Lattice Jordan curve theorem, even-odd form to Zero corner weight of the bounded face off the walk
TheoremLattice Jordan curve theorem, even-odd form#✓fully proved
Lattice Jordan curve theorem, even-odd form: a cell lies in the bounded face of a simple closed
walk without right turns iff its ray parity is 1.
theorem mem_interiorCells_iff_rayParity (p : ℤ × ℤ) :
p ∈ interiorCells d hclosed hsimple hreflexfree ↔ rayParity d p.1 p.2 = 1
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:323
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 30 · Used by 4
DefinitionFace-graph component of an interior cell#✓fully proved
The connected component of the walk's face graph containing an interior cell.
noncomputable def oddComponent (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(c : interiorCells d hclosed) :
(walkRegionGraph d hclosed hsimple).ConnectedComponent :=
(walkRegionGraph d hclosed hsimple).connectedComponentMk (cellFace c.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 def interiorCells (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) :
Finset (ℤ × ℤ) := (interiorSet_finite d hclosed).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorCells.lean:114
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
Uses 6 · Used by 1
TheoremA side between interior and exterior cells is a walk edge#✓fully proved
A side shared by an interior and an exterior cell is an edge of the walk.
theorem sharedPrimalEdge_mem_of_membership_diff (p q : ℤ × ℤ)
(hlat : (hypercubicLattice 2).Adj (cellFace p) (cellFace q))
(hdiff : (p ∈ S ∧ q ∉ S) ∨ (q ∈ S ∧ p ∉ S)) :
sharedPrimalEdge (cellFace p) (cellFace q) ∈ (imageGraph P).edgeSet
def hypercubicLattice (d : ℕ) : SimpleGraph (Site d) where
Adj := NearestNeighbour d
symm := ⟨fun _ _ h => nearestNeighbour_symm d h⟩
loopless := nearestNeighbour_irrefl d
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:76
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 sharedPrimalEdge (f g : Site 2) : Sym2 (Site 2) := by
classical
exact if f 0 = g 0 then
s(![f 0, max (f 1) (g 1)], ![f 0 + 1, max (f 1) (g 1)])
else
s(![max (f 0) (g 0), f 1], ![max (f 0) (g 0), f 1 + 1])
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:223
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
Uses 13 · Used by 1
TheoremThree walk edges cannot meet at a vertex#✓fully proved
Three walk edges cannot meet at one vertex of a simple closed walk.
theorem pinch_four_edges_impossible (x y : ℤ)
(hU : sharedPrimalEdge (cellFace (x, y)) (cellFace (x - 1, y)) ∈
(imageGraph P).edgeSet)
(hR : sharedPrimalEdge (cellFace (x, y)) (cellFace (x, y - 1)) ∈
(imageGraph P).edgeSet)
(hL : sharedPrimalEdge (cellFace (x - 1, y)) (cellFace (x - 1, y - 1)) ∈
(imageGraph P).edgeSet) : False
noncomputable def sharedPrimalEdge (f g : Site 2) : Sym2 (Site 2) := by
classical
exact if f 0 = g 0 then
s(![f 0, max (f 1) (g 1)], ![f 0 + 1, max (f 1) (g 1)])
else
s(![max (f 0) (g 0), f 1], ![max (f 0) (g 0), f 1 + 1])
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:223
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 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
Uses 13 · Used by 1
TheoremBounded face of a simple closed walk has no pinch points#✓fully proved
The bounded face of the walk has no pinch points.
theorem not_pinchAt_interiorCells (v : ℤ × ℤ) : ¬ pinchAt S v
def pinchAt (S : Finset (ℤ × ℤ)) (v : ℤ × ℤ) : Prop :=
(v ∈ S ∧ (v.1 - 1, v.2 - 1) ∈ S ∧ (v.1 - 1, v.2) ∉ S ∧ (v.1, v.2 - 1) ∉ S) ∨
((v.1 - 1, v.2) ∈ S ∧ (v.1, v.2 - 1) ∈ S ∧ v ∉ S ∧ (v.1 - 1, v.2 - 1) ∉ S)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellPinch.lean:40
Uses 12 · Used by 2
TheoremPinch count of the bounded face is zero#✓fully proved
The bounded face of the walk has pinch count 0. See also
StatMech.Onsager.PinchFree.pinchCount_eq_zero.
theorem pinchCount_interiorCells_eq_zero : pinchCount S = 0
def pinchCount (S : Finset (ℤ × ℤ)) : ℤ := ∑ v ∈ cellVerts S, pinchW S v
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellPinch.lean:52
DefinitionCell to the left of a walk step#✓fully proved
The cell to the left of step k of the walk. See also StatMech.Onsager.Orientation.leftCell;
they agree by StatMech.Onsager.UmlaufsatzFinal.leftCell_bridge.
def leftCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2)
| 1 => ((pos d k).1 - 1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2 - 1)
| 3 => ((pos d k).1, (pos d k).2 - 1)
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 1 · Used by 11
DefinitionCell to the right of a walk step#✓fully proved
The cell to the right of step k of the walk.
def rightCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2 - 1)
| 1 => ((pos d k).1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2)
| 3 => ((pos d k).1 - 1, (pos d k).2 - 1)
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 1 · Used by 3
TheoremVertices of a walk's image graph are adjacent only to walk neighbours#✓fully proved
In the image graph of a simple closed walk, a vertex is adjacent only to its walk neighbours.
theorem imageGraph_not_adj_of_neighbours (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(k : Fin (m + 3)) (q : Site 2)
(hpred : q ≠ posSite d (k - 1)) (hsucc : q ≠ posSite d (k + 1)) :
¬ (imageGraph (walkP d hclosed hsimple)).Adj (posSite d k) q
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
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
TheoremConsecutive left cells on a straight step are face-adjacent#✓fully proved
Going straight, consecutive left cells are adjacent in the face graph of the walk.
theorem leftCell_faceAdj_of_straight (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(k : Fin (m + 3)) (hstraight : d (k + 1) = d k) :
(walkRegionGraph d hclosed hsimple).Adj (cellFace (leftCell d k))
(cellFace (leftCell 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
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 leftCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2)
| 1 => ((pos d k).1 - 1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2 - 1)
| 3 => ((pos d k).1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:52
Uses 18 · Used by 1
TheoremConsecutive left cells have the same ray parity#✓fully proved
Consecutive left cells of a simple closed walk without right turns have the same ray parity.
theorem leftCell_parity_succ (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin (m + 3), d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(k : Fin (m + 3)) :
rayParity d (leftCell d k).1 (leftCell d k).2 =
rayParity d (leftCell d (k + 1)).1 (leftCell d (k + 1)).2
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 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 leftCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2)
| 1 => ((pos d k).1 - 1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2 - 1)
| 3 => ((pos d k).1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:52
Uses 10 · Used by 1
TheoremAll left cells have the same ray parity#✓fully proved
All left cells of a simple closed walk without right turns have the same ray parity.
theorem leftCell_parity_eq_of_reachable (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin (m + 3), d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
{i j : Fin (m + 3)} (hreach : (cycleGraph (m + 3)).Reachable i j) :
rayParity d (leftCell d i).1 (leftCell d i).2 =
rayParity d (leftCell d j).1 (leftCell d j).2
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 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 leftCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2)
| 1 => ((pos d k).1 - 1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2 - 1)
| 3 => ((pos d k).1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:52
Uses 5 · Used by 1
TheoremEvery left cell has ray parity one#✓fully proved
Every left cell of a simple closed walk without right turns is inside.
theorem leftCell_parity_one (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin (m + 3), d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(k : Fin (m + 3)) :
rayParity d (leftCell d k).1 (leftCell d k).2 = 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
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 leftCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2)
| 1 => ((pos d k).1 - 1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2 - 1)
| 3 => ((pos d k).1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:52
Uses 8 · Used by 2
TheoremEvery left cell lies in the bounded face#✓fully proved
Every left cell of a simple closed walk without right turns lies in the bounded face.
theorem leftCell_mem_interiorCells (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin (m + 3), d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(k : Fin (m + 3)) :
leftCell d k ∈ interiorCells d hclosed hsimple hreflexfree
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 leftCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2)
| 1 => ((pos d k).1 - 1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2 - 1)
| 3 => ((pos d k).1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:52
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:323
Uses 7 · Used by 3
TheoremCells on either side of a step lie in different faces#✓fully proved
The two cells on either side of a walk step are in different face components.
theorem walkRegion_flanking_not_reachable (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(k : Fin (m + 3)) {f g : Site 2}
(hlat : (hypercubicLattice 2).Adj f g)
(hshared : sharedPrimalEdge f g = s(posSite d k, posSite d (k + 1))) :
¬ (walkRegionGraph d hclosed hsimple).Reachable f g
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
def hypercubicLattice (d : ℕ) : SimpleGraph (Site d) where
Adj := NearestNeighbour d
symm := ⟨fun _ _ h => nearestNeighbour_symm d h⟩
loopless := nearestNeighbour_irrefl d
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:76
noncomputable def sharedPrimalEdge (f g : Site 2) : Sym2 (Site 2) := by
classical
exact if f 0 = g 0 then
s(![f 0, max (f 1) (g 1)], ![f 0 + 1, max (f 1) (g 1)])
else
s(![max (f 0) (g 0), f 1], ![max (f 0) (g 0), f 1 + 1])
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:223
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 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
Uses 36 · Used by 1
TheoremLeft and right cells of a step share that step#✓fully proved
The left and right cells of a step are adjacent faces sharing that step.
theorem left_right_flanking (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (k : Fin (m + 3)) :
(hypercubicLattice 2).Adj (cellFace (leftCell d k)) (cellFace (rightCell d k)) ∧
sharedPrimalEdge (cellFace (leftCell d k)) (cellFace (rightCell d k)) =
s(posSite d k, 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 hypercubicLattice (d : ℕ) : SimpleGraph (Site d) where
Adj := NearestNeighbour d
symm := ⟨fun _ _ h => nearestNeighbour_symm d h⟩
loopless := nearestNeighbour_irrefl d
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:76
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 leftCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2)
| 1 => ((pos d k).1 - 1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2 - 1)
| 3 => ((pos d k).1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:52
def rightCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2 - 1)
| 1 => ((pos d k).1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2)
| 3 => ((pos d k).1 - 1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:60
noncomputable def sharedPrimalEdge (f g : Site 2) : Sym2 (Site 2) := by
classical
exact if f 0 = g 0 then
s(![f 0, max (f 1) (g 1)], ![f 0 + 1, max (f 1) (g 1)])
else
s(![max (f 0) (g 0), f 1], ![max (f 0) (g 0), f 1 + 1])
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:223
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 14 · Used by 1
TheoremNo right cell lies in the bounded face#✓fully proved
No right cell of a simple closed walk without right turns lies in the bounded face.
theorem rightCell_not_mem_interiorCells (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin (m + 3), d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(k : Fin (m + 3)) :
rightCell d k ∉ interiorCells d hclosed hsimple hreflexfree
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 rightCell (d : Fin (m + 3) → Fin 4) (k : Fin (m + 3)) : ℤ × ℤ :=
match d k with
| 0 => ((pos d k).1, (pos d k).2 - 1)
| 1 => ((pos d k).1, (pos d k).2)
| 2 => ((pos d k).1 - 1, (pos d k).2)
| 3 => ((pos d k).1 - 1, (pos d k).2 - 1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellBoundary.lean:60
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:323
Uses 16 · Used by 1
TheoremCorner count as a sum of four indicators#✓fully proved
The corner count at v as a sum of four indicators. See also
StatMech.Onsager.CellEuler.cornerCount_eq_inter.
theorem cornerCount_eq_indicators (S : Finset (ℤ × ℤ)) (v : ℤ × ℤ) :
cornerCount S v =
(if v ∈ S then 1 else 0) +
(if (v.1 - 1, v.2) ∈ S then 1 else 0) +
(if (v.1, v.2 - 1) ∈ S then 1 else 0) +
(if (v.1 - 1, v.2 - 1) ∈ S then 1 else 0)
def cornerCount (S : Finset (ℤ × ℤ)) (v : ℤ × ℤ) : ℕ :=
(S.filter (fun c => v ∈ cornersOf c)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellCount.lean:46
TheoremCorner count of the bounded face at a walk vertex#✓fully proved
At the vertex after step k, the bounded face has one cell after a left turn and two after a
straight step.
theorem cornerCount_at_walkVertex (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin (m + 3), d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(k : Fin (m + 3)) :
cornerCount (interiorCells d hclosed hsimple hreflexfree) (pos d (k + 1)) =
if d (k + 1) - d k = 1 then 1 else 2
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 cornerCount (S : Finset (ℤ × ℤ)) (v : ℤ × ℤ) : ℕ :=
(S.filter (fun c => v ∈ cornersOf c)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellCount.lean:46
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:323
Uses 12 · Used by 1
TheoremZero corner weight of the bounded face off the walk#✓fully proved
Points off the walk have corner weight 0 for the bounded face.
theorem cornerWeight_zero_of_not_walkVertex (d : Fin (m + 3) → Fin 4)
(hclosed : ∑ i, stepOf (d i) = 0) (hsimple : Function.Injective (pos d))
(hreflexfree : ∀ i : Fin (m + 3), d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(v : ℤ × ℤ) (hv : ∀ k : Fin (m + 3), pos d k ≠ v) :
cornerWeight (cornerCount (interiorCells d hclosed hsimple hreflexfree) v) = 0
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 cornerWeight (k : ℕ) : ℤ := (if k = 1 then 1 else 0) - (if k = 3 then 1 else 0)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellEuler.lean:74
def cornerCount (S : Finset (ℤ × ℤ)) (v : ℤ × ℤ) : ℕ :=
(S.filter (fun c => v ∈ cornersOf c)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellCount.lean:46
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:323
Uses 9 · Used by 1
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.