P4062T1RankedAttachment #
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.P4062T1RankedAttachment
(D E : Finset GaussianInt)
(σ : GaussianInt → ℤ)
(d : GaussianInt → ℕ)
(hE : E ⊆ D)
(o : AcyclicIndegreeOrientation E σ)
(hres :
∀ x ∈ D \ E,
↑{y ∈ E | FourNeighborAdjacent y x}.card + ↑{y ∈ D \ E | FourNeighborAdjacent y x ∧ d y < d x}.card = σ x)
(hstrict : ∀ x ∈ D \ E, ∀ y ∈ D \ E, FourNeighborAdjacent x y → d x ≠ d y)
:
∃ (t : AcyclicIndegreeOrientation D σ),
(∀ x ∈ E, ∀ y ∈ E, t.edge x y ↔ o.edge x y) ∧ (∀ x ∈ E, ∀ y ∈ D \ E, FourNeighborAdjacent x y → t.edge x y) ∧ (∀ x ∈ D \ E, ∀ y ∈ D \ E, t.edge x y ↔ FourNeighborAdjacent x y ∧ d x < d y) ∧ (∀ x ∈ E, t.rank x = o.rank x) ∧ ∀ x ∈ D \ E, t.rank x = E.sup o.rank + 1 + d x