Hi all,

I was wondering if, using the sympy.tensor module, I can contract two 
epsilon tensors to get kronecker deltas? 

In particular, if I have something like

from sympy.tensor.tensor import TensorIndexType, tensor_indices
Spin = TensorIndexType('Spin', dummy_fmt='S', dim=3)
i, j, k, l, m = tensor_indices('i, j, k, l, m', Spin)

delta = Spin.delta
eps = Spin.epsilon

q = eps(i,j,k)*eps(-i,l,m)

print(q)

then I get 
>>> Eps(S_0, j, k)*Eps(-S_0, l, m)

In 3 dimensions, I would want to contract the $ \epsilon^{ijk} 
\epsilon^{ilm} $ to give me
 $\delta^{jl}\delta^{km} - \delta^{jm}\delta^{lk}$$.  So, I would like to 
have something like `q.epsilon_to_delta` to get
q.epsilon_to_delta()
print(q)
>>> KD(j,l)*KD(k,m) - KD(j,m)*KD(l,k)

Is this possible?  

Thanks!

-- 
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 https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/b194f86f-973a-4faa-ad82-f31a5783e745%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to