Please also take care of this bug: https://github.com/sympy/sympy/blob/master/sympy/physics/hep/gamma_matrices.py#L8
DiracSpinorIndex is the index for the Dirac matrices, its dimension is fixed to 4, it is a TensorIndexType, i.e. the class used to generate the actual indices to be placed into tensor expressions. The Lorentz index instead is contained inside a container class, which stores many Lorentz index type objects, based on their dimension. The problem is that the gamma matrix dimension should be given by the spinor index dimension, not by the Lorentz index dimension, which should always be 4. Originally gamma matrices were meant to be tensors with a single index, so the trick was to put their dimension into the Lorentz index. Afterwards I decided to switch to a (Lorentz, Spinor, Spinor) type tensor, in order to avoid dealing with the complications of having a tensor of matrices. Unfortunately the dimensional marked remained on the Lorentz index. Possible solutions: 1. get rid of the _LorentzContainer class and replace it with a global LorentzIndex object. 2. devise a better way to store the GammaMatrix dimension information. Unfortunately this is not a very easy task. -- 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/2355c999-683b-43fe-90d2-7afd20e2e8ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
