Multiplying tensors with same dummies

17 views
Skip to first unread message

Lucas Fernandez Sarmiento

unread,
Jun 27, 2024, 12:09:02 PMJun 27
to xAct Tensor Computer Algebra
Hi all, 
My issue is that I'm trying to multiply two tensors I have defined from other tensors. These will contain  products of other tensors with dummy indices. Say said tensor is S[a,b]=s[a,c]s[-c,b] (Not the actual tensor I'm working with but serves to make my point)
When I take products such as S[a,k]S[-k,b] xTensor will come up with an error such as "found indices with the same name c" as both of them will have dummies "c". Is there a way to fix this without having to use ReplaceDummies for every tensor in the product? Thank you! 
Lucas

Jose

unread,
Jun 30, 2024, 7:59:07 PMJun 30
to xAct Tensor Computer Algebra
Hi,

The functions IndexSet and IndexSetDelayed help with this. For example with

   << xAct`xTensor`

   $PrePrint = ScreenDollarIndices;

   DefManifold[M, 4, {a, b, c, d, e, f}]

   DefTensor[s[a, -b], M]

Now define S as

   IndexSet[ S[a_Symbol, -b_Symbol], s[a, -c] s[c, -b] ]

Then you can do something like this without the index c being repeated:

   In[6]:= S[a, -b] S[b, -c]
   Out[6]= s[a, -d] s[b, -e] s[d, -b] s[e, -c]

Cheers,
Jose.

Reply all
Reply to author
Forward
0 new messages