Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

Hi! I tryed to use symmetrise_slots function from cdb.utils.indices package, and I thought that it would symmetrise only free indices, but then I use it with expressions like

ind.symmetrise_slots($R_{a b} R_{c d} h_{s w} h^{a c} h^{b d}$, [0,1]);

I obtain

R_{a b} R_{c d} h_{s w} h^{a c} h^{b d} + R_{b a} R_{c d} h_{s w} h^{a c} h^{b d}

How can it be used to symmetrise only free indiced?

in General questions by (1.7k points)
retagged by

2 Answers

0 votes

Hi Arina.

In your example, you asked to symmetrise the indices 0 and 1, using the [0,1] notation.

The indices in a expression are counted by appearence, i.e. that in your expression the 0 and 1 corresponds to the a and b respectively

R_{a b} R_{c d} h_{s w} h^{a c} h^{b d}
   ^ ^
   | |
   0 1

If you'd like to symmetrise the s and w, then you shold ask to symmetrise the 4 and 5 indices.

by (15.0k points)
+2 votes

As an alternative to doxdrum's answer, if you know the names of the indices, you can use sym, e.g.

ex:= R_{a b} R_{c d} h_{s w} h^{a c} h^{b d};
sym(ex, $_{s}, _{w}$);

There is also asym for anti-symmetrisation.

by (82.6k points)

Excellent tip!!! Thanks Kasper.

Thank you! That's exactly what I needed.

...