a field theory motivated approach to computer algebra

# Diagonal

Declares a tensor to only have non-zero diagonal entries.
Indicates that the object to which the property is attached only has non-zero components on the diagonal, i.e. when all indices take the same value.
\delta_{m n}::Diagonal; ex:= \delta_{1 2} \delta_{1 2} - \delta_{1 1} \delta_{2 2};
$$\displaystyle{}\text{Attached property Diagonal to }{\delta}_(mn).$$
$$\displaystyle{}\delta_{1 2} \delta_{1 2}-\delta_{1 1} \delta_{2 2}$$
canonicalise(_);
$$\displaystyle{}-\delta_{1 1} \delta_{2 2}$$