How to permute indices of tensors?

90 views
Skip to first unread message

M

unread,
Jun 25, 2022, 4:14:30 AM6/25/22
to xAct Tensor Computer Algebra
Hi, I have been trying to permute the indices of tensors. I have been trying to use the command  PermuteIndices unsuccessfully. 

Here, I attach a notebook explaining my problem 


I would very much appreciate your help. 

Maria




permutations_help.nb

TB

unread,
Jun 25, 2022, 4:45:13 AM6/25/22
to xAct Tensor Computer Algebra
Hi!

It is unclear to me what you actually want to do here.

First of all PermuteIndices will only produce one index permutation. You need to give a list of indices to permute and description of the permutation. For instance the following swaps the first two indices in your list, i.e. alpha and beta:
PermuteIndices[T[\[Alpha],\[Beta],\[Kappa]] T[\[Lambda],-\[Beta],-\[Kappa]] CD[-\[Lambda]][CD[-\[Alpha]][\[Phi][]]],IndexList[\[Alpha],\[Beta],\[Kappa],\[Lambda]],Cycles[{1,2}]]

If you want to symmetrize over a list of indices, you can for instance do
Symmetrize[T[\[Alpha], \[Beta], \[Kappa]],  IndexList[\[Alpha], \[Beta], \[Kappa]]]
This will produce 1/6 of the sum you listed.
If you apply ToCanonical to this you get zero due to the antisymmetry of the last two indices. This is not what you suggested.

However, if you apply ToCanonical to
Symmetrize[T[\[Alpha], \[Beta], \[Kappa]] T[\[Lambda], -\[Beta], -\[Kappa]], IndexList[\[Lambda], \[Alpha]]] CD[-\[Lambda]][CD[-\[Alpha]][\[Phi][]]]
you will get
T[\[Alpha], \[Beta], \[Kappa]] T[\[Lambda], -\[Beta], -\[Kappa]]  CD[-\[Lambda]][CD[-\[Alpha]][\[Phi][]]]

Perhaps if you can put it into context what you want to do and why we can help you find a way to do it. When you do calculations in xAct it is sometimes better to do things in different ways compared to hand calculations.

Regards
Thomas

TB

unread,
Jun 26, 2022, 7:32:16 AM6/26/22
to xAct Tensor Computer Algebra
Hi!

There is a function called AllContractions in the xTras package. I think it can do what you want.

Load all the packages with
<< xAct`xTras`
<< xAct`TexAct`
The other packages will be automatically loaded, so you don't need load them manually.

The function AllContractions takes an expression without dummy indices and produces a list of possible contractions taking the symmetries into account.
So in your case you can try
AllContractions[T[-\[Alpha], -\[Beta], -\[Delta]] T[-\[Epsilon], -\[Zeta], -\[Eta]] CD[-\[Theta]][CD[-\[Iota]][\[Phi][]]]]

Regards
Thomas

lördag 25 juni 2022 kl. 10:14:30 UTC+2 skrev M:
Reply all
Reply to author
Forward
0 new messages