Matchete`
Matchete`
ContractCGs
ContractCGs[expr]
evaluates all contractions of CGs occurring in the expression.
Details and Options
- ContractCGs will expand the expression before doing contractions in each term separately.
- ContractCGs finds each disjoint contraction of CGs in a terms, replaces the CGs with the numerical tensors and performs a tensor contraction to evaluate the Einstein summation of the indices. The resulting tensor is (attempted) projected onto a basis of previously defined CGs. If this is not possible (i.e. if the previously defined CGs do not form a basis), a new CG is initialized instead. Please refer to CG Coefficients for examples.
Examples
open allclose allBasic Examples (2)
Scope (4)
ContractCGs expands the expression it is applied to and applies to each term separately:
It will correctly identify situations where the result is a tensor product of CGs, such as for the ordinary Fierz identities:
When the resulting CG is not in the basis of defined CGs, a new CG is initialized:
More details of what to do in such situations is found in CG Coefficients.
ContractCGs threads over List, treating each entry as an individual expression:
Tech Notes
▪