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.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)])
:
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 crossing index supported exactly on the occupied cells detects every boundary edge.