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.ComplexTensor.Basic public import Physlib.Mathematics.RatComplexNum public import Physlib.Relativity.Tensors.Dual

Basis for tensors in a tensor species

@[expose] public section@[simp] lemma ofRat_basis_repr_apply {n : } {c : Fin n complexLorentzTensor.Color} (f : (ComponentIdx c) RatComplexNum) (b :(ComponentIdx c)) : (Tensor.basis c).repr (ofRat f) b = toComplexNum (f b) := n:c:Fin n Colorf:ComponentIdx c RatComplexNumb:ComponentIdx c((Tensor.basis c).repr (ofRat f)) b = toComplexNum (f b) All goals completed! 🐙n:c:Fin n Colorb:ComponentIdx cb':ComponentIdx c(if b = b' then 1 else 0) = { toFun := fun x => x.fst + x.snd * Complex.I, map_one' := toComplexNum._proof_1, map_mul' := , map_zero' := toComplexNum._proof_3, map_add' := } (if b = b' then { fst := 1, snd := 0 } else { fst := 0, snd := 0 }) n:c:Fin n Colorb:ComponentIdx cb':ComponentIdx c(if b = b' then 1 else 0) = (if b = b' then { fst := 1, snd := 0 } else { fst := 0, snd := 0 }).fst + (if b = b' then { fst := 1, snd := 0 } else { fst := 0, snd := 0 }).snd * Complex.I n:c:Fin n Colorb:ComponentIdx cb':ComponentIdx ch✝:b = b'1 = { fst := 1, snd := 0 }.fst + { fst := 1, snd := 0 }.snd * Complex.In:c:Fin n Colorb:ComponentIdx cb':ComponentIdx ch✝:¬b = b'0 = { fst := 0, snd := 0 }.fst + { fst := 0, snd := 0 }.snd * Complex.I n:c:Fin n Colorb:ComponentIdx cb':ComponentIdx ch✝:¬b = b'0 = { fst := 0, snd := 0 }.fst + { fst := 0, snd := 0 }.snd * Complex.I All goals completed! 🐙c:Colori:Fin (repDim Color.down)j:Fin (repDim (complexLorentzTensor.τ Color.down))(if i = j then 1 else 0) = toComplexNum (if i = j then 1 else 0) All goals completed! 🐙n:n1:c:Fin n Colorf:ComponentIdx c RatComplexNumc1:Fin n1 Colorf1:ComponentIdx c1 RatComplexNumb:ComponentIdx (Fin.append c c1)((Tensor.basis c).repr (ofRat f)) (ComponentIdx.prod b).1 * ((Tensor.basis c1).repr (ofRat f1)) (ComponentIdx.prod b).2 = ((Tensor.basis (Fin.append c c1)).repr (ofRat fun b => f (ComponentIdx.prod b).1 * f1 (ComponentIdx.prod b).2)) b All goals completed! 🐙n:c:Fin (n + 1 + 1) Colori:Fin (n + 1 + 1)j:Fin (n + 1 + 1)h:i j complexLorentzTensor.τ (c i) = c jf:ComponentIdx c RatComplexNumb:ComponentIdx (c i.succSuccAbove j)toComplexNum (∑ x, f x * if (x i) = ((basisIdxCongr ) (x j)) then 1 else 0) = toComplexNum (∑ x, f x * if (x i) = (x j) then 1 else 0) All goals completed! 🐙n:c:Fin (n + 1 + 1) Colori:Fin (n + 1 + 1)j:Fin (n + 1 + 1)h:i j complexLorentzTensor.τ (c i) = c jf:ComponentIdx c RatComplexNumb:ComponentIdx (c i.succSuccAbove j)x:Fin (repDim (c i))y:Fin (repDim (c j))a✝:y Finset.univhy:y (Fin.cast x)¬x = y n:c:Fin (n + 1 + 1) Colori:Fin (n + 1 + 1)j:Fin (n + 1 + 1)h:i j complexLorentzTensor.τ (c i) = c jf:ComponentIdx c RatComplexNumb:ComponentIdx (c i.succSuccAbove j)x:Fin (repDim (c i))y:Fin (repDim (c j))a✝:y Finset.univhy:¬y = x¬x = y All goals completed! 🐙 n:c:Fin (n + 1 + 1) Colori:Fin (n + 1 + 1)j:Fin (n + 1 + 1)h:i j complexLorentzTensor.τ (c i) = c jf:ComponentIdx c RatComplexNumb:ComponentIdx (c i.succSuccAbove j)x:Fin (repDim (c i))Fin.cast x Finset.univ (f ((DropPairSection.ofFinEquiv b) (x, Fin.cast x)) * if (((DropPairSection.ofFinEquiv b) (x, Fin.cast x)) i) = (((DropPairSection.ofFinEquiv b) (x, Fin.cast x)) j) then 1 else 0) = 0 All goals completed! 🐙lemma permT_ofRat {n m : } {c : Fin n complexLorentzTensor.Color} {c1 : Fin m complexLorentzTensor.Color} {σ : Fin m Fin n} (h : IsReindexing c c1 σ) (f : ComponentIdx c RatComplexNum) : (permT σ h ((ofRat f))) = ((ofRat (fun b => f (fun i => Fin.cast (n:m:c:Fin n Colorc1:Fin m Colorσ:Fin m Fin nh:IsReindexing c c1 σf:ComponentIdx c RatComplexNumb:ComponentIdx c1i:Fin nrepDim (c1 (IsReindexing.inv σ h i)) = repDim (c i) All goals completed! 🐙) (b (h.inv σ i)))))) := n:m:c:Fin n Colorc1:Fin m Colorσ:Fin m Fin nh:IsReindexing c c1 σf:ComponentIdx c RatComplexNum(permT σ h) (ofRat f) = ofRat fun b => f fun i => Fin.cast (b (IsReindexing.inv σ h i)) n:m:c:Fin n Colorc1:Fin m Colorσ:Fin m Fin nh:IsReindexing c c1 σf:ComponentIdx c RatComplexNum(Tensor.basis c1).repr ((permT σ h) (ofRat f)) = (Tensor.basis c1).repr (ofRat fun b => f fun i => Fin.cast (b (IsReindexing.inv σ h i))) n:m:c:Fin n Colorc1:Fin m Colorσ:Fin m Fin nh:IsReindexing c c1 σf:ComponentIdx c RatComplexNumb:ComponentIdx c1((Tensor.basis c1).repr ((permT σ h) (ofRat f))) b = ((Tensor.basis c1).repr (ofRat fun b => f fun i => Fin.cast (b (IsReindexing.inv σ h i)))) b n:m:c:Fin n Colorc1:Fin m Colorσ:Fin m Fin nh:IsReindexing c c1 σf:ComponentIdx c RatComplexNumb:ComponentIdx c1toComplexNum (f fun i => (basisIdxCongr ) (b (IsReindexing.inv σ h i))) = toComplexNum (f fun i => Fin.cast (b (IsReindexing.inv σ h i))) n:m:c:Fin n Colorc1:Fin m Colorσ:Fin m Fin nh:IsReindexing c c1 σf:ComponentIdx c RatComplexNumb:ComponentIdx c1(fun i => (basisIdxCongr ) (b (IsReindexing.inv σ h i))) = fun i => Fin.cast (b (IsReindexing.inv σ h i)) n:m:c:Fin n Colorc1:Fin m Colorσ:Fin m Fin nh:IsReindexing c c1 σf:ComponentIdx c RatComplexNumb:ComponentIdx c1i:Fin n((basisIdxCongr ) (b (IsReindexing.inv σ h i))) = (Fin.cast (b (IsReindexing.inv σ h i))) All goals completed! 🐙