# Proof template

This is a template for a generic proof of one ore more of the equations in the paper. Insert some description here about what we're trying to prove. We should try to use `sympy` as much as possible to actually prove things formally, but settle for a numerical verification if that's too difficult.

We begin with some generic imports:


```python
import numpy as np
import matplotlib.pyplot as pl
%matplotlib notebook
from IPython.display import display, Math
import sympy
from sympy import *
from sympy.functions.special.tensor_functions import KroneckerDelta

# Initialize the session
init_session(quiet=True)

# Let's report what version of sympy this is
print("Using sympy version", sympy.__version__)
```

    IPython console for SymPy 0.7.6.1 (Python 3.5.2-64-bit) (ground types: python)
    Using sympy version 0.7.6.1


As an example, let's prove some generic matrix identities.


```python
# Declare a few generic matrices
n, m = symbols('n m')
A = MatrixSymbol('A', n, n) # Square
B = MatrixSymbol('B', n, m) # Non-square
C = MatrixSymbol('C', m, m) # Square
```

Show that matrix multiplication is associative:


```python
(A * B) * C == A * (B * C)
```




    True



Show that the inverse of the inverse of a matrix is the matrix itself:


```python
(A.I).I
```

Show that a matrix times the identity is itself:


```python
A * Identity(n)
```

Show that matrix multiplication is not commutative


```python
try:
    A * B == B * A
except ShapeError:
    print("Matrix multiplication is not commutative!")
```

    Matrix multiplication is not commutative!


That's it for now!

97d20c9b6eab233e52810e6ec30cdc8713f31132
ipynb
Jupyter Notebook
proofs/template.ipynb
langfzac/Limbdark.jl
a6a30c52e14686a9a01d7b4437f4f171c9c53a24
MIT
2019-05-08T09:03:56.000Z
2021-02-14T20:53:23.000Z
proofs/template.ipynb
langfzac/Limbdark.jl
a6a30c52e14686a9a01d7b4437f4f171c9c53a24
MIT
2018-04-23T20:41:25.000Z
2019-05-02T01:50:19.000Z
proofs/template.ipynb
langfzac/Limbdark.jl
a6a30c52e14686a9a01d7b4437f4f171c9c53a24
MIT
2019-05-15T08:06:04.000Z
2020-02-24T19:11:47.000Z
Qwen/Qwen-72B
1. YES
2. YES