Documentation

Physlib.Relativity.Tensors.Contraction.CrossToSlot

Result-to-slot contraction against a rank-2 tensor #

i. Overview #

crossToEnd deposits the surviving index of a slot contraction at the end of the survivor list. Raising and lowering a named index instead wants the replacement to stay in place: contracting slot i of t against a rank-2 tensor M (a metric, the unit tensor) should return t with only slot i's color changed, T^{μ}{}_{νρ} ↦ T_{μνρ}. crossToSlot i j hc M is that operation, and crossToSlot_eq_crossToEnd is the one place the two conventions meet.

This module stays at the CommRing altitude of crossToEnd; the RCLike round trips built on the operation live with the unit-tensor collapse theory in Physlib.Relativity.Tensors.Contraction.UnitTensorContraction.

ii. Key results #

iii. Table of contents #

iv. References #

A. The result-to-slot contraction #

theorem TensorSpecies.Tensor.IsReindexing.crossToSlot_cycle {C : Type} {nA : ℕ} {c : Fin (nA + 1) → C} {cM : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) :

The survivor color of crossToEnd i j against a rank-2 tensor of color cM is c with slot i replaced by the surviving color cM (j.succAbove 0), once the survivors are rotated back by the inverse of the cycle [i, last].

noncomputable def TensorSpecies.Tensor.crossToSlot {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} {nA : ℕ} {c : Fin (nA + 1) → C} {cM : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) (hc : S.τ (c i) = cM j) (M : S.Tensor cM) :

Contract slot i of t against slot j of the rank-2 tensor M, whose j-slot color must equal the dual color τ (c i) (propositionally, via hc), and rotate M's surviving slot back into position i. The result is t with slot i relabelled to M's surviving color.

This is raising and lowering a named index; the metric case is j = 0, M = metricTensor (τ (c i)). Because hc is propositional, a rank-2 tensor whose slot color matches only up to an equality enters directly, with no transport.

Equations
Instances For
    theorem TensorSpecies.Tensor.crossToSlot_eq_crossToEnd {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} {nA : ℕ} {c : Fin (nA + 1) → C} {cM : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) (hc : S.τ (c i) = cM j) (M : S.Tensor cM) (t : S.Tensor c) :
    (crossToSlot i j hc M) t = (permT ⇑(Equiv.symm (i.cycleIcc (Fin.last nA))) ⋯) (((crossToEnd i j hc) t) M)

    The bridge between the two conventions: crossToSlot i j hc M t is crossToEnd i j hc t M with the survivor rotated from the last slot back to slot i by the inverse cycle.

    theorem TensorSpecies.Tensor.crossToSlot_basis_repr_apply {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} {nA : ℕ} {c : Fin (nA + 1) → C} {cM : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) (hc : S.τ (c i) = cM j) (M : S.Tensor cM) (t : S.Tensor c) (φ : ComponentIdx (Function.update c i (cM (j.succAbove 0)))) :
    ((basis (Function.update c i (cM (j.succAbove 0)))).repr ((crossToSlot i j hc M) t)) φ = ((basis (Fin.append (c ∘ i.succAbove) (cM ∘ j.succAbove))).repr (((crossToEnd i j hc) t) M)) fun (m : Fin (nA + 1)) => (basisIdxCongr ⋯) (φ (IsReindexing.inv ⇑(Equiv.symm (i.cycleIcc (Fin.last nA))) ⋯ m))

    A component of crossToSlot is the corresponding component of crossToEnd, with the surviving indices rotated back into the contracted slot.

    noncomputable def TensorSpecies.Tensor.crossToSlotInv {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} {nA : ℕ} {c : Fin (nA + 1) → C} {d : C} {ds : Fin 2 → C} (i : Fin (nA + 1)) (he : c i = ds 1) (hb : S.τ d = ds 0) (M' : S.Tensor ds) :

    crossToSlot of slot i with the first index of M', followed by renaming slot i back to its original colour c i (he).

    Equations
    Instances For
      theorem TensorSpecies.Tensor.crossToSlot_permT_right_id {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} {nA : ℕ} {c : Fin (nA + 1) → C} {cM cM' : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) (hc : S.τ (c i) = cM' j) (M : S.Tensor cM) (hM : IsReindexing cM cM' id) (t : S.Tensor c) :
      (crossToSlot i j hc ((permT id hM) M)) t = (permT id ⋯) ((crossToSlot i j ⋯ M) t)

      An identity reindexing of the rank-2 tensor becomes the corresponding identity reindexing of the contracted output: the crossToSlot-level case of crossToEnd_permT_right where the rank-2 tensor's colors are only propositionally recast.

      theorem TensorSpecies.Tensor.crossToSlot_basis_repr_eq_sum_fin {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} {nA : ℕ} {c : Fin (nA + 1) → C} {cM : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) (hc : S.τ (c i) = cM j) (M : S.Tensor cM) (t : S.Tensor c) (φ : ComponentIdx (Function.update c i (cM (j.succAbove 0)))) :
      ((basis (Function.update c i (cM (j.succAbove 0)))).repr ((crossToSlot i j hc M) t)) φ = ∑ x₁ : basisIdx (c i), ∑ x₂ : basisIdx (cM j), ((basis c).repr t) ((ComponentIdx.insert i) (x₁, fun (m : Fin nA) => (basisIdxCongr ⋯) (φ (i.succAbove m)))) * ((basis cM).repr M) ((ComponentIdx.insert j) (x₂, fun (m : Fin 1) => (basisIdxCongr ⋯) (φ i))) * (S.contr (c i)) ((b (c i)) x₁ ⊗ₜ[k] (b (S.τ (c i))) ((basisIdxCongr ⋯) x₂))

      The component formula for a cross contraction into an arbitrary slot, for a species whose bases are not assumed adapted to the contraction: each contracted label is summed over its own slot and the contraction of the two basis vectors remains an opaque coefficient. Rotating the survivor back to its slot only transports the surviving labels, so this is crossToEnd_basis_repr_eq_sum_fin read through the cycle.

      theorem TensorSpecies.Tensor.crossToSlot_basis_repr_eq_sum_dual {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} [S.HasContrDualBases] {nA : ℕ} {c : Fin (nA + 1) → C} {cM : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) (hc : S.τ (c i) = cM j) (M : S.Tensor cM) (t : S.Tensor c) (φ : ComponentIdx (Function.update c i (cM (j.succAbove 0)))) :
      ((basis (Function.update c i (cM (j.succAbove 0)))).repr ((crossToSlot i j hc M) t)) φ = ∑ x : basisIdx (c i), ((basis c).repr t) ((ComponentIdx.insert i) (x, fun (m : Fin nA) => (basisIdxCongr ⋯) (φ (i.succAbove m)))) * ((basis cM).repr M) ((ComponentIdx.insert j) ((basisIdxCongr hc) ((HasContrDualBases.contrDualIdxEquiv S (c i)).symm x), fun (m : Fin 1) => (basisIdxCongr ⋯) (φ i)))

      The component formula for a cross contraction into an arbitrary slot, for a species with contraction-dual bases: the contraction coefficient is δ and one sum remains, the contracted label of M matched to that of t by contrDualIdxEquiv.

      @[simp]
      theorem TensorSpecies.Tensor.crossToSlot_equivariant {k : Type} [CommRing k] {C G : Type} [Group G] {V : C → Type} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : C → Type} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : (c : C) → Representation k G (V c)} {b : (c : C) → Module.Basis (basisIdx c) k (V c)} {S : TensorSpecies k C G V basisIdx rep b} {nA : ℕ} {c : Fin (nA + 1) → C} {cM : Fin 2 → C} (i : Fin (nA + 1)) (j : Fin 2) (hc : S.τ (c i) = cM j) (g : G) (M : S.Tensor cM) (t : S.Tensor c) :
      (crossToSlot i j hc (g • M)) (g • t) = g • (crossToSlot i j hc M) t

      Cross contraction into a slot is G-equivariant, both constituents (crossToEnd, permT) being so.