Imports
/-
Copyright (c) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
module
public import Physlib.Relativity.Tensors.ComponentIdx.Single
public import Physlib.Relativity.Tensors.Reindexing
public import Physlib.Relativity.Tensors.Contraction.SuccSuccAbove
public import Mathlib.Topology.Algebra.Module.ModuleTopology
public import Mathlib.Analysis.RCLike.Basic
public import Mathlib.Tactic.CasesTensors
This module sets up the tensors used for index notation in Physlib.
Physics picture:
Choose a symmetry group G (for example, the Lorentz group).
Give each index kind a name called a color (encoded by a type C).
In Lorentzian notation, a typical choice is two colors: up and down.
For each color, choose a representation of G.
Fix a basis for each color. This determines which values that index can take and lets us speak about tensor components explicitly.
Specify a dual color for each color, telling us which index pairs can contract.
For dual pairs, provide the contraction/unit/metric data used for contraction and for raising/lowering indices.
All of this structure is packaged as a TensorSpecies.
For S : TensorSpecies and a list of index colors c : Fin n → C:
Tensor S c is the type of tensors with those indices.
Pure S c is the type of pure tensors, i.e. tensors of the form
v₀ ⊗ₜ v₁ ⊗ₜ v₂ ….
ComponentIdx S c is the type of allowed component labels for those indices.
This file realizes Tensor S c as a PiTensorProduct, relates pure tensors to
their components, constructs the component basis, and supplies the inherited
finite-dimensional and module-topology instances. It also defines the natural
action of G on pure tensors and tensors, the associated permutation maps, and
the map from rank-zero tensors to the base field.
From this setup we get the usual index-notation operations in a uniform way: contraction, raising/lowering, and permutation of indices.
@[expose] public section
The tensors associated with a list of indices of a given color
c : Fin n → C.
set_option linter.unusedVariables false in@[nolint unusedArguments]
noncomputable abbrev Tensor {n : ℕ} (S : TensorSpecies k C G V basisIdx rep b)
(c : Fin n → C) : Type := PiTensorProduct k (fun i => V (c i))Components of tensors
Pure tensors
The type of pure tensors associated to a list of indices c : OverColor C.
A pure tensor is a tensor which can be written in the form v1 ⊗ₜ v2 ⊗ₜ v3 ….
set_option linter.unusedVariables false in@[nolint unusedArguments]
abbrev Pure (S : TensorSpecies k C G V basisIdx rep b) (c : Fin n → C) : Type :=
(i : Fin n) → V (c i)All goals completed! 🐙) (p j) = p i := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S ci:Fin nj:Fin nh:i = j⊢ (LinearEquiv.cast ⋯) (p j) = p i
subst h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S ci:Fin n⊢ (LinearEquiv.cast ⋯) (p i) = p i
simp All goals completed! 🐙
lemma congr_mid {n : ℕ} {c : Fin n → C} (c' : C) (p : Pure S c)
(i j : Fin n) (h : i = j) (hi : c i = c') (hj : c j = c') :
LinearEquiv.cast (R := k) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cc':Cp:Pure S ci:Fin nj:Fin nh:i = jhi:c i = c'hj:c j = c'⊢ c i = c' rw [hi k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cc':Cp:Pure S ci:Fin nj:Fin nh:i = jhi:c i = c'hj:c j = c'⊢ c' = c' All goals completed! 🐙] All goals completed! 🐙 : c i = c') (p i) =
LinearEquiv.cast (R := k) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cc':Cp:Pure S ci:Fin nj:Fin nh:i = jhi:c i = c'hj:c j = c'⊢ c j = c' rw [hj k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cc':Cp:Pure S ci:Fin nj:Fin nh:i = jhi:c i = c'hj:c j = c'⊢ c' = c' All goals completed! 🐙] All goals completed! 🐙 : c j = c') (p j) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cc':Cp:Pure S ci:Fin nj:Fin nh:i = jhi:c i = c'hj:c j = c'⊢ (LinearEquiv.cast ⋯) (p i) = (LinearEquiv.cast ⋯) (p j)
subst h hi k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S ci:Fin nhj:c i = c i⊢ (LinearEquiv.cast ⋯) (p i) = (LinearEquiv.cast ⋯) (p i)
simp All goals completed! 🐙
lemma map_mid_move_left {n n1 : ℕ} {c : Fin n → C} {c1 : Fin n1 → C} (p : Pure S c)
(p' : Pure S c1) {c' : C}
(i : Fin n) (j : Fin n1) (hi : c i = c') (hj : c1 j = c') :
LinearEquiv.cast (R := k) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ c i = c' rw [hi k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ c' = c' All goals completed! 🐙] All goals completed! 🐙 : c i = c') (p i) =
LinearEquiv.cast (R := k) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ c1 j = c' rw [hj k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ c' = c' All goals completed! 🐙] All goals completed! 🐙 : c1 j = c') (p' j)
↔ LinearEquiv.cast (R := k) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ c i = c1 j rw [hi, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ c' = c1 j All goals completed! 🐙 hj k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc'✝:Fin n' → Cc2:Fin n2 → Cn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ c' = c' All goals completed! 🐙] All goals completed! 🐙 : c i = c1 j) (p i) =
(p' j) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1c':Ci:Fin nj:Fin n1hi:c i = c'hj:c1 j = c'⊢ (LinearEquiv.cast ⋯) (p i) = (LinearEquiv.cast ⋯) (p' j) ↔ (LinearEquiv.cast ⋯) (p i) = p' j
subst hj k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕn1:ℕc:Fin n → Cc1:Fin n1 → Cp:Pure S cp':Pure S c1i:Fin nj:Fin n1hi:c i = c1 j⊢ (LinearEquiv.cast ⋯) (p i) = (LinearEquiv.cast ⋯) (p' j) ↔ (LinearEquiv.cast ⋯) (p i) = p' j
simp_all All goals completed! 🐙lemma toTensor_apply {n : ℕ} (c : Fin n → C) (p : Pure S c) :
toTensor p = PiTensorProduct.tprod k p := rfl
Given a list of indices c of n indices, a pure tensor p, an element i : Fin n and
a x in V (c i) then update p i x corresponds to p where
the ith part of p is replaced with x.
E.g. if n = 2 and p = v₀ ⊗ₜ v₁ then update p 0 x = x ⊗ₜ v₁.
def update {n : ℕ} {c : Fin n → C} [inst : DecidableEq (Fin n)] (p : Pure S c) (i : Fin n)
(x : V (c i)) : Pure S c := Function.update p i xlemma update_eq_function_update {n : ℕ} {c : Fin n → C} [inst : DecidableEq (Fin n)]
(p : Pure S c) (i : Fin n)
(x : V (c i)) : update p i x = Function.update p i x := rfl@[simp]
lemma update_same {n : ℕ} {c : Fin n → C} [inst : DecidableEq (Fin n)] (p : Pure S c) (i : Fin n)
(x : V (c i)) : (update p i x) i = x := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cinst:DecidableEq (Fin n)p:Pure S ci:Fin nx:V (c i)⊢ p.update i x i = x
simp [update] All goals completed! 🐙
lemma update_diff {n : ℕ} {c : Fin n → C} [inst : DecidableEq (Fin n)] (p : Pure S c) (i j : Fin n)
(x : V (c i)) (hij : i ≠ j) : (update p i x) j = p j := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cinst:DecidableEq (Fin n)p:Pure S ci:Fin nj:Fin nx:V (c i)hij:i ≠ j⊢ p.update i x j = p j
rw [update_eq_function_update, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cinst:DecidableEq (Fin n)p:Pure S ci:Fin nj:Fin nx:V (c i)hij:i ≠ j⊢ Function.update p i x j = p j All goals completed! 🐙 Function.update_of_ne hij.symm k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cinst:DecidableEq (Fin n)p:Pure S ci:Fin nj:Fin nx:V (c i)hij:i ≠ j⊢ p j = p j All goals completed! 🐙] All goals completed! 🐙
@[simp]
lemma update_succAbove_apply {n : ℕ} {c : Fin (n + 1) → C} [inst : DecidableEq (Fin (n + 1))]
(p : Pure S c) (i : Fin (n + 1)) (j : Fin n) (x : V (c (i.succAbove j))) :
update p (i.succAbove j) x i = p i := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Cinst:DecidableEq (Fin (n + 1))p:Pure S ci:Fin (n + 1)j:Fin nx:V (c (i.succAbove j))⊢ p.update (i.succAbove j) x i = p i
rw [update_eq_function_update, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Cinst:DecidableEq (Fin (n + 1))p:Pure S ci:Fin (n + 1)j:Fin nx:V (c (i.succAbove j))⊢ Function.update p (i.succAbove j) x i = p i All goals completed! 🐙 Function.update_of_ne (Fin.ne_succAbove i j) k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Cinst:DecidableEq (Fin (n + 1))p:Pure S ci:Fin (n + 1)j:Fin nx:V (c (i.succAbove j))⊢ p i = p i All goals completed! 🐙] All goals completed! 🐙@[simp]
lemma toTensor_update_add {n : ℕ} {c : Fin n → C} [inst : DecidableEq (Fin n)] (p : Pure S c)
(i : Fin n) (x y : V (c i)) :
(update p i (x + y)).toTensor = (update p i x).toTensor + (update p i y).toTensor := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cinst:DecidableEq (Fin n)p:Pure S ci:Fin nx:V (c i)y:V (c i)⊢ (p.update i (x + y)).toTensor = (p.update i x).toTensor + (p.update i y).toTensor
simp [toTensor, update] All goals completed! 🐙@[simp]
lemma toTensor_update_smul {n : ℕ} {c : Fin n → C} [inst : DecidableEq (Fin n)] (p : Pure S c)
(i : Fin n) (r : k) (y : V (c i)) :
(update p i (r • y)).toTensor = r • (update p i y).toTensor := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cinst:DecidableEq (Fin n)p:Pure S ci:Fin nr:ky:V (c i)⊢ (p.update i (r • y)).toTensor = r • (p.update i y).toTensor
simp [toTensor, update] All goals completed! 🐙
Given a list of indices c of length n + 1, a pure tensor p and an i : Fin (n + 1), then
drop p i is the tensor p with it's ith part dropped.
For example, if n = 2 and p = v₀ ⊗ₜ v₁ ⊗ₜ v₂ then drop p 1 = v₀ ⊗ₜ v₂.
def drop {n : ℕ} {c : Fin (n + 1) → C} (p : Pure S c) (i : Fin (n + 1)) :
Pure S (c ∘ i.succAbove) :=
fun j => p (i.succAbove j)@[simp]
lemma update_succAbove_drop {n : ℕ} {c : Fin (n + 1) → C} [inst : DecidableEq (Fin (n + 1))]
(p : Pure S c) (i : Fin (n + 1)) (k : Fin n) (x : V (c (i.succAbove k))) :
(update p (i.succAbove k) x).drop i = (p.drop i).update k x :=
Function.update_comp_eq_of_injective' p Fin.succAbove_right_injective k x@[simp]
lemma update_drop_self {n : ℕ} {c : Fin (n + 1) → C} [inst : DecidableEq (Fin (n + 1))]
(p : Pure S c) (i : Fin (n + 1)) (x : V (c i)) :
(update p i x).drop i = p.drop i := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Cinst:DecidableEq (Fin (n + 1))p:Pure S ci:Fin (n + 1)x:V (c i)⊢ (p.update i x).drop i = p.drop i
ext j k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Cinst:DecidableEq (Fin (n + 1))p:Pure S ci:Fin (n + 1)x:V (c i)j:Fin n⊢ (p.update i x).drop i j = p.drop i j
simp [drop, update_eq_function_update] All goals completed! 🐙Components
lemma component_eq {n : ℕ} {c : Fin n → C} (p : Pure S c) (φ : ComponentIdx c) :
p.component φ = ∏ i, (b (c i)).repr (p i) (φ i) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S cφ:ComponentIdx c⊢ p.component φ = ∏ i, ((b (c i)).repr (p i)) (φ i) rfl All goals completed! 🐙lemma component_eq_drop {n : ℕ} {c : Fin (n + 1) → C} (p : Pure S c) (i : Fin (n + 1))
(φ : ComponentIdx c) :
p.component φ = ((b (c i)).repr (p i) (φ i)) *
((drop p i).component (fun j => φ (i.succAbove j))) :=
Fin.prod_univ_succAbove (fun j => (b (c j)).repr (p j) (φ j)) i@[simp]
lemma component_update_add {n : ℕ} [inst : DecidableEq (Fin n)]
{c : Fin n → C} (p : Pure S c) (i : Fin n)
(x y :V (c i)) (b : ComponentIdx c) :
(update p i (x + y)).component b = (update p i x).component b +
(update p i y).component b := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n:ℕinst:DecidableEq (Fin n)c:Fin n → Cp:Pure S ci:Fin nx:V (c i)y:V (c i)b:ComponentIdx c⊢ (p.update i (x + y)).component b = (p.update i x).component b + (p.update i y).component b
cases n zero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝inst:DecidableEq (Fin 0)c:Fin 0 → Cp:Pure S ci:Fin 0x:V (c i)y:V (c i)b:ComponentIdx c⊢ (p.update i (x + y)).component b = (p.update i x).component b + (p.update i y).component bsucc k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n✝:ℕinst:DecidableEq (Fin (n✝ + 1))c:Fin (n✝ + 1) → Cp:Pure S ci:Fin (n✝ + 1)x:V (c i)y:V (c i)b:ComponentIdx c⊢ (p.update i (x + y)).component b = (p.update i x).component b + (p.update i y).component b
· zero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝inst:DecidableEq (Fin 0)c:Fin 0 → Cp:Pure S ci:Fin 0x:V (c i)y:V (c i)b:ComponentIdx c⊢ (p.update i (x + y)).component b = (p.update i x).component b + (p.update i y).component b exact Fin.elim0 i All goals completed! 🐙
· succ k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n✝:ℕinst:DecidableEq (Fin (n✝ + 1))c:Fin (n✝ + 1) → Cp:Pure S ci:Fin (n✝ + 1)x:V (c i)y:V (c i)b:ComponentIdx c⊢ (p.update i (x + y)).component b = (p.update i x).component b + (p.update i y).component b simp [component_eq_drop _ i, add_mul] All goals completed! 🐙@[simp]
lemma component_update_smul {n : ℕ} [inst : DecidableEq (Fin n)]
{c : Fin n → C} (p : Pure S c) (i : Fin n)
(x : k) (y : V (c i)) (b : ComponentIdx c) :
(update p i (x • y)).component b = x * (update p i y).component b := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n:ℕinst:DecidableEq (Fin n)c:Fin n → Cp:Pure S ci:Fin nx:ky:V (c i)b:ComponentIdx c⊢ (p.update i (x • y)).component b = x * (p.update i y).component b
cases n zero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝x:kinst:DecidableEq (Fin 0)c:Fin 0 → Cp:Pure S ci:Fin 0y:V (c i)b:ComponentIdx c⊢ (p.update i (x • y)).component b = x * (p.update i y).component bsucc k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝x:kn✝:ℕinst:DecidableEq (Fin (n✝ + 1))c:Fin (n✝ + 1) → Cp:Pure S ci:Fin (n✝ + 1)y:V (c i)b:ComponentIdx c⊢ (p.update i (x • y)).component b = x * (p.update i y).component b
· zero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝x:kinst:DecidableEq (Fin 0)c:Fin 0 → Cp:Pure S ci:Fin 0y:V (c i)b:ComponentIdx c⊢ (p.update i (x • y)).component b = x * (p.update i y).component b exact Fin.elim0 i All goals completed! 🐙
· succ k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝x:kn✝:ℕinst:DecidableEq (Fin (n✝ + 1))c:Fin (n✝ + 1) → Cp:Pure S ci:Fin (n✝ + 1)y:V (c i)b:ComponentIdx c⊢ (p.update i (x • y)).component b = x * (p.update i y).component b simp [component_eq_drop _ i, mul_assoc] All goals completed! 🐙@[simp]
lemma componentMap_apply {n : ℕ} (c : Fin n → C)
(p : Pure S c) : componentMap c p = p.component := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ (componentMap c) p = p.component
rfl All goals completed! 🐙@[simp]
lemma component_basisVector {n : ℕ} (c : Fin n → C) (b1 b2 : ComponentIdx (S := S) c) :
(basisVector c b1).component b2 = if b1 = b2 then 1 else 0 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cb1:ComponentIdx cb2:ComponentIdx c⊢ (basisVector c b1).component b2 = if b1 = b2 then 1 else 0
simp [component_eq, basisVector, Finsupp.single_apply, Fintype.prod_boole, funext_iff] All goals completed! 🐙lemma induction_on_pure {n : ℕ} {c : Fin n → C} {P : S.Tensor c → Prop}
(h : ∀ (p : Pure S c), P p.toTensor)
(hsmul : ∀ (r : k) t, P t → P (r • t))
(hadd : ∀ t1 t2, P t1 → P t2 → P (t1 + t2)) (t : S.Tensor c) : P t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → CP:S.Tensor c → Proph:∀ (p : Pure S c), P p.toTensorhsmul:∀ (r : k) (t : S.Tensor c), P t → P (r • t)hadd:∀ (t1 t2 : S.Tensor c), P t1 → P t2 → P (t1 + t2)t:S.Tensor c⊢ P t
refine PiTensorProduct.induction_on' t (fun r p => ?_) hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → CP:S.Tensor c → Proph:∀ (p : Pure S c), P p.toTensorhsmul:∀ (r : k) (t : S.Tensor c), P t → P (r • t)hadd:∀ (t1 t2 : S.Tensor c), P t1 → P t2 → P (t1 + t2)t:S.Tensor cr:kp:(i : Fin n) → V (c i)⊢ P (PiTensorProduct.tprodCoeff k r p)
simp only [PiTensorProduct.tprodCoeff_eq_smul_tprod] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → CP:S.Tensor c → Proph:∀ (p : Pure S c), P p.toTensorhsmul:∀ (r : k) (t : S.Tensor c), P t → P (r • t)hadd:∀ (t1 t2 : S.Tensor c), P t1 → P t2 → P (t1 + t2)t:S.Tensor cr:kp:(i : Fin n) → V (c i)⊢ P (r • (PiTensorProduct.tprod k) p)
exact hsmul r _ (h p) All goals completed! 🐙The basis
The linear map from tensors to its components.
def componentMap {n : ℕ} (c : Fin n → C) : S.Tensor c →ₗ[k] (ComponentIdx (S := S) c → k) :=
PiTensorProduct.lift (Pure.componentMap c)@[simp]
lemma componentMap_pure {n : ℕ} (c : Fin n → C)
(p : Pure S c) : componentMap c (p.toTensor) = Pure.componentMap c p :=
PiTensorProduct.lift.tprod pThe tensor created from it's components.
def ofComponents {n : ℕ} (c : Fin n → C) :
(ComponentIdx (S := S) c → k) →ₗ[k] S.Tensor c where
toFun f := ∑ b, f b • (Pure.basisVector c b).toTensor
map_add' fb gb := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cfb:ComponentIdx c → kgb:ComponentIdx c → k⊢ ∑ b_1, (fb + gb) b_1 • (Pure.basisVector c b_1).toTensor =
∑ b_1, fb b_1 • (Pure.basisVector c b_1).toTensor + ∑ b_1, gb b_1 • (Pure.basisVector c b_1).toTensor
simp [add_smul, Finset.sum_add_distrib] All goals completed! 🐙
map_smul' fb r := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cfb:kr:ComponentIdx c → k⊢ ∑ b_1, (fb • r) b_1 • (Pure.basisVector c b_1).toTensor =
(RingHom.id k) fb • ∑ b_1, r b_1 • (Pure.basisVector c b_1).toTensor
simp [smul_smul, Finset.smul_sum] All goals completed! 🐙@[simp]
lemma componentMap_ofComponents {n : ℕ} (c : Fin n → C) (f : ComponentIdx c → k) :
componentMap c (ofComponents (S := S) c f) = f := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cf:ComponentIdx c → k⊢ (componentMap c) ((ofComponents c) f) = f
ext b k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cf:ComponentIdx c → kb:ComponentIdx c⊢ (componentMap c) ((ofComponents c) f) b = f b
simp [ofComponents] All goals completed! 🐙@[simp]
lemma ofComponents_componentMap {n : ℕ} (c : Fin n → C) (t : S.Tensor c) :
ofComponents c (componentMap c t) = t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct:S.Tensor c⊢ (ofComponents c) ((componentMap c) t) = t
simp only [ofComponents, LinearMap.coe_mk, AddHom.coe_mk] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct:S.Tensor c⊢ ∑ b_1, (componentMap c) t b_1 • (Pure.basisVector c b_1).toTensor = t
induction t using induction_on_pure with
| h p => h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ ∑ b_1, (componentMap c) p.toTensor b_1 • (Pure.basisVector c b_1).toTensor = p.toTensor
simp only [componentMap_pure, Pure.componentMap_apply] h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ ∑ x, p.component x • (Pure.basisVector c x).toTensor = p.toTensor
simp_rw [ h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ ∑ x, p.component x • (Pure.basisVector c x).toTensor = p.toTensorPure.component_eq, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ ∑ x, (∏ i, ((b (c i)).repr (p i)) (x i)) • (Pure.basisVector c x).toTensor = p.toTensor Pure.toTensor, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ ∑ x, (∏ i, ((b (c i)).repr (p i)) (x i)) • (PiTensorProduct.tprod k) (Pure.basisVector c x) =
(PiTensorProduct.tprod k) p ← MultilinearMap.map_smul_univ, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ (∑ x, (PiTensorProduct.tprod k) fun i => ((b (c i)).repr (p i)) (x i) • Pure.basisVector c x i) =
(PiTensorProduct.tprod k) p Pure.basisVector h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ (∑ x, (PiTensorProduct.tprod k) fun i => ((b (c i)).repr (p i)) (x i) • (b (c i)) (x i)) = (PiTensorProduct.tprod k) p]
trans (PiTensorProduct.tprod k) fun i =>
∑ x, ((b (c i)).repr (p i)) x • (b (c i)) x k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ (∑ x, (PiTensorProduct.tprod k) fun i => ((b (c i)).repr (p i)) (x i) • (b (c i)) (x i)) =
(PiTensorProduct.tprod k) fun i => ∑ x, ((b (c i)).repr (p i)) x • (b (c i)) xk:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ ((PiTensorProduct.tprod k) fun i => ∑ x, ((b (c i)).repr (p i)) x • (b (c i)) x) = (PiTensorProduct.tprod k) p
· k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ (∑ x, (PiTensorProduct.tprod k) fun i => ((b (c i)).repr (p i)) (x i) • (b (c i)) (x i)) =
(PiTensorProduct.tprod k) fun i => ∑ x, ((b (c i)).repr (p i)) x • (b (c i)) x exact (MultilinearMap.map_sum _ fun i j => ((b (c i)).repr (p i)) j • (b (c i)) j).symm All goals completed! 🐙
exact congrArg _ (funext fun i => Basis.sum_equivFun (b (c i)) (p i)) All goals completed! 🐙
| hsmul r t ht => hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cr:kt:S.Tensor cht:∑ b_1, (componentMap c) t b_1 • (Pure.basisVector c b_1).toTensor = t⊢ ∑ b_1, (componentMap c) (r • t) b_1 • (Pure.basisVector c b_1).toTensor = r • t
simp only [map_smul, Pi.smul_apply, smul_eq_mul, ← smul_smul, ← Finset.smul_sum, ht] All goals completed! 🐙
| hadd t1 t2 h1 h2 => hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct1:S.Tensor ct2:S.Tensor ch1:∑ b_1, (componentMap c) t1 b_1 • (Pure.basisVector c b_1).toTensor = t1h2:∑ b_1, (componentMap c) t2 b_1 • (Pure.basisVector c b_1).toTensor = t2⊢ ∑ b_1, (componentMap c) (t1 + t2) b_1 • (Pure.basisVector c b_1).toTensor = t1 + t2 simp [add_smul, Finset.sum_add_distrib, h1, h2] All goals completed! 🐙The basis of tensors.
def basis {n : ℕ} (c : Fin n → C) : Basis (ComponentIdx (S := S) c) k (S.Tensor c) where
repr := (LinearEquiv.mk (componentMap c) (ofComponents c)
(fun x => by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cx:S.Tensor c⊢ (ofComponents c) ((componentMap c).toFun x) = x simp All goals completed! 🐙) (fun x => by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cx:ComponentIdx c → k⊢ (componentMap c).toFun ((ofComponents c) x) = x simp All goals completed! 🐙)).trans
(Finsupp.linearEquivFunOnFinite k k ((j : Fin n) → basisIdx (c j))).symmlemma basis_apply {n : ℕ} (c : Fin n → C) (φ : ComponentIdx (S := S) c) :
basis c φ = (Pure.basisVector c φ).toTensor := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cφ:ComponentIdx c⊢ (basis c) φ = (Pure.basisVector c φ).toTensor
change ofComponents c _ = _ k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cφ:ComponentIdx c⊢ (ofComponents c)
((Finsupp.linearEquivFunOnFinite k k ((j : Fin n) → basisIdx (c j))).symm.toEquiv.symm (Finsupp.single φ 1)) =
(Pure.basisVector c φ).toTensor
simp [ofComponents, Finsupp.linearEquivFunOnFinite_single, Pi.single_apply, ite_smul] All goals completed! 🐙@[simp]
lemma basis_repr_pure {n : ℕ} (c : Fin n → C)
(p : Pure S c) :
(basis c).repr p.toTensor = p.component := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ ⇑((basis c).repr p.toTensor) = p.component
ext φ k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S cφ:ComponentIdx c⊢ ((basis c).repr p.toTensor) φ = p.component φ
change componentMap c p.toTensor φ = _ k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S cφ:ComponentIdx c⊢ (componentMap c) p.toTensor φ = p.component φ
simp All goals completed! 🐙lemma induction_on_basis {n : ℕ} {c : Fin n → C} {P : S.Tensor c → Prop}
(h : ∀ b, P (basis c b)) (hzero : P 0)
(hsmul : ∀ (r : k) t, P t → P (r • t))
(hadd : ∀ t1 t2, P t1 → P t2 → P (t1 + t2)) (t : S.Tensor c) : P t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → CP:S.Tensor c → Proph:∀ (b_1 : ComponentIdx c), P ((basis c) b_1)hzero:P 0hsmul:∀ (r : k) (t : S.Tensor c), P t → P (r • t)hadd:∀ (t1 t2 : S.Tensor c), P t1 → P t2 → P (t1 + t2)t:S.Tensor c⊢ P t
refine Submodule.span_induction ?_ hzero (fun t1 t2 _ _ => hadd t1 t2)
(fun r t _ => hsmul r t) (Basis.mem_span (basis c) t) k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → CP:S.Tensor c → Proph:∀ (b_1 : ComponentIdx c), P ((basis c) b_1)hzero:P 0hsmul:∀ (r : k) (t : S.Tensor c), P t → P (r • t)hadd:∀ (t1 t2 : S.Tensor c), P t1 → P t2 → P (t1 + t2)t:S.Tensor c⊢ ∀ x ∈ Set.range ⇑(basis c), P x
rintro x ⟨b, rfl⟩ k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → CP:S.Tensor c → Proph:∀ (b_1 : ComponentIdx c), P ((basis c) b_1)hzero:P 0hsmul:∀ (r : k) (t : S.Tensor c), P t → P (r • t)hadd:∀ (t1 t2 : S.Tensor c), P t1 → P t2 → P (t1 + t2)t:S.Tensor cb:ComponentIdx c⊢ P ((basis c) b)
exact h b All goals completed! 🐙
componentMap is the basis representation (basis c).repr definitionally; this bridges the two
notations wherever a component computation meets a repr rewrite.
lemma componentMap_eq_repr {n : ℕ} (c : Fin n → C) (t : S.Tensor c)
(ψ : ComponentIdx (S := S) c) : componentMap c t ψ = (basis c).repr t ψ := rflTwo tensors with the same colour sequence are equal when all their components agree.
lemma componentMap_ext {n : ℕ} {c : Fin n → C} {t₁ t₂ : S.Tensor c}
(h : ∀ b, componentMap c t₁ b = componentMap c t₂ b) : t₁ = t₂ := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct₁:S.Tensor ct₂:S.Tensor ch:∀ (b_1 : ComponentIdx c), (componentMap c) t₁ b_1 = (componentMap c) t₂ b_1⊢ t₁ = t₂
rw [← ofComponents_componentMap c t₁, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct₁:S.Tensor ct₂:S.Tensor ch:∀ (b_1 : ComponentIdx c), (componentMap c) t₁ b_1 = (componentMap c) t₂ b_1⊢ (ofComponents c) ((componentMap c) t₁) = t₂ All goals completed! 🐙 ← ofComponents_componentMap c t₂, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct₁:S.Tensor ct₂:S.Tensor ch:∀ (b_1 : ComponentIdx c), (componentMap c) t₁ b_1 = (componentMap c) t₂ b_1⊢ (ofComponents c) ((componentMap c) t₁) = (ofComponents c) ((componentMap c) t₂) All goals completed! 🐙 funext h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct₁:S.Tensor ct₂:S.Tensor ch:∀ (b_1 : ComponentIdx c), (componentMap c) t₁ b_1 = (componentMap c) t₂ b_1⊢ (ofComponents c) ((componentMap c) t₂) = (ofComponents c) ((componentMap c) t₂) All goals completed! 🐙] All goals completed! 🐙The rank
instance {k : Type} [Field k] {C : Type} {G : Type} [Group G]
{V : C → Type} [∀ c, AddCommGroup (V c)] [∀ c, Module k (V c)]
{basisIdx : C → Type} [∀ c, Fintype (basisIdx c)] [∀ c, DecidableEq (basisIdx c)]
{rep : (c : C) → Representation k G (V c)} {b : (c : C) → Basis (basisIdx c) k (V c)}
(S : TensorSpecies k C G V basisIdx rep b)
{c : Fin n → C} : FiniteDimensional k (S.Tensor c) :=
Module.Basis.finiteDimensional_of_finite (Tensor.basis c)instance {k : Type} [RCLike k] {C : Type} {G : Type} [Group G]
{V : C → Type} [∀ c, AddCommGroup (V c)] [∀ c, Module k (V c)]
{basisIdx : C → Type} [∀ c, Fintype (basisIdx c)] [∀ c, DecidableEq (basisIdx c)]
{rep : (c : C) → Representation k G (V c)} {b : (c : C) → Basis (basisIdx c) k (V c)}
(S : TensorSpecies k C G V basisIdx rep b)
{c : Fin n → C} : IsTopologicalAddGroup (S.Tensor c) :=
IsModuleTopology.topologicalAddGroup (R := k) (S.Tensor c)The action
lemma actionP_eq {g : G} {p : Pure S c} : g • p = fun i => rep (c i) g (p i) := rfllemma rep_cast {g : G} {c c1 : C} (p : V c) (h : c = c1) :
LinearEquiv.cast (R := k) h (rep c g p) = rep c1 g (LinearEquiv.cast (R := k) h p) := by k:Typeinst✝³:CommRing kC:TypeG:Typeinst✝²:Group GV:C → Typeinst✝¹:(c : C) → AddCommGroup (V c)inst✝:(c : C) → Module k (V c)rep:(c : C) → Representation k G (V c)g:Gc:Cc1:Cp:V ch:c = c1⊢ (LinearEquiv.cast h) (((rep c) g) p) = ((rep c1) g) ((LinearEquiv.cast h) p)
subst h k:Typeinst✝³:CommRing kC:TypeG:Typeinst✝²:Group GV:C → Typeinst✝¹:(c : C) → AddCommGroup (V c)inst✝:(c : C) → Module k (V c)rep:(c : C) → Representation k G (V c)g:Gc:Cp:V c⊢ (LinearEquiv.cast ⋯) (((rep c) g) p) = ((rep c) g) ((LinearEquiv.cast ⋯) p)
rfl All goals completed! 🐙lemma actionP_cast {g : G} {p : Pure S c} (h : c = c1) :
LinearEquiv.cast (R := k) h (g • p) = g • LinearEquiv.cast (R := k) h p := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cc1:Fin n → Cg:Gp:Pure S ch:c = c1⊢ (LinearEquiv.cast h) (g • p) = g • (LinearEquiv.cast h) p
subst h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gp:Pure S c⊢ (LinearEquiv.cast ⋯) (g • p) = g • (LinearEquiv.cast ⋯) p
rfl All goals completed! 🐙
@[simp]
lemma drop_actionP {n : ℕ} {c : Fin (n + 1) → C} {i : Fin (n + 1)} {p : Pure S c} (g : G) :
(g • p).drop i = g • (p.drop i) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:G⊢ (g • p).drop i = g • p.drop i
ext j k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (g • p).drop i j = (g • p.drop i) j
rw [drop, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (g • p) (i.succAbove j) = (g • p.drop i) j k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (fun i => ((rep (c i)) g) (p i)) (i.succAbove j) = (fun i_1 => ((rep ((c ∘ i.succAbove) i_1)) g) (p.drop i i_1)) j actionP_eq, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (fun i => ((rep (c i)) g) (p i)) (i.succAbove j) = (g • p.drop i) j k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (fun i => ((rep (c i)) g) (p i)) (i.succAbove j) = (fun i_1 => ((rep ((c ∘ i.succAbove) i_1)) g) (p.drop i i_1)) j actionP_eq k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (fun i => ((rep (c i)) g) (p i)) (i.succAbove j) = (fun i_1 => ((rep ((c ∘ i.succAbove) i_1)) g) (p.drop i i_1)) j k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (fun i => ((rep (c i)) g) (p i)) (i.succAbove j) = (fun i_1 => ((rep ((c ∘ i.succAbove) i_1)) g) (p.drop i i_1)) j] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ (fun i => ((rep (c i)) g) (p i)) (i.succAbove j) = (fun i_1 => ((rep ((c ∘ i.succAbove) i_1)) g) (p.drop i i_1)) j
simp only [Function.comp_apply] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin (n + 1) → Ci:Fin (n + 1)p:Pure S cg:Gj:Fin n⊢ ((rep (c (i.succAbove j))) g) (p (i.succAbove j)) = ((rep (c (i.succAbove j))) g) (p.drop i j)
rfl All goals completed! 🐙The action on tensors
lemma actionT_eq {g : G} {t : S.Tensor c} : g • t =
PiTensorProduct.map (fun i => rep (c i) g) t := rfllemma actionT_pure {g : G} {p : Pure S c} :
g • p.toTensor = Pure.toTensor (g • p) :=
PiTensorProduct.map_tprod (R := k) (fun i => rep (c i) g) plemma actionT_add {g : G} {t1 t2 : S.Tensor c} :
g • (t1 + t2) = g • t1 + g • t2 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gt1:S.Tensor ct2:S.Tensor c⊢ g • (t1 + t2) = g • t1 + g • t2
simp [actionT_eq] All goals completed! 🐙@[simp]
lemma actionT_smul {g : G} {r : k} {t : S.Tensor c} :
g • (r • t) = r • (g • t) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gr:kt:S.Tensor c⊢ g • r • t = r • g • t
simp [actionT_eq] All goals completed! 🐙lemma actionT_zero {g : G} : g • (0 : S.Tensor c) = 0 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:G⊢ g • 0 = 0
simp [actionT_eq] All goals completed! 🐙
lemma actionT_neg {g : G} {t : S.Tensor c} :
g • (-t) = -(g • t) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gt:S.Tensor c⊢ g • -t = -(g • t)
rw [actionT_eq k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gt:S.Tensor c⊢ (PiTensorProduct.map fun i => (rep (c i)) g) (-t) = -(g • t) k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gt:S.Tensor c⊢ (PiTensorProduct.map fun i => (rep (c i)) g) (-t) = -(g • t)] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gt:S.Tensor c⊢ (PiTensorProduct.map fun i => (rep (c i)) g) (-t) = -(g • t)
simp only [map_neg, neg_inj] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cg:Gt:S.Tensor c⊢ (PiTensorProduct.map fun i => (rep (c i)) g) t = g • t
rfl All goals completed! 🐙Permutations
Given a permutation σ : Fin m → Fin n of indices satisfying IsReindexing through h,
and a pure tensor p, permP σ h p is the pure tensor permuted according to σ.
For example if m = n = 2 and σ = ![1, 0], and p = v ⊗ₜ w then
permP σ _ p = w ⊗ₜ v.
def Pure.permP {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
(σ : Fin m → Fin n) (h : IsReindexing c c1 σ) (p : Pure S c) : Pure S c1 :=
fun i => LinearEquiv.cast (R := k) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σp:Pure S ci:Fin m⊢ c (σ i) = c1 i simp [h.preserve_color] All goals completed! 🐙) (p (σ i))@[simp]
lemma Pure.permP_basisVector {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
(σ : Fin m → Fin n) (h : IsReindexing c c1 σ) (φ : ComponentIdx (S := S) c) :
Pure.permP σ h (Pure.basisVector c φ) =
Pure.basisVector c1 (fun i => basisIdxCongr (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx ci:Fin m⊢ c (σ i) = c1 i simp [h.preserve_color] All goals completed! 🐙) (φ (σ i))) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c⊢ permP σ h (basisVector c φ) = basisVector c1 fun i => (basisIdxCongr ⋯) (φ (σ i))
ext i k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx ci:Fin m⊢ permP σ h (basisVector c φ) i = basisVector c1 (fun i => (basisIdxCongr ⋯) (φ (σ i))) i
simp only [permP, basisVector] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx ci:Fin m⊢ (LinearEquiv.cast ⋯) ((b (c (σ i))) (φ (σ i))) = (b (c1 i)) ((basisIdxCongr ⋯) (φ (σ i)))
apply map_basis_eq All goals completed! 🐙lemma Pure.permP_equivariant {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ : Fin m → Fin n} (h : IsReindexing c c1 σ) (g : G) (p : Pure S c) :
Pure.permP σ h (g • p) = g • Pure.permP σ h p := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σg:Gp:Pure S c⊢ permP σ h (g • p) = g • permP σ h p
ext i k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σg:Gp:Pure S ci:Fin m⊢ permP σ h (g • p) i = (g • permP σ h p) i
simp only [permP, actionP_eq] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σg:Gp:Pure S ci:Fin m⊢ (LinearEquiv.cast ⋯) (((rep (c (σ i))) g) (p (σ i))) = ((rep (c1 i)) g) ((LinearEquiv.cast ⋯) (p (σ i)))
exact rep_cast _ _ All goals completed! 🐙lemma permT_pure {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ : Fin m → Fin n} (h : IsReindexing c c1 σ) (p : Pure S c) :
permT σ h p.toTensor = (p.permP σ h).toTensor := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σp:Pure S c⊢ (permT σ h) p.toTensor = (Pure.permP σ h p).toTensor
simp only [permT, Pure.toTensor, LinearMap.coe_comp, LinearEquiv.coe_coe, Function.comp_apply,
PiTensorProduct.reindex_tprod, PiTensorProduct.map_tprod] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σp:Pure S c⊢ ((PiTensorProduct.tprod k) fun i => (LinearEquiv.cast ⋯) (p (h.toEquiv.symm i))) =
(PiTensorProduct.tprod k) (Pure.permP σ h p)
rfl All goals completed! 🐙set_option backward.isDefEq.respectTransparency false in
@[simp]
lemma Pure.permP_id_self {n : ℕ} {c : Fin n → C} (p : Pure S c) :
Pure.permP (id : Fin n → Fin n) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Cp:Pure S c⊢ IsReindexing c c id simp All goals completed! 🐙 : IsReindexing c c id) p = p := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ permP id ⋯ p = p
ext i k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S ci:Fin n⊢ permP id ⋯ p i = p i
simp [Pure.permP] All goals completed! 🐙@[simp]
lemma permT_id_self {n : ℕ} {c : Fin n → C} (t : S.Tensor c) :
permT (id : Fin n → Fin n) (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕc:Fin n → Ct:S.Tensor c⊢ IsReindexing c c id simp All goals completed! 🐙 : IsReindexing c c id) t = t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct:S.Tensor c⊢ (permT id ⋯) t = t
induction t using induction_on_pure with
| h p => h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cp:Pure S c⊢ (permT id ⋯) p.toTensor = p.toTensor simp [permT_pure] All goals completed! 🐙
| hsmul r t ht => hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Cr:kt:S.Tensor cht:(permT id ⋯) t = t⊢ (permT id ⋯) (r • t) = r • t simp [ht] All goals completed! 🐙
| hadd t1 t2 h1 h2 => hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct1:S.Tensor ct2:S.Tensor ch1:(permT id ⋯) t1 = t1h2:(permT id ⋯) t2 = t2⊢ (permT id ⋯) (t1 + t2) = t1 + t2 simp [h1, h2] All goals completed! 🐙lemma permT_congr_eq_id {n : ℕ} {c : Fin n → C} (t : S.Tensor c)
(σ : Fin n → Fin n) (hσ : IsReindexing c c σ) (h : σ = id) :
permT σ (hσ) t = t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct:S.Tensor cσ:Fin n → Fin nhσ:IsReindexing c c σh:σ = id⊢ (permT σ hσ) t = t
subst h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct:S.Tensor chσ:IsReindexing c c id⊢ (permT id hσ) t = t
simp All goals completed! 🐙lemma permT_congr_eq_id' {n : ℕ} {c : Fin n → C} (t t1 : S.Tensor c)
(σ : Fin n → Fin n) (hσ : IsReindexing c c σ) (h : σ = id) (ht : t = t1) :
permT σ (hσ) t = t1 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct:S.Tensor ct1:S.Tensor cσ:Fin n → Fin nhσ:IsReindexing c c σh:σ = idht:t = t1⊢ (permT σ hσ) t = t1
subst h ht k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕc:Fin n → Ct:S.Tensor chσ:IsReindexing c c id⊢ (permT id hσ) t = t
simp All goals completed! 🐙@[simp]
lemma permT_equivariant {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ : Fin m → Fin n} (h : IsReindexing c c1 σ) (g : G) (t : S.Tensor c) :
permT σ h (g • t) = g • permT σ h t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σg:Gt:S.Tensor c⊢ (permT σ h) (g • t) = g • (permT σ h) t
induction t using induction_on_pure with
| h p => h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σg:Gp:Pure S c⊢ (permT σ h) (g • p.toTensor) = g • (permT σ h) p.toTensor simp [actionT_pure, permT_pure, Pure.permP_equivariant] All goals completed! 🐙
| hsmul r t ht => hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σg:Gr:kt:S.Tensor cht:(permT σ h) (g • t) = g • (permT σ h) t⊢ (permT σ h) (g • r • t) = g • (permT σ h) (r • t) simp [ht] All goals completed! 🐙
| hadd t1 t2 h1 h2 => hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σg:Gt1:S.Tensor ct2:S.Tensor ch1:(permT σ h) (g • t1) = g • (permT σ h) t1h2:(permT σ h) (g • t2) = g • (permT σ h) t2⊢ (permT σ h) (g • (t1 + t2)) = g • (permT σ h) (t1 + t2) simp [h1, h2] All goals completed! 🐙@[congr]
lemma Pure.permP_congr {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ σ1 : Fin m → Fin n} {h : IsReindexing c c1 σ} {h1 : IsReindexing c c1 σ1}
{p p1 : Pure S c} (hmap : σ = σ1) (hpure : p = p1) :
Pure.permP σ h p = Pure.permP σ1 h1 p1 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nσ1:Fin m → Fin nh:IsReindexing c c1 σh1:IsReindexing c c1 σ1p:Pure S cp1:Pure S chmap:σ = σ1hpure:p = p1⊢ permP σ h p = permP σ1 h1 p1
subst hmap hpure k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σp:Pure S ch1:IsReindexing c c1 σ⊢ permP σ h p = permP σ h1 p
rfl All goals completed! 🐙@[congr]
lemma permT_congr {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ σ1 : Fin m → Fin n} {h : IsReindexing c c1 σ} {h1 : IsReindexing c c1 σ1}
(hmap : σ = σ1) {t t1: S.Tensor c} (htensor : t = t1) :
permT σ h t = permT σ1 h1 t1 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nσ1:Fin m → Fin nh:IsReindexing c c1 σh1:IsReindexing c c1 σ1hmap:σ = σ1t:S.Tensor ct1:S.Tensor chtensor:t = t1⊢ (permT σ h) t = (permT σ1 h1) t1
subst hmap htensor k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch1:IsReindexing c c1 σ⊢ (permT σ h) t = (permT σ h1) t
rfl All goals completed! 🐙set_option backward.isDefEq.respectTransparency false in
@[simp]
lemma Pure.permP_permP {n m1 m2 : ℕ} {c : Fin n → C} {c1 : Fin m1 → C} {c2 : Fin m2 → C}
{σ : Fin m1 → Fin n} {σ2 : Fin m2 → Fin m1} (h : IsReindexing c c1 σ)
(h2 : IsReindexing c1 c2 σ2) (p : Pure S c) :
Pure.permP σ2 h2 (Pure.permP σ h p) = Pure.permP (σ ∘ σ2) (h.comp h2) p := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2p:Pure S c⊢ permP σ2 h2 (permP σ h p) = permP (σ ∘ σ2) ⋯ p
ext i k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2p:Pure S ci:Fin m2⊢ permP σ2 h2 (permP σ h p) i = permP (σ ∘ σ2) ⋯ p i
simp [permP] All goals completed! 🐙
@[simp]
lemma permT_permT {n m1 m2 : ℕ} {c : Fin n → C} {c1 : Fin m1 → C} {c2 : Fin m2 → C}
{σ : Fin m1 → Fin n} {σ2 : Fin m2 → Fin m1} (h : IsReindexing c c1 σ)
(h2 : IsReindexing c1 c2 σ2) (t : S.Tensor c) :
permT σ2 h2 (permT σ h t) = permT (σ ∘ σ2) (h.comp h2) t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2t:S.Tensor c⊢ (permT σ2 h2) ((permT σ h) t) = (permT (σ ∘ σ2) ⋯) t
induction t using induction_on_basis with
| h b => h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2b:ComponentIdx c⊢ (permT σ2 h2) ((permT σ h) ((basis c) b)) = (permT (σ ∘ σ2) ⋯) ((basis c) b) rw [basis_apply, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2b:ComponentIdx c⊢ (permT σ2 h2) ((permT σ h) (Pure.basisVector c b).toTensor) = (permT (σ ∘ σ2) ⋯) (Pure.basisVector c b).toTensor All goals completed! 🐙 permT_pure, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2b:ComponentIdx c⊢ (permT σ2 h2) (Pure.permP σ h (Pure.basisVector c b)).toTensor = (permT (σ ∘ σ2) ⋯) (Pure.basisVector c b).toTensor All goals completed! 🐙 permT_pure, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2b:ComponentIdx c⊢ (Pure.permP σ2 h2 (Pure.permP σ h (Pure.basisVector c b))).toTensor = (permT (σ ∘ σ2) ⋯) (Pure.basisVector c b).toTensor All goals completed! 🐙 permT_pure, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2b:ComponentIdx c⊢ (Pure.permP σ2 h2 (Pure.permP σ h (Pure.basisVector c b))).toTensor =
(Pure.permP (σ ∘ σ2) ⋯ (Pure.basisVector c b)).toTensor All goals completed! 🐙 Pure.permP_permP h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2b:ComponentIdx c⊢ (Pure.permP (σ ∘ σ2) ⋯ (Pure.basisVector c b)).toTensor = (Pure.permP (σ ∘ σ2) ⋯ (Pure.basisVector c b)).toTensor All goals completed! 🐙] All goals completed! 🐙
| hzero => hzero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2⊢ (permT σ2 h2) ((permT σ h) 0) = (permT (σ ∘ σ2) ⋯) 0 simp All goals completed! 🐙
| hsmul r t h1 => hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2:IsReindexing c1 c2 σ2r:kt:S.Tensor ch1:(permT σ2 h2) ((permT σ h) t) = (permT (σ ∘ σ2) ⋯) t⊢ (permT σ2 h2) ((permT σ h) (r • t)) = (permT (σ ∘ σ2) ⋯) (r • t) simp [h1] All goals completed! 🐙
| hadd t1 t2 h1 h2 => hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm1:ℕm2:ℕc:Fin n → Cc1:Fin m1 → Cc2:Fin m2 → Cσ:Fin m1 → Fin nσ2:Fin m2 → Fin m1h:IsReindexing c c1 σh2✝:IsReindexing c1 c2 σ2t1:S.Tensor ct2:S.Tensor ch1:(permT σ2 h2✝) ((permT σ h) t1) = (permT (σ ∘ σ2) ⋯) t1h2:(permT σ2 h2✝) ((permT σ h) t2) = (permT (σ ∘ σ2) ⋯) t2⊢ (permT σ2 h2✝) ((permT σ h) (t1 + t2)) = (permT (σ ∘ σ2) ⋯) (t1 + t2) simp [h1, h2] All goals completed! 🐙
lemma permT_basis_repr_symm_apply {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ : Fin m → Fin n} (h : IsReindexing c c1 σ) (t : S.Tensor c)
(φ : ComponentIdx c1) :
(basis c1).repr (permT σ h t) φ =
(basis c).repr t (fun i =>
basisIdxCongr (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep bS:TensorSpecies k C G V basisIdx rep bn✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor cφ:ComponentIdx c1i:Fin n⊢ c1 (IsReindexing.inv σ h i) = c i simp [IsReindexing.inv_perserve_color] All goals completed! 🐙) (φ (h.inv σ i))) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor cφ:ComponentIdx c1⊢ ((basis c1).repr ((permT σ h) t)) φ = ((basis c).repr t) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))
induction t using induction_on_basis with
| h b' => h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((permT σ h) ((basis c) b'))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))
rw [basis_apply, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((permT σ h) (Pure.basisVector c b').toTensor)) φ =
((basis c).repr (Pure.basisVector c b').toTensor) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) permT_pure, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr (Pure.permP σ h (Pure.basisVector c b')).toTensor) φ =
((basis c).repr (Pure.basisVector c b').toTensor) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) Pure.permP_basisVector, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr (Pure.basisVector c1 fun i => (basisIdxCongr ⋯) (b' (σ i))).toTensor) φ =
((basis c).repr (Pure.basisVector c b').toTensor) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) ← basis_apply, h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr (Pure.basisVector c b').toTensor) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) ← basis_apply h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))]h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((basis c1).repr ((basis c1) fun i => (basisIdxCongr ⋯) (b' (σ i)))) φ =
((basis c).repr ((basis c) b')) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))
simp only [Basis.repr_self, Finsupp.single_apply] h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ (if (fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ then 1 else 0) =
if b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) then 1 else 0
congr 1 h.e_c k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ ((fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ) = (b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)))
simp only [eq_iff_iff] h.e_c k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ (fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ ↔ b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))
constructor h.e_c.mp k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ (fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ → b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))h.e_c.mpr k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ (b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))) → (fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ
· h.e_c.mp k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ (fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ → b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) intro h' h.e_c.mp k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx ch':(fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ⊢ b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))
funext x h.e_c.mp k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx ch':(fun i => (basisIdxCongr ⋯) (b' (σ i))) = φx:Fin n⊢ b' x = (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h x))
simpa [← h'] using ComponentIdx.congr_right _ _ _
(IsReindexing.inv_apply_apply σ h x).symm All goals completed! 🐙
· h.e_c.mpr k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx c⊢ (b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))) → (fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ intro h' h.e_c.mpr k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx ch':b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))⊢ (fun i => (basisIdxCongr ⋯) (b' (σ i))) = φ
funext x h.e_c.mpr k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1b':ComponentIdx ch':b' = fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))x:Fin m⊢ (basisIdxCongr ⋯) (b' (σ x)) = φ x
simpa [h'] using (ComponentIdx.congr_right _ _ _
(IsReindexing.apply_inv_apply σ h x).symm).symm All goals completed! 🐙
| hzero => hzero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1⊢ ((basis c1).repr ((permT σ h) 0)) φ = ((basis c).repr 0) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) simp All goals completed! 🐙
| hsmul r t h => hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh✝:IsReindexing c c1 σφ:ComponentIdx c1r:kt:S.Tensor ch:((basis c1).repr ((permT σ h✝) t)) φ = ((basis c).repr t) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h✝ i))⊢ ((basis c1).repr ((permT σ h✝) (r • t))) φ =
((basis c).repr (r • t)) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h✝ i)) simp [h] All goals completed! 🐙
| hadd t1 t2 h1 h2 => hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σφ:ComponentIdx c1t1:S.Tensor ct2:S.Tensor ch1:((basis c1).repr ((permT σ h) t1)) φ = ((basis c).repr t1) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))h2:((basis c1).repr ((permT σ h) t2)) φ = ((basis c).repr t2) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i))⊢ ((basis c1).repr ((permT σ h) (t1 + t2))) φ =
((basis c).repr (t1 + t2)) fun i => (basisIdxCongr ⋯) (φ (IsReindexing.inv σ h i)) simp [h1, h2] All goals completed! 🐙
lemma permT_basis {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ : Fin m → Fin n} (h : IsReindexing c c1 σ)
(b : ComponentIdx c) :
(permT σ h) (basis (S := S) c b) = basis c1 (fun i =>
basisIdxCongr (by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S✝:TensorSpecies k C G V basisIdx rep b✝S:TensorSpecies k C G V basisIdx rep b✝n✝:ℕn':ℕn2:ℕc✝:Fin n✝ → Cc':Fin n' → Cc2:Fin n2 → Cn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σb:ComponentIdx ci:Fin m⊢ c (σ i) = c1 i simp [h.2] All goals completed! 🐙) (b (σ i))) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σb:ComponentIdx c⊢ (permT σ h) ((basis c) b) = (basis c1) fun i => (basisIdxCongr ⋯) (b (σ i))
rw [basis_apply, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σb:ComponentIdx c⊢ (permT σ h) (Pure.basisVector c b).toTensor = (basis c1) fun i => (basisIdxCongr ⋯) (b (σ i)) All goals completed! 🐙 permT_pure, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σb:ComponentIdx c⊢ (Pure.permP σ h (Pure.basisVector c b)).toTensor = (basis c1) fun i => (basisIdxCongr ⋯) (b (σ i)) All goals completed! 🐙 Pure.permP_basisVector, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σb:ComponentIdx c⊢ (Pure.basisVector c1 fun i => (basisIdxCongr ⋯) (b (σ i))).toTensor = (basis c1) fun i => (basisIdxCongr ⋯) (b (σ i)) All goals completed! 🐙 ← basis_apply k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝n:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σb:ComponentIdx c⊢ ((basis c1) fun i => (basisIdxCongr ⋯) (b (σ i))) = (basis c1) fun i => (basisIdxCongr ⋯) (b (σ i)) All goals completed! 🐙] All goals completed! 🐙lemma permT_eq_zero_iff {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ : Fin m → Fin n} (h : IsReindexing c c1 σ) (t : S.Tensor c) :
permT σ h t = 0 ↔ t = 0 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor c⊢ (permT σ h) t = 0 ↔ t = 0
refine ⟨fun h' => ?_, fun h' => by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':t = 0⊢ (permT σ h) t = 0 simp [h'] All goals completed! 🐙⟩
have h2 := congrArg (permT (h.inv σ) h.symm) h' k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:(permT (IsReindexing.inv σ h) ⋯) ((permT σ h) t) = (permT (IsReindexing.inv σ h) ⋯) 0⊢ t = 0
rwa [permT_permT, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:(permT (σ ∘ IsReindexing.inv σ h) ⋯) t = (permT (IsReindexing.inv σ h) ⋯) 0⊢ t = 0 map_zero, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:(permT (σ ∘ IsReindexing.inv σ h) ⋯) t = 0⊢ t = 0 permT_congr_eq_id k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:t = 0⊢ t = 0h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:(permT (σ ∘ IsReindexing.inv σ h) ⋯) t = 0⊢ σ ∘ IsReindexing.inv σ h = id] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:t = 0⊢ t = 0h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:(permT (σ ∘ IsReindexing.inv σ h) ⋯) t = 0⊢ σ ∘ IsReindexing.inv σ h = id at h2
funext x h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bn:ℕm:ℕc:Fin n → Cc1:Fin m → Cσ:Fin m → Fin nh:IsReindexing c c1 σt:S.Tensor ch':(permT σ h) t = 0h2:(permT (σ ∘ IsReindexing.inv σ h) ⋯) t = 0x:Fin n⊢ (σ ∘ IsReindexing.inv σ h) x = id x
simp [IsReindexing.inv_apply_apply] All goals completed! 🐙
permT is injective.
lemma permT_injective {n m : ℕ} {c : Fin n → C} {c1 : Fin m → C}
{σ : Fin m → Fin n} (h : IsReindexing c c1 σ) :
Function.Injective (permT (S := S) σ h) :=
(injective_iff_map_eq_zero' _).mpr (permT_eq_zero_iff h)field
lemma toField_default {c : Fin 0 → C} :
toField (Pure.toTensor default : S.Tensor c) = 1 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → C⊢ toField default.toTensor = 1
simp [toField, Pure.toTensor] All goals completed! 🐙lemma toField_injective {c : Fin 0 → C} :
Function.Injective (toField : S.Tensor c → k) :=
(PiTensorProduct.isEmptyEquiv (Fin 0)).injective
@[simp]
lemma toField_pure {c : Fin 0 → C} (p : Pure S c) :
toField (p.toTensor : S.Tensor c) = 1 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cp:Pure S c⊢ toField p.toTensor = 1
rw [Subsingleton.elim p default, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cp:Pure S c⊢ toField default.toTensor = 1 All goals completed! 🐙 toField_default k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cp:Pure S c⊢ 1 = 1 All goals completed! 🐙] All goals completed! 🐙lemma toField_permT {c c1 : Fin 0 → C} (σ : Fin 0 → Fin 0)
(h : IsReindexing c c1 σ) (t : S.Tensor c) :
toField (permT σ h t) = toField t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σt:S.Tensor c⊢ toField ((permT σ h) t) = toField t
induction' t using induction_on_basis with b r t ht t1 t2 h1 h2 h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σb:ComponentIdx c⊢ toField ((permT σ h) ((basis c) b)) = toField ((basis c) b)hzero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σ⊢ toField ((permT σ h) 0) = toField 0hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σr:kt:S.Tensor cht:toField ((permT σ h) t) = toField t⊢ toField ((permT σ h) (r • t)) = toField (r • t)hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σt1:S.Tensor ct2:S.Tensor ch1:toField ((permT σ h) t1) = toField t1h2:toField ((permT σ h) t2) = toField t2⊢ toField ((permT σ h) (t1 + t2)) = toField (t1 + t2)
· h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σb:ComponentIdx c⊢ toField ((permT σ h) ((basis c) b)) = toField ((basis c) b) simp [toField_pure, basis_apply, permT_pure] All goals completed! 🐙
· hzero k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σ⊢ toField ((permT σ h) 0) = toField 0 simp All goals completed! 🐙
· hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σr:kt:S.Tensor cht:toField ((permT σ h) t) = toField t⊢ toField ((permT σ h) (r • t)) = toField (r • t) simp [ht] All goals completed! 🐙
· hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cc1:Fin 0 → Cσ:Fin 0 → Fin 0h:IsReindexing c c1 σt1:S.Tensor ct2:S.Tensor ch1:toField ((permT σ h) t1) = toField t1h2:toField ((permT σ h) t2) = toField t2⊢ toField ((permT σ h) (t1 + t2)) = toField (t1 + t2) simp [h1, h2] All goals completed! 🐙@[simp]
lemma toField_basis_default {c : Fin 0 → C} :
toField (basis c (@default (ComponentIdx (S := S) c) Unique.instInhabited)) = 1 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → C⊢ toField ((basis c) default) = 1
simp [basis_apply] All goals completed! 🐙lemma toField_basis {c : Fin 0 → C} (b : ComponentIdx (S := S) c) :
toField (basis c b) = 1 := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b✝:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep b✝c:Fin 0 → Cb:ComponentIdx c⊢ toField ((basis c) b) = 1
simp [basis_apply] All goals completed! 🐙
lemma toField_eq_repr {c : Fin 0 → C} (t : Tensor S c) :
t.toField = (basis c).repr t (fun j => Fin.elim0 j) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:S.Tensor c⊢ toField t = ((basis c).repr t) fun j => j.elim0
obtain ⟨t, rfl⟩ := (basis c).repr.symm.surjective t k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ toField ((basis c).repr.symm t) = ((basis c).repr ((basis c).repr.symm t)) fun j => j.elim0
simp only [Basis.repr_symm_apply, Basis.repr_linearCombination] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ toField ((Finsupp.linearCombination k ⇑(basis c)) t) = t fun j => j.elim0
rw [Finsupp.linearCombination_unique, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ toField (t default • (basis c) default) = t fun j => j.elim0 k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default = t fun j => j.elim0 map_smul, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default • toField ((basis c) default) = t fun j => j.elim0 k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default = t fun j => j.elim0 toField_basis_default, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default • 1 = t fun j => j.elim0 k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default = t fun j => j.elim0 smul_eq_mul, k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default * 1 = t fun j => j.elim0 k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default = t fun j => j.elim0 mul_one k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default = t fun j => j.elim0 k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default = t fun j => j.elim0] k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:ComponentIdx c →₀ k⊢ t default = t fun j => j.elim0
rfl All goals completed! 🐙@[simp]
lemma toField_equivariant {c : Fin 0 → C} (g : G) (t : Tensor S c) :
toField (g • t) = toField t := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cg:Gt:S.Tensor c⊢ toField (g • t) = toField t
induction t using induction_on_pure with
| h p => h k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cg:Gp:Pure S c⊢ toField (g • p.toTensor) = toField p.toTensor simp [actionT_pure] All goals completed! 🐙
| hsmul r t hp => hsmul k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cg:Gr:kt:S.Tensor chp:toField (g • t) = toField t⊢ toField (g • r • t) = toField (r • t) simp [hp] All goals completed! 🐙
| hadd t1 t2 hp1 hp2 => hadd k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Cg:Gt1:S.Tensor ct2:S.Tensor chp1:toField (g • t1) = toField t1hp2:toField (g • t2) = toField t2⊢ toField (g • (t1 + t2)) = toField (t1 + t2) simp [hp1, hp2] All goals completed! 🐙lemma eq_smul_toField {c : Fin 0 → C} (t : Tensor S c) :
t = toField t • (basis c (@default (ComponentIdx (S := S) c) Unique.instInhabited)) := by k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:S.Tensor c⊢ t = toField t • (basis c) default
apply toField_injective k:Typeinst✝⁵:CommRing kC:TypeG:Typeinst✝⁴:Group GV:C → Typeinst✝³:(c : C) → AddCommGroup (V c)inst✝²:(c : C) → Module k (V c)basisIdx:C → Typeinst✝¹:(c : C) → Fintype (basisIdx c)inst✝:(c : C) → DecidableEq (basisIdx c)rep:(c : C) → Representation k G (V c)b:(c : C) → Basis (basisIdx c) k (V c)S:TensorSpecies k C G V basisIdx rep bc:Fin 0 → Ct:S.Tensor c⊢ toField t = toField (toField t • (basis c) default)
simp All goals completed! 🐙