Contractions on tensors #
i. Overview #
This file defines tensor contraction for an arbitrary TensorSpecies.
The colors of a tensor record the type of each index. A pair of positions can be
contracted when their colors are dual, expressed by a proof
S.τ (c i) = c j, where S.τ is the color involution in the tensor species.
For a tensor with colors c : Fin (n + 1 + 1) → C, contraction at positions
i and j produces a tensor with two fewer indices and colors
c ∘ Fin.succSuccAbove i j.
The construction is first made on pure tensors in
Physlib.Relativity.Tensors.Contraction.Pure. There, Pure.dropPair removes the
two contracted factors from the remaining pure tensor, Pure.contrPCoeff
computes the scalar contraction of the two removed factors using S.contr, and
Pure.contrP multiplies that scalar by the dropped tensor. This file extends the
operation linearly to arbitrary tensors via contrT.
ii. Key results #
TensorSpecies.Tensor.contrTis the linear contraction map on tensors.TensorSpecies.Tensor.contrT_pureidentifiescontrTon pure tensors withPure.contrP.TensorSpecies.Tensor.contrT_equivariantsays contraction commutes with the symmetry-group action.TensorSpecies.Tensor.contrT_permT,TensorSpecies.Tensor.contrT_symm, andTensorSpecies.Tensor.contrT_commdescribe the interaction of contraction with reindexing, swapping the contracted pair, and performing two contractions.
iii. Related files #
Physlib.Relativity.Tensors.Contraction.SuccSuccAbovecontains the finite-index maps used to drop two positions.Physlib.Relativity.Tensors.Contraction.PuredefinesPure.dropPair,Pure.contrPCoeff,Pure.contrP, and the multilinear map used to definecontrT.Physlib.Relativity.Tensors.Contraction.Productsproves compatibility between contractions and tensor products.
iv. Table of contents #
- A. Tensor contraction
v. References #
There are no known references for the material in this module.
A. Tensor contraction #
For c : Fin (n + 1 + 1) → C, i j : Fin (n + 1 + 1) with dual color, and a tensor
t : Tensor S c, contrT i j _ t is the tensor
formed by contracting the ith index of t
with the jth index.
Equations
- TensorSpecies.Tensor.contrT n i j hij = PiTensorProduct.lift (TensorSpecies.Tensor.Pure.contrPMultilinear i j hij)