Documentation

LeanPool.ApollonianSuperharmonic.GridBoundaryCombinatorics

Combinatorics of consecutive path edges and grid boundaries #

Adapted from Wesley Pegden's Apache-2.0 Trellis formalization of Levine–Pegden–Smart.

theorem ApollonianSuperharmonic.GridBoundaryCombinatorics.consecutivePair_decompose {α : Type u_1} (gridPath : List α) (a b : α) (hab : (a, b) ∈ gridPath.zip gridPath.tail) :
∃ (l₁ : List α) (l₂ : List α), gridPath = l₁ ++ a :: b :: l₂

Membership in consecutive pairs gives an actual adjacent-list decomposition.

theorem ApollonianSuperharmonic.GridBoundaryCombinatorics.cyclicPair_endpoints_mem {α : Type u_1} (gridPath : List α) (x y : α) (head : gridPath.head? = some x) (last : gridPath.getLast? = some y) (a b : α) (hab : (a, b) ∈ gridPath.zip gridPath.tail ++ [(y, x)]) :
a ∈ gridPath ∧ b ∈ gridPath

Both endpoints of an edge in a closed list occur in the list.

theorem ApollonianSuperharmonic.GridBoundaryCombinatorics.boundaryEdge_mem_cycle_of_index_control (T : ProtoTile) (gridPath : List GaussianInt) (x y : GaussianInt) (control : have edges := gridPath.zip gridPath.tail ++ [(y, x)]; ∀ (q : LatticeCell), ((q + 1, q + 1 + { re := 0, im := 1 }) ∉ edges ∧ (q + 1 + { re := 0, im := 1 }, q + 1) ∉ edges → GridRayCrossingIndex (q + 1) gridPath = GridRayCrossingIndex q gridPath) ∧ ((q + 1 + { re := 0, im := 1 }, q + { re := 0, im := 1 }) ∉ edges ∧ (q + { re := 0, im := 1 }, q + 1 + { re := 0, im := 1 }) ∉ edges → GridRayCrossingIndex (q + { re := 0, im := 1 }) gridPath = GridRayCrossingIndex q gridPath)) (unoccupied_index_zero : ∀ q ∉ T.cells, GridRayCrossingIndex q gridPath = 0) (occupied_index_nonzero : ∀ q ∈ T.cells, GridRayCrossingIndex q gridPath ≠ 0) (e : Finset GaussianInt) (he : e ∈ BoundaryFootprintEdges T) :
∃ (a : GaussianInt) (b : GaussianInt), e = {a, b} ∧ ((a, b) ∈ gridPath.zip gridPath.tail ++ [(y, x)] ∨ (b, a) ∈ gridPath.zip gridPath.tail ++ [(y, x)])

A crossing index supported exactly on the occupied cells detects every boundary edge.