AffineTriangularPlaneTriangulation #
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.AffineTriangularPlaneTriangulation :
∃ (P : PlaneTriangulation (ℤ × ℤ)) (up : ℤ × ℤ → P.Face) (down : ℤ × ℤ → P.Face),
(∀ (x y : ℤ × ℤ), P.adjacent x y ↔ TriangularLatticeAdjacent x y) ∧ Function.Injective up ∧ Function.Injective down ∧ (∀ (x y : ℤ × ℤ), up x ≠ down y) ∧ (∀ (f : P.Face), (∃ (x : ℤ × ℤ), f = up x) ∨ ∃ (x : ℤ × ℤ), f = down x) ∧ (∀ (x : ℤ × ℤ),
P.faceVertex (up x) 0 = x ∧ P.faceVertex (up x) 1 = x + (1, 0) ∧ P.faceVertex (up x) 2 = x - (0, 1)) ∧ (∀ (x : ℤ × ℤ),
P.faceVertex (down x) 0 = x ∧ P.faceVertex (down x) 1 = x - (1, 0) ∧ P.faceVertex (down x) 2 = x + (0, 1)) ∧ (∀ (x : ℤ × ℤ), P.position x = (↑x.1 - ↑x.2 / 2, ↑x.2)) ∧ (∀ (x y : ℤ × ℤ), P.edgeArc x y = segment ℝ (P.position x) (P.position y)) ∧ (∀ (x : ℤ × ℤ),
P.faceRegion (up x) = (fun (p : ℝ × ℝ) => (↑x.1 + p.1 - (↑x.2 - p.2) / 2, ↑x.2 - p.2)) '' {p : ℝ × ℝ | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 < 1}) ∧ ∀ (x : ℤ × ℤ),
P.faceRegion (down x) = (fun (p : ℝ × ℝ) => (↑x.1 - p.1 - (↑x.2 + p.2) / 2, ↑x.2 + p.2)) '' {p : ℝ × ℝ | 0 < p.1 ∧ 0 < p.2 ∧ p.1 + p.2 < 1}