Documentation

LeanPool.ApollonianSuperharmonic.P5110T1SquareInterface

P5110T1SquareInterface #

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.P5110T1SquareInterface (n m : ℕ) (hn : 0 < n) (hm : 0 < m) (a b : GaussianInt) (vertical : Bool) (hside : if vertical = true then b.re = a.re + ↑n else b.im = a.im + ↑n) (hoverlap : max (if vertical = true then a.im else a.re) (if vertical = true then b.im else b.re) < min ((if vertical = true then a.im else a.re) + ↑n) ((if vertical = true then b.im else b.re) + ↑m)) :
have A := TileTranslation (FordTile n) a; have B := TileTranslation (FordTile m) b; have l := max (if vertical = true then a.im else a.re) (if vertical = true then b.im else b.re); have u := min ((if vertical = true then a.im else a.re) + ↑n) ((if vertical = true then b.im else b.re) + ↑m); have p := List.map (fun (k : ℕ) => if vertical = true then { re := b.re, im := l + ↑k } else { re := l + ↑k, im := b.im }) (List.range ((u - l).toNat + 1)); Finset.Nonempty A.cells ∧ Finset.Nonempty B.cells ∧ Disjoint A.cells B.cells ∧ BoundaryFootprintVertices A ∩ BoundaryFootprintVertices B = {z : GaussianInt | if vertical = true then z.re = b.re ∧ l ≤ z.im ∧ z.im ≤ u else z.im = b.im ∧ l ≤ z.re ∧ z.re ≤ u} ∧ BoundaryFootprintEdges A ∩ BoundaryFootprintEdges B = {e : Finset GaussianInt | ∃ (t : ℤ), l ≤ t ∧ t < u ∧ e = if vertical = true then {{ re := b.re, im := t }, { re := b.re, im := t + 1 }} else {{ re := t, im := b.im }, { re := t + 1, im := b.im }}} ∧ p.Nodup ∧ 2 ≤ p.length ∧ BoundaryFootprintVertices A ∩ BoundaryFootprintVertices B = ↑p.toFinset ∧ SimpleGridPath (BoundaryFootprintVertices A ∩ BoundaryFootprintVertices B) (BoundaryFootprintEdges A ∩ BoundaryFootprintEdges B)