feat: Indices for index notation

This commit is contained in:
jstoobysmith 2024-08-01 15:08:02 -04:00
parent 717c4b0681
commit 52bb0bda79
4 changed files with 439 additions and 76 deletions

View file

@ -11,7 +11,6 @@ import HepLean.SpaceTime.LorentzTensor.MulActionTensor
# Real Lorentz tensors
-/
noncomputable section
open TensorProduct
open minkowskiMatrix
@ -29,8 +28,43 @@ inductive ColorType
| up
| down
def colorTypEquivFin1Fin1 : ColorType ≃ Fin 1 ⊕ Fin 1 where
toFun
| ColorType.up => Sum.inl ⟨0, Nat.zero_lt_one⟩
| ColorType.down => Sum.inr ⟨0, Nat.zero_lt_one⟩
invFun
| Sum.inl _ => ColorType.up
| Sum.inr _ => ColorType.down
left_inv := by
intro x
cases x
simp
simp
right_inv := by
intro x
cases x
simp
rename_i f
exact (Fin.fin_one_eq_zero f).symm
simp
rename_i f
exact (Fin.fin_one_eq_zero f).symm
instance : DecidableEq realTensor.ColorType :=
Equiv.decidableEq colorTypEquivFin1Fin1
instance : Fintype realTensor.ColorType where
elems := {realTensor.ColorType.up, realTensor.ColorType.down}
complete := by
intro x
cases x
simp
simp
end realTensor
noncomputable section
open realTensor
/-! TODO: Set up the notation `𝓛𝓣` or similar. -/
@ -88,6 +122,10 @@ def realLorentzTensor (d : ) : TensorStructure where
| realTensor.ColorType.up => asTenProd_contr_asCoTenProd
| realTensor.ColorType.down => asCoTenProd_contr_asTenProd
instance : Fintype (realLorentzTensor d).Color := realTensor.instFintypeColorType
instance : DecidableEq (realLorentzTensor d).Color := realTensor.instDecidableEqColorType
/-- The action of the Lorentz group on real Lorentz tensors. -/
instance : MulActionTensor (LorentzGroup d) (realLorentzTensor d) where
repColorModule μ :=