Physlib.Relativity.Tensors.Contraction.CrossToEnd
Cross contraction at named slots
i. Overview
`contrT` contracts two slots of a single tensor. Contracting a slot of one tensor against a slot of another (`T^{μν} u_ν`, `g_{μν} v^ν`) is `prodT` then `contrT`, which leaves every call site to locate the two post-product slots and discharge the distinctness and `τ`-duality goals.
`crossToEnd i j hc` performs that contraction at named slots `i` and `j`, with `hc : S.τ (cA i) = cB j` recording their `τ`-duality. The output color is `Fin.append (cA ∘ i.succAbove) (cB ∘ j.succAbove)`: every slot of `cA` except `i`, in order, then every slot of `cB` except `j`. These are the survivors. Any slot is reachable: `crossToEnd 2 0 _ R u` reads as `R_{μνρσ} u^ρ`. The survivors are appended rather than interleaved, and appending is associative, so both bracketings of a chain produce the same survivor list in the same order.
The complementary convention keeps the replacement index in place. Contracting slot `1` of `![c₀, c₁, c₂, c₃]` against a rank-two `![S.τ c₁, d]` gives `![c₀, c₂, c₃, d]` here and `![c₀, d, c₂, c₃]` there; that operation is `crossToSlot`, built on this substrate in `Physlib.Relativity.Tensors.Contraction.CrossToSlot`.
ii. Key results
- `TensorSpecies.Tensor.crossToEnd` : the slot-addressed cross contraction. - `TensorSpecies.Tensor.crossToEnd_two` : at rank two on each factor, a plain `contrT` of the product on slots `1, 2`. - `TensorSpecies.Tensor.crossToEnd_equivariant` : the contraction commutes with the `G`-action. - `TensorSpecies.Tensor.crossToEnd_assoc_rankTwo` : rebracket the chain `A —(iA·0)— B —(last·0)— C` at rank-two `B` and `C`, up to `permT id`. Not full associativity. - `TensorSpecies.Tensor.crossToEnd_permT_left` / `crossToEnd_permT_right` : move a relabelling of the left or right factor through the contraction, the contracted slot moving with it.
iii. Table of contents
- A. Slot-addressed cross contraction
- B. Equivariance
- C. Rebracketing the metric chain
- D. Permutation commutators
iv. References
A. Slot-addressed cross contraction
B. Equivariance
`crossToEnd i j hc` is the curried bilinear map `LinearMap.compr₂ prodT` post-composed with the linear `permT`/`contrT` factors, so additivity, scalar multiplication, and finite sums in either argument are already the generic `map_add`/`map_smul`/`map_sum` and need no lemmas of their own.
C. Rebracketing the metric chain
Both bracketings reduce to one product contracted at its two seams in opposite order, then drop to the pure-tensor level, so the seam permutation never crosses a contraction under `whnf`; `Pure.permP_dropPair_dropPair_congr` closes the step.
D. Permutation commutators
Moving a relabelling of one factor through the slot-addressed contraction. The relabelling `σ` need not fix the contracted slot, so it carries the contraction from slot `i` to slot `σ i` and restricts to the survivors as a map `σ'` filling the square `(σ i).succAbove ∘ σ' = σ ∘ i.succAbove`. Taking `σ'` as an argument rather than deriving it lets a caller supply the survivor map it wants (`id`, a swap-induced map) instead of an opaque composite.
6 declarations
Slot-addressed cross contraction of slot and slot
Let be a tensor species over a ring . Given two color sequences and , let and be indices such that the color at is dual to the color at (i.e., ). The cross contraction `crossToEnd` is the -bilinear map: which takes tensors and and returns the contraction of the -th slot of with the -th slot of . The resulting color sequence is the concatenation of (omitting index ) and (omitting index ), specifically , where is the order-preserving map that skips index .
`crossToEnd` of Rank-2 Tensors Equals `contrT` of Product on Slots 1 and 2
Let be a tensor species over a ring . Let be color sequences for rank-2 tensors. If the last slot of is dual to the first slot of , such that , then for any tensors and , the cross contraction of the second slot of with the first slot of is equivalent to the contraction of their tensor product at the middle indices 1 and 2, up to a color-recasting reindexing: where denotes the contraction of the slots at indices 1 and 2 of the rank-4 product tensor, and is the reindexing map associated with the identity permutation used to match the resulting color sequences.
-Equivariance of Slot-Addressed Cross Contraction:
Let be a tensor species over a ring and be a group acting on the tensors. Given two tensors and , and indices and such that the color of the -th slot of is dual to the color of the -th slot of (i.e., ), the slot-addressed cross contraction is equivariant under the action of . That is, for any group element : This property follows from the fact that the underlying operations of tensor product (`prodT`), single-tensor contraction (`contrT`), and permutation (`permT`) are all -equivariant.
Associativity of tensor contraction for rank-two chains
Let be a tensor species over a ring . Let be a tensor of rank with color sequence , and let and be tensors of rank 2 with color sequences and . Given a slot in , suppose that the -th slot of is dual to the -th slot of (i.e., ), and the -st slot of is dual to the -th slot of (i.e., ). Then the result of first contracting and at slots and , and then contracting the result with at the slot corresponding to 's survivor and 's -th slot, is equal to the result of first contracting and at slots and , and then contracting with that result at slot and the slot corresponding to 's survivor. This equality holds up to a color reindexing . Symbolically, if denotes the `crossToEnd` contraction at slots and , then: where refers to the index in the intermediate product where the survivor slot of the rank-two tensor resides.
Reindexing Commutes with Left Side of Cross Contraction
Let be a tensor species over a ring . Consider two tensors and of rank and with color sequences and , respectively. Let be a reindexing (a color-preserving bijection) of the indices of , and let and be indices such that the -th slot of the reindexed tensor is dual to the -th slot of (i.e., ). If is a reindexing of the surviving indices of that satisfies the consistency condition , then contracting the -th slot of the permuted tensor with the -th slot of is equivalent to first contracting the -th slot of the original tensor with the -th slot of , and then reindexing the resulting survivors. Specifically: where is the reindexing on the surviving indices that applies to the slots originating from and the identity map to the slots originating from .
Commutativity of cross contraction with right-factor reindexing
Let be a tensor species. Let be a tensor of rank with index colors , and let be a tensor of rank with index colors . Let be a reindexing (permutation) of the indices of such that the permuted tensor has colors . Suppose we contract the -th slot of with the -th slot of the permuted tensor . This theorem states that this is equivalent to contracting the -th slot of with the -th slot of the original tensor , and then reindexing the resulting survivors. The reindexing of the final tensor is defined by the identity map on the indices originating from and the map on the indices originating from , where is the permutation of the surviving slots of that satisfies .
