From 79cba76a2f7fa4e27b0684604b174c8469410d77 Mon Sep 17 00:00:00 2001 From: jstoobysmith <72603918+jstoobysmith@users.noreply.github.com> Date: Mon, 2 Dec 2024 06:00:59 +0000 Subject: [PATCH] docs: Improve some documentation --- HepLean/FeynmanDiagrams/Wick/Algebra.lean | 10 ++--- HepLean/FeynmanDiagrams/Wick/Species.lean | 5 ++- HepLean/FeynmanDiagrams/Wick/String.lean | 46 ++++++++++++----------- 3 files changed, 33 insertions(+), 28 deletions(-) diff --git a/HepLean/FeynmanDiagrams/Wick/Algebra.lean b/HepLean/FeynmanDiagrams/Wick/Algebra.lean index d4a7f076..0460774f 100644 --- a/HepLean/FeynmanDiagrams/Wick/Algebra.lean +++ b/HepLean/FeynmanDiagrams/Wick/Algebra.lean @@ -34,10 +34,10 @@ informal_definition WickAlgebra where A structure with the following data: - A β„€β‚‚-graded algebra A. - A map from `ψ : 𝓔 Γ— SpaceTime β†’ A` where 𝓔 are field colors. - - A map `Οˆβ‚Š : 𝓔 Γ— SpaceTime β†’ A`. - - A map `Οˆβ‚‹ : 𝓔 Γ— SpaceTime β†’ A`. + - A map `ψc : 𝓔 Γ— SpaceTime β†’ A`. + - A map `ψd : 𝓔 Γ— SpaceTime β†’ A`. Subject to the conditions: - - The sum of `ψ0` and `ψ1` is `ψ`. + - The sum of `ψc` and `ψd` is `ψ`. - Two fields super-commute if there colors are not dual to each other. - The super-commutator of two fields is always in the center of the algebra. " @@ -65,8 +65,8 @@ informal_definition timeOrder where informal_definition normalOrder where math :β‰ˆ "A function from WickMonomial to WickAlgebra which takes a monomial and returns the element in `WickAlgebra` defined as follows - - The Οˆβ‚Š fields are move to the right. - - The Οˆβ‚‹ fields are moved to the left. + - The ψd fields are move to the right. + - The ψc fields are moved to the left. - Othewise the order of the fields is preserved." ref :β‰ˆ "https://www.imperial.ac.uk/media/imperial-college/research-centres-and-groups/theoretical-physics/msc/current/qft/handouts/qftwickstheorem.pdf" deps :β‰ˆ [``WickAlgebra, ``WickMonomial] diff --git a/HepLean/FeynmanDiagrams/Wick/Species.lean b/HepLean/FeynmanDiagrams/Wick/Species.lean index d74ea93f..9f9450c7 100644 --- a/HepLean/FeynmanDiagrams/Wick/Species.lean +++ b/HepLean/FeynmanDiagrams/Wick/Species.lean @@ -22,7 +22,8 @@ namespace Wick /-- The basic structure needed to write down Wick contractions for a theory and calculate the corresponding Feynman diagrams. - WARNING: This definition is not yet complete. -/ + WARNING: This definition is not yet complete. + -/ structure Species where /-- The color of Field operators which appear in a theory. -/ 𝓕 : Type @@ -32,7 +33,7 @@ structure Species where ΞΎ_involutive : Function.Involutive ΞΎ /-- The color of vertices which appear in a theory. -/ π“₯ : Type - /-- The number of edges each vertex corresponds to. -/ + /-- The edges each vertex corresponds to. -/ π“₯Fields : π“₯ β†’ Ξ£ n, Fin n β†’ 𝓕 end Wick diff --git a/HepLean/FeynmanDiagrams/Wick/String.lean b/HepLean/FeynmanDiagrams/Wick/String.lean index cc992940..50e96ae6 100644 --- a/HepLean/FeynmanDiagrams/Wick/String.lean +++ b/HepLean/FeynmanDiagrams/Wick/String.lean @@ -133,41 +133,45 @@ def size {ni : β„•} {i : Fin ni β†’ 𝓔} {n : β„•} {c : Fin n β†’ 𝓔} {no : | endOutgoing w => size w + 1 /-- The number of vertices in a Wick string. This does NOT include external vertices. -/ -def numVertex {ni : β„•} {i : Fin ni β†’ 𝓔} {n : β„•} {c : Fin n β†’ 𝓔} {no : β„•} {o : Fin no β†’ 𝓔} +def numIntVertex {ni : β„•} {i : Fin ni β†’ 𝓔} {n : β„•} {c : Fin n β†’ 𝓔} {no : β„•} {o : Fin no β†’ 𝓔} {f : WickStringLast} : WickString i c o f β†’ β„• := fun | empty => 0 - | incoming w e => numVertex w - | endIncoming w => numVertex w - | vertex w v => numVertex w + 1 - | endVertex w => numVertex w - | outgoing w e => numVertex w - | endOutgoing w => numVertex w + | incoming w e => numIntVertex w + | endIncoming w => numIntVertex w + | vertex w v => numIntVertex w + 1 + | endVertex w => numIntVertex w + | outgoing w e => numIntVertex w + | endOutgoing w => numIntVertex w /-- The vertices present in a Wick string. This does NOT include external vertices. -/ -def vertices {ni : β„•} {i : Fin ni β†’ 𝓔} {n : β„•} {c : Fin n β†’ 𝓔} {no : β„•} {o : Fin no β†’ 𝓔} - {f : WickStringLast} : (w : WickString i c o f) β†’ Fin w.numVertex β†’ π“₯ := fun +def intVertex {ni : β„•} {i : Fin ni β†’ 𝓔} {n : β„•} {c : Fin n β†’ 𝓔} {no : β„•} {o : Fin no β†’ 𝓔} + {f : WickStringLast} : (w : WickString i c o f) β†’ Fin w.numIntVertex β†’ π“₯ := fun | empty => Fin.elim0 - | incoming w e => vertices w - | endIncoming w => vertices w - | vertex w v => Fin.cons v (vertices w) - | endVertex w => vertices w - | outgoing w e => vertices w - | endOutgoing w => vertices w - -informal_definition fieldToVertex where - math :β‰ˆ "A function which takes a field and returns the vertex it is associated with. - This is a map from `Fin n` to `Fin w.numVertex`" + | incoming w e => intVertex w + | endIncoming w => intVertex w + | vertex w v => Fin.cons v (intVertex w) + | endVertex w => intVertex w + | outgoing w e => intVertex w + | endOutgoing w => intVertex w + +informal_definition intExtVertex where + math :β‰ˆ "The vertices present in a Wick string, including external vertices." + deps :β‰ˆ [``WickString] + +informal_definition fieldToIntExtVertex where + math :β‰ˆ "A function which takes a field and returns the internal or + external vertex it is associated with." deps :β‰ˆ [``WickString] informal_definition exponentialPrefactor where math :β‰ˆ "The combinatorical prefactor from the expansion of the exponential associated with a Wick string." - deps :β‰ˆ [``vertices, ``WickString] + deps :β‰ˆ [``intVertex, ``WickString] informal_definition vertexPrefactor where math :β‰ˆ "The prefactor arising from the coefficent of vertices in the Lagrangian. This should not take account of the exponential prefactor." - deps :β‰ˆ [``vertices, ``WickString] + deps :β‰ˆ [``intVertex, ``WickString] informal_definition minNoLoops where math :β‰ˆ "The minimum number of loops a Feynman diagram based on a given Wick string can have.