PhysLean/HepLean/FeynmanDiagrams/Instances/ComplexScalar.lean
2024-07-12 11:23:02 -04:00

65 lines
1.7 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/-
Copyright (c) 2024 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license.
Authors: Joseph Tooby-Smith
-/
import HepLean.FeynmanDiagrams.Basic
/-!
# Feynman diagrams in a complex scalar field theory
-/
namespace PhiFour
open CategoryTheory
open FeynmanDiagram
open PreFeynmanRule
/-- The pre-Feynman rules for a complex scalar theory. -/
@[simps!]
def complexScalarFeynmanRules : PreFeynmanRule where
/- There is 2 types of `half-edge`. -/
HalfEdgeLabel := Fin 2
/- There is only 1 type of `edge`. -/
EdgeLabel := Fin 1
/- There are two types of `vertex`, two external `0` and internal `1`. -/
VertexLabel := Fin 3
edgeLabelMap x :=
match x with
| 0 => Over.mk ![0, 1]
vertexLabelMap x :=
match x with
| 0 => Over.mk ![0]
| 1 => Over.mk ![1]
| 2 => Over.mk ![0, 0, 1, 1]
instance (a : ) : OfNat complexScalarFeynmanRules.EdgeLabel a where
ofNat := (a : Fin _)
instance (a : ) : OfNat complexScalarFeynmanRules.HalfEdgeLabel a where
ofNat := (a : Fin _)
instance (a : ) : OfNat complexScalarFeynmanRules.VertexLabel a where
ofNat := (a : Fin _)
instance : IsFinitePreFeynmanRule complexScalarFeynmanRules where
edgeLabelDecidable := instDecidableEqFin _
vertexLabelDecidable := instDecidableEqFin _
halfEdgeLabelDecidable := instDecidableEqFin _
vertexMapFintype := fun v =>
match v with
| 0 => Fin.fintype _
| 1 => Fin.fintype _
| 2 => Fin.fintype _
edgeMapFintype := fun v =>
match v with
| 0 => Fin.fintype _
vertexMapDecidable := fun v =>
match v with
| 0 => instDecidableEqFin _
| 1 => instDecidableEqFin _
| 2 => instDecidableEqFin _
edgeMapDecidable := fun v =>
match v with
| 0 => instDecidableEqFin _
end PhiFour