Skip to content

Commit

Permalink
Merge pull request #196 from HEPLean/IndexNotation
Browse files Browse the repository at this point in the history
refactor: Index notation
  • Loading branch information
jstoobysmith authored Oct 16, 2024
2 parents 70f2738 + c73ae1a commit ac11a51
Show file tree
Hide file tree
Showing 12 changed files with 447 additions and 730 deletions.
4 changes: 1 addition & 3 deletions HepLean.lean
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ import HepLean.StandardModel.HiggsBoson.Potential
import HepLean.StandardModel.Representations
import HepLean.Tensors.Basic
import HepLean.Tensors.ComplexLorentz.Basic
import HepLean.Tensors.ComplexLorentz.ColorFun
import HepLean.Tensors.ComplexLorentz.ContrNatTransform
import HepLean.Tensors.ComplexLorentz.Examples
import HepLean.Tensors.ComplexLorentz.TensorStruct
import HepLean.Tensors.Contraction
import HepLean.Tensors.EinsteinNotation.Basic
import HepLean.Tensors.EinsteinNotation.IndexNotation
Expand All @@ -138,6 +135,7 @@ import HepLean.Tensors.IndexNotation.IndexString
import HepLean.Tensors.IndexNotation.TensorIndex
import HepLean.Tensors.MulActionTensor
import HepLean.Tensors.OverColor.Basic
import HepLean.Tensors.OverColor.Discrete
import HepLean.Tensors.OverColor.Functors
import HepLean.Tensors.OverColor.Iso
import HepLean.Tensors.OverColor.Lift
Expand Down
99 changes: 72 additions & 27 deletions HepLean/Tensors/ComplexLorentz/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.Tensors.OverColor.Basic
import HepLean.Tensors.Tree.Dot
import HepLean.SpaceTime.WeylFermion.Contraction
import HepLean.SpaceTime.WeylFermion.Metric
import HepLean.SpaceTime.WeylFermion.Unit
import HepLean.SpaceTime.LorentzVector.Complex.Contraction
import HepLean.SpaceTime.LorentzVector.Complex.Metric
import HepLean.SpaceTime.LorentzVector.Complex.Unit
import HepLean.Mathematics.PiTensorProduct
import HepLean.SpaceTime.PauliMatrices.AsTensor
/-!
## Complex Lorentz tensors
Expand All @@ -30,34 +38,71 @@ inductive Color
| up : Color
| down : Color

/-- The involution taking a colour to its dual. -/
def τ : Color → Color
| Color.upL => Color.downL
| Color.downL => Color.upL
| Color.upR => Color.downR
| Color.downR => Color.upR
| Color.up => Color.down
| Color.down => Color.up

/-- The function taking a color to the dimension of the basis of vectors. -/
def evalNo : Color → ℕ
| Color.upL => 2
| Color.downL => 2
| Color.upR => 2
| Color.downR => 2
| Color.up => 4
| Color.down => 4

noncomputable section
/-- The corresponding representations associated with a color. -/
def colorToRep (c : Color) : Rep ℂ SL(2, ℂ) :=
match c with
| Color.upL => Fermion.altLeftHanded
| Color.downL => Fermion.leftHanded
| Color.upR => Fermion.altRightHanded
| Color.downR => Fermion.rightHanded
| Color.up => Lorentz.complexContr
| Color.down => Lorentz.complexCo

/-- The tensor structure for complex Lorentz tensors. -/
def complexLorentzTensor : TensorStruct where
C := Fermion.Color
G := SL(2, ℂ)
G_group := inferInstance
k := ℂ
k_commRing := inferInstance
FDiscrete := Discrete.functor fun c =>
match c with
| Color.upL => Fermion.leftHanded
| Color.downL => Fermion.altLeftHanded
| Color.upR => Fermion.rightHanded
| Color.downR => Fermion.altRightHanded
| Color.up => Lorentz.complexContr
| Color.down => Lorentz.complexCo
τ := fun c =>
match c with
| Color.upL => Color.downL
| Color.downL => Color.upL
| Color.upR => Color.downR
| Color.downR => Color.upR
| Color.up => Color.down
| Color.down => Color.up
τ_involution c := by
match c with
| Color.upL => rfl
| Color.downL => rfl
| Color.upR => rfl
| Color.downR => rfl
| Color.up => rfl
| Color.down => rfl
contr := Discrete.natTrans fun c =>
match c with
| Discrete.mk Color.upL => Fermion.leftAltContraction
| Discrete.mk Color.downL => Fermion.altLeftContraction
| Discrete.mk Color.upR => Fermion.rightAltContraction
| Discrete.mk Color.downR => Fermion.altRightContraction
| Discrete.mk Color.up => Lorentz.contrCoContraction
| Discrete.mk Color.down => Lorentz.coContrContraction
metric := Discrete.natTrans fun c =>
match c with
| Discrete.mk Color.upL => Fermion.leftMetric
| Discrete.mk Color.downL => Fermion.altLeftMetric
| Discrete.mk Color.upR => Fermion.rightMetric
| Discrete.mk Color.downR => Fermion.altRightMetric
| Discrete.mk Color.up => Lorentz.contrMetric
| Discrete.mk Color.down => Lorentz.coMetric
unit := Discrete.natTrans fun c =>
match c with
| Discrete.mk Color.upL => Fermion.altLeftLeftUnit
| Discrete.mk Color.downL => Fermion.leftAltLeftUnit
| Discrete.mk Color.upR => Fermion.altRightRightUnit
| Discrete.mk Color.downR => Fermion.rightAltRightUnit
| Discrete.mk Color.up => Lorentz.coContrUnit
| Discrete.mk Color.down => Lorentz.contrCoUnit
evalNo := fun c =>
match c with
| Color.upL => 2
| Color.downL => 2
| Color.upR => 2
| Color.downR => 2
| Color.up => 4
| Color.down => 4

end
end Fermion
Loading

0 comments on commit ac11a51

Please sign in to comment.