P4120T1DiamondGeometry #
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.P4120T1DiamondGeometry
(K : DiamondParameter)
(hK : 1 < ↑K)
(T : ProtoTile)
(S : Fin 3 → Bool → ProtoTile)
(u : GaussianInt)
(hcells : T.cells = (TileTranslation (DiamondTile ↑K) u).cells)
(hanchor : T.cells = ∅ → T.anchor = (TileTranslation (DiamondTile ↑K) u).anchor)
(hS : ∀ (i : Fin 3) (s : Bool), BandSubtileOccurrence (DiamondRecursiveQuadruple K) T i s (S i s))
(x : GaussianInt)
(hx : x ∈ FootprintVertices T)
(hxb : x ∉ BoundaryFootprintVertices T)
:
have y := x - u;
have k := Nat.card { a : Fin 3 × Bool // x ∈ BoundaryFootprintVertices (S a.1 a.2) };
(k = 2 →
y ∈ DiamondVertexDomains K true ∧ Even (y.re + y.im) ∧ (y.re = 0 ↔ GaussianRealPoint x = TileCentroid T) ∧ (GaussianRealPoint x = TileCentroid T ↔ ↑K = 2)) ∧ k ≠ 3 ∧ (k = 4 → y ∈ DiamondVertexDomains K true ∧ ¬Even (y.re + y.im) ∧ y.re ≠ 0 ∧ GaussianRealPoint x ≠ TileCentroid T) ∧ ((k = 2 ∨ k = 3 ∨ k = 4) ∨ ∃ (i : Fin 3) (s : Bool),
0 < (DiamondRecursiveQuadruple K i.succ).1 ∧ x ∈ FootprintVertices (S i s) ∧ x ∉ BoundaryFootprintVertices (S i s))