Documentation

Physlib.Relativity.Tensors.Tensorial

Tensorial class #

i. Overview #

We define a class called Tensorial. This class is used to enable the use of index notation on a type M via a linear equivalence to a tensor of a TensorSpecies.

We define the class Tensorial here, and provide an API around its use.

ii. Key results #

iii. Table of contents #

iv. References #

A. Defining the tensorial class #

We first define the Tensorial class.

class TensorSpecies.Tensorial {n : outParam ℕ} {k : outParam Type} [CommRing k] {C G : outParam Type} [Group G] {V : outParam (C → Type)} [(c : C) → AddCommGroup (V c)] [(c : C) → Module k (V c)] {basisIdx : outParam (C → Type)} [(c : C) → Fintype (basisIdx c)] [(c : C) → DecidableEq (basisIdx c)] {rep : outParam ((c : C) → Representation k G (V c))} {b : outParam ((c : C) → Module.Basis (basisIdx c) k (V c))} (S : outParam (TensorSpecies k C G V basisIdx rep b)) (c : outParam (Fin n → C)) (M : Type) [AddCommMonoid M] [Module k M] :

The tensorial class is used to define a tensor structure on a type M through a linear equivalence with a module S.Tensor c for S a tensor species.

  • toTensor : M ≃ₗ[k] S.Tensor c

    The equivalence between M and S.Tensor c in a tensorial instance.

Instances

    A.1. Tensors carry a tensorial instance #

    The module of tensors of a tensor species carries a canonical tensorial instance, through the equivalence.

    @[instance_reducible]
    noncomputable instance TensorSpecies.Tensorial.self {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)} {n : ℕ} (S : TensorSpecies k C G V basisIdx rep b) (c : Fin n → C) :
    S.Tensorial c (S.Tensor c)
    Equations
    @[simp]
    theorem TensorSpecies.Tensorial.self_toTensor_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)} {n : ℕ} (S : TensorSpecies k C G V basisIdx rep b) (c : Fin n → C) (t : S.Tensor c) :

    A.2. The number of indices #

    noncomputable def TensorSpecies.Tensorial.numIndices {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 → C} {M : Type} [AddCommMonoid M] [Module k M] (t : M) [S.Tensorial c M] :

    The number of indices of a elements t : M where M carries a tensorial instance.

    Equations
    Instances For

      B. The action of the group on a module with a tensorial instance #

      We now define the action of the group G on a type M carrying a tensorial instance.

      @[instance_reducible, instance 10000]
      noncomputable instance TensorSpecies.Tensorial.smulAction {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 → C} {M : Type} [AddCommMonoid M] [Module k M] [S.Tensorial c M] :
      SMul G M
      Equations
      @[instance_reducible]
      noncomputable instance TensorSpecies.Tensorial.mulAction {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 → C} {M : Type} [AddCommMonoid M] [Module k M] [S.Tensorial c M] :
      Equations

      B.1. Relation between the action and the equivalence to tensors #

      theorem TensorSpecies.Tensorial.smul_eq {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 → C} {M : Type} [AddCommMonoid M] [Module k M] {g : G} {t : M} [S.Tensorial c M] :
      theorem TensorSpecies.Tensorial.toTensor_smul {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 → C} {M : Type} [AddCommMonoid M] [Module k M] {g : G} {t : M} [S.Tensorial c M] :
      theorem TensorSpecies.Tensorial.smul_toTensor_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 → C} {M : Type} [AddCommMonoid M] [Module k M] {g : G} {t : S.Tensor c} [self : S.Tensorial c M] :

      B.2. Linear properties of the action #

      @[instance_reducible, instance 10000]
      noncomputable instance TensorSpecies.Tensorial.distribMulAction {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 → C} {M : Type} [AddCommMonoid M] [Module k M] [S.Tensorial c M] :
      Equations

      B.3. The action as a linear map #

      noncomputable def TensorSpecies.Tensorial.smulLinearMap {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 → C} {M : Type} [AddCommMonoid M] [Module k M] (g : G) [S.Tensorial c M] :

      The action of the group on a Tensorial instance as a linear map.

      Equations
      Instances For
        theorem TensorSpecies.Tensorial.smulLinearMap_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} {n : ℕ} {c : Fin n → C} {M : Type} [AddCommMonoid M] [Module k M] {g : G} [S.Tensorial c M] (m : M) :
        (smulLinearMap g) m = g • m

        B.4. The SMulCommClass property #

        instance TensorSpecies.Tensorial.instSMulCommClass {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 → C} {M : Type} [AddCommMonoid M] [Module k M] [S.Tensorial c M] :
        instance TensorSpecies.Tensorial.instSMulCommClass_1 {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 → C} {M : Type} [AddCommMonoid M] [Module k M] [S.Tensorial c M] :

        C. Properties of the basis #

        We now prove some properties of the basis induced on a Tensorial instance.

        theorem TensorSpecies.Tensorial.basis_toTensor_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} {n : ℕ} {c : Fin n → C} {M : Type} [AddCommMonoid M] [Module k M] [S.Tensorial c M] (m : M) :

        D. Products of tensorial instances #

        @[instance_reducible, instance 10000]
        noncomputable instance TensorSpecies.Tensorial.prod {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 → C} {M : Type} [AddCommMonoid M] [Module k M] [S.Tensorial c M] {n2 : ℕ} {c2 : Fin n2 → C} {M₂ : Type} [AddCommMonoid M₂] [Module k M₂] [S.Tensorial c2 M₂] :
        S.Tensorial (Fin.append c c2) (TensorProduct k M M₂)
        Equations

        D.1. The equivalence to tensors on products #

        theorem TensorSpecies.Tensorial.toTensor_tprod {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 → C} {M : Type} [AddCommMonoid M] [Module k M] {n2 : ℕ} {c2 : Fin n2 → C} {M₂ : Type} [S.Tensorial c M] [AddCommMonoid M₂] [Module k M₂] [S.Tensorial c2 M₂] (m : M) (m2 : M₂) :

        D.2. The group action on products #

        theorem TensorSpecies.Tensorial.smul_prod {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 → C} {M : Type} [AddCommMonoid M] [Module k M] {n2 : ℕ} {c2 : Fin n2 → C} {M₂ : Type} [S.Tensorial c M] [AddCommMonoid M₂] [Module k M₂] [S.Tensorial c2 M₂] (g : G) (m : M) (m2 : M₂) :
        g • m ⊗ₜ[k] m2 = (g • m) ⊗ₜ[k] (g • m2)

        D.3. The basis on products #

        theorem TensorSpecies.Tensorial.basis_map_prod {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 → C} {M : Type} [AddCommMonoid M] [Module k M] {n2 : ℕ} {c2 : Fin n2 → C} {M₂ : Type} [S.Tensorial c M] [AddCommMonoid M₂] [Module k M₂] [S.Tensorial c2 M₂] :
        theorem TensorSpecies.Tensorial.prod_basis_of_map_reindex {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 → C} {M : Type} [AddCommMonoid M] [Module k M] {n2 : ℕ} {c2 : Fin n2 → C} {M₂ : Type} [S.Tensorial c M] [AddCommMonoid M₂] [Module k M₂] [S.Tensorial c2 M₂] {ι ι2 : Type} {b✝ : Module.Basis ι k M} {b2 : Module.Basis ι2 k M₂} {e : Tensor.ComponentIdx c ≃ ι} {e2 : Tensor.ComponentIdx c2 ≃ ι2} (h : b✝ = ((Tensor.basis c).map toTensor.symm).reindex e) (h2 : b2 = ((Tensor.basis c2).map toTensor.symm).reindex e2) :
        theorem TensorSpecies.Tensorial.prod_tensor_basis_eq_map_reindex {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 → C} {M : Type} [AddCommMonoid M] [Module k M] {n2 : ℕ} {c2 : Fin n2 → C} {M₂ : Type} [S.Tensorial c M] [AddCommMonoid M₂] [Module k M₂] [S.Tensorial c2 M₂] {ι ι2 : Type} {b✝ : Module.Basis ι k M} {b2 : Module.Basis ι2 k M₂} {e : Tensor.ComponentIdx c ≃ ι} {e2 : Tensor.ComponentIdx c2 ≃ ι2} (h : b✝ = ((Tensor.basis c).map toTensor.symm).reindex e) (h2 : b2 = ((Tensor.basis c2).map toTensor.symm).reindex e2) :
        theorem TensorSpecies.Tensorial.prod_eq_sum_eval {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} {M : Type} [AddCommMonoid M] [Module k M] {c c2 : C} {M₂ : Type} [S.Tensorial ![c] M] [AddCommMonoid M₂] [Module k M₂] [S.Tensorial ![c2] M₂] {b✝ : Module.Basis (basisIdx c) k M} {b2 : Module.Basis (basisIdx c2) k M₂} (h : b✝ = ((Tensor.basis ![c]).map toTensor.symm).reindex Tensor.ComponentIdx.single) (h2 : b2 = ((Tensor.basis ![c2]).map toTensor.symm).reindex Tensor.ComponentIdx.single) (x : TensorProduct k M M₂) :
        x = ∑ i : basisIdx c, ∑ j : basisIdx c2, Tensor.toScalar ((Tensor.evalT 0 ((basisIdxCongr ⋯) j)) ((Tensor.evalT 0 ((basisIdxCongr ⋯) i)) (toTensor x))) • b✝ i ⊗ₜ[k] b2 j

        Double basis expansion of an element of a tensor product M ⊗[k] M₂ of two Tensorial one-index spaces. Given bases b, b2 of M, M₂ coming from the single-index tensor bases, every x : M ⊗[k] M₂ is the double sum over i, j of the iterated evaluation coefficient toScalar (evalT 0 j (evalT 0 i (toTensor x))) times b i ⊗ₜ b2 j.

        E. Continuous properties #

        E.1. Finite dimensionality #

        instance TensorSpecies.Tensorial.instFiniteDimensional {n : ℕ} {k : Type} [RCLike 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) {c : Fin n → C} {M : Type} [AddCommGroup M] [Module k M] [S.Tensorial c M] :

        E.2. The map to tensors as a continuous linear equivalence #

        def TensorSpecies.Tensorial.toTensorCLM {n : ℕ} {k : Type} [RCLike 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) {c : Fin n → C} {M : Type} [AddCommGroup M] [Module k M] [TopologicalSpace M] [IsTopologicalAddGroup M] [ContinuousSMul k M] [S.Tensorial c M] [T2Space M] :
        M ≃L[k] S.Tensor c

        The map from a type carrying an Tensorial instance to tensors, as a continuous linear map.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          E.3. The Lorentz action as a continuous linear equivalence #

          noncomputable def TensorSpecies.Tensorial.actionCLM {n : ℕ} {k : Type} [RCLike 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) {c : Fin n → C} {M : Type} [AddCommGroup M] [Module k M] [TopologicalSpace M] (g : G) [IsTopologicalAddGroup M] [ContinuousSMul k M] [S.Tensorial c M] [T2Space M] :
          M →L[k] M

          The Lorentz action on types carrying a tensorial instance as a continuous linear map.

          Equations
          Instances For
            theorem TensorSpecies.Tensorial.actionCLM_apply {n : ℕ} {k : Type} [RCLike 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) {c : Fin n → C} {M : Type} [AddCommGroup M] [Module k M] [TopologicalSpace M] {g : G} [IsTopologicalAddGroup M] [ContinuousSMul k M] [S.Tensorial c M] [T2Space M] (m : M) :
            (actionCLM S g) m = g • m