Corner weight of the bounded face at a walk vertex to Lower-left corner of a cell as a skeleton vertex
TheoremCorner weight of the bounded face at a walk vertex#✓fully proved
The corner weight of the bounded face at the vertex after step k is 1 after a left turn and
0 after a straight step.
theorem cornerWeight_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)) :
cornerWeight
(cornerCount (interiorCells d hclosed hsimple hreflexfree) (pos d (k + 1))) =
if d (k + 1) - d k = 1 then 1 else 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
TheoremCorner defect of the bounded face equals the number of left turns#✓fully proved
The corner defect of the bounded face of a simple closed walk without right turns equals its number of left turns.
theorem cornerDiff_interiorCells_eq_cc (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) :
cornerDiff (interiorCells d hclosed hsimple hreflexfree) = (cc d : ℤ)
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 cornerDiff (S : Finset (ℤ × ℤ)) : ℤ :=
((cellVerts S).filter (fun v => cornerCount S v = 1)).card
- ((cellVerts S).filter (fun v => cornerCount S v = 3)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellEuler.lean:51
noncomputable def interiorCells : Finset (ℤ × ℤ) :=
(componentCellSet_finite d hclosed hsimple hreflexfree).toFinset
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCellRegion.lean:323
def cc {n : ℕ} [NeZero n] (d : Fin n → Fin 4) : ℕ :=
(Finset.univ.filter (fun i : Fin n => d (i + 1) - d i = 1)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:62
Uses 12
Definition1-skeleton of a cell complex#✓fully proved
The 1-skeleton of the cell complex S: vertices are the corners of cells, edges the sides of
cells.
def cellSkeleton (S : Finset Cell) : SimpleGraph {v // v ∈ regVerts S} where
Adj a b := s(a.1, b.1) ∈ StatMech.CellEulerChar.regEdges S
symm := ⟨fun a b h => by rwa [Sym2.eq_swap]⟩
loopless := ⟨by
intro a h
exact wad_edge_not_diag h (by simp)⟩
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
def regVerts (K : Finset Cell) : Finset Vtx := K.biUnion cellVerts
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:63
def regEdges (K : Finset Cell) : Finset (Sym2 Vtx) := K.biUnion cellEdges
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:66
Uses 5 · Used by 8
Definition1-skeleton of a cell complex as a planar subgraph#✓fully proved
The 1-skeleton of S as a planar subgraph of ℤ².
StatMech.Onsager.CellEulerFaithful.cellSkeletonP · 23 lines
noncomputable def cellSkeletonP (S : Finset Cell) : PlanarZ2Subgraph where
V := {v // v ∈ regVerts S}
finV := inferInstance
decV := inferInstance
G := cellSkeleton S
emb := ⟨fun v => ![v.1.1, v.1.2], by
intro a b h
apply Subtype.ext
apply Prod.ext
· exact congrFun h 0
· exact congrFun h 1⟩
isSub := by
intro a b hab
change s(a.1, b.1) ∈ StatMech.CellEulerChar.regEdges S at hab
rw [StatMech.CellEulerChar.regEdges, Finset.mem_biUnion] at hab
obtain ⟨c, _, he⟩ := hab
obtain ⟨x, y⟩ := c
simp only [StatMech.CellEulerChar.cellEdges, Finset.mem_insert, Finset.mem_singleton] at he
rw [hypercubicLattice_adj, Fin.sum_univ_two]
change (a.1.1 - b.1.1).natAbs + (a.1.2 - b.1.2).natAbs = 1
rcases he with he | he | he | he <;> rw [Sym2.eq_iff] at he <;>
rcases he with ⟨h1, h2⟩ | ⟨h1, h2⟩ <;>
simp only [Prod.ext_iff] at h1 h2 <;> omega
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
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
def regVerts (K : Finset Cell) : Finset Vtx := K.biUnion cellVerts
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:63
def cellSkeleton (S : Finset Cell) : SimpleGraph {v // v ∈ regVerts S} where
Adj a b := s(a.1, b.1) ∈ StatMech.CellEulerChar.regEdges S
symm := ⟨fun a b h => by rwa [Sym2.eq_swap]⟩
loopless := ⟨by
intro a h
exact wad_edge_not_diag h (by simp)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:59
Uses 9 · Used by 10
TheoremCell complex edges lie in the embedded skeleton#✓fully proved
An edge of the cell complex is an edge of the embedded skeleton.
theorem regEdge_mem_imageGraph (S : Finset Cell) {e : Sym2 Vtx}
(he : e ∈ StatMech.CellEulerChar.regEdges S) :
Sym2.map (fun v : Vtx => ![v.1, v.2]) e ∈ (imageGraph (cellSkeletonP S)).edgeSet
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
abbrev Vtx := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:49
def regEdges (K : Finset Cell) : Finset (Sym2 Vtx) := K.biUnion cellEdges
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:66
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 def cellSkeletonP (S : Finset Cell) : PlanarZ2Subgraph where
V := {v // v ∈ regVerts S}
finV := inferInstance
decV := inferInstance
G := cellSkeleton S
emb := ⟨fun v => ![v.1.1, v.1.2], by
intro a b h
apply Subtype.ext
apply Prod.ext
· exact congrFun h 0
· exact congrFun h 1⟩
isSub := by
⋯
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:67
Uses 10 · Used by 1
TheoremShared side of a cell and an adjacent face is an edge#✓fully proved
The side shared by a cell of S and an adjacent face is an edge of S.
theorem sharedPrimalEdge_mem_regEdges (S : Finset Cell) (c : Cell) (hc : c ∈ S)
(g : Site 2) (hlat : (hypercubicLattice 2).Adj (cellFace c) g) :
Sym2.map cellFace.symm (sharedPrimalEdge (cellFace c) g) ∈
StatMech.CellEulerChar.regEdges S
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
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
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
def regEdges (K : Finset Cell) : Finset (Sym2 Vtx) := K.biUnion cellEdges
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:66
Uses 12 · Used by 2
TheoremThe face of a cell is enclosed on all four sides#✓fully proved
The face of a cell of S is enclosed by the skeleton on all four sides.
theorem occupiedFace_isolated (S : Finset Cell) (c : Cell) (hc : c ∈ S) (g : Site 2) :
¬ (whb_faceRegion (imageGraph (cellSkeletonP S))).Adj (cellFace c) g
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
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 def cellSkeletonP (S : Finset Cell) : PlanarZ2Subgraph where
V := {v // v ∈ regVerts S}
finV := inferInstance
decV := inferInstance
G := cellSkeleton S
emb := ⟨fun v => ![v.1.1, v.1.2], by
intro a b h
apply Subtype.ext
apply Prod.ext
· exact congrFun h 0
· exact congrFun h 1⟩
isSub := by
⋯
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:67
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 12 · Used by 1
DefinitionFace component containing a cell#✓fully proved
The face component of the skeleton containing the cell c.
noncomputable def occupiedComponent (S : Finset Cell) (c : Cell) :
(whb_faceRegion (imageGraph (cellSkeletonP S))).ConnectedComponent :=
(whb_faceRegion (imageGraph (cellSkeletonP S))).connectedComponentMk (cellFace c)
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
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 def cellSkeletonP (S : Finset Cell) : PlanarZ2Subgraph where
V := {v // v ∈ regVerts S}
finV := inferInstance
decV := inferInstance
G := cellSkeleton S
emb := ⟨fun v => ![v.1.1, v.1.2], by
intro a b h
apply Subtype.ext
apply Prod.ext
· exact congrFun h 0
· exact congrFun h 1⟩
isSub := by
⋯
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:67
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
TheoremThe face of a cell is alone in its component#✓fully proved
The face of a cell of S is alone in its face component.
theorem occupiedFace_reachable_eq (S : Finset Cell) (c : Cell) (hc : c ∈ S) (g : Site 2)
(hreach : (whb_faceRegion (imageGraph (cellSkeletonP S))).Reachable (cellFace c) g) :
g = cellFace c
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
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 def cellSkeletonP (S : Finset Cell) : PlanarZ2Subgraph where
V := {v // v ∈ regVerts S}
finV := inferInstance
decV := inferInstance
G := cellSkeleton S
emb := ⟨fun v => ![v.1.1, v.1.2], by
intro a b h
apply Subtype.ext
apply Prod.ext
· exact congrFun h 0
· exact congrFun h 1⟩
isSub := by
⋯
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:67
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
TheoremThe face component of a cell is bounded#✓fully proved
The face component of a cell of S is bounded.
theorem occupiedComponent_finite (S : Finset Cell) (c : Cell) (hc : c ∈ S) :
(occupiedComponent S c).supp.Finite
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
noncomputable def occupiedComponent (S : Finset Cell) (c : Cell) :
(whb_faceRegion (imageGraph (cellSkeletonP S))).ConnectedComponent :=
(whb_faceRegion (imageGraph (cellSkeletonP S))).connectedComponentMk (cellFace c)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:164
DefinitionBounded face formed by a cell#✓fully proved
The bounded face of the skeleton formed by a cell of S.
noncomputable def occupiedBoundedFace (S : Finset Cell) (c : S) :
jcb_BoundedRegion (cellSkeletonP S) :=
⟨occupiedComponent S c.1, occupiedComponent_finite S c.1 c.2⟩
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
abbrev jcb_BoundedRegion (P : PlanarZ2Subgraph) : Type :=
{c : (whb_faceRegion (imageGraph P)).ConnectedComponent // c.supp.Finite}
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanClusterBridge.lean:53
noncomputable def cellSkeletonP (S : Finset Cell) : PlanarZ2Subgraph where
V := {v // v ∈ regVerts S}
finV := inferInstance
decV := inferInstance
G := cellSkeleton S
emb := ⟨fun v => ![v.1.1, v.1.2], by
intro a b h
apply Subtype.ext
apply Prod.ext
· exact congrFun h 0
· exact congrFun h 1⟩
isSub := by
⋯
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:67
noncomputable def occupiedComponent (S : Finset Cell) (c : Cell) :
(whb_faceRegion (imageGraph (cellSkeletonP S))).ConnectedComponent :=
(whb_faceRegion (imageGraph (cellSkeletonP S))).connectedComponentMk (cellFace c)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:164
theorem occupiedComponent_finite (S : Finset Cell) (c : Cell) (hc : c ∈ S) :
(occupiedComponent S c).supp.Finite
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:178
Uses 8 · Used by 3
TheoremDistinct cells form distinct bounded faces#✓fully proved
Distinct cells form distinct bounded faces.
theorem occupiedBoundedFace_injective (S : Finset Cell) :
Function.Injective (occupiedBoundedFace S)
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
noncomputable def occupiedBoundedFace (S : Finset Cell) (c : S) :
jcb_BoundedRegion (cellSkeletonP S) :=
⟨occupiedComponent S c.1, occupiedComponent_finite S c.1 c.2⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:189
Uses 10 · Used by 2
TheoremNumber of cells is at most the nullity of the skeleton#✓fully proved
The number of cells is at most the nullity of the skeleton.
theorem card_le_cellSkeleton_nullity (S : Finset Cell) :
S.card ≤ nullity (cellSkeletonP S).G
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
noncomputable def nullity (G : SimpleGraph V) : ℕ :=
(G.edgeSet.ncard + Nat.card G.ConnectedComponent) - Nat.card V
MathlibExt/Combinatorics/SimpleGraph/Lattice/CycleRank.lean:267
noncomputable def cellSkeletonP (S : Finset Cell) : PlanarZ2Subgraph where
V := {v // v ∈ regVerts S}
finV := inferInstance
decV := inferInstance
G := cellSkeleton S
emb := ⟨fun v => ![v.1.1, v.1.2], by
intro a b h
apply Subtype.ext
apply Prod.ext
· exact congrFun h 0
· exact congrFun h 1⟩
isSub := by
⋯
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:67
Uses 18 · Used by 1
DefinitionEdges of the skeleton are the edges of the cell complex#✓fully proved
The edges of cellSkeleton S are the edges of the cell complex S.
noncomputable def cellSkeletonEdgeEquiv (S : Finset Cell) :
{e // e ∈ (cellSkeleton S).edgeSet} ≃ {e // e ∈ StatMech.CellEulerChar.regEdges S} where
toFun e := ⟨Sym2.map Subtype.val e.1, by
exact (mem_cellSkeleton_edgeSet_iff S e.1).mp e.2⟩
invFun e := ⟨e.1.attachWith (fun v hv => wad_edge_mem_regVerts e.2 hv), by
rw [mem_cellSkeleton_edgeSet_iff]
simpa only [Sym2.attachWith_map_subtypeVal] using e.2⟩
left_inv e := by
apply Subtype.ext
apply Sym2.map.injective Subtype.val_injective
simp only [Sym2.attachWith_map_subtypeVal]
right_inv e := by
apply Subtype.ext
simp only [Sym2.attachWith_map_subtypeVal]
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
def cellSkeleton (S : Finset Cell) : SimpleGraph {v // v ∈ regVerts S} where
Adj a b := s(a.1, b.1) ∈ StatMech.CellEulerChar.regEdges S
symm := ⟨fun a b h => by rwa [Sym2.eq_swap]⟩
loopless := ⟨by
intro a h
exact wad_edge_not_diag h (by simp)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:59
def regEdges (K : Finset Cell) : Finset (Sym2 Vtx) := K.biUnion cellEdges
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:66
Uses 7 · Used by 2
TheoremVertex count of the skeleton#✓fully proved
The skeleton has (regVerts S).card vertices.
theorem card_cellSkeleton_vertices (S : Finset Cell) :
Nat.card {v // v ∈ regVerts S} = (regVerts S).card
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
def regVerts (K : Finset Cell) : Finset Vtx := K.biUnion cellVerts
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:63
Uses 3 · Used by 2
TheoremEuler characteristic at most 1 for a connected skeleton#✓fully proved
If the 1-skeleton of S is connected, then eulerChar S ≤ 1. See also
StatMech.Onsager.CellEulerBound.eulerChar_le_one.
theorem eulerChar_le_one_of_skeleton_connected (S : Finset Cell)
(hconn : (cellSkeleton S).Connected) : eulerChar S ≤ 1
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
def cellSkeleton (S : Finset Cell) : SimpleGraph {v // v ∈ regVerts S} where
Adj a b := s(a.1, b.1) ∈ StatMech.CellEulerChar.regEdges S
symm := ⟨fun a b h => by rwa [Sym2.eq_swap]⟩
loopless := ⟨by
intro a h
exact wad_edge_not_diag h (by simp)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:59
def eulerChar (S : Finset (ℤ × ℤ)) : ℤ :=
((cellVerts S).card : ℤ) - (cellEdges S).card + S.card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/CellEuler.lean:176
Uses 14 · Used by 1
DefinitionCorner of a cell as a skeleton vertex#✓fully proved
A corner of a cell of S, as a vertex of the skeleton.
def skeletonVertexOfCorner (S : Finset Cell) (c : Cell) (hc : c ∈ S)
(v : Vtx) (hv : v ∈ StatMech.CellEulerChar.cellVerts c) : {v // v ∈ regVerts S} :=
⟨v, wad_cellVerts_subset_regVerts hc hv⟩
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
abbrev Vtx := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:49
def cellVerts (c : Cell) : Finset Vtx :=
{(c.1, c.2), (c.1 + 1, c.2), (c.1, c.2 + 1), (c.1 + 1, c.2 + 1)}
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:52
def regVerts (K : Finset Cell) : Finset Vtx := K.biUnion cellVerts
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:63
theorem wad_cellVerts_subset_regVerts {K : Finset Cell} {c : Cell} (hc : c ∈ K) :
cellVerts c ⊆ regVerts K
MathlibExt/Combinatorics/SimpleGraph/Lattice/AngleDefect.lean:74
Uses 4 · Used by 5
TheoremCell corners are connected to the lower-left corner#✓fully proved
Every corner of a cell is connected in the skeleton to its lower-left corner.
theorem corner_reachable_lowerLeft (S : Finset Cell) (c : Cell) (hc : c ∈ S)
(v : Vtx) (hv : v ∈ StatMech.CellEulerChar.cellVerts c) :
(cellSkeleton S).Reachable (skeletonVertexOfCorner S c hc v hv)
(skeletonVertexOfCorner S c hc c (by
obtain ⟨x, y⟩ := c
simp [StatMech.CellEulerChar.cellVerts]))
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
abbrev Vtx := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:49
def cellVerts (c : Cell) : Finset Vtx :=
{(c.1, c.2), (c.1 + 1, c.2), (c.1, c.2 + 1), (c.1 + 1, c.2 + 1)}
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:52
def cellSkeleton (S : Finset Cell) : SimpleGraph {v // v ∈ regVerts S} where
Adj a b := s(a.1, b.1) ∈ StatMech.CellEulerChar.regEdges S
symm := ⟨fun a b h => by rwa [Sym2.eq_swap]⟩
loopless := ⟨by
intro a h
exact wad_edge_not_diag h (by simp)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:59
def skeletonVertexOfCorner (S : Finset Cell) (c : Cell) (hc : c ∈ S)
(v : Vtx) (hv : v ∈ StatMech.CellEulerChar.cellVerts c) : {v // v ∈ regVerts S} :=
⟨v, wad_cellVerts_subset_regVerts hc hv⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:267
Uses 8 · Used by 3
TheoremAdjacent cells have connected lower-left corners#✓fully proved
The lower-left corners of two adjacent cells of S are connected in the skeleton.
theorem cell_representatives_reachable_of_adj (S : Finset Cell) (c d : Cell)
(hc : c ∈ S) (hd : d ∈ S)
(hadj : (hypercubicLattice 2).Adj (cellFace c) (cellFace d)) :
(cellSkeleton S).Reachable
(skeletonVertexOfCorner S c hc c (by
obtain ⟨x, y⟩ := c; simp [StatMech.CellEulerChar.cellVerts]))
(skeletonVertexOfCorner S d hd d (by
obtain ⟨x, y⟩ := d; simp [StatMech.CellEulerChar.cellVerts]))
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
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 cellSkeleton (S : Finset Cell) : SimpleGraph {v // v ∈ regVerts S} where
Adj a b := s(a.1, b.1) ∈ StatMech.CellEulerChar.regEdges S
symm := ⟨fun a b h => by rwa [Sym2.eq_swap]⟩
loopless := ⟨by
intro a h
exact wad_edge_not_diag h (by simp)⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:59
def skeletonVertexOfCorner (S : Finset Cell) (c : Cell) (hc : c ∈ S)
(v : Vtx) (hv : v ∈ StatMech.CellEulerChar.cellVerts c) : {v // v ∈ regVerts S} :=
⟨v, wad_cellVerts_subset_regVerts hc hv⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:267
Uses 14 · Used by 2
DefinitionLower-left corner of a cell as a skeleton vertex#✓fully proved
The lower-left corner of a cell of S, as a vertex of the skeleton.
def skeletonRepresentative (S : Finset Cell) (c : S) : {v // v ∈ regVerts S} :=
skeletonVertexOfCorner S c.1 c.2 c.1 (by
obtain ⟨x, y⟩ := c.1
simp [StatMech.CellEulerChar.cellVerts])
abbrev Cell := ℤ × ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:46
def regVerts (K : Finset Cell) : Finset Vtx := K.biUnion cellVerts
MathlibExt/Combinatorics/SimpleGraph/Lattice/CellEulerCharacteristic.lean:63
def skeletonVertexOfCorner (S : Finset Cell) (c : Cell) (hc : c ∈ S)
(v : Vtx) (hv : v ∈ StatMech.CellEulerChar.cellVerts c) : {v // v ∈ regVerts S} :=
⟨v, wad_cellVerts_subset_regVerts hc hv⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/InteriorEulerBound.lean:267
Uses 5 · Used by 3
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.