P3544T1LocalParity #
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.P3544T1LocalParity
{n : ℕ}
(p : P3381T1PolygonBoundary n)
:
closure (P3544T1RayParity p) = P3544T1RayParity p ∪ P3544T1BoundaryCarrier p ∧ IsOpen (P3544T1RayParity p) ∧ interior (P3544T1RayParity p ∪ P3544T1BoundaryCarrier p) = P3544T1RayParity p ∧ frontier (P3544T1RayParity p ∪ P3544T1BoundaryCarrier p) = P3544T1BoundaryCarrier p ∧ (∀ x ∉ P3544T1BoundaryCarrier p,
∃ (r : ℝ),
0 < r ∧ (Metric.ball x r ⊆ P3544T1RayParity p ∨ Disjoint (Metric.ball x r) (P3544T1RayParity p))) ∧ (∀ x ∉ P3544T1BoundaryCarrier p,
∃ (d : ℝ × ℝ),
(∀ (i : Fin (n + 3)), d.1 * (p.vertex i - x).2 - d.2 * (p.vertex i - x).1 ≠ 0) ∧ ∀ (i : Fin (n + 3)),
d.1 * (p.vertex (i + 1) - p.vertex i).2 - d.2 * (p.vertex (i + 1) - p.vertex i).1 ≠ 0) ∧ (∀ (x d : ℝ × ℝ),
x ∉ P3544T1BoundaryCarrier p →
(∀ (i : Fin (n + 3)), d.1 * (p.vertex i - x).2 - d.2 * (p.vertex i - x).1 ≠ 0) →
(∀ (i : Fin (n + 3)),
d.1 * (p.vertex (i + 1) - p.vertex i).2 - d.2 * (p.vertex (i + 1) - p.vertex i).1 ≠ 0) →
(x ∈ P3544T1RayParity p ↔ {i : Fin (n + 3) | ∃ (t : ℝ), 0 < t ∧ x + t • d ∈ segment ℝ (p.vertex i) (p.vertex (i + 1))}.ncard % 2 = 1)) ∧ (∀ (i : Fin (n + 3)),
∃ (r : ℝ),
0 < r ∧ IsPathConnected (Metric.ball (p.vertex i) r ∩ P3544T1RayParity p) ∧ IsPathConnected
(Metric.ball (p.vertex i) r \ (P3544T1RayParity p ∪ P3544T1BoundaryCarrier p))) ∧ ∀ (i : Fin (n + 3)),
∀ x ∈ openSegment ℝ (p.vertex i) (p.vertex (i + 1)),
∃ (r : ℝ),
0 < r ∧ ∃ (s : Bool),
∀ y ∈ Metric.ball x r,
y ∈ P3544T1RayParity p ↔ if s = true then 0 < P3381T1TriangleDeterminant ![p.vertex i, p.vertex (i + 1), y]
else P3381T1TriangleDeterminant ![p.vertex i, p.vertex (i + 1), y] < 0