# symmetrise slots function

+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?

retagged

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 (10.9k points)
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.