refactor: Lint
This commit is contained in:
parent
52e591fa7a
commit
9f27a3a9fd
46 changed files with 176 additions and 168 deletions
|
@ -92,7 +92,7 @@ def preimageType' {𝓥 : Type} (v : 𝓥) : Over 𝓥 ⥤ Type where
|
|||
def preimageVertex {𝓔 𝓥 : Type} (v : 𝓥) :
|
||||
Over (P.HalfEdgeLabel × 𝓔 × 𝓥) ⥤ Over P.HalfEdgeLabel where
|
||||
obj f := Over.mk (fun x => Prod.fst (f.hom x.1) :
|
||||
(P.toVertex ⋙ preimageType' v).obj f ⟶ P.HalfEdgeLabel)
|
||||
(P.toVertex ⋙ preimageType' v).obj f ⟶ P.HalfEdgeLabel)
|
||||
map {f g} F := Over.homMk ((P.toVertex ⋙ preimageType' v).map F)
|
||||
(funext <| fun x => congrArg Prod.fst <| congrFun F.w x.1)
|
||||
|
||||
|
@ -101,7 +101,7 @@ def preimageVertex {𝓔 𝓥 : Type} (v : 𝓥) :
|
|||
def preimageEdge {𝓔 𝓥 : Type} (v : 𝓔) :
|
||||
Over (P.HalfEdgeLabel × 𝓔 × 𝓥) ⥤ Over P.HalfEdgeLabel where
|
||||
obj f := Over.mk (fun x => Prod.fst (f.hom x.1) :
|
||||
(P.toEdge ⋙ preimageType' v).obj f ⟶ P.HalfEdgeLabel)
|
||||
(P.toEdge ⋙ preimageType' v).obj f ⟶ P.HalfEdgeLabel)
|
||||
map {f g} F := Over.homMk ((P.toEdge ⋙ preimageType' v).map F)
|
||||
(funext <| fun x => congrArg Prod.fst <| congrFun F.w x.1)
|
||||
|
||||
|
@ -173,11 +173,11 @@ instance preimageEdgeDecidablePred {𝓔 𝓥 : Type} [DecidableEq 𝓔] (v :
|
|||
| isFalse h => isFalse h
|
||||
|
||||
instance preimageVertexDecidable {𝓔 𝓥 : Type} (v : 𝓥)
|
||||
(F : Over (P.HalfEdgeLabel × 𝓔 × 𝓥)) [DecidableEq F.left] :
|
||||
(F : Over (P.HalfEdgeLabel × 𝓔 × 𝓥)) [DecidableEq F.left] :
|
||||
DecidableEq ((P.preimageVertex v).obj F).left := Subtype.instDecidableEq
|
||||
|
||||
instance preimageEdgeDecidable {𝓔 𝓥 : Type} (v : 𝓔)
|
||||
(F : Over (P.HalfEdgeLabel × 𝓔 × 𝓥)) [DecidableEq F.left] :
|
||||
(F : Over (P.HalfEdgeLabel × 𝓔 × 𝓥)) [DecidableEq F.left] :
|
||||
DecidableEq ((P.preimageEdge v).obj F).left := Subtype.instDecidableEq
|
||||
|
||||
instance preimageVertexFintype {𝓔 𝓥 : Type} [DecidableEq 𝓥]
|
||||
|
@ -378,7 +378,7 @@ instance CondDecidable [IsFinitePreFeynmanRule P] {𝓔 𝓥 𝓱𝓔 : Type} (
|
|||
/-- Making a Feynman diagram from maps of edges, vertices and half-edges. -/
|
||||
def mk' {𝓔 𝓥 𝓱𝓔 : Type} (𝓔𝓞 : 𝓔 → P.EdgeLabel) (𝓥𝓞 : 𝓥 → P.VertexLabel)
|
||||
(𝓱𝓔To𝓔𝓥 : 𝓱𝓔 → P.HalfEdgeLabel × 𝓔 × 𝓥)
|
||||
(C : Cond 𝓔𝓞 𝓥𝓞 𝓱𝓔To𝓔𝓥): FeynmanDiagram P where
|
||||
(C : Cond 𝓔𝓞 𝓥𝓞 𝓱𝓔To𝓔𝓥) : FeynmanDiagram P where
|
||||
𝓔𝓞 := Over.mk 𝓔𝓞
|
||||
𝓥𝓞 := Over.mk 𝓥𝓞
|
||||
𝓱𝓔To𝓔𝓥 := Over.mk 𝓱𝓔To𝓔𝓥
|
||||
|
@ -674,7 +674,7 @@ instance [IsFinitePreFeynmanRule P] [IsFiniteDiagram F] : Fintype F.SymmetryType
|
|||
Fintype.ofEquiv _ F.symmetryTypeEquiv.symm
|
||||
|
||||
/-- The symmetry factor can be defined as the cardinal of the symmetry type.
|
||||
In general this is not a finite number. -/
|
||||
In general this is not a finite number. -/
|
||||
@[simp]
|
||||
def cardSymmetryFactor : Cardinal := Cardinal.mk (F.SymmetryType)
|
||||
|
||||
|
@ -705,7 +705,7 @@ A feynman diagram is connected if its simple graph is connected.
|
|||
-/
|
||||
|
||||
/-- A relation on the vertices of Feynman diagrams. The proposition is true if the two
|
||||
vertices are not equal and are connected by a single edge. -/
|
||||
vertices are not equal and are connected by a single edge. -/
|
||||
@[simp]
|
||||
def AdjRelation : F.𝓥 → F.𝓥 → Prop := fun x y =>
|
||||
x ≠ y ∧
|
||||
|
|
|
@ -45,7 +45,7 @@ We define the direct sum of the edge and vertex momentum spaces.
|
|||
-/
|
||||
|
||||
/-- The type which assocaites to each half-edge a `1`-dimensional vector space.
|
||||
Corresponding to that spanned by its momentum. -/
|
||||
Corresponding to that spanned by its momentum. -/
|
||||
def HalfEdgeMomenta : Type := F.𝓱𝓔 → ℝ
|
||||
|
||||
instance : AddCommGroup F.HalfEdgeMomenta := Pi.addCommGroup
|
||||
|
@ -78,7 +78,7 @@ def euclidInner : F.HalfEdgeMomenta →ₗ[ℝ] F.HalfEdgeMomenta →ₗ[ℝ]
|
|||
LinearMap.smul_apply]
|
||||
|
||||
/-- The type which associates to each edge a `1`-dimensional vector space.
|
||||
Corresponding to that spanned by its total outflowing momentum. -/
|
||||
Corresponding to that spanned by its total outflowing momentum. -/
|
||||
def EdgeMomenta : Type := F.𝓔 → ℝ
|
||||
|
||||
instance : AddCommGroup F.EdgeMomenta := Pi.addCommGroup
|
||||
|
@ -86,7 +86,7 @@ instance : AddCommGroup F.EdgeMomenta := Pi.addCommGroup
|
|||
instance : Module ℝ F.EdgeMomenta := Pi.module _ _ _
|
||||
|
||||
/-- The type which assocaites to each ege a `1`-dimensional vector space.
|
||||
Corresponding to that spanned by its total inflowing momentum. -/
|
||||
Corresponding to that spanned by its total inflowing momentum. -/
|
||||
def VertexMomenta : Type := F.𝓥 → ℝ
|
||||
|
||||
instance : AddCommGroup F.VertexMomenta := Pi.addCommGroup
|
||||
|
@ -125,7 +125,7 @@ We define various maps into `F.HalfEdgeMomenta`.
|
|||
In particular, we define a map from `F.EdgeVertexMomenta` to `F.HalfEdgeMomenta`. This
|
||||
map represents the space orthogonal (with respect to the standard Euclidean inner product)
|
||||
to the allowed momenta of half-edges (up-to an offset determined by the
|
||||
external momenta).
|
||||
external momenta).
|
||||
|
||||
The number of loops of a diagram is defined as the number of half-edges minus
|
||||
the rank of this matrix.
|
||||
|
@ -147,7 +147,7 @@ def vertexToHalfEdgeMomenta : F.VertexMomenta →ₗ[ℝ] F.HalfEdgeMomenta wher
|
|||
map_smul' _ _ := rfl
|
||||
|
||||
/-- The linear map from `F.EdgeVertexMomenta` to `F.HalfEdgeMomenta` induced by
|
||||
`F.edgeToHalfEdgeMomenta` and `F.vertexToHalfEdgeMomenta`. -/
|
||||
`F.edgeToHalfEdgeMomenta` and `F.vertexToHalfEdgeMomenta`. -/
|
||||
def edgeVertexToHalfEdgeMomenta : F.EdgeVertexMomenta →ₗ[ℝ] F.HalfEdgeMomenta :=
|
||||
DirectSum.toModule ℝ (Fin 2) F.HalfEdgeMomenta
|
||||
(fun i => match i with | 0 => F.edgeToHalfEdgeMomenta | 1 => F.vertexToHalfEdgeMomenta)
|
||||
|
@ -163,7 +163,7 @@ allowed momenta.
|
|||
-/
|
||||
|
||||
/-- The submodule of `F.HalfEdgeMomenta` corresponding to the range of
|
||||
`F.edgeVertexToHalfEdgeMomenta`. -/
|
||||
`F.edgeVertexToHalfEdgeMomenta`. -/
|
||||
def orthogHalfEdgeMomenta : Submodule ℝ F.HalfEdgeMomenta :=
|
||||
LinearMap.range F.edgeVertexToHalfEdgeMomenta
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue