On Sun, Aug 7, 2011 at 2:18 AM, cschwan <[email protected]> wrote:
> On Aug 5, 7:51 pm, Ondřej Čertík <[email protected]> wrote:
>> That's right. There are basically 2 approaches:
>>
>> 1) use some particular representation, and simply multiply all the
>> matrices and then take a trace
>> 2) do things symbolically using the relations between the matrices
>>
>> I decided to try 1), as it seemed to me, that it should work fine. But
>> the resulting matrix is quite a mess, so one would need to figure out
>> whether there is some good way to simplify the result.
>
> Thats the problem I saw - no manifest Lorentz covariance.
>
>>
>> As to 2), I think there the difficulty is in the fact, that one needs
>> to know which rules to apply and how. If you go this route, I would be
>> very interested if you manage to get it working.
>
> I already have some ideas about that, but currently I wonder how one
> does implement non-commutative symbols with indices. Are there any
> plans to support indices with covariance?

The IndexedBase class and friends basically symbols with index, and
are non-commutative by default:

In [22]: mu = Idx('mu')

In [23]: IndexedBase?

In [26]: A = IndexedBase('A')

In [27]: B = IndexedBase('B')

In [28]: A[mu]*B[mu]
A[mu]*B[mu]

In [29]: B[mu]*A[mu]
B[mu]*A[mu]

In [30]: A[mu]*B[mu] - B[mu]*A[mu]
A[mu]*B[mu] - B[mu]*A[mu]

(btw, imho, they shouldn't be non-commutative by default, but they are)

Aaron Meurer

>
> On Aug 5, 8:49 pm, Brian Granger <[email protected]> wrote:
>> The best starting place is to look at how we handle spin in
>> sympy.physics.quantum.spin.  I should note that we don't have a
>> symbolic trace operation, but that could be implemented quite easily.
>
> Thank you for the pointer, I will have a look into it.
>
> Christopher
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sympy" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/sympy?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to