a field-theory motivated approach to computer algebra

## asym

Anti-symmetrise or symmetrise an expression in indicated indices or arguments
Anti-symmetrise or symmetrise (depending on the antisymmetric flag) a product or tensor in the indicated objects. This works both with normal objects and with indices. An example of the former:
ex:=A B C;
$$\displaystyle{}A B C$$
asym(_, $A,B,C$);
$$\displaystyle{}\frac{1}{6}A B C - \frac{1}{6}A C B - \frac{1}{6}B A C+\frac{1}{6}B C A+\frac{1}{6}C A B - \frac{1}{6}C B A$$
When used with indices, remember to also indicate whether you want to symmetrise upper or lower indices, as in the example below.
ex:=A_{m n} B_{p};
$$\displaystyle{}A_{m n} B_{p}$$
asym(_, $_{m}, _{n}, _{p}$);
$$\displaystyle{}\frac{1}{6}A_{m n} B_{p} - \frac{1}{6}A_{m p} B_{n} - \frac{1}{6}A_{n m} B_{p}+\frac{1}{6}A_{n p} B_{m}+\frac{1}{6}A_{p m} B_{n} - \frac{1}{6}A_{p n} B_{m}$$
If you want to symmetrise in the indicated objects instead, use the antisymmetric=False flag:
ex:=A_{m n} B_{p}; asym(_, $_{m}, _{n}, _{p}$, antisymmetric=False);
$$\displaystyle{}A_{m n} B_{p}$$
$$\displaystyle{}\frac{1}{6}A_{m n} B_{p}+\frac{1}{6}A_{m p} B_{n}+\frac{1}{6}A_{n m} B_{p}+\frac{1}{6}A_{n p} B_{m}+\frac{1}{6}A_{p m} B_{n}+\frac{1}{6}A_{p n} B_{m}$$