Cadabra
a field-theory motivated approach to computer algebra

slot_asym

Anti-symmetrise or symmetrise an expression in indicated index slots
Anti-symmetrise or symmetrise (depending on the antisymmetric flag) a product or tensor in the indicated indices, where the indices are given as slot positions. This complements the asym algorithm, which instead takes the index names over which to (anti-)symmetrise.
ex:=A_{m n} B_{p q};
\(\displaystyle{}A_{m n} B_{p q}\)
A_{m n} B_{p q}
slot_asym(_, [1,2]);
\(\displaystyle{}\frac{1}{2}A_{m n} B_{p q} - \frac{1}{2}A_{m p} B_{n q}\)
1/2 A_{m n} B_{p q} - 1/2 A_{m p} B_{n q}
If you want to symmetrise in the indicated objects instead, use the antisymmetric=False flag:
ex:=A_{m n} B_{p q}; slot_asym(_, [1,2], antisymmetric=False);
\(\displaystyle{}A_{m n} B_{p q}\)
A_{m n} B_{p q}
\(\displaystyle{}\frac{1}{2}A_{m n} B_{p q}+\frac{1}{2}A_{m p} B_{n q}\)
1/2 A_{m n} B_{p q} + 1/2 A_{m p} B_{n q}
Copyright © 2001-2024 Kasper Peeters
Questions? info@cadabra.science