Physlib

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

theorem

The unit tensor is an identity for `crossToEnd` up to a `move_last` permutation

Let SS be a tensor species over a ring kk. Let t1t_1 be a tensor in TensorS(cA)\text{Tensor}_S(c_A) of rank nA+1n_A + 1, and let ii be an index in {0,,nA}\{0, \dots, n_A\} such that the color of the ii-th slot is cc (i.e., cA(i)=cc_A(i) = c). Let unitTensor(c)\text{unitTensor}(c) be the unit tensor associated with color cc, which has the color sequence (τ(c),c)(\tau(c), c), where τ\tau denotes the duality map. The contraction of the ii-th slot of t1t_1 against the first slot (index 00) of unitTensor(c)\text{unitTensor}(c) is equivalent to a permutation of t1t_1 that moves the ii-th index to the last position. Specifically, crossToEnd(i,0,hdual,t1,unitTensor(c))=permT(σ,hreindex,t1)\text{crossToEnd}(i, 0, h_{\text{dual}}, t_1, \text{unitTensor}(c)) = \text{permT}(\sigma, h_{\text{reindex}}, t_1) where hdualh_{\text{dual}} is the proof that S.τ(cA(i))S.\tau(c_A(i)) matches the color of the first slot of the unit tensor, and σ\sigma is the permutation that maps the first nAn_A indices to the surviving indices of t1t_1 (skipping ii) and maps the last index to ii.

theorem

a=S.τe    ida = S.\tau e \implies \text{id} is a reindexing from (S.τe,e)(S.\tau e, e) to (a,e)(a, e)

Let SS be a tensor species and a,b,d,ea, b, d, e be index colors. If a=S.τea = S.\tau e (the dual color of ee is aa), then the identity map id:{0,1}{0,1}\text{id}: \{0, 1\} \to \{0, 1\} is a reindexing from the color sequence (S.τe,e)(S.\tau e, e) to the sequence (a,e)(a, e) formed by taking the first color of (a,d)(a, d) and the second color of (b,e)(b, e).

theorem

(M1M2=δ)    (tM1)M2=permT(t)(M_1 \cdot M_2 = \delta) \implies (t \cdot M_1) \cdot M_2 = \text{permT}(t) for the cross-contraction to end positions

Let SS be a tensor species and c:{0,,n}Cc: \{0, \dots, n\} \to C be a sequence of colors. Let tTensorS(c)t \in \text{Tensor}_S(c) be a tensor of rank n+1n+1. Let M1M_1 be a rank-2 tensor of colors (τ(ci),d)(\tau(c_i), d) and M2M_2 be a rank-2 tensor of colors (τ(d),ci)(\tau(d), c_i), where i{0,,n}i \in \{0, \dots, n\} and dCd \in C. Suppose that contracting the second slot of M1M_1 with the first slot of M2M_2 results in the unit tensor of color cic_i: crossToEnd(1,0,rfl,M1,M2)=unitTensor(ci)\text{crossToEnd}(1, 0, \text{rfl}, M_1, M_2) = \text{unitTensor}(c_i) (where the identity reindexing is understood). Then, performing a "round trip" contraction—first contracting the ii-th slot of tt with the first slot of M1M_1, and then contracting the resulting last slot (corresponding to the index dd) with the first slot of M2M_2—is equivalent to applying a permutation to the original tensor tt. Specifically: crossToEnd(last,0,h,(crossToEnd(i,0,rfl,t,M1)),M2)=permT(σ,h,t)\text{crossToEnd}(\text{last}, 0, \text{h}, (\text{crossToEnd}(i, 0, \text{rfl}, t, M_1)), M_2) = \text{permT}(\sigma, h', t) where the permutation σ:{0,,n}{0,,n}\sigma: \{0, \dots, n\} \to \{0, \dots, n\} is defined by append(i.succAbove,last)\text{append}(i.\text{succAbove}, \text{last}), which effectively moves the ii-th slot of tt to the final position.

theorem

(MM=δ)    crossToSloti(M,crossToSloti(M,t))=t(M \cdot M' = \delta) \implies \text{crossToSlot}_i(M', \text{crossToSlot}_i(M, t)) = t

Let SS be a tensor species and tt be a tensor with color sequence c=(c0,,cn)c = (c_0, \dots, c_n). Let ii be a specific slot index and let e=cie = c_i be the color at that slot. Consider two rank-2 tensors MM with colors (a,d)(a, d) and MM' with colors (b,e)(b, e), where a=τ(e)a = \tau(e) (the dual color of ee) and b=τ(d)b = \tau(d) (the dual color of dd). Suppose that contracting the second slot of MM with the first slot of MM' results in the unit tensor of color ee: crossToEnd(1,0,M,M)=δe\text{crossToEnd}(1, 0, M, M') = \delta_e (where δe\delta_e is the unit tensor associated with color ee). Then, performing a "round trip" contraction on the ii-th slot of tt—first contracting it with MM (which replaces the color cic_i with dd) and then contracting the resulting ii-th slot with MM' (which replaces dd back with ee)—recovers the original tensor tt: crossToSloti(M,crossToSloti(M,t))=t\text{crossToSlot}_i(M', \text{crossToSlot}_i(M, t)) = t The equality holds up to an identity reindexing of the color sequence.

theorem

crossToSlotInv\text{crossToSlotInv} is the Left Inverse of crossToSlot\text{crossToSlot}

Let SS be a tensor species over a ring kk and tt be a tensor with color sequence cc. Let ii be a specific slot index such that the color at that slot is ci=ec_i = e. Consider two rank-2 tensors MM and MM' with color sequences (a,d)(a, d) and (b,e)(b, e) respectively, where aa is the dual color of cic_i (a=τ(e)a = \tau(e)) and bb is the dual color of dd (b=τ(d)b = \tau(d)). Assuming MM and MM' form a matched pair that contracts to the unit tensor, then first "raising" the index at slot ii by contracting it with MM (using `crossToSlot`) and then "lowering" it back using MM' (using `crossToSlotInv`) returns the original tensor tt: crossToSlotInvi(M,crossToSloti(M,t))=t\text{crossToSlotInv}_i(M', \text{crossToSlot}_i(M, t)) = t

theorem

crossToSloti(M,crossToSlotInvi(M,t))=t\text{crossToSlot}_i(M, \text{crossToSlotInv}_i(M', t)) = t

Let SS be a tensor species over a ring kk. Let c:{0,,n}Cc: \{0, \dots, n\} \to C be a color sequence, i{0,,n}i \in \{0, \dots, n\} be a slot index, and e=c(i)e = c(i) be the color at that slot. Let dCd \in C be a color, and let a,bCa, b \in C be colors such that a=τ(e)a = \tau(e) and b=τ(d)b = \tau(d), where τ\tau is the duality map. Let MM be a rank-2 tensor with colors (a,d)(a, d) and MM' be a rank-2 tensor with colors (b,e)(b, e). For any tensor tt with the color sequence cc updated at index ii to color dd (denoted as c[id]c[i \mapsto d]), applying the inverse result-to-slot contraction `crossToSlotInv` with MM' followed by the result-to-slot contraction `crossToSlot` with MM at index ii returns the original tensor tt: crossToSloti(M,crossToSlotInvi(M,t))=t\text{crossToSlot}_i(M, \text{crossToSlotInv}_i(M', t)) = t This identity demonstrates that "raising" an index (contracting with MM) is the left inverse of "lowering" (the inverse operation with MM') under the assumption that MM and MM' are a matched pair of dual tensors.

definition

Linear equivalence of raising and lowering at index ii

Let SS be a tensor species over a ring kk. Given a color sequence c:{0,,n}Cc: \{0, \dots, n\} \to C, an index i{0,,n}i \in \{0, \dots, n\}, and a target color dCd \in C, the map `crossToSlotEquiv` is a kk-linear equivalence between the tensor spaces: Tensor(S,c)Tensor(S,c[id])\text{Tensor}(S, c) \cong \text{Tensor}(S, c[i \mapsto d]) where c[id]c[i \mapsto d] denotes the color sequence cc with the ii-th entry updated to dd. This equivalence is constructed using a pair of rank-2 tensors MM and MM' (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 ii with MM, and the inverse map is `crossToSlotInv` at index ii with MM'. This formalizes the physical operation of raising or lowering the ii-th index of a tensor.