Boundary contours in the square lattice
StructureDart of the square lattice#✓fully proved
An oriented edge of the square lattice: a pair of nearest-neighbour sites. This is the same data
as Mathlib's SimpleGraph.Dart of hypercubicLattice 2; see
StatMech.Lattice.Dart.equivSimpleGraphDart.
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
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
tail : Site 2
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:59
head : Site 2
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:61
Uses 2 · Used by 82
DefinitionReversal of a lattice dart#✓fully proved
The dart with tail and head exchanged.
def rev (d : Dart) : Dart where
tail := d.head
head := d.tail
adj := d.adj.symm
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
Uses 3 · Used by 1
DefinitionDirection of a lattice dart#✓fully proved
The direction head - tail of a dart, one of the four unit vectors of ℤ².
def dir (d : Dart) : Site 2 := d.head - d.tail
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 2 · Used by 24
DefinitionLattice darts agree with graph darts of the square lattice#✓fully proved
Lattice darts are exactly Mathlib's darts of the square lattice.
def equivSimpleGraphDart : Dart ≃ (hypercubicLattice 2).Dart where
toFun d := ⟨(d.tail, d.head), d.adj⟩
invFun d := ⟨d.fst, d.snd, d.adj⟩
left_inv _ := rfl
right_inv _ := rfl
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
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
Uses 3 · Used by 1
TheoremDart correspondence respects reversal#✓fully proved
Reversing a lattice dart corresponds to SimpleGraph.Dart.symm.
theorem equivSimpleGraphDart_rev (d : Dart) :
equivSimpleGraphDart d.rev = (equivSimpleGraphDart d).symm
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def equivSimpleGraphDart : Dart ≃ (hypercubicLattice 2).Dart where
toFun d := ⟨(d.tail, d.head), d.adj⟩
invFun d := ⟨d.fst, d.snd, d.adj⟩
left_inv _ := rfl
right_inv _ := rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:91
Definition\(\ell^1\) norm of a vector in \(\mathbb{Z}^2\)#✓fully proved
The ℓ¹ norm |z 0| + |z 1| of a vector of ℤ².
def unitWt (z : Site 2) : ℕ := ∑ i, (z i).natAbs
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 26
DefinitionDart from a site in a unit direction#✓fully proved
The dart from p to p + g, for a unit vector g.
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def unitWt (z : Site 2) : ℕ := ∑ i, (z i).natAbs
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:45
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
Uses 4 · Used by 23
DefinitionBoundary dart of a set of sites#✓fully proved
e is a boundary dart of K: it points from a site of K to a site outside K.
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
Uses 2 · Used by 43
DefinitionSuccessor of a boundary dart#✓fully proved
The successor of the dart e along the boundary of K. Write r for e.dir rotated
clockwise by a quarter turn. If e.head + r ∈ K (a reflex corner of K), the successor shares the
head of e; if only e.tail + r ∈ K, it is the translate of e by r; otherwise (a convex corner
of K) it starts at e.tail in direction r.
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
Uses 7 · Used by 33
DefinitionSuccessor map on boundary darts#✓fully proved
The successor map restricted to boundary darts of K.
noncomputable def dartNextSub (K : Set (Site 2)) :
{e : Dart // IsBoundaryDart K e} → {e : Dart // IsBoundaryDart K e} :=
fun e => ⟨dartNext K e.1, dartNext_isBoundaryDart K e.1 e.2⟩
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
theorem dartNext_isBoundaryDart (K : Set (Site 2)) (e : Dart)
(he : IsBoundaryDart K e) : IsBoundaryDart K (dartNext K e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:148
Uses 9 · Used by 12
DefinitionSuccessor graph on boundary darts#✓fully proved
The graph on boundary darts of K in which each dart is adjacent to its successor.
noncomputable def dartSuccGraph (K : Set (Site 2)) :
SimpleGraph {e : Dart // IsBoundaryDart K e} where
Adj a b := a ≠ b ∧ (dartNextSub K a = b ∨ dartNextSub K b = a)
symm := ⟨by rintro a b ⟨hne, h⟩; exact ⟨hne.symm, h.symm⟩⟩
loopless := by refine ⟨?_⟩; rintro a ⟨hne, _⟩; exact hne rfl
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def dartNextSub (K : Set (Site 2)) :
{e : Dart // IsBoundaryDart K e} → {e : Dart // IsBoundaryDart K e} :=
fun e => ⟨dartNext K e.1, dartNext_isBoundaryDart K e.1 e.2⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:120
Uses 4 · Used by 4
DefinitionWalk along the first iterates of a boundary dart#✓fully proved
The walk a, next a, …, next^[n] a in dartSuccGraph K.
noncomputable def orbitWalkAux (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
(n : ℕ) → (dartSuccGraph K).Walk a ((dartNextSub K)^[n] a)
| 0 => SimpleGraph.Walk.nil
| (n+1) =>
(orbitWalkAux K a n).concat (by
rw [Function.iterate_succ_apply']
exact dartSuccGraph_adj_next K ((dartNextSub K)^[n] a))
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def dartSuccGraph (K : Set (Site 2)) :
SimpleGraph {e : Dart // IsBoundaryDart K e} where
Adj a b := a ≠ b ∧ (dartNextSub K a = b ∨ dartNextSub K b = a)
symm := ⟨by rintro a b ⟨hne, h⟩; exact ⟨hne.symm, h.symm⟩⟩
loopless := by refine ⟨?_⟩; rintro a ⟨hne, _⟩; exact hne rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:155
noncomputable def dartNextSub (K : Set (Site 2)) :
{e : Dart // IsBoundaryDart K e} → {e : Dart // IsBoundaryDart K e} :=
fun e => ⟨dartNext K e.1, dartNext_isBoundaryDart K e.1 e.2⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:120
Uses 12 · Used by 1
DefinitionMinimal period of a boundary dart#✓fully proved
The minimal period of the boundary dart a under the successor map.
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def dartNextSub (K : Set (Site 2)) :
{e : Dart // IsBoundaryDart K e} → {e : Dart // IsBoundaryDart K e} :=
fun e => ⟨dartNext K e.1, dartNext_isBoundaryDart K e.1 e.2⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:120
Uses 4 · Used by 18
DefinitionClosed walk around a boundary dart orbit#✓fully proved
The closed walk in dartSuccGraph K that runs once around the orbit of a.
noncomputable def dartOrbitWalk (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
(dartSuccGraph K).Walk a a :=
(orbitWalkAux K a (dartOrbitPeriod K a)).copy rfl (dartOrbitPeriod_iterate K a)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def dartSuccGraph (K : Set (Site 2)) :
SimpleGraph {e : Dart // IsBoundaryDart K e} where
Adj a b := a ≠ b ∧ (dartNextSub K a = b ∨ dartNextSub K b = a)
symm := ⟨by rintro a b ⟨hne, h⟩; exact ⟨hne.symm, h.symm⟩⟩
loopless := by refine ⟨?_⟩; rintro a ⟨hne, _⟩; exact hne rfl
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:155
noncomputable def orbitWalkAux (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
(n : ℕ) → (dartSuccGraph K).Walk a ((dartNextSub K)^[n] a)
| 0 => SimpleGraph.Walk.nil
| (n+1) =>
(orbitWalkAux K a n).concat (by
rw [Function.iterate_succ_apply']
exact dartSuccGraph_adj_next K ((dartNextSub K)^[n] a))
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:168
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
theorem dartOrbitPeriod_iterate (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
(dartNextSub K)^[dartOrbitPeriod K a] a = a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:213
TheoremIterates up to the minimal period are distinct#✓fully proved
The iterates f^[j] x for 1 ≤ j ≤ minimalPeriod f x are distinct. See also Mathlib's
Function.iterate_injOn_Iio_minimalPeriod, the same statement for 0 ≤ j < minimalPeriod f x.
theorem iterate_inj_on_Icc_minimalPeriod {α : Type*} (f : α → α) (x : α) {j k : ℕ}
(hpos : 0 < Function.minimalPeriod f x)
(hj1 : 1 ≤ j) (hjp : j ≤ Function.minimalPeriod f x)
(hk1 : 1 ≤ k) (hkp : k ≤ Function.minimalPeriod f x)
(h : f^[j] x = f^[k] x) : j = k
DefinitionInner corner of a boundary dart#✓fully proved
The site e.head + r, with r the clockwise rotation of e.dir, lies in K; then the
successor of e has the same head.
def IsInnerCorner (K : Set (Site 2)) (e : Dart) : Prop :=
e.head + (-rot90Fun e.dir) ∈ K
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def rot90Fun (x : Site 2) : Site 2 := ![- x 1, x 0]
MathlibExt/Combinatorics/SimpleGraph/Lattice/PlanarDual.lean:65
DefinitionTwo darts in the same boundary orbit#✓fully proved
The dart f is obtained from e by iterating the boundary successor map of K.
def SameOrbit (K : Set (Site 2)) (e f : Dart) : Prop := ∃ n : ℕ, (dartNext K)^[n] e = f
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
Uses 3 · Used by 3
DefinitionOrbit saturation by heads connected in the complement#✓fully proved
Boundary darts whose heads are connected in Kᶜ lie in the same orbit; a reformulation of
StatMech.Lattice.InterfaceConnected.
def OrbitHeadsSaturate (K : Set (Site 2)) : Prop :=
∀ (e f : Dart), IsBoundaryDart K e → IsBoundaryDart K f →
(∀ (he : IsBoundaryDart K e) (hf : IsBoundaryDart K f),
((hypercubicLattice 2).induce Kᶜ).Reachable ⟨e.head, he.2⟩ ⟨f.head, hf.2⟩) →
SameOrbit K e f
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
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 SameOrbit (K : Set (Site 2)) (e f : Dart) : Prop := ∃ n : ℕ, (dartNext K)^[n] e = f
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:113
DefinitionKing adjacency on the square lattice#✓fully proved
King adjacency on ℤ²: distinct sites that differ by at most one in each coordinate.
def KingAdj (u v : Site 2) : Prop := u ≠ v ∧ ∀ i, (u i - v i).natAbs ≤ 1
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 2
DefinitionKing-move graph on the complement of a set#✓fully proved
The graph of king moves on the complement of K.
def boundaryKingGraph (K : Set (Site 2)) : SimpleGraph (↥(Kᶜ : Set (Site 2))) where
Adj a b := KingAdj (a : Site 2) (b : Site 2)
symm := ⟨fun _ _ h => h.symm⟩
loopless := ⟨fun _ h => h.1 rfl⟩
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def KingAdj (u v : Site 2) : Prop := u ≠ v ∧ ∀ i, (u i - v i).natAbs ≤ 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:175
Uses 2 · Used by 1
DefinitionSite reached by a boundary orbit#✓fully proved
Some boundary dart in the orbit of e has head v.
def OrbitReached (K : Set (Site 2)) (e : Dart) (v : Site 2) : Prop :=
∃ d : Dart, IsBoundaryDart K d ∧ d.head = v ∧ SameOrbit K e d
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
def SameOrbit (K : Set (Site 2)) (e f : Dart) : Prop := ∃ n : ℕ, (dartNext K)^[n] e = f
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:113
Uses 4 · Used by 2
DefinitionBoundary orbits spread along king moves#✓fully proved
If the orbit of e reaches a site outside K, it reaches every king neighbour of that site
outside K.
def OrbitKingTransport (K : Set (Site 2)) : Prop :=
∀ (e : Dart), IsBoundaryDart K e →
∀ {u v : Site 2}, u ∉ K → v ∉ K → KingAdj u v →
OrbitReached K e u → OrbitReached K e v
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
def KingAdj (u v : Site 2) : Prop := u ≠ v ∧ ∀ i, (u i - v i).natAbs ≤ 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:175
def OrbitReached (K : Set (Site 2)) (e : Dart) (v : Site 2) : Prop :=
∃ d : Dart, IsBoundaryDart K d ∧ d.head = v ∧ SameOrbit K e d
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:191
DefinitionOrbit saturation at reached sites#✓fully proved
Every boundary dart whose head is reached by the orbit of e lies in that orbit.
def OrbitVertexSaturate (K : Set (Site 2)) : Prop :=
∀ (e : Dart), IsBoundaryDart K e → ∀ {v : Site 2}, OrbitReached K e v →
∀ d : Dart, IsBoundaryDart K d → d.head = v → SameOrbit K e d
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
def OrbitReached (K : Set (Site 2)) (e : Dart) (v : Site 2) : Prop :=
∃ d : Dart, IsBoundaryDart K d ∧ d.head = v ∧ SameOrbit K e d
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:191
def SameOrbit (K : Set (Site 2)) (e f : Dart) : Prop := ∃ n : ℕ, (dartNext K)^[n] e = f
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:113
DefinitionLattice connectivity in the complement implies king connectivity#✓fully proved
Sites connected by a lattice path in Kᶜ are connected by king moves in Kᶜ.
def BoundaryKingConnected (K : Set (Site 2)) : Prop :=
∀ {u w : Site 2} (hu : u ∉ K) (hw : w ∉ K),
((hypercubicLattice 2).induce Kᶜ).Reachable ⟨u, hu⟩ ⟨w, hw⟩ →
(boundaryKingGraph K).Reachable ⟨u, hu⟩ ⟨w, hw⟩
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 boundaryKingGraph (K : Set (Site 2)) : SimpleGraph (↥(Kᶜ : Set (Site 2))) where
Adj a b := KingAdj (a : Site 2) (b : Site 2)
symm := ⟨fun _ _ h => h.symm⟩
loopless := ⟨fun _ h => h.1 rfl⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/InterfaceConnected.lean:182
Uses 3
DefinitionBoundary darts with heads in one component share an orbit#✓fully proved
Boundary darts of K whose heads lie in the same connected component of Kᶜ lie in the same
boundary orbit.
def InterfaceConnected (K : Set (Site 2)) : Prop :=
∀ (e f : Dart) (he : IsBoundaryDart K e) (hf : IsBoundaryDart K f),
((hypercubicLattice 2).induce Kᶜ).Reachable ⟨e.head, he.2⟩ ⟨f.head, hf.2⟩ →
∃ n : ℕ, (dartNext K)^[n] e = f
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
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 dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
DefinitionLower left corner of the unit face at \((a, b)\)#✓fully proved
The lower left corner (a, b) of the unit face [a, a + 1] × [b, b + 1].
def faceCorner00 (a b : ℤ) : Site 2 := ![a, b]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 21
DefinitionLower right corner of the unit face at \((a, b)\)#✓fully proved
The lower right corner (a + 1, b) of the unit face [a, a + 1] × [b, b + 1].
def faceCorner10 (a b : ℤ) : Site 2 := ![a + 1, b]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 23
DefinitionUpper right corner of the unit face at \((a, b)\)#✓fully proved
The upper right corner (a + 1, b + 1) of the unit face [a, a + 1] × [b, b + 1].
def faceCorner11 (a b : ℤ) : Site 2 := ![a + 1, b + 1]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 19
DefinitionUpper left corner of the unit face at \((a, b)\)#✓fully proved
The upper left corner (a, b + 1) of the unit face [a, a + 1] × [b, b + 1].
def faceCorner01 (a b : ℤ) : Site 2 := ![a, b + 1]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 23
DefinitionBoundary indicator of an edge#✓fully proved
1 if exactly one of x and y lies in S, and 0 otherwise.
noncomputable def bdInd (S : Set (Site 2)) (x y : Site 2) : ℕ := by
classical exact if (x ∈ S ↔ y ∉ S) then 1 else 0
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 10
DefinitionBoundary degree of a unit face#✓fully proved
The number of the four edges of the unit face at (a, b) that have exactly one
endpoint
in S.
noncomputable def faceBoundaryDegree (S : Set (Site 2)) (a b : ℤ) : ℕ :=
bdInd S (faceCorner00 a b) (faceCorner10 a b)
+ bdInd S (faceCorner10 a b) (faceCorner11 a b)
+ bdInd S (faceCorner11 a b) (faceCorner01 a b)
+ bdInd S (faceCorner01 a b) (faceCorner00 a b)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
noncomputable def bdInd (S : Set (Site 2)) (x y : Site 2) : ℕ := by
classical exact if (x ∈ S ↔ y ∉ S) then 1 else 0
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanZ2.lean:76
def faceCorner00 (a b : ℤ) : Site 2 := ![a, b]
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanZ2.lean:48
def faceCorner10 (a b : ℤ) : Site 2 := ![a + 1, b]
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanZ2.lean:51
def faceCorner11 (a b : ℤ) : Site 2 := ![a + 1, b + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanZ2.lean:54
def faceCorner01 (a b : ℤ) : Site 2 := ![a, b + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanZ2.lean:57
Uses 6 · Used by 9
DefinitionFace loop left of one period of a boundary orbit#✓fully proved
The closed walk of faces to the left of the darts in one period of the boundary orbit of a.
noncomputable def mpl_orbitFaceLoop (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
(faceBoundaryGraph K).Walk (dartFace a.1) (dartFace a.1) :=
(dartOrbitFaceWalk K a.1 a.2 (dartOrbitPeriod K a)).copy rfl
(by rw [orbit_iterate_period_eq K a])
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
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
noncomputable def dartFace (e : Dart) : Site 2 :=
![ e.tail 0 + negPart (e.dir 0) + negPart (rot90Fun e.dir 0),
e.tail 1 + negPart (e.dir 1) + negPart (rot90Fun e.dir 1) ]
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:120
noncomputable def dartOrbitFaceWalk (K : Set (Site 2)) (e : Dart) (he : IsBoundaryDart K e) :
(n : ℕ) → (faceBoundaryGraph K).Walk (dartFace e) (dartFace ((dartNext K)^[n] e))
| 0 => SimpleGraph.Walk.nil
| (n + 1) =>
((dartOrbitFaceWalk K e he n).concat
(dartFace_step_adj K _ (iterate_isBoundaryDart K e he n))).copy rfl (by
rw [Function.iterate_succ_apply'])
MathlibExt/Combinatorics/SimpleGraph/Lattice/OrbitEncloses.lean:71
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
Uses 9 · Used by 1
DefinitionMinimal-period orbit loop as a lattice walk#✓fully proved
The closed face walk of one period of the orbit of a, as a walk in the square lattice.
noncomputable def mpl_orbitLoop (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
(hypercubicLattice 2).Walk (dartFace a.1) (dartFace a.1) :=
(mpl_orbitFaceLoop K a).mapLe (faceBoundaryGraph_le K)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
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 dartFace (e : Dart) : Site 2 :=
![ e.tail 0 + negPart (e.dir 0) + negPart (rot90Fun e.dir 0),
e.tail 1 + negPart (e.dir 1) + negPart (rot90Fun e.dir 1) ]
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:120
noncomputable def mpl_orbitFaceLoop (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
(faceBoundaryGraph K).Walk (dartFace a.1) (dartFace a.1) :=
(dartOrbitFaceWalk K a.1 a.2 (dartOrbitPeriod K a)).copy rfl
(by rw [orbit_iterate_period_eq K a])
MathlibExt/Combinatorics/SimpleGraph/Lattice/MinimalPeriodLoop.lean:45
theorem faceBoundaryGraph_le (S : Set (Site 2)) :
faceBoundaryGraph S ≤ hypercubicLattice 2
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:311
Uses 9
DefinitionLower left corner of a face \(f\)#✓fully proved
The lower left corner of the face f. This is StatMech.Lattice.faceCorner00 (f 0) (f 1).
def npd_P00 (f : Site 2) : Site 2 := ![f 0, f 1]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 4
DefinitionLower right corner of a face \(f\)#✓fully proved
The lower right corner of the face f.
def npd_P10 (f : Site 2) : Site 2 := ![f 0 + 1, f 1]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 4
DefinitionUpper right corner of a face \(f\)#✓fully proved
The upper right corner of the face f.
def npd_P11 (f : Site 2) : Site 2 := ![f 0 + 1, f 1 + 1]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 4
DefinitionUpper left corner of a face \(f\)#✓fully proved
The upper left corner of the face f.
def npd_P01 (f : Site 2) : Site 2 := ![f 0, f 1 + 1]
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 4
DefinitionDiagonal touch at a face#✓fully proved
K contains exactly two opposite corners of the face f.
def npd_DiagTouch (K : Set (Site 2)) (f : Site 2) : Prop :=
(npd_P00 f ∈ K ∧ npd_P11 f ∈ K ∧ npd_P10 f ∉ K ∧ npd_P01 f ∉ K) ∨
(npd_P10 f ∈ K ∧ npd_P01 f ∈ K ∧ npd_P00 f ∉ K ∧ npd_P11 f ∉ K)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def npd_P00 (f : Site 2) : Site 2 := ![f 0, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:46
def npd_P11 (f : Site 2) : Site 2 := ![f 0 + 1, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:52
def npd_P10 (f : Site 2) : Site 2 := ![f 0 + 1, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:49
def npd_P01 (f : Site 2) : Site 2 := ![f 0, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:55
DefinitionNo diagonal touch along a boundary orbit#✓fully proved
No face visited in one period of the orbit of a is a diagonal touch of K.
def npd_NoDiagTouchAlongOrbit (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) : Prop :=
∀ k ∈ Set.Iio (dartOrbitPeriod K a), ¬ npd_DiagTouch K (dartFace ((dartNext K)^[k] a.1))
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
def npd_DiagTouch (K : Set (Site 2)) (f : Site 2) : Prop :=
(npd_P00 f ∈ K ∧ npd_P11 f ∈ K ∧ npd_P10 f ∉ K ∧ npd_P01 f ∉ K) ∨
(npd_P10 f ∈ K ∧ npd_P01 f ∈ K ∧ npd_P00 f ∉ K ∧ npd_P11 f ∉ K)
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:97
noncomputable def dartFace (e : Dart) : Site 2 :=
![ e.tail 0 + negPart (e.dir 0) + negPart (rot90Fun e.dir 0),
e.tail 1 + negPart (e.dir 1) + negPart (rot90Fun e.dir 1) ]
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:120
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
DefinitionSet with no diagonal touches#✓fully proved
K has no diagonal touch at any face.
def npd_NoDiagTouch (K : Set (Site 2)) : Prop := ∀ f : Site 2, ¬ npd_DiagTouch K f
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def npd_DiagTouch (K : Set (Site 2)) (f : Site 2) : Prop :=
(npd_P00 f ∈ K ∧ npd_P11 f ∈ K ∧ npd_P10 f ∉ K ∧ npd_P01 f ∉ K) ∨
(npd_P10 f ∈ K ∧ npd_P01 f ∈ K ∧ npd_P00 f ∉ K ∧ npd_P11 f ∉ K)
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:97
Uses 2
DefinitionKing-saturated set#✓fully proved
Whenever K contains two opposite corners of a face, it contains one of the other two
corners.
def npm_KingSaturated (K : Set (Site 2)) : Prop :=
∀ f : Site 2,
(npd_P00 f ∈ K → npd_P11 f ∈ K → (npd_P10 f ∈ K ∨ npd_P01 f ∈ K)) ∧
(npd_P10 f ∈ K → npd_P01 f ∈ K → (npd_P00 f ∈ K ∨ npd_P11 f ∈ K))
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def npd_P00 (f : Site 2) : Site 2 := ![f 0, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:46
def npd_P11 (f : Site 2) : Site 2 := ![f 0 + 1, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:52
def npd_P10 (f : Site 2) : Site 2 := ![f 0 + 1, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:49
def npd_P01 (f : Site 2) : Site 2 := ![f 0, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:55
DefinitionBoundary orbit face loop as a lattice walk#✓fully proved
The face loop of the boundary orbit of e, as a closed walk in the square lattice.
noncomputable def olb_orbitLoop (K : Set (Site 2)) (hK : K.Finite) (e : Dart)
(he : IsBoundaryDart K e) : (hypercubicLattice 2).Walk (dartFace e) (dartFace e) :=
(dartOrbitFaceLoop K hK e he).mapLe (faceBoundaryGraph_le K)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
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 dartFace (e : Dart) : Site 2 :=
![ e.tail 0 + negPart (e.dir 0) + negPart (rot90Fun e.dir 0),
e.tail 1 + negPart (e.dir 1) + negPart (rot90Fun e.dir 1) ]
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:120
noncomputable def dartOrbitFaceLoop (K : Set (Site 2)) (hK : K.Finite) (e : Dart)
(he : IsBoundaryDart K e) : (faceBoundaryGraph K).Walk (dartFace e) (dartFace e) :=
(dartOrbitFaceWalk K e he (dartNext_periodic K hK e he).choose).copy rfl (by
rw [(dartNext_periodic K hK e he).choose_spec.2])
MathlibExt/Combinatorics/SimpleGraph/Lattice/OrbitEncloses.lean:110
theorem faceBoundaryGraph_le (S : Set (Site 2)) :
faceBoundaryGraph S ≤ hypercubicLattice 2
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanEnclosure.lean:311
Uses 9
DefinitionProduct set of two coordinate sets in the plane#✓fully proved
The product set {x | x 0 ∈ A ∧ x 1 ∈ B}.
def ndt_product (A B : Set ℤ) : Set (Site 2) := {x | x 0 ∈ A ∧ x 1 ∈ B}
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1
DefinitionSublevel set of a separable function#✓fully proved
The sublevel set {x | φ (x 0) + ψ (x 1) ≤ c} of a separable function.
def ndt_sublevel (φ ψ : ℤ → ℤ) (c : ℤ) : Set (Site 2) := {x | φ (x 0) + ψ (x 1) ≤ c}
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1
InductiveMembership in the star hull#✓fully proved
Membership in the star hull of K: sites of K, closed under filling the lower right corner
of a face whose lower left and upper right corners are members, and the lower left corner of
a face whose lower right and upper left corners are members.
inductive ndt_StarHullMem (K : Set (Site 2)) : Site 2 → Prop
| base {x : Site 2} (h : x ∈ K) : ndt_StarHullMem K x
| fillBL {f : Site 2} (h00 : ndt_StarHullMem K (npd_P00 f))
(h11 : ndt_StarHullMem K (npd_P11 f)) : ndt_StarHullMem K (npd_P10 f)
| fillTL {f : Site 2} (h10 : ndt_StarHullMem K (npd_P10 f))
(h01 : ndt_StarHullMem K (npd_P01 f)) : ndt_StarHullMem K (npd_P00 f)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def npd_P00 (f : Site 2) : Site 2 := ![f 0, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:46
def npd_P11 (f : Site 2) : Site 2 := ![f 0 + 1, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:52
def npd_P10 (f : Site 2) : Site 2 := ![f 0 + 1, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:49
def npd_P01 (f : Site 2) : Site 2 := ![f 0, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:55
Uses 5 · Used by 1
DefinitionStar hull of a set of lattice sites#✓fully proved
The star hull of K: the smallest superset of K closed under the diagonal fill rules.
def ndt_StarHull (K : Set (Site 2)) : Set (Site 2) := {x | ndt_StarHullMem K x}
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
inductive ndt_StarHullMem (K : Set (Site 2)) : Site 2 → Prop
| base {x : Site 2} (h : x ∈ K) : ndt_StarHullMem K x
| fillBL {f : Site 2} (h00 : ndt_StarHullMem K (npd_P00 f))
(h11 : ndt_StarHullMem K (npd_P11 f)) : ndt_StarHullMem K (npd_P10 f)
| fillTL {f : Site 2} (h10 : ndt_StarHullMem K (npd_P10 f))
(h01 : ndt_StarHullMem K (npd_P01 f)) : ndt_StarHullMem K (npd_P00 f)
MathlibExt/Combinatorics/SimpleGraph/Lattice/StarHull.lean:86
Uses 2
DefinitionClosure under the diagonal fill rules#✓fully proved
S is closed under the two diagonal fill rules of StatMech.Lattice.ndt_StarHullMem.
def ndt_FillClosed (S : Set (Site 2)) : Prop :=
(∀ f, npd_P00 f ∈ S → npd_P11 f ∈ S → npd_P10 f ∈ S) ∧
(∀ f, npd_P10 f ∈ S → npd_P01 f ∈ S → npd_P00 f ∈ S)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def npd_P00 (f : Site 2) : Site 2 := ![f 0, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:46
def npd_P11 (f : Site 2) : Site 2 := ![f 0 + 1, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:52
def npd_P10 (f : Site 2) : Site 2 := ![f 0 + 1, f 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:49
def npd_P01 (f : Site 2) : Site 2 := ![f 0, f 1 + 1]
MathlibExt/Combinatorics/SimpleGraph/Lattice/NoPinchDual.lean:55
TheoremFour quarter turns of the square lattice are the identity#✓fully proved
Four counterclockwise quarter turns are the identity, i.e. every site is a periodic point of
rot90Fun of period 4.
theorem rot90Fun_iterate_four_eq (x : Site 2) : rot90Fun^[4] x = x
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def rot90Fun (x : Site 2) : Site 2 := ![- x 1, x 0]
MathlibExt/Combinatorics/SimpleGraph/Lattice/PlanarDual.lean:65
Uses 2 · Used by 1
DefinitionRotation of \(\mathbb{Z}^2\) by a number of quarter turns#✓fully proved
Rotation of ℤ² by s counterclockwise quarter turns, s : ZMod 4.
noncomputable def rotPow (s : ZMod 4) (x : Site 2) : Site 2 := rot90Fun^[s.val] x
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def rot90Fun (x : Site 2) : Site 2 := ![- x 1, x 0]
MathlibExt/Combinatorics/SimpleGraph/Lattice/PlanarDual.lean:65
Uses 2 · Used by 5
TheoremQuarter-turn rotations form an action of \(\mathbb{Z}/4\)#✓fully proved
rotPow is an action of the additive group ZMod 4.
theorem rotPow_add (a b : ZMod 4) (x : Site 2) :
rotPow (a + b) x = rotPow a (rotPow b x)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
noncomputable def rotPow (s : ZMod 4) (x : Site 2) : Site 2 := rot90Fun^[s.val] x
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:68
Uses 4 · Used by 1
TheoremNontrivial quarter-turn rotations fix no lattice direction#✓fully proved
A nontrivial rotation moves every lattice direction: rotPow s fixes the direction of a dart
only for s = 0.
theorem rotPow_dir_eq_iff (e : Dart) (s : ZMod 4) :
rotPow s e.dir = e.dir ↔ s = 0
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def rotPow (s : ZMod 4) (x : Site 2) : Site 2 := rot90Fun^[s.val] x
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:68
Uses 7 · Used by 1
DefinitionQuarter turn between consecutive boundary darts modulo 4#✓fully proved
The quarter turn, as an element of ZMod 4, from the boundary dart e of K to its successor
dartNext K e: 1 for a counterclockwise (left) turn, 0 for going straight, 3 for a
clockwise (right) turn.
noncomputable def turn (K : Set (Site 2)) (e : Dart) : ZMod 4 := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else 3
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
Uses 4 · Used by 4
DefinitionSigned quarter turn between consecutive boundary darts#✓fully proved
The signed quarter turn from e to dartNext K e: 1 counterclockwise, 0 straight, -1
clockwise. Its reduction mod 4 is turn K e.
noncomputable def turnZ (K : Set (Site 2)) (e : Dart) : ℤ := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else -1
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
Uses 4 · Used by 7
TheoremNext boundary dart direction is rotated by the turn#✓fully proved
The direction of dartNext K e is the direction of e rotated by turn K e quarter turns.
theorem dartNext_dir_eq_rotPow_turn (K : Set (Site 2)) (e : Dart) :
(dartNext K e).dir = rotPow (turn K e) e.dir
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
noncomputable def rotPow (s : ZMod 4) (x : Site 2) : Site 2 := rot90Fun^[s.val] x
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:68
noncomputable def turn (K : Set (Site 2)) (e : Dart) : ZMod 4 := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else 3
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:118
Uses 10 · Used by 1
DefinitionCumulative turn along a boundary-tracing orbit#✓fully proved
The cumulative turn, in ZMod 4, over the first k steps of the dartNext K-orbit of e.
noncomputable def cumTurn (K : Set (Site 2)) (e : Dart) (k : ℕ) : ZMod 4 :=
∑ i ∈ Finset.range k, turn K ((dartNext K)^[i] e)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def turn (K : Set (Site 2)) (e : Dart) : ZMod 4 := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else 3
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:118
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
Uses 4 · Used by 2
TheoremDart direction after k steps is rotated by the cumulative turn#✓fully proved
After k boundary-tracing steps the direction of a dart is its initial direction rotated by the
cumulative turn cumTurn K e k.
theorem dir_iterate_eq_rotPow_cumTurn (K : Set (Site 2)) (e : Dart) (k : ℕ) :
((dartNext K)^[k] e).dir = rotPow (cumTurn K e k) e.dir
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
noncomputable def rotPow (s : ZMod 4) (x : Site 2) : Site 2 := rot90Fun^[s.val] x
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:68
noncomputable def cumTurn (K : Set (Site 2)) (e : Dart) (k : ℕ) : ZMod 4 :=
∑ i ∈ Finset.range k, turn K ((dartNext K)^[i] e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:162
Uses 9 · Used by 1
DefinitionTotal signed turning along a boundary orbit#✓fully proved
The total signed turning (in quarter turns) over the first p steps of the dartNext K-orbit
of e.
noncomputable def totalTurnZ (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
∑ i ∈ Finset.range p, turnZ K ((dartNext K)^[i] e)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def turnZ (K : Set (Site 2)) (e : Dart) : ℤ := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else -1
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:127
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
Uses 4 · Used by 5
TheoremTotal turning of a closed orbit segment is divisible by four#✓fully proved
If the orbit of e closes after p steps, the total signed turning over these steps is
divisible by 4.
theorem four_dvd_totalTurnZ_of_iterate_eq (K : Set (Site 2)) (e : Dart) (p : ℕ)
(hp : (dartNext K)^[p] e = e) : (4 : ℤ) ∣ totalTurnZ K e p
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
noncomputable def totalTurnZ (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
∑ i ∈ Finset.range p, turnZ K ((dartNext K)^[i] e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:184
Uses 12 · Used by 1
TheoremTotal turning over the minimal period is divisible by four#✓fully proved
The total signed turning around a boundary orbit, taken over its minimal period, is divisible by
4.
theorem four_dvd_orbit_totalTurnZ (K : Set (Site 2))
(a : {e : Dart // IsBoundaryDart K e}) :
(4 : ℤ) ∣ totalTurnZ K a.1 (dartOrbitPeriod K a)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def totalTurnZ (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
∑ i ∈ Finset.range p, turnZ K ((dartNext K)^[i] e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:184
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
TheoremTotal turning of a boundary orbit is bounded by its length#✓fully proved
The total signed turning around a boundary orbit is at most the orbit length in absolute value.
theorem abs_orbit_totalTurnZ_le (K : Set (Site 2))
(a : {e : Dart // IsBoundaryDart K e}) :
|totalTurnZ K a.1 (dartOrbitPeriod K a)| ≤ (dartOrbitPeriod K a : ℤ)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def totalTurnZ (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
∑ i ∈ Finset.range p, turnZ K ((dartNext K)^[i] e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:184
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
Uses 9 · Used by 1
DefinitionBoundary orbit making exactly one full revolution#✓fully proved
The boundary orbit through a turns by exactly one full revolution, i.e. its total signed
turning is 4 or -4 quarter turns.
def TurningIsFullRevolution (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
Prop :=
totalTurnZ K a.1 (dartOrbitPeriod K a) = 4 ∨
totalTurnZ K a.1 (dartOrbitPeriod K a) = -4
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def totalTurnZ (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
∑ i ∈ Finset.range p, turnZ K ((dartNext K)^[i] e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:184
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
TheoremBoundary orbit with a full revolution has length at least four#✓fully proved
A boundary orbit that makes a full revolution has length at least 4.
theorem orbitPeriod_ge_four_of_fullRevolution (K : Set (Site 2))
(a : {e : Dart // IsBoundaryDart K e}) (h : TurningIsFullRevolution K a) :
4 ≤ dartOrbitPeriod K a
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
def TurningIsFullRevolution (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
Prop :=
totalTurnZ K a.1 (dartOrbitPeriod K a) = 4 ∨
totalTurnZ K a.1 (dartOrbitPeriod K a) = -4
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:250
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
DefinitionNumber of reflex corners in a boundary orbit#✓fully proved
The number of steps i < p in the boundary orbit of e with turn turnZ = 1 (reflex
corners of K).
noncomputable def rightCornerCount (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
((Finset.range p).filter (fun i => turnZ K ((dartNext K)^[i] e) = 1)).card
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def turnZ (K : Set (Site 2)) (e : Dart) : ℤ := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else -1
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:127
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
Uses 4 · Used by 1
DefinitionNumber of convex corners in a boundary orbit#✓fully proved
The number of steps i < p in the boundary orbit of e with turn turnZ = -1 (convex
corners of K).
noncomputable def leftCornerCount (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
((Finset.range p).filter (fun i => turnZ K ((dartNext K)^[i] e) = -1)).card
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def turnZ (K : Set (Site 2)) (e : Dart) : ℤ := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else -1
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:127
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
Uses 4 · Used by 1
DefinitionUnit cell as a one-site set#✓fully proved
The one-site set {(0, 0)}.
noncomputable def unitCell : Set (Site 2) := {![0, 0]}
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 2
DefinitionRightward boundary dart of the unit cell#✓fully proved
The boundary dart of the unit cell pointing right.
noncomputable def ucDart0 : Dart := mkDart ![0, 0] ![1, 0] unitWt_px
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_px : unitWt (![1, 0] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:108
Uses 3 · Used by 2
DefinitionDownward boundary dart of the unit cell#✓fully proved
The boundary dart of the unit cell pointing down.
noncomputable def ucDart1 : Dart := mkDart ![0, 0] ![0, -1] unitWt_my
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_my : unitWt (![0, -1] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:109
Uses 3 · Used by 1
DefinitionLeftward boundary dart of the unit cell#✓fully proved
The boundary dart of the unit cell pointing left.
noncomputable def ucDart2 : Dart := mkDart ![0, 0] ![-1, 0] unitWt_mx
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_mx : unitWt (![-1, 0] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:110
Uses 3 · Used by 1
DefinitionUpward boundary dart of the unit cell#✓fully proved
The boundary dart of the unit cell pointing up.
noncomputable def ucDart3 : Dart := mkDart ![0, 0] ![0, 1] unitWt_py
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_py : unitWt (![0, 1] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:111
Uses 3 · Used by 1
DefinitionBase boundary dart of the unit cell#✓fully proved
The rightward boundary dart of the unit cell, as an element of the subtype of boundary darts.
noncomputable def ucBase : {e : Dart // IsBoundaryDart unitCell e} :=
⟨ucDart0, ucDart0_boundary⟩
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def unitCell : Set (Site 2) := {![0, 0]}
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:95
noncomputable def ucDart0 : Dart := mkDart ![0, 0] ![1, 0] unitWt_px
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:114
theorem ucDart0_boundary : IsBoundaryDart unitCell ucDart0
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:141
DefinitionNumber of straight steps in a boundary orbit#✓fully proved
The number of steps i < p in the boundary orbit of e with turn 0.
noncomputable def straightStepCount (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
((Finset.range p).filter (fun i => turnZ K ((dartNext K)^[i] e) = 0)).card
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
noncomputable def turnZ (K : Set (Site 2)) (e : Dart) : ℤ := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else -1
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:127
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
DefinitionCorner balance of a simple lattice polygon#✓fully proved
The numbers of reflex and convex corners along the orbit of a differ by 4 or -4, the
corner count of a simple lattice polygon.
def SimplePolygonCornerBalance (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
Prop :=
rightCornerCount K a.1 (dartOrbitPeriod K a) -
leftCornerCount K a.1 (dartOrbitPeriod K a) = 4 ∨
rightCornerCount K a.1 (dartOrbitPeriod K a) -
leftCornerCount K a.1 (dartOrbitPeriod K a) = -4
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def rightCornerCount (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
((Finset.range p).filter (fun i => turnZ K ((dartNext K)^[i] e) = 1)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:51
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
noncomputable def leftCornerCount (K : Set (Site 2)) (e : Dart) (p : ℕ) : ℤ :=
((Finset.range p).filter (fun i => turnZ K ((dartNext K)^[i] e) = -1)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:57
DefinitionDomino as a two-site set#✓fully proved
The two-site set {(0, 0), (1, 0)}.
noncomputable def domino : Set (Site 2) := {![0, 0], ![1, 0]}
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1 · Used by 2
DefinitionDownward domino dart at the left site#✓fully proved
The boundary dart of the domino from (0, 0) downwards.
noncomputable def dmD0 : Dart := mkDart ![0, 0] ![0, -1] unitWt_my
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_my : unitWt (![0, -1] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:109
Uses 3 · Used by 2
DefinitionLeftward domino dart at the left site#✓fully proved
The boundary dart of the domino from (0, 0) to the left.
noncomputable def dmD1 : Dart := mkDart ![0, 0] ![-1, 0] unitWt_mx
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_mx : unitWt (![-1, 0] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:110
Uses 3 · Used by 1
DefinitionUpward domino dart at the left site#✓fully proved
The boundary dart of the domino from (0, 0) upwards.
noncomputable def dmD2 : Dart := mkDart ![0, 0] ![0, 1] unitWt_py
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_py : unitWt (![0, 1] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:111
Uses 3 · Used by 1
DefinitionUpward domino dart at the right site#✓fully proved
The boundary dart of the domino from (1, 0) upwards.
noncomputable def dmD3 : Dart := mkDart ![1, 0] ![0, 1] unitWt_py
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_py : unitWt (![0, 1] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:111
Uses 3 · Used by 1
DefinitionRightward domino dart at the right site#✓fully proved
The boundary dart of the domino from (1, 0) to the right.
noncomputable def dmD4 : Dart := mkDart ![1, 0] ![1, 0] unitWt_px
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_px : unitWt (![1, 0] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:108
Uses 3 · Used by 1
DefinitionDownward domino dart at the right site#✓fully proved
The boundary dart of the domino from (1, 0) downwards.
noncomputable def dmD5 : Dart := mkDart ![1, 0] ![0, -1] unitWt_my
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def mkDart (p g : Site 2) (hg : unitWt g = 1) : Dart where
tail := p
head := p + g
adj := by
rw [adj_iff_unitWt_sub, show p - (p + g) = -g by abel, unitWt_neg]
exact hg
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:80
theorem unitWt_my : unitWt (![0, -1] : Site 2) = 1
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:109
Uses 3 · Used by 1
DefinitionBase boundary dart of the domino#✓fully proved
The boundary dart dmD0 of the domino, as an element of the subtype of boundary darts.
noncomputable def dmBase : {e : Dart // IsBoundaryDart domino e} := ⟨dmD0, dmD0_boundary⟩
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def domino : Set (Site 2) := {![0, 0], ![1, 0]}
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalanceDomino.lean:157
noncomputable def dmD0 : Dart := mkDart ![0, 0] ![0, -1] unitWt_my
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalanceDomino.lean:187
theorem dmD0_boundary : IsBoundaryDart domino dmD0
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalanceDomino.lean:226
DefinitionNo-pinch condition for a boundary orbit#✓fully proved
Darts in one period of the orbit of a that have the same face also have the same direction.
def OrbitFaceNoPinch (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) : Prop :=
∀ i ∈ Set.Iio (dartOrbitPeriod K a), ∀ j ∈ Set.Iio (dartOrbitPeriod K a),
dartFace ((dartNext K)^[i] a.1) = dartFace ((dartNext K)^[j] a.1) →
((dartNext K)^[i] a.1).dir = ((dartNext K)^[j] a.1).dir
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
noncomputable def dartFace (e : Dart) : Site 2 :=
![ e.tail 0 + negPart (e.dir 0) + negPart (rot90Fun e.dir 0),
e.tail 1 + negPart (e.dir 1) + negPart (rot90Fun e.dir 1) ]
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:120
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
Uses 7 · Used by 1
DefinitionFace loop around the unit cell#✓fully proved
The closed walk of faces around the unit cell, of length four.
noncomputable def unitCellFaceLoop :
(faceBoundaryGraph unitCell).Walk (dartFace ucDart0) (dartFace ucDart0) :=
(dartOrbitFaceWalk unitCell ucDart0 ucDart0_boundary 4).copy rfl (by rw [iterate_ucDart_4])
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
noncomputable def unitCell : Set (Site 2) := {![0, 0]}
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:95
noncomputable def dartFace (e : Dart) : Site 2 :=
![ e.tail 0 + negPart (e.dir 0) + negPart (rot90Fun e.dir 0),
e.tail 1 + negPart (e.dir 1) + negPart (rot90Fun e.dir 1) ]
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:120
noncomputable def ucDart0 : Dart := mkDart ![0, 0] ![1, 0] unitWt_px
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:114
noncomputable def dartOrbitFaceWalk (K : Set (Site 2)) (e : Dart) (he : IsBoundaryDart K e) :
(n : ℕ) → (faceBoundaryGraph K).Walk (dartFace e) (dartFace ((dartNext K)^[n] e))
| 0 => SimpleGraph.Walk.nil
| (n + 1) =>
((dartOrbitFaceWalk K e he n).concat
(dartFace_step_adj K _ (iterate_isBoundaryDart K e he n))).copy rfl (by
rw [Function.iterate_succ_apply'])
MathlibExt/Combinatorics/SimpleGraph/Lattice/OrbitEncloses.lean:71
theorem ucDart0_boundary : IsBoundaryDart unitCell ucDart0
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalance.lean:141
Uses 17
DefinitionFace loop around the domino#✓fully proved
The closed walk of faces around the domino, of length six.
noncomputable def dominoFaceLoop :
(faceBoundaryGraph domino).Walk (dartFace dmD0) (dartFace dmD0) :=
(dartOrbitFaceWalk domino dmD0 dmD0_boundary 6).copy rfl (by rw [iterate_dmD_6])
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
noncomputable def domino : Set (Site 2) := {![0, 0], ![1, 0]}
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalanceDomino.lean:157
noncomputable def dartFace (e : Dart) : Site 2 :=
![ e.tail 0 + negPart (e.dir 0) + negPart (rot90Fun e.dir 0),
e.tail 1 + negPart (e.dir 1) + negPart (rot90Fun e.dir 1) ]
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:120
noncomputable def dmD0 : Dart := mkDart ![0, 0] ![0, -1] unitWt_my
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalanceDomino.lean:187
noncomputable def dartOrbitFaceWalk (K : Set (Site 2)) (e : Dart) (he : IsBoundaryDart K e) :
(n : ℕ) → (faceBoundaryGraph K).Walk (dartFace e) (dartFace ((dartNext K)^[n] e))
| 0 => SimpleGraph.Walk.nil
| (n + 1) =>
((dartOrbitFaceWalk K e he n).concat
(dartFace_step_adj K _ (iterate_isBoundaryDart K e he n))).copy rfl (by
rw [Function.iterate_succ_apply'])
MathlibExt/Combinatorics/SimpleGraph/Lattice/OrbitEncloses.lean:71
theorem dmD0_boundary : IsBoundaryDart domino dmD0
MathlibExt/Combinatorics/SimpleGraph/Lattice/CornerBalanceDomino.lean:226
Uses 19
DefinitionFour unit vectors of \(\mathbb{Z}^2\)#✓fully proved
The four unit vectors of ℤ².
noncomputable def usc_fourDirs : Finset (Site 2) :=
{![1, 0], ![-1, 0], ![0, 1], ![0, -1]}
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
Uses 1
DefinitionVisit times of a boundary orbit to a face#✓fully proved
The times i in one period of the orbit of a at which the dart has face f.
noncomputable def usc_visitSet (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e})
(f : Site 2) : Finset ℕ := by
classical
exact (Finset.range (dartOrbitPeriod K a)).filter
(fun i => dartFace ((dartNext K)^[i] a.1) = f)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
Uses 6 · Used by 2
DefinitionEach face visited once per period by a boundary orbit#✓fully proved
Every face visited by the orbit of a is visited exactly once per period.
def usc_FaceMultiplicityOne (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) : Prop :=
∀ f : Site 2, 1 ≤ (usc_visitSet K a f).card → (usc_visitSet K a f).card = 1
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def usc_visitSet (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e})
(f : Site 2) : Finset ℕ := by
classical
exact (Finset.range (dartOrbitPeriod K a)).filter
(fun i => dartFace ((dartNext K)^[i] a.1) = f)
MathlibExt/Combinatorics/SimpleGraph/Lattice/UmlaufsatzSingleCycle.lean:70
DefinitionLocal turn of a boundary orbit at a face#✓fully proved
The sum of the turns turnZ at the visits of the orbit of a to the face f.
noncomputable def usc_localTurn (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e})
(f : Site 2) : ℤ :=
∑ i ∈ usc_visitSet K a f, turnZ K ((dartNext K)^[i] a.1)
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
noncomputable def usc_visitSet (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e})
(f : Site 2) : Finset ℕ := by
classical
exact (Finset.range (dartOrbitPeriod K a)).filter
(fun i => dartFace ((dartNext K)^[i] a.1) = f)
MathlibExt/Combinatorics/SimpleGraph/Lattice/UmlaufsatzSingleCycle.lean:70
noncomputable def turnZ (K : Set (Site 2)) (e : Dart) : ℤ := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then 1
else if e.tail + (-rot90Fun e.dir) ∈ K then 0
else -1
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber.lean:127
noncomputable def dartNext (K : Set (Site 2)) (e : Dart) : Dart := by
classical
exact
if e.head + (-rot90Fun e.dir) ∈ K then
mkDart (e.head + (-rot90Fun e.dir)) (rot90Fun e.dir) (unitWt_rot90Fun_dir e)
else if e.tail + (-rot90Fun e.dir) ∈ K then
mkDart (e.tail + (-rot90Fun e.dir)) e.dir (unitWt_dir e)
else
mkDart e.tail (-rot90Fun e.dir) (unitWt_neg_rot90Fun_dir e)
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:111
DefinitionFaces visited by a boundary orbit in one period#✓fully proved
The set of faces visited in one period of the orbit of a.
noncomputable def usc_orbitFaces (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
Finset (Site 2) := by
classical
exact (Finset.range (dartOrbitPeriod K a)).image (fun i => dartFace ((dartNext K)^[i] a.1))
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
structure Dart where
/-- The site the dart starts at. -/
tail : Site 2
/-- The site the dart points to. -/
head : Site 2
/-- The tail and head are nearest neighbours. -/
adj : (hypercubicLattice 2).Adj tail head
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartDef.lean:57
def IsBoundaryDart (K : Set (Site 2)) (e : Dart) : Prop :=
e.tail ∈ K ∧ e.head ∉ K
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartNext.lean:98
Theorem\(p_c(\mathbb{Z}^2) < 1\) under a no-pinch hypothesis#✓fully proved
p_c(ℤ²) < 1, under the hypothesis that for every configuration with a finite origin cluster
the boundary orbit of the exit dart has period at least three, has no pinch, and contains the
left exit dart.
theorem usc_pc_lt_one_of_noPinch
(h : ∀ (ω : ConfigSpace (Sym2 (Site 2))) (hfin : (cluster 2 ω (origin 2)).Finite),
3 ≤ dartOrbitPeriod (cluster 2 ω (origin 2)) (exitBaseSub (ω := ω) hfin) ∧
OrbitFaceNoPinch (cluster 2 ω (origin 2)) (exitBaseSub (ω := ω) hfin) ∧
ExitDartsSameOrbit ω hfin) :
(StatMech.Percolation.pc 2 : ℝ) < 1
abbrev ConfigSpace (E : Type*) : Type _ := E → Bool
MathlibExt/Probability/Configuration/ConfigSpace.lean:40
abbrev Site (d : ℕ) : Type := Fin d → ℤ
MathlibExt/Combinatorics/SimpleGraph/Lattice/HypercubicLattice.lean:55
def cluster (d : ℕ) (ω : ConfigSpace (Sym2 (Site d))) (x : Site d) : Set (Site d) :=
{y | Connected d ω x y}
MathlibExt/Combinatorics/SimpleGraph/Lattice/Clusters.lean:103
def origin (d : ℕ) : Site d := fun _ => 0
MathlibExt/Probability/Percolation/Theta.lean:56
noncomputable def dartOrbitPeriod (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) :
ℕ := Function.minimalPeriod (dartNextSub K) a
MathlibExt/Combinatorics/SimpleGraph/Lattice/DartOrbit.lean:193
noncomputable def exitBaseSub (hfin : (cluster 2 ω (origin 2)).Finite) :
{d : Dart // IsBoundaryDart (cluster 2 ω (origin 2)) d} :=
⟨exitDart (ω := ω) hfin, exitDart_isBoundaryDart (ω := ω) hfin⟩
MathlibExt/Combinatorics/SimpleGraph/Lattice/JordanSingleCycle.lean:146
def OrbitFaceNoPinch (K : Set (Site 2)) (a : {e : Dart // IsBoundaryDart K e}) : Prop :=
∀ i ∈ Set.Iio (dartOrbitPeriod K a), ∀ j ∈ Set.Iio (dartOrbitPeriod K a),
dartFace ((dartNext K)^[i] a.1) = dartFace ((dartNext K)^[j] a.1) →
((dartNext K)^[i] a.1).dir = ((dartNext K)^[j] a.1).dir
MathlibExt/Combinatorics/SimpleGraph/Lattice/Umlaufsatz.lean:91
def ExitDartsSameOrbit (ω : ConfigSpace (Sym2 (Site 2)))
(hfin : (cluster 2 ω (origin 2)).Finite) : Prop :=
∃ n : ℕ, (dartNext (cluster 2 ω (origin 2)))^[n] (exitDart (ω := ω) hfin)
= leftExitDart (ω := ω) hfin
MathlibExt/Combinatorics/SimpleGraph/Lattice/ContourLinksExits.lean:339
noncomputable def pc (d : ℕ) : ℝ≥0 :=
sSup (subcriticalSet d)
MathlibExt/Probability/Percolation/Theta.lean:76
Uses 22
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.