How do I implement the Levi-Civita and Kroenecker tensors in sympy? I am 
doing

from sympy.tensor.tensor import TensorIndexType, tensor_indices
from sympy.tensor.tensor import tensorhead, TensorManager
from sympy.tensor.tensor import get_symmetric_group_sgs
from sympy import LeviCivita

Lorentz = TensorIndexType('Lorentz',
                          dim=3,
                          eps_dim=3,
                          metric=False,
                          dummy_fmt='L')



Lorentz.data = [1,1,1]


Lorentz.epsilon.data = [[[LeviCivita(i,j,k) for k in range(3)] 
                         for j in range(3)] 
                        for i in range(3)]

i,j,k,l,m, n = tensor_indices('i,j,k,l,m,n', Lorentz)

eps = Lorentz.epsilon
delta = Lorentz.delta

Is this correct?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/1b94f705-e1ea-4b4b-9fa1-1a0a3422901d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to