P4366T1AttachedRemainderIndexZero #
Adapted from Wesley Pegden’s Apache-2.0 Trellis formalization of Levine–Pegden–Smart. Changes: pool module paths, public exports, project namespace and current Mathlib compatibility.
theorem
ApollonianSuperharmonic.P4366T1AttachedRemainderIndexZero
(T : ProtoTile)
(F : Fin 3 → Bool → ProtoTile)
(hF : ∀ (i : Fin 3) (s : Bool), LatticeTile (F i s))
(hinside : ∀ (i : Fin 3) (s : Bool), (F i s).cells ⊆ T.cells)
(hattach : ∀ (i : Fin 3) (s : Bool), ∃ e ∈ BoundaryFootprintEdges (F i s), e ∈ BoundaryFootprintEdges T)
(p : List GaussianInt)
(x y : GaussianInt)
(hhead : p.head? = some x)
(hlast : p.getLast? = some y)
(hnodup : p.Nodup)
(hlen : 3 ≤ p.length)
(hadj : ∀ (a b : GaussianInt), (a, b) ∈ p.zip p.tail → FourNeighborAdjacent a b)
(hclose : FourNeighborAdjacent y x)
(havoid : ∀ z ∈ p, z ∉ BoundaryFootprintVertices T)
(hnoncross :
have edges := p.zip p.tail ++ [(y, x)];
∀ (i : Fin 3) (s : Bool) (z : LatticeCell),
(z ∈ (F i s).cells ∧ z + 1 ∈ (F i s).cells →
(z + 1, z + 1 + { re := 0, im := 1 }) ∉ edges ∧ (z + 1 + { re := 0, im := 1 }, z + 1) ∉ edges) ∧ (z ∈ (F i s).cells ∧ z + { re := 0, im := 1 } ∈ (F i s).cells →
(z + 1 + { re := 0, im := 1 }, z + { re := 0, im := 1 }) ∉ edges ∧ (z + { re := 0, im := 1 }, z + 1 + { re := 0, im := 1 }) ∉ edges))
(houtside : ∀ z ∉ T.cells, GridRayCrossingIndex z p = 0)
(i : Fin 3)
(s : Bool)
(z : LatticeCell)
:
z ∈ (F i s).cells → GridRayCrossingIndex z p = 0