PhysLean/HepLean/PerturbationTheory/FieldStruct/CreateAnnihilate.lean
Joseph Tooby-Smith 17f84b7153
feat: Time dependent Wick theorem. (#274)
feat: Proof of the time-dependent Wick's theorem
2025-01-20 15:17:48 +00:00

82 lines
3.4 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) 2025 Joseph Tooby-Smith. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joseph Tooby-Smith
-/
import HepLean.PerturbationTheory.FieldStruct.Basic
import HepLean.PerturbationTheory.CreateAnnihilate
/-!
# Creation and annihlation parts of fields
-/
namespace FieldStruct
variable (𝓕 : FieldStruct)
/-- To each state the specificaition of the type of creation and annihlation parts.
For asymptotic staes there is only one allowed part, whilst for position states
there is two. -/
def statesToCrAnType : 𝓕.States → Type
| States.negAsymp _ => Unit
| States.position _ => CreateAnnihilate
| States.posAsymp _ => Unit
/-- The instance of a finite type on `𝓕.statesToCreateAnnihilateType i`. -/
instance : ∀ i, Fintype (𝓕.statesToCrAnType i) := fun i =>
match i with
| States.negAsymp _ => inferInstanceAs (Fintype Unit)
| States.position _ => inferInstanceAs (Fintype CreateAnnihilate)
| States.posAsymp _ => inferInstanceAs (Fintype Unit)
/-- The instance of a decidable equality on `𝓕.statesToCreateAnnihilateType i`. -/
instance : ∀ i, DecidableEq (𝓕.statesToCrAnType i) := fun i =>
match i with
| States.negAsymp _ => inferInstanceAs (DecidableEq Unit)
| States.position _ => inferInstanceAs (DecidableEq CreateAnnihilate)
| States.posAsymp _ => inferInstanceAs (DecidableEq Unit)
/-- The equivalence between `𝓕.statesToCreateAnnihilateType i` and
`𝓕.statesToCreateAnnihilateType j` from an equality `i = j`. -/
def statesToCreateAnnihilateTypeCongr : {i j : 𝓕.States} → i = j →
𝓕.statesToCrAnType i ≃ 𝓕.statesToCrAnType j
| _, _, rfl => Equiv.refl _
/-- A creation and annihlation state is a state plus an valid specification of the
creation or annihliation part of that state. (For asympotic states there is only one valid
choice). -/
def CrAnStates : Type := Σ (s : 𝓕.States), 𝓕.statesToCrAnType s
/-- The map from creation and annihlation states to their underlying states. -/
def crAnStatesToStates : 𝓕.CrAnStates → 𝓕.States := Sigma.fst
@[simp]
lemma crAnStatesToStates_prod (s : 𝓕.States) (t : 𝓕.statesToCrAnType s) :
𝓕.crAnStatesToStates ⟨s, t⟩ = s := rfl
/-- The map from creation and annihlation states to the type `CreateAnnihilate`
specifying if a state is a creation or an annihilation state. -/
def crAnStatesToCreateAnnihilate : 𝓕.CrAnStates → CreateAnnihilate
| ⟨States.negAsymp _, _⟩ => CreateAnnihilate.create
| ⟨States.position _, CreateAnnihilate.create⟩ => CreateAnnihilate.create
| ⟨States.position _, CreateAnnihilate.annihilate⟩ => CreateAnnihilate.annihilate
| ⟨States.posAsymp _, _⟩ => CreateAnnihilate.annihilate
/-- Takes a `CrAnStates` state to its corresponding fields statistic (bosonic or fermionic). -/
def crAnStatistics : 𝓕.CrAnStates → FieldStatistic :=
𝓕.statesStatistic ∘ 𝓕.crAnStatesToStates
/-- The field statistic of a `CrAnState`. -/
scoped[FieldStruct] notation 𝓕 "|>ₛ" φ =>
(crAnStatistics 𝓕) φ
/-- The field statistic of a list of `CrAnState`s. -/
scoped[FieldStruct] notation 𝓕 "|>ₛ" φ => FieldStatistic.ofList
(crAnStatistics 𝓕) φ
/-- The `CreateAnnihilate` value of a `CrAnState`s, i.e. whether it is a creation or
annihilation operator. -/
scoped[FieldStruct] infixl:80 "|>ᶜ" =>
crAnStatesToCreateAnnihilate
end FieldStruct