Euler circuits and single dual circuits for planar contours
A. Closed trails and splicing
LemmaDegree of a vertex equals the number of edges containing it#✓fully proved
The degree of a vertex is the number of edges containing it. See also
SimpleGraph.card_incidenceFinset_eq_degree.
lemma degree_eq_card_filter_edges (G : SimpleGraph V) [DecidableRel G.Adj] (x : V) :
G.degree x = (G.edgeFinset.filter (fun e => x ∈ e)).card
Used by 1
DefinitionSplicing a closed walk into another at a shared vertex#✓fully proved
Splice a closed walk c at a vertex w of the closed walk p into p.
noncomputable def spliceWalk (G : SimpleGraph V) {u w : V} (p : G.Walk u u)
(hw : w ∈ p.support) (c : G.Walk w w) : G.Walk u u :=
(p.takeUntil w hw).append (c.append (p.dropUntil w hw))
Used by 1
B. Existence of Euler circuits
TheoremEuler's theorem#✓fully proved
Euler's theorem (existence direction): a finite connected graph with all degrees even has a
closed trail through every edge, based at any vertex. See also
SimpleGraph.Connected.exists_isEulerian in MathlibExt, which does not prescribe the base
vertex.
theorem exists_closed_eulerian (G : SimpleGraph V) [DecidableRel G.Adj] (hconn : G.Connected)
(heven : ∀ x, Even (G.degree x)) (u : V) :
∃ p : G.Walk u u, p.IsTrail ∧ ∀ e ∈ G.edgeFinset, e ∈ p.edges
LemmaEulerian circuit at any vertex of a finite connected even graph#✓fully proved
The closed trail of exists_closed_eulerian is an Eulerian circuit in Mathlib's sense, based
at any prescribed vertex. See also SimpleGraph.Connected.exists_isEulerian.
lemma exists_closed_isEulerian (G : SimpleGraph V) [DecidableRel G.Adj]
(hconn : G.Connected) (heven : ∀ x, Even (G.degree x)) (u : V) :
∃ p : G.Walk u u, p.IsEulerian
Uses 1
LemmaEuler's theorem for a graph supported on a finite connected set#✓fully proved
Euler's theorem for a locally finite graph whose support lies in a finite set T on which the
induced graph is connected. See also SimpleGraph.ConnectedSupport.exists_isEulerian in
MathlibExt.
C. Single dual circuits for planar contours
DefinitionConnectedness of the face-boundary graph on a face set#✓fully proved
The face-boundary graph of K is connected on the finite set of faces T.
def FaceBoundaryConnected (K : Set (Site 2)) (T : Finset (Site 2)) : Prop :=
((faceBoundaryGraph K).induce (T : Set (Site 2))).Connected
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def faceBoundaryGraph (S : Set (Site 2)) : SimpleGraph (Site 2) where
Adj f g := (hypercubicLattice 2).Adj f g ∧ bdEdge S (sharedPrimalEdge f g)
symm := by
refine ⟨fun f g ⟨hadj, hbd⟩ => ?_⟩
refine ⟨hadj.symm, ?_⟩
rwa [← sharedPrimalEdge_comm_of_adj hadj]
loopless := by
refine ⟨fun f h => ?_⟩
exact (hypercubicLattice 2).irrefl h.1
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:297
Uses 2 · Used by 7
DefinitionFinite face set containing the face-boundary support#✓fully proved
A finite set of faces containing the support of the face-boundary graph of a finite set K.
noncomputable def boundarySupport {K : Set (Site 2)} (hK : K.Finite) : Finset (Site 2) :=
(exists_finset_support_faceBoundaryGraph K hK).choose
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
theorem exists_finset_support_faceBoundaryGraph (S : Set (Site 2)) (hS : S.Finite) :
∃ T : Finset (Site 2), (faceBoundaryGraph S).support ⊆ (T : Set (Site 2))
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:511
Uses 16 · Used by 2
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.