Contiguous top row of a walk to A closed walk crosses each horizontal line an even number of times
DefinitionContiguous top row of a walk#✓fully proved
The vertices of the walk at its maximal height cover every lattice point between any two of them, i.e. the top row of the walk is a contiguous horizontal segment.
def TopRowContiguous (d : Fin n → Fin 4) : Prop :=
∃ M : Fin n, (∀ j : Fin n, (pos d j).2 ≤ (pos d M).2) ∧
∀ a b : Fin n, (pos d a).2 = (pos d M).2 → (pos d b).2 = (pos d M).2 →
∀ x : ℤ, (pos d a).1 ≤ x → x ≤ (pos d b).1 →
∃ c : Fin n, pos d c = (x, (pos d M).2)
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 1 · Used by 2
TheoremRecursion for the x-coordinate of a closed walk#✓fully proved
The x-coordinate recursion of a closed walk. See also
StatMech.Onsager.WalkCrossing.fst_step.
theorem xco_succ (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n) :
(pos d (k + 1)).1 = (pos d k).1 + (stepOf (d k)).1
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 3 · Used by 2
TheoremRecursion for the y-coordinate of a closed walk#✓fully proved
The y-coordinate recursion of a closed walk. See also
StatMech.Onsager.WalkCrossing.snd_step.
theorem yco_succ (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n) :
(pos d (k + 1)).2 = (pos d k).2 + (stepOf (d k)).2
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 3 · Used by 2
TheoremNo east step leaves a rightmost vertex#✓fully proved
No east step leaves a vertex of maximal x-coordinate.
theorem maxx_no_E_out (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n)
(hmax : ∀ j : Fin n, (pos d j).1 ≤ (pos d k).1) : d k ≠ 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
Uses 3
TheoremNo west step arrives at a rightmost vertex#✓fully proved
No west step arrives at a vertex of maximal x-coordinate.
theorem maxx_no_W_in (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n)
(hmax : ∀ j : Fin n, (pos d j).1 ≤ (pos d k).1) : d (k - 1) ≠ 2
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 3
TheoremNo south step leaves a lowest vertex#✓fully proved
No south step leaves a vertex of minimal y-coordinate.
theorem miny_no_S_out (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n)
(hmin : ∀ j : Fin n, (pos d k).2 ≤ (pos d j).2) : d k ≠ 3
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
Uses 3
TheoremNo north step arrives at a lowest vertex#✓fully proved
No north step arrives at a vertex of minimal y-coordinate.
theorem miny_no_N_in (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n)
(hmin : ∀ j : Fin n, (pos d k).2 ≤ (pos d j).2) : d (k - 1) ≠ 1
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 3
DefinitionNumber of left turns out of a given direction#✓fully proved
The number of left turns of d from direction c to direction c + 1.
def tcount (d : Fin n → Fin 4) (c : Fin 4) : ℕ :=
(Finset.univ.filter (fun i : Fin n => d i = c ∧ d (i + 1) = c + 1)).card
DefinitionNumber of straight continuations in a given direction#✓fully proved
The number of straight continuations of d in direction c.
def scount (d : Fin n → Fin 4) (c : Fin 4) : ℕ :=
(Finset.univ.filter (fun i : Fin n => d i = c ∧ d (i + 1) = c)).card
Used by 1
TheoremEvery direction is left by equally many left turns#✓fully proved
In a direction sequence without right turns, every direction is left by the same number of left turns.
theorem tcount_shift (d : Fin n → Fin 4)
(hreflexfree : ∀ i : Fin n, d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1) (c : Fin 4) :
tcount d c = tcount d (c + 1)
def tcount (d : Fin n → Fin 4) (c : Fin 4) : ℕ :=
(Finset.univ.filter (fun i : Fin n => d i = c ∧ d (i + 1) = c + 1)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/TurnCount.lean:109
Uses 2 · Used by 1
TheoremLeft turns are four times the north-to-west turns#✓fully proved
In a direction sequence without right turns, the number of left turns is four times the number of north-to-west turns.
theorem cc_eq_four_mul_tcount (d : Fin n → Fin 4)
(hreflexfree : ∀ i : Fin n, d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1) :
cc d = 4 * tcount d 1
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
def tcount (d : Fin n → Fin 4) (c : Fin 4) : ℕ :=
(Finset.univ.filter (fun i : Fin n => d i = c ∧ d (i + 1) = c + 1)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/TurnCount.lean:109
Uses 3 · Used by 1
TheoremEight left turns give two north-then-west corners#✓fully proved
Eight or more left turns, without right turns, give two distinct north-then-west corners.
theorem exists_two_top_corners (d : Fin n → Fin 4)
(hreflexfree : ∀ i : Fin n, d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(h8 : 8 ≤ cc d) :
∃ i j : Fin n, i ≠ j ∧ d i = 1 ∧ d (i + 1) = 2 ∧ d j = 1 ∧ d (j + 1) = 2
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 3 · Used by 2
TheoremA unique top corner forces fewer than eight left turns#✓fully proved
If the north-then-west corner is unique, a direction sequence without right turns has fewer than eight left turns.
theorem cc_lt_eight_of_uniqueTopCorner (d : Fin n → Fin 4)
(hreflexfree : ∀ i : Fin n, d (i + 1) - d i = 0 ∨ d (i + 1) - d i = 1)
(huniq : ∀ i j : Fin n, d i = 1 → d (i + 1) = 2 → d j = 1 → d (j + 1) = 2 → i = j) :
cc d < 8
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 2
DefinitionVertical lattice direction#✓fully proved
The direction w is vertical (north or south).
def isVertEdge (w : Fin 4) : Prop := w = 1 ∨ w = 3
Used by 31
DefinitionHorizontal lattice direction#✓fully proved
The direction w is horizontal (east or west).
def isHorizEdge (w : Fin 4) : Prop := w = 0 ∨ w = 2
Used by 39
TheoremRecursion for the y-coordinate of a walk step#✓fully proved
The y-coordinate recursion of a closed walk. See also
StatMech.Onsager.NoDoubleWind2.yco_succ.
theorem snd_step (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n) :
(pos d (k + 1)).2 = (pos d k).2 + (stepOf (d k)).2
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 3 · Used by 24
TheoremRecursion for the x-coordinate of a walk step#✓fully proved
The x-coordinate recursion of a closed walk. See also
StatMech.Onsager.NoDoubleWind2.xco_succ.
theorem fst_step (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (k : Fin n) :
(pos d (k + 1)).1 = (pos d k).1 + (stepOf (d k)).1
def stepOf : Fin 4 → ℤ × ℤ
| 0 => (1, 0)
| 1 => (0, 1)
| 2 => (-1, 0)
| 3 => (0, -1)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:49
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 3 · Used by 23
DefinitionNumber of crossings of a horizontal line#✓fully proved
The number of vertical steps of the walk crossing the horizontal line y = m + 1/2, i.e.
vertical steps between heights m and m + 1.
def fullLineCross (d : Fin n → Fin 4) (m : ℤ) : ℕ :=
(Finset.univ.filter (fun k : Fin n =>
isVertEdge (d k) ∧ min ((pos d k).2) ((pos d (k + 1)).2) = m)).card
def isVertEdge (w : Fin 4) : Prop := w = 1 ∨ w = 3
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCrossing.lean:52
def pos {n : ℕ} [NeZero n] (d : Fin n → Fin 4) (k : Fin n) : ℤ × ℤ :=
∑ i ∈ Finset.filter (· < k) Finset.univ, stepOf (d i)
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/DirectionWalk.lean:57
Uses 2 · Used by 1
TheoremA closed walk crosses a horizontal line equally often up and down#✓fully proved
A closed walk crosses the line y = m + 1/2 upwards as often as downwards.
theorem upDown_card_eq (d : Fin n → Fin 4) (_hclosed : ∑ i, stepOf (d i) = 0) (m : ℤ) :
(Finset.univ.filter
(fun k : Fin n => (pos d k).2 ≤ m ∧ m + 1 ≤ (pos d (k + 1)).2)).card
= (Finset.univ.filter
(fun k : Fin n => m + 1 ≤ (pos d k).2 ∧ (pos d (k + 1)).2 ≤ m)).card
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
Uses 2 · Used by 1
TheoremA closed walk crosses each horizontal line an even number of times#✓fully proved
A closed walk crosses each horizontal line y = m + 1/2 an even number of times.
theorem fullLineCross_even (d : Fin n → Fin 4) (hclosed : ∑ i, stepOf (d i) = 0) (m : ℤ) :
Even (fullLineCross d m)
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 fullLineCross (d : Fin n → Fin 4) (m : ℤ) : ℕ :=
(Finset.univ.filter (fun k : Fin n =>
isVertEdge (d k) ∧ min ((pos d k).2) ((pos d (k + 1)).2) = m)).card
MathlibExt/Combinatorics/SimpleGraph/Lattice/TurningNumber/WalkCrossing.lean:116
Uses 8
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.