P5620T1BoundaryComponentCycle #
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.P5620T1BoundaryComponentCycle
(T : ProtoTile)
(cells_nonempty : Finset.Nonempty T.cells)
(boundary_degree_two :
∀ v ∈ BoundaryFootprintVertices T, {e : Finset GaussianInt | e ∈ BoundaryFootprintEdges T ∧ v ∈ e}.ncard = 2)
:
∃ (p : List GaussianInt) (x : GaussianInt) (y : GaussianInt) (z : GaussianInt),
p.Nodup ∧ 4 ≤ p.length ∧ p.head? = some x ∧ p.getLast? = some y ∧ List.IsChain (fun (a b : GaussianInt) => {a, b} ∈ BoundaryFootprintEdges T) p ∧ {y, x} ∈ BoundaryFootprintEdges T ∧ List.IsChain FourNeighborAdjacent p ∧ FourNeighborAdjacent y x ∧ (∀ (a b : GaussianInt), (a, b) ∈ p.zip p.tail → FourNeighborAdjacent a b) ∧ (∀ a ∈ p, a ∈ BoundaryFootprintVertices T) ∧ z ∈ T.cells ∧ (∀ q ∈ T.cells, q.re ≤ z.re) ∧ z + 1 ∉ T.cells ∧ have cyclicEdges := p.zip p.tail ++ [(y, x)];
(∀ (a b : GaussianInt), (a, b) ∈ cyclicEdges → {a, b} ∈ BoundaryFootprintEdges T) ∧ (∀ (a b : GaussianInt), (a, b) ∈ cyclicEdges → FourNeighborAdjacent a b) ∧ (∀ (a b : GaussianInt),
a ∈ p →
{a, b} ∈ BoundaryFootprintEdges T → (a, b) ∈ cyclicEdges ∨ (b, a) ∈ cyclicEdges) ∧ ((z + 1, z + 1 + { re := 0, im := 1 }) ∈ cyclicEdges ∨ (z + 1 + { re := 0, im := 1 }, z + 1) ∈ cyclicEdges)