Documentation

Physlib.Relativity.Tensors.Contraction.Basic

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 #

iv. Table of contents #

v. References #

There are no known references for the material in this module.

A. Tensor contraction #

theorem TensorSpecies.Tensor.contrT_decide {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} {n : ℕ} {c : Fin (n + 1 + 1) → C} {i j : Fin (n + 1 + 1)} (hx : S.τ (c i) = c j) (hij : i ≠ j := by decide) :
i ≠ j ∧ S.τ (c i) = c j
noncomputable def TensorSpecies.Tensor.contrT {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} (n : ℕ) {c : Fin (n + 1 + 1) → C} (i j : Fin (n + 1 + 1)) (hij : i ≠ j ∧ S.τ (c i) = c j) :

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
Instances For
    theorem TensorSpecies.Tensor.contrT_congr {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} {n : ℕ} {c : Fin (n + 1 + 1) → C} {i j : Fin (n + 1 + 1)} {hij : i ≠ j ∧ S.τ (c i) = c j} (i' j' : Fin (n + 1 + 1)) (t : S.Tensor c) (hii' : i = i' := by decide) (hjj' : j = j' := by decide) :
    (contrT n i j hij) t = (permT id ⋯) ((contrT n i' j' ⋯) t)
    @[simp]
    theorem TensorSpecies.Tensor.contrT_pure {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} {n : ℕ} {c : Fin (n + 1 + 1) → C} (i j : Fin (n + 1 + 1)) (hij : i ≠ j ∧ S.τ (c i) = c j) (p : Pure S c) :
    (contrT n i j hij) p.toTensor = Pure.contrP i j hij p
    @[simp]
    theorem TensorSpecies.Tensor.contrT_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} {n : ℕ} {c : Fin (n + 1 + 1) → C} (i j : Fin (n + 1 + 1)) (hij : i ≠ j ∧ S.τ (c i) = c j) (g : G) (t : S.Tensor c) :
    (contrT n i j hij) (g • t) = g • (contrT n i j hij) t
    theorem TensorSpecies.Tensor.contrT_permT {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} {n n1 : ℕ} {c : Fin (n + 1 + 1) → C} {c1 : Fin (n1 + 1 + 1) → C} (i j : Fin (n1 + 1 + 1)) (hij : i ≠ j ∧ S.τ (c1 i) = c1 j) (σ : Fin (n1 + 1 + 1) → Fin (n + 1 + 1)) (hσ : IsReindexing c c1 σ) (t : S.Tensor c) :
    (contrT n1 i j hij) ((permT σ hσ) t) = (permT (i.funPredPredAbove j ⋯ σ ⋯) ⋯) ((contrT n (σ i) (σ j) ⋯) t)
    theorem TensorSpecies.Tensor.contrT_symm {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} {n : ℕ} {c : Fin (n + 1 + 1) → C} {i j : Fin (n + 1 + 1)} {hij : i ≠ j ∧ S.τ (c i) = c j} (t : S.Tensor c) :
    (contrT n i j hij) t = (permT id ⋯) ((contrT n j i ⋯) t)
    theorem TensorSpecies.Tensor.contrT_comm {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} {n : ℕ} {c : Fin (n + 1 + 1 + 1 + 1) → C} (i1 j1 : Fin (n + 1 + 1 + 1 + 1)) (i2 j2 : Fin (n + 1 + 1)) (hij1 : i1 ≠ j1 ∧ S.τ (c i1) = c j1) (hij2 : i2 ≠ j2 ∧ S.τ (c (i1.succSuccAbove j1 i2)) = c (i1.succSuccAbove j1 j2)) (t : S.Tensor c) :
    let i2' := i1.succSuccAbove j1 i2; let j2' := i1.succSuccAbove j1 j2; have hi2j2' := ⋯; let i1' := i2'.predPredAbove j2' hi2j2' i1 ⋯; let j1' := i2'.predPredAbove j2' hi2j2' j1 ⋯; (contrT n i2 j2 hij2) ((contrT (n + 1 + 1) i1 j1 hij1) t) = (permT id ⋯) ((contrT n i1' j1' ⋯) ((contrT (n + 1 + 1) i2' j2' ⋯) t))