Documentation

Physlib.Relativity.Tensors.Contraction.RankTwo

The bilinear map and the product of rank-two tensors #

The bilinear map of a rank-two tensor and the product of two rank-two tensors.

i. Overview #

A rank-two tensor M defines a bilinear map on one-slot tensors by contracting one argument into each of its slots, t, s ↦ M_{zw} tᶻ sʷ. In the bases dual to the slots of M the matrix of this map is the component matrix toMatrix M.

contractInnerT A B is the tensor A_{μν} B^{νρ}, in which the second index of A is contracted with the first index of B. Its indices are μ and ρ, with colours ![cs 0, ds 1]. The general contraction crossToEnd gives the same tensor, but its colours are a composite of the two colour lists. With contractInnerT, an identity such as η_{μν} η^{νρ} = δ_μ^ρ needs no renaming of the colours of the product. For contraction-dual bases, the matrix of A_{μν} B^{νρ} is the matrix product of (A_{μν}) and (B^{νρ}) (toMatrix_contractInnerT).

ii. Key results #

iii. Table of contents #

iv. References #

A. Pairing a rank-two tensor with two vectors #

Contracting a vector into each slot of a rank-two tensor M gives a bilinear map. This holds for any species: the only colour condition is duality, an argument contracts with a slot when its colour is dual to the slot's. For a species without conjugation this map is the metric form itself; a species with conjugation composes it with conjugation of one argument to get a sesquilinear form (ConjTensorSpecies.toSesqForm).

noncomputable def TensorSpecies.Tensor.toLinearMap₂ {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} (x y : C) {cM : Fin 2 → C} (M : S.Tensor cM) (hx : S.τ x = cM 0 := by rfl) (hy : S.τ y = cM 1 := by rfl) :

The bilinear map t, s ↦ M_{μν} tᵘ sᵛ of a rank-two tensor: t fills the first index of M, s the second. For the Minkowski metric this is the inner product η_{μν} tᵘ sᵛ.

Equations
Instances For
    theorem TensorSpecies.Tensor.toLinearMap₂_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} [S.HasContrDualBases] {x y : C} {cM : Fin 2 → C} (hx : S.τ x = cM 0) (hy : S.τ y = cM 1) (M : S.Tensor cM) (t : S.Tensor ![x]) (s : S.Tensor ![y]) :
    ((toLinearMap₂ x y M hx hy) t) s = ∑ w : basisIdx y, ∑ z : basisIdx x, ((basis ![x]).repr t) (ComponentIdx.single.symm z) * M.toMatrix ((HasContrDualBases.dualIdxEquiv hx) z) ((HasContrDualBases.dualIdxEquiv hy) w) * ((basis ![y]).repr s) (ComponentIdx.single.symm w)

    In components, the bilinear map is ∑_{μ,ν} M_{μν} tᵘ sᵛ.

    theorem TensorSpecies.Tensor.toMatrix₂_toLinearMap₂ {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] {x y : C} {cM : Fin 2 → C} (hx : S.τ x = cM 0) (hy : S.τ y = cM 1) (M : S.Tensor cM) :

    On basis vectors, the bilinear map gives M(e_μ, e_ν) = M_{μν}, so its matrix is the component matrix (M_{μν}).

    B. Contracting two rank-two tensors #

    noncomputable def TensorSpecies.Tensor.contractInnerT {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} {cs ds : Fin 2 → C} (h : S.τ (cs 1) = ds 0) :
    S.Tensor cs →ₗ[k] S.Tensor ds →ₗ[k] S.Tensor ![cs 0, ds 1]

    The contraction A_{μν} B^{νρ} of the second index of A with the first index of B, whose colours are dual by h. The result has the indices μ and ρ, in that order.

    Equations
    Instances For
      theorem TensorSpecies.Tensor.contractInnerT_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} {cs ds : Fin 2 → C} (h : S.τ (cs 1) = ds 0) (a : S.Tensor cs) (b✝ : S.Tensor ds) :
      ((contractInnerT h) a) b✝ = (permT id ⋯) (((crossToEnd (Fin.last 1) 0 h) a) b✝)

      contractInnerT is crossToEnd of the last index of A with the first index of B, with the colours of the result renamed to ![cs 0, ds 1].

      theorem TensorSpecies.Tensor.crossToEnd_eq_permT_contractInnerT {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} {cs ds : Fin 2 → C} (h : S.τ (cs 1) = ds 0) (a : S.Tensor cs) (b✝ : S.Tensor ds) :
      ((crossToEnd (Fin.last 1) 0 h) a) b✝ = (permT id ⋯) (((contractInnerT h) a) b✝)

      crossToEnd of the last index of A with the first index of B is contractInnerT with its colours renamed. This is contractInnerT_apply read from right to left.

      theorem TensorSpecies.Tensor.toMatrix_contractInnerT {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] {cs ds : Fin 2 → C} (h : S.τ (cs 1) = ds 0) (a : S.Tensor cs) (b✝ : S.Tensor ds) :

      The matrix of A_{μν} B^{νρ} is the matrix product of (A_{μν}) and (B^{νρ}), with the labels of ν in B matched to those in A by dualIdxEquiv. This is toMatrix_crossToEnd_pair at general colour lists.

      theorem TensorSpecies.Tensor.contractInnerT_right_injective {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] {cs ds : Fin 2 → C} (h : S.τ (cs 1) = ds 0) (e : basisIdx (cs 0) ≃ basisIdx (cs 1)) (M : S.Tensor cs) (hM : IsUnit (M.toMatrix.submatrix id ⇑e).det) :

      If the matrix (M_{μν}), made square by the label bijection e, is invertible, then t ↦ M_{μν} t^{νρ} is injective.

      theorem TensorSpecies.Tensor.contractInnerT_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} {cs ds : Fin 2 → C} (h : S.τ (cs 1) = ds 0) (g : G) (a : S.Tensor cs) (b✝ : S.Tensor ds) :
      ((contractInnerT h) (g • a)) (g • b✝) = g • ((contractInnerT h) a) b✝

      contractInnerT commutes with the action of G. For a Lorentz transformation Λ, (Λ A)_{μν} (Λ B)^{νρ} = Λ (A_{μν} B^{νρ}).