Unit cell as a face of the square lattice to Membership in the bounded face
DefinitionUnit cell as a face of the square lattice#✓fully proved
The unit cell with lower-left corner p, viewed as a face of the square lattice, i.e. as the
site ![p.1, p.2] of the dual lattice.
def cellFace : (ℤ × ℤ) ≃ Site 2 where
toFun p := ![p.1, p.2]
invFun z := (z 0, z 1)
left_inv p := by ext <;> rfl
right_inv z := by funext i; fin_cases i <;> rfl
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 25
AbbreviationSimple closed walk as a planar subgraph#✓fully proved
A simple closed walk as a planar subgraph of ℤ².
noncomputable abbrev walkP (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
PlanarZ2Subgraph := walkSubgraph d hclosed hsimple
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
structure PlanarZ2Subgraph where
/-- The vertex type. -/
V : Type
/-- The vertex type is finite. -/
finV : Finite V
/-- Equality of vertices is decidable. -/
decV : DecidableEq V
/-- The abstract graph. -/
G : SimpleGraph V
/-- The embedding of the vertices into `ℤ²`. -/
emb : V ↪ Site 2
/-- Edges are mapped to lattice edges. -/
⋯
MathlibExt/Combinatorics/SimpleGraph/Lattice/PlanarFaceGeometric.lean:66
noncomputable def walkSubgraph {m : ℕ} (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
PlanarZ2Subgraph where
V := Fin (m + 3)
finV := inferInstance
decV := inferInstance
G := cycleGraph (m + 3)
emb := ⟨posSite d, posSite_injective d hsimple⟩
isSub := walk_isSub d hclosed
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkPlanarSubgraph.lean:102
Uses 4 · Used by 17
AbbreviationFace graph of a closed walk#✓fully proved
The face graph of the walk: adjacent faces of the square lattice whose common side is not an edge of the walk.
noncomputable abbrev walkRegionGraph (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
SimpleGraph (Site 2) := whb_faceRegion (imageGraph (walkP d hclosed hsimple))
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
noncomputable def whb_faceRegion (G : SimpleGraph (Site 2)) : SimpleGraph (Site 2) where
Adj f g := (hypercubicLattice 2).Adj f g ∧ sharedPrimalEdge f g ∉ G.edgeSet
symm := by
refine ⟨?_⟩
intro f g ⟨hadj, hs⟩
exact ⟨hadj.symm, by rwa [sharedPrimalEdge_comm_of_adj hadj] at hs⟩
loopless := ⟨fun f h => (hypercubicLattice 2).irrefl h.1⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/WhitneyBridge.lean:95
noncomputable def imageGraph (P : PlanarZ2Subgraph) : SimpleGraph (Site 2) where
Adj a b := ∃ x y : P.V, P.G.Adj x y ∧ P.emb x = a ∧ P.emb y = b
symm := by
refine ⟨?_⟩
rintro a b ⟨x, y, hadj, rfl, rfl⟩
exact ⟨y, x, hadj.symm, rfl, rfl⟩
loopless := ⟨by
rintro a ⟨x, y, hadj, hx, hy⟩
have : x = y := P.emb.injective (hx.trans hy.symm)
exact P.G.irrefl (this ▸ hadj)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/PlanarFaceGeometric.lean:83
noncomputable abbrev walkP (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
PlanarZ2Subgraph := walkSubgraph d hclosed hsimple
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:69
Uses 6 · Used by 18
TheoremEach walk step is an edge of the image graph#✓fully proved
Each step of the walk is an edge of its image graph.
theorem walkEdge_mem_imageGraph (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(k : Fin (m + 3)) :
s(posSite d k, posSite d (k + 1)) ∈ (imageGraph (walkP d hclosed hsimple)).edgeSet
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
def posSite {m : ℕ} (d : Fin (m + 3) → Fin 4) (i : Fin (m + 3)) : Site 2 :=
![(pos d i).1, (pos d i).2]
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkPlanarSubgraph.lean:52
noncomputable def imageGraph (P : PlanarZ2Subgraph) : SimpleGraph (Site 2) where
Adj a b := ∃ x y : P.V, P.G.Adj x y ∧ P.emb x = a ∧ P.emb y = b
symm := by
refine ⟨?_⟩
rintro a b ⟨x, y, hadj, rfl, rfl⟩
exact ⟨y, x, hadj.symm, rfl, rfl⟩
loopless := ⟨by
rintro a ⟨x, y, hadj, hx, hy⟩
have : x = y := P.emb.injective (hx.trans hy.symm)
exact P.G.irrefl (this ▸ hadj)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/PlanarFaceGeometric.lean:83
noncomputable abbrev walkP (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
PlanarZ2Subgraph := walkSubgraph d hclosed hsimple
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:69
TheoremNeighbours in the image graph are walk predecessor and successor#✓fully proved
In the image graph of a simple closed walk, the neighbours of a vertex are its predecessor and successor on the walk.
theorem imageGraph_adj_pos_iff (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(k : Fin (m + 3)) (q : Site 2) :
(imageGraph (walkP d hclosed hsimple)).Adj (posSite d k) q ↔
q = posSite d (k - 1) ∨ q = posSite d (k + 1)
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
noncomputable def imageGraph (P : PlanarZ2Subgraph) : SimpleGraph (Site 2) where
Adj a b := ∃ x y : P.V, P.G.Adj x y ∧ P.emb x = a ∧ P.emb y = b
symm := by
refine ⟨?_⟩
rintro a b ⟨x, y, hadj, rfl, rfl⟩
exact ⟨y, x, hadj.symm, rfl, rfl⟩
loopless := ⟨by
rintro a ⟨x, y, hadj, hx, hy⟩
have : x = y := P.emb.injective (hx.trans hy.symm)
exact P.G.irrefl (this ▸ hadj)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/PlanarFaceGeometric.lean:83
noncomputable abbrev walkP (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
PlanarZ2Subgraph := walkSubgraph d hclosed hsimple
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:69
def posSite {m : ℕ} (d : Fin (m + 3) → Fin 4) (i : Fin (m + 3)) : Site 2 :=
![(pos d i).1, (pos d i).2]
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkPlanarSubgraph.lean:52
Uses 9 · Used by 3
TheoremHorizontally face-adjacent cells have the same ray parity#✓fully proved
Horizontally adjacent cells joined in the face graph have the same ray parity.
theorem rayParity_eq_of_faceAdj_right (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(a b : ℤ)
(hadj : (walkRegionGraph d hclosed hsimple).Adj (cellFace (a, b))
(cellFace (a + 1, b))) :
rayParity d a b = rayParity d (a + 1) b
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
noncomputable abbrev walkRegionGraph (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
SimpleGraph (Site 2) := whb_faceRegion (imageGraph (walkP d hclosed hsimple))
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:75
def cellFace : (ℤ × ℤ) ≃ Site 2 where
toFun p := ![p.1, p.2]
invFun z := (z 0, z 1)
left_inv p := by ext <;> rfl
right_inv z := by funext i; fin_cases i <;> rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:54
def rayParity (d : Fin n → Fin 4) (a b : ℤ) : ZMod 2 := (upCross d a b : ZMod 2)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/JordanParity.lean:55
Uses 19 · Used by 1
TheoremVertically face-adjacent cells have the same ray parity#✓fully proved
Vertically adjacent cells joined in the face graph have the same ray parity.
theorem rayParity_eq_of_faceAdj_top (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(a b : ℤ)
(hadj : (walkRegionGraph d hclosed hsimple).Adj (cellFace (a, b))
(cellFace (a, b + 1))) :
rayParity d a b = rayParity d a (b + 1)
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
noncomputable abbrev walkRegionGraph (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
SimpleGraph (Site 2) := whb_faceRegion (imageGraph (walkP d hclosed hsimple))
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:75
def cellFace : (ℤ × ℤ) ≃ Site 2 where
toFun p := ![p.1, p.2]
invFun z := (z 0, z 1)
left_inv p := by ext <;> rfl
right_inv z := by funext i; fin_cases i <;> rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:54
def rayParity (d : Fin n → Fin 4) (a b : ℤ) : ZMod 2 := (upCross d a b : ZMod 2)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/JordanParity.lean:55
Uses 19 · Used by 1
TheoremFace-adjacent cells have the same ray parity#✓fully proved
Cells adjacent in the face graph have the same ray parity.
theorem rayParity_eq_of_faceAdj (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
{f g : Site 2} (hadj : (walkRegionGraph d hclosed hsimple).Adj f g) :
rayParity d (f 0) (f 1) = rayParity d (g 0) (g 1)
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
noncomputable abbrev walkRegionGraph (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
SimpleGraph (Site 2) := whb_faceRegion (imageGraph (walkP d hclosed hsimple))
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:75
def rayParity (d : Fin n → Fin 4) (a b : ℤ) : ZMod 2 := (upCross d a b : ZMod 2)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/JordanParity.lean:55
Uses 12 · Used by 4
TheoremRay parity is constant on face-graph components#✓fully proved
Ray parity is constant on connected components of the face graph.
theorem rayParity_eq_of_reachable (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
{f g : Site 2} (hreach : (walkRegionGraph d hclosed hsimple).Reachable f g) :
rayParity d (f 0) (f 1) = rayParity d (g 0) (g 1)
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
noncomputable abbrev walkRegionGraph (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
SimpleGraph (Site 2) := whb_faceRegion (imageGraph (walkP d hclosed hsimple))
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:75
def rayParity (d : Fin n → Fin 4) (a b : ℤ) : ZMod 2 := (upCross d a b : ZMod 2)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/JordanParity.lean:55
DefinitionTop corner with an inside cell below it#✓fully proved
A vertex M at which the walk turns from north to west and whose below-left cell is inside
(chosen from StatMech.Onsager.InsideConnected.lexmax_corner_cell_inside).
noncomputable def lexInteriorIndex : Fin (m + 3) :=
(lexmax_corner_cell_inside d hclosed hsimple hreflexfree).choose
theorem lexmax_corner_cell_inside
(d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0)
(hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin n, d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1) :
∃ M : Fin n, d (M - 1) = 1 ∧ d M = 2 ∧
rayParity d ((pos d M).1 - 1) ((pos d M).2 - 1) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/TopCornerCellInside.lean:35
TheoremDefining property of the inside top corner#✓fully proved
The defining property of lexInteriorIndex.
theorem lexInteriorIndex_spec :
d (lexInteriorIndex d hclosed hsimple hreflexfree - 1) = 1 ∧
d (lexInteriorIndex d hclosed hsimple hreflexfree) = 2 ∧
rayParity d
((pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).1 - 1)
((pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).2 - 1) = 1
noncomputable def lexInteriorIndex : Fin (m + 3) :=
(lexmax_corner_cell_inside d hclosed hsimple hreflexfree).choose
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:243
def rayParity (d : Fin n → Fin 4) (a b : ℤ) : ZMod 2 := (upCross d a b : ZMod 2)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/JordanParity.lean:55
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 5 · Used by 2
DefinitionFace below-left of the inside top corner#✓fully proved
The face of the cell below-left of the corner lexInteriorIndex.
noncomputable def lexInteriorFace : Site 2 :=
cellFace
((pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).1 - 1,
(pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).2 - 1)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def cellFace : (ℤ × ℤ) ≃ Site 2 where
toFun p := ![p.1, p.2]
invFun z := (z 0, z 1)
left_inv p := by ext <;> rfl
right_inv z := by funext i; fin_cases i <;> rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:54
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
noncomputable def lexInteriorIndex : Fin (m + 3) :=
(lexmax_corner_cell_inside d hclosed hsimple hreflexfree).choose
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:243
TheoremThe face below the inside top corner is inside#✓fully proved
The face lexInteriorFace is inside the walk.
theorem lexInteriorFace_parity :
rayParity d (lexInteriorFace d hclosed hsimple hreflexfree 0)
(lexInteriorFace d hclosed hsimple hreflexfree 1) = 1
def rayParity (d : Fin n → Fin 4) (a b : ℤ) : ZMod 2 := (upCross d a b : ZMod 2)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/JordanParity.lean:55
noncomputable def lexInteriorFace : Site 2 :=
cellFace
((pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).1 - 1,
(pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:256
Uses 6 · Used by 2
DefinitionInner component of the face graph#✓fully proved
The connected component of the face graph containing lexInteriorFace.
noncomputable def innerComponent :
(walkRegionGraph d hclosed hsimple).ConnectedComponent :=
(walkRegionGraph d hclosed hsimple).connectedComponentMk
(lexInteriorFace d hclosed hsimple hreflexfree)
noncomputable abbrev walkRegionGraph (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
SimpleGraph (Site 2) := whb_faceRegion (imageGraph (walkP d hclosed hsimple))
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:75
noncomputable def lexInteriorFace : Site 2 :=
cellFace
((pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).1 - 1,
(pos d (lexInteriorIndex d hclosed hsimple hreflexfree)).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:256
TheoremA face far outside the walk has ray parity zero#✓fully proved
A face far outside the bounding box of the walk has ray parity 0.
theorem outerBeacon_parity :
rayParity d
(beacon 2 (outerBoxRadius (walkP d hclosed hsimple) + 1) 0)
(beacon 2 (outerBoxRadius (walkP d hclosed hsimple) + 1) 1) = 0
def rayParity (d : Fin n → Fin 4) (a b : ℤ) : ZMod 2 := (upCross d a b : ZMod 2)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/JordanParity.lean:55
def beacon (d R : ℕ) : Site d := fun _ => (R : ℤ) + 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/UniqueInfiniteComponent.lean:153
noncomputable def outerBoxRadius (P : PlanarZ2Subgraph) : ℕ := (image_subset_box P).choose
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanOuterFaceUnique.lean:49
noncomputable abbrev walkP (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d)) :
PlanarZ2Subgraph := walkSubgraph d hclosed hsimple
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:69
Uses 11 · Used by 3
TheoremThe inner face component is finite#✓fully proved
The component innerComponent is bounded.
theorem innerComponent_finite :
(innerComponent d hclosed hsimple hreflexfree).supp.Finite
noncomputable def innerComponent :
(walkRegionGraph d hclosed hsimple).ConnectedComponent :=
(walkRegionGraph d hclosed hsimple).connectedComponentMk
(lexInteriorFace d hclosed hsimple hreflexfree)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:268
Uses 23 · Used by 2
DefinitionCells of the inner face component#✓fully proved
The cells whose faces lie in innerComponent.
def componentCellSet : Set (ℤ × ℤ) :=
{p | cellFace p ∈ (innerComponent d hclosed hsimple hreflexfree).supp}
def cellFace : (ℤ × ℤ) ≃ Site 2 where
toFun p := ![p.1, p.2]
invFun z := (z 0, z 1)
left_inv p := by ext <;> rfl
right_inv z := by funext i; fin_cases i <;> rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:54
noncomputable def innerComponent :
(walkRegionGraph d hclosed hsimple).ConnectedComponent :=
(walkRegionGraph d hclosed hsimple).connectedComponentMk
(lexInteriorFace d hclosed hsimple hreflexfree)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:268
TheoremThe inner component has finitely many cells#✓fully proved
There are finitely many such cells.
theorem componentCellSet_finite :
(componentCellSet d hclosed hsimple hreflexfree).Finite
def componentCellSet : Set (ℤ × ℤ) :=
{p | cellFace p ∈ (innerComponent d hclosed hsimple hreflexfree).supp}
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:311
Uses 8 · Used by 2
DefinitionCells of the bounded face of a simple closed walk#✓fully proved
The cells of the bounded face of a simple closed walk without right turns. See also
StatMech.Onsager.InteriorCells.interiorCells, the ray-parity interior; they agree by
mem_interiorCells_iff_rayParity.
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
theorem componentCellSet_finite :
(componentCellSet d hclosed hsimple hreflexfree).Finite
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:315
Uses 4 · Used by 16
TheoremMembership in the bounded face#✓fully proved
Membership in the bounded face.
@[simp] theorem mem_interiorCells (p : ℤ × ℤ) :
p ∈ interiorCells d hclosed hsimple hreflexfree ↔
cellFace p ∈ (innerComponent d hclosed hsimple hreflexfree).supp
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:323
def cellFace : (ℤ × ℤ) ≃ Site 2 where
toFun p := ![p.1, p.2]
invFun z := (z 0, z 1)
left_inv p := by ext <;> rfl
right_inv z := by funext i; fin_cases i <;> rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:54
noncomputable def innerComponent :
(walkRegionGraph d hclosed hsimple).ConnectedComponent :=
(walkRegionGraph d hclosed hsimple).connectedComponentMk
(lexInteriorFace d hclosed hsimple hreflexfree)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:268
Uses 9 · Used by 3
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.