Documentation

Physlib.Relativity.Tensors.Evaluation

Evaluation of tensor indices #

## The evaluation coefficient.

noncomputable def TensorSpecies.Tensor.Pure.evalPCoeff {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) → C} (i : Fin (n + 1)) (φ : basisIdx (c i)) (p : Pure S c) :
k

Given a i : Fin (n + 1), a b : basisIdx (c i) and a pure tensor p : Pure S c, evalPCoeff i b p is the bth component of p i.

Equations
Instances For
    @[simp]
    theorem TensorSpecies.Tensor.Pure.evalPCoeff_update_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)} {S : TensorSpecies k C G V basisIdx rep b} {n : ℕ} {c : Fin (n + 1) → C} (i : Fin (n + 1)) [inst : DecidableEq (Fin (n + 1))] (φ : basisIdx (c i)) (p : Pure S c) (x : V (c i)) :
    evalPCoeff i φ (p.update i x) = ((b (c i)).repr x) φ
    @[simp]
    theorem TensorSpecies.Tensor.Pure.evalPCoeff_update_succAbove {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) → C} (i : Fin (n + 1)) [inst : DecidableEq (Fin (n + 1))] (j : Fin n) (φ : basisIdx (c i)) (p : Pure S c) (x : V (c (i.succAbove j))) :
    evalPCoeff i φ (p.update (i.succAbove j) x) = evalPCoeff i φ p
    theorem TensorSpecies.Tensor.Pure.evalPCoeff_basisVector {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) → C} (i : Fin (n + 1)) (φ : basisIdx (c i)) (b' : ComponentIdx c) :
    evalPCoeff i φ (basisVector c b') = if b' i = φ then 1 else 0

    Evaluation for a pure tensor. #

    noncomputable def TensorSpecies.Tensor.Pure.evalP {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) → C} (i : Fin (n + 1)) (φ : basisIdx (c i)) (p : Pure S c) :

    Given a i : Fin (n + 1), a φ : basisIdx (c i) and a pure tensor p : Pure S c, evalP i φ p is the tensor formed by evaluating the ith index of p at φ.

    Equations
    Instances For
      @[simp]
      theorem TensorSpecies.Tensor.Pure.evalP_update_add {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) → C} [inst : DecidableEq (Fin (n + 1))] (i j : Fin (n + 1)) (φ : basisIdx (c i)) (p : Pure S c) (x y : V (c j)) :
      evalP i φ (p.update j (x + y)) = evalP i φ (p.update j x) + evalP i φ (p.update j y)
      @[simp]
      theorem TensorSpecies.Tensor.Pure.evalP_update_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 + 1) → C} [inst : DecidableEq (Fin (n + 1))] (i j : Fin (n + 1)) (φ : basisIdx (c i)) (p : Pure S c) (r : k) (x : V (c j)) :
      evalP i φ (p.update j (r • x)) = r • evalP i φ (p.update j x)

      Evaluation for a pure tensor as multilinear map. #

      noncomputable def TensorSpecies.Tensor.Pure.evalPMultilinear {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) → C} (i : Fin (n + 1)) (φ : basisIdx (c i)) :
      MultilinearMap k (fun (i : Fin (n + 1)) => V (c i)) (S.Tensor (c ∘ i.succAbove))

      The multi-linear map formed by evaluation of an index of pure tensors.

      Equations
      Instances For
        noncomputable def TensorSpecies.Tensor.evalT {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) → C} (i : Fin (n + 1)) (φ : basisIdx (c i)) :

        Evaluation of a tensor at a given index and basis element.

        Equations
        Instances For
          @[simp]
          theorem TensorSpecies.Tensor.evalT_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) → C} (i : Fin (n + 1)) (φ : basisIdx (c i)) (p : Pure S c) :
          (evalT i φ) p.toTensor = Pure.evalP i φ p
          theorem TensorSpecies.Tensor.evalT_basis {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) → C} (i : Fin (n + 1)) (b✝ : ComponentIdx c) (x : basisIdx (c i)) :
          (evalT i x) ((basis c) b✝) = if b✝ i = x then (basis (c ∘ i.succAbove)) fun (j : Fin n) => b✝ (i.succAbove j) else 0

          The commutation of evaluation with permutations. #

          theorem TensorSpecies.Tensor.evalT_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 m : ℕ} {c : Fin (n + 1) → C} {c' : Fin (m + 1) → C} {σ : Fin (n + 1) → Fin (m + 1)} (h : IsReindexing c' c σ) (i : Fin (n + 1)) (x : basisIdx (c i)) (t : S.Tensor c') :
          (evalT i x) ((permT σ h) t) = (permT (if hi : σ i = 0 then fun (j : Fin n) => (σ (i.succAbove j)).pred ⋯ else ((σ i).pred hi).predAbove ∘ σ ∘ i.succAbove) ⋯) ((evalT (σ i) ((basisIdxCongr ⋯) x)) t)

          Commuting evaluation with permutations.

          The commutation of evaluation with evaluation. #

          theorem TensorSpecies.Tensor.evalT_evalT_basis {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} (k1 : Fin (n + 1 + 1)) (k2 : Fin (n + 1)) (φ1 : basisIdx (c k1)) (φ2 : basisIdx ((c ∘ k1.succAbove) k2)) (ψ : ComponentIdx c) :
          (evalT k2 φ2) ((evalT k1 φ1) ((basis c) ψ)) = (permT id ⋯) ((evalT (k2.predAbove k1) ((basisIdxCongr ⋯) φ1)) ((evalT (k1.succAbove k2) φ2) ((basis c) ψ)))

          Commutation of two evaluations on a tensor basis vector.

          theorem TensorSpecies.Tensor.evalT_evalT {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} (k1 : Fin (n + 1 + 1)) (k2 : Fin (n + 1)) (φ1 : basisIdx (c k1)) (φ2 : basisIdx ((c ∘ k1.succAbove) k2)) (t : S.Tensor c) :
          (evalT k2 φ2) ((evalT k1 φ1) t) = (permT id ⋯) ((evalT (k2.predAbove k1) ((basisIdxCongr ⋯) φ1)) ((evalT (k1.succAbove k2) φ2) t))

          Evaluating two tensor indices commutes, up to the canonical reindexing identifying the two possible orders in which the indices are removed.

          The commutation of evaluation with contraction. #

          theorem TensorSpecies.Tensor.contrT_evalT {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) → C} (k✝ : Fin (n + 1 + 1 + 1)) (i j : Fin (n + 1 + 1)) (φ : basisIdx (c k✝)) (hij : i ≠ j ∧ S.τ ((c ∘ k✝.succAbove) i) = (c ∘ k✝.succAbove) j) (t : S.Tensor c) :
          (contrT n i j hij) ((evalT k✝ φ) t) = (permT id ⋯) ((evalT ((k✝.succAbove i).predPredAbove (k✝.succAbove j) ⋯ k✝ ⋯) ((basisIdxCongr ⋯) φ)) ((contrT (n + 1) (k✝.succAbove i) (k✝.succAbove j) ⋯) t))

          Commuting evaluation with contraction. Evaluating index k and then contracting the pair i j equals contracting the corresponding pair k.succAbove i, k.succAbove j and then evaluating the residual index, up to the identity reindexing IsReindexing.succAbove_succSuccAbove_comm.

          The commutation of evaluation with products. #

          theorem TensorSpecies.Tensor.evalT_prodT_right {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 → C} {c1 : Fin (n1 + 1) → C} (i : Fin (n1 + 1)) (x : basisIdx (c1 i)) (t : S.Tensor c) (t1 : S.Tensor c1) :
          (prodT t) ((evalT i x) t1) = (permT id ⋯) ((evalT (Fin.natAdd n i) ((basisIdxCongr ⋯) x)) ((prodT t) t1))

          Evaluating an index in the right factor of a tensor product commutes with forming the product, up to the identity reindexing which identifies the two ways of removing that index from the appended color list.

          Other properties of evaluation #

          theorem TensorSpecies.Tensor.evalT_basis_single {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} {c : C} (b✝ : basisIdx c) (x : basisIdx (![c] 0)) :
          toScalar ((evalT 0 x) ((basis ![c]) (ComponentIdx.single.symm b✝))) = if (basisIdxCongr ⋯) b✝ = x then 1 else 0

          Evaluating the single-index basis tensor basis ![c] (single.symm b) at the index x yields the field element 1 if b = x (transported across ![c] 0 = c) and 0 otherwise: evaluation of a one-index basis tensor is the Kronecker delta.

          theorem TensorSpecies.Tensor.eq_sum_evalT_of_single_tensor_basis {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} {c : C} (t : S.Tensor ![c]) :
          t = ∑ i : basisIdx (![c] 0), toScalar ((evalT 0 i) t) • (basis ![c]) (ComponentIdx.single.symm ((basisIdxCongr ⋯) i))

          Basis expansion of a one-index tensor: every t : Tensor S ![c] is the sum over basis indices i of its evaluation coefficient toScalar (evalT 0 i t) times the corresponding basis tensor.

          theorem TensorSpecies.Tensor.eq_sum_evalT {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) → C} (t : S.Tensor c) :
          t = ∑ i : basisIdx (c (Fin.last n)), (permT id ⋯) ((prodT ((evalT (Fin.last n) i) t)) ((basis ![c (Fin.last n)]) (ComponentIdx.single.symm i)))

          Reconstruction of a tensor from the evaluations of its last index: every t : Tensor S c is the sum over basis indices i of the evaluation evalT (Fin.last n) i t tensored with the basis covector basis ![c (Fin.last n)] (single.symm i), with the appended index permuted back into the last slot.

          theorem TensorSpecies.Tensor.eq_sum_evalT_zero {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) → C} (t : S.Tensor c) :
          t = ∑ i : basisIdx (c 0), (permT (Fin.cast ⋯) ⋯) ((prodT ((basis ![c 0]) (ComponentIdx.single.symm i))) ((evalT 0 i) t))

          Reconstruction of a tensor from the evaluations of its first index: every t : Tensor S c is the sum over basis indices i of the basis covector basis ![c 0] (single.symm i) tensored with the evaluation evalT 0 i t, with the prepended index permuted back into the first slot. This is the first-index analogue of eq_sum_evalT.

          theorem TensorSpecies.Tensor.ext_of_evalT {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) → C} (t1 t2 : S.Tensor c) (h : ∀ (i : Fin (n + 1)) (φ : basisIdx (c i)), (evalT i φ) t1 = (evalT i φ) t2) :
          t1 = t2
          theorem TensorSpecies.Tensor.ext_of_evalT_index {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) → C} {t1 t2 : S.Tensor c} (i : Fin (n + 1)) (h : ∀ (φ : basisIdx (c i)), (evalT i φ) t1 = (evalT i φ) t2) :
          t1 = t2