BoundaryJoinChamberCertificate #
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.BoundaryJoinChamberCertificate
(q : Fin 4 → CircleCoordinates)
(hq : ProperBandQuadruple q)
(C : BandCircle)
(i : Fin 3)
(hC : q i.succ = ↑↑C)
(orientation : Bool)
(horientation : (q i.succ).1 = 1 → UnitOccurrenceOrientation q i orientation)
(base : ProtoTile)
(hbase : BandPrototile (↑↑C) base)
(e f : GaussianInt)
(hdet : 0 < e.re * f.im - e.im * f.re)
(he : e ∈ TilingLattice C)
(hf : f ∈ TilingLattice C)
(hcoord : ∀ (w : ↥(TilingLattice C)), ∃! z : ℤ × ℤ, ↑z.1 * e + ↑z.2 * f = ↑w)
(hadj :
∀ (x y : ℤ × ℤ),
(if (↑↑C).1 = 1 then
∃ (t : GaussianInt),
UnitTriangularStep orientation t ∧ TileCentroid (TileTranslation base (↑y.1 * e + ↑y.2 * f)) - TileCentroid (TileTranslation base (↑x.1 * e + ↑x.2 * f)) = GaussianRealPoint t
else TileTouching (TileTranslation base (↑x.1 * e + ↑x.2 * f)) (TileTranslation base (↑y.1 * e + ↑y.2 * f))) ↔ TriangularLatticeAdjacent x y)
:
have u := BandVectors.1 (q (i + 1).succ) (q i.succ);
have v := { re := 0, im := 1 } * BandVectors.1 (q i.succ) (q (i + 2).succ);
∃ (σ : ℤ × ℤ ≃+ ℤ × ℤ),
(∀ (x y : ℤ × ℤ), TriangularLatticeAdjacent (σ x) (σ y) ↔ TriangularLatticeAdjacent x y) ∧ (∀ (x y z : ℤ × ℤ), TriangularSignedHeight (σ x) (σ y) (σ z) = TriangularSignedHeight x y z) ∧ ∃ (a : ℤ) (b : ℤ) (c : ℤ) (d : ℤ),
↑(σ.symm (a, b)).1 * e + ↑(σ.symm (a, b)).2 * f = u ∧ ↑(σ.symm (c, d)).1 * e + ↑(σ.symm (c, d)).2 * f = v ∧ 0 ≤ b ∧ b ≤ a ∧ 0 ≤ d ∧ d ≤ c ∧ a * d - b * c = -1