Physlib.Relativity.Tensors.Contraction.UnitTensorContraction
Contraction against the unit tensor
i. Overview
The unit tensor is the identity for slot contraction: contracting any slot of `t` against `unitTensor` for that slot's color returns `t`, the slot relabelled to the survivor tail. That is what collapses "raise then lower" to the identity, a metric contracted against its dual becoming the unit tensor and then contracting away.
`crossToEnd_unitTensor` is proved by decomposing `t` along its last slot (`eq_sum_evalT`) and transporting to an arbitrary slot with the transposition `swap i (last)`. On it the round trip against a matched pair is assembled in both conventions, and a pair collapsing in *both* orders makes the two contractions mutually inverse, which `crossToSlotEquiv` bundles as a linear equivalence between the two color assignments.
Since `unitTensor` is `RCLike`-valued, this material sits over an `[RCLike k]` variable block, apart from the `CommRing` `crossToEnd`/`crossToSlot` algebra.
ii. Key results
- `TensorSpecies.Tensor.crossToEnd_unitTensor` : the unit tensor is an identity for `crossToEnd` at any named slot. - `TensorSpecies.Tensor.crossToEnd_round_trip_of_unit_slot` : two contractions against a pair that collapses to the unit tensor return the original tensor, in result-to-end form. - `TensorSpecies.Tensor.crossToSlot_raise_lower_round_trip` : the round trip in result-to-slot form, every color propositional. - `TensorSpecies.Tensor.crossToSlotEquiv` : raising and lowering a named index against a pair that collapses in both orders, as a linear equivalence.
iii. Table of contents
- A. The unit tensor as a slot-contraction identity
- B. Round trips against a matched pair
- C. Raising and lowering as an equivalence
iv. References
A. The unit tensor as a slot-contraction identity
Contracting a named slot against `unitTensor` returns the tensor unchanged, the slot carried to the survivor tail by `move_last`.
B. Round trips against a matched pair
When two rank-2 tensors collapse to the unit tensor after their shared index is contracted, contracting a slot first against one and then against the other returns the original tensor.
C. Raising and lowering as an equivalence
Both collapse orders are hypotheses here and each is used once: `M · M' = δ` gives one round trip by section B, `M' · M = δ` the other through injectivity of the lowering half.
7 declarations
The unit tensor is an identity for `crossToEnd` up to a `move_last` permutation
Let be a tensor species over a ring . Let be a tensor in of rank , and let be an index in such that the color of the -th slot is (i.e., ). Let be the unit tensor associated with color , which has the color sequence , where denotes the duality map. The contraction of the -th slot of against the first slot (index ) of is equivalent to a permutation of that moves the -th index to the last position. Specifically, where is the proof that matches the color of the first slot of the unit tensor, and is the permutation that maps the first indices to the surviving indices of (skipping ) and maps the last index to .
is a reindexing from to
Let be a tensor species and be index colors. If (the dual color of is ), then the identity map is a reindexing from the color sequence to the sequence formed by taking the first color of and the second color of .
for the cross-contraction to end positions
Let be a tensor species and be a sequence of colors. Let be a tensor of rank . Let be a rank-2 tensor of colors and be a rank-2 tensor of colors , where and . Suppose that contracting the second slot of with the first slot of results in the unit tensor of color : (where the identity reindexing is understood). Then, performing a "round trip" contraction—first contracting the -th slot of with the first slot of , and then contracting the resulting last slot (corresponding to the index ) with the first slot of —is equivalent to applying a permutation to the original tensor . Specifically: where the permutation is defined by , which effectively moves the -th slot of to the final position.
Let be a tensor species and be a tensor with color sequence . Let be a specific slot index and let be the color at that slot. Consider two rank-2 tensors with colors and with colors , where (the dual color of ) and (the dual color of ). Suppose that contracting the second slot of with the first slot of results in the unit tensor of color : (where is the unit tensor associated with color ). Then, performing a "round trip" contraction on the -th slot of —first contracting it with (which replaces the color with ) and then contracting the resulting -th slot with (which replaces back with )—recovers the original tensor : The equality holds up to an identity reindexing of the color sequence.
is the Left Inverse of
Let be a tensor species over a ring and be a tensor with color sequence . Let be a specific slot index such that the color at that slot is . Consider two rank-2 tensors and with color sequences and respectively, where is the dual color of () and is the dual color of (). Assuming and form a matched pair that contracts to the unit tensor, then first "raising" the index at slot by contracting it with (using `crossToSlot`) and then "lowering" it back using (using `crossToSlotInv`) returns the original tensor :
Let be a tensor species over a ring . Let be a color sequence, be a slot index, and be the color at that slot. Let be a color, and let be colors such that and , where is the duality map. Let be a rank-2 tensor with colors and be a rank-2 tensor with colors . For any tensor with the color sequence updated at index to color (denoted as ), applying the inverse result-to-slot contraction `crossToSlotInv` with followed by the result-to-slot contraction `crossToSlot` with at index returns the original tensor : This identity demonstrates that "raising" an index (contracting with ) is the left inverse of "lowering" (the inverse operation with ) under the assumption that and are a matched pair of dual tensors.
Linear equivalence of raising and lowering at index
Let be a tensor species over a ring . Given a color sequence , an index , and a target color , the map `crossToSlotEquiv` is a -linear equivalence between the tensor spaces: where denotes the color sequence with the -th entry updated to . This equivalence is constructed using a pair of rank-2 tensors and (such as a metric and its inverse) that are mutually inverse, meaning their contractions in both orders result in the unit tensor. The forward map is defined by the result-to-slot contraction `crossToSlot` at index with , and the inverse map is `crossToSlotInv` at index with . This formalizes the physical operation of raising or lowering the -th index of a tensor.
