P4366T2LocalSectors #
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.P4366T2LocalSectors
(C0 Ci : BandCircle)
(hlarge : 1 < (↑↑Ci).1)
(T0 T0' : ProtoTile)
(h0 h0' : PartialOdometer)
(orientation : Bool)
(base Rminus Rplus : ProtoTile)
(tiles reverseTiles : List ProtoTile)
(hs reverseHs : List PartialOdometer)
(hf : TileString Ci orientation base Rminus Rplus tiles)
(hr : TileString Ci orientation base Rplus Rminus reverseTiles)
(EM : ExactTileInterfaceTriple T0 T0' Rminus)
(EP : ExactTileInterfaceTriple T0 T0' Rplus)
(hT : LatticeTile T0)
(hT' : LatticeTile T0')
(hRm : LatticeTile Rminus)
(hRp : LatticeTile Rplus)
(hdis : Disjoint T0.cells T0'.cells)
(hTm : Disjoint T0.cells Rminus.cells)
(hT'm : Disjoint T0'.cells Rminus.cells)
(hTp : Disjoint T0.cells Rplus.cells)
(hT'p : Disjoint T0'.cells Rplus.cells)
(hreg : ∀ x ∈ FootprintVertices T0, ∀ y ∈ FootprintVertices T0, FourNeighborAdjacent x y → {x, y} ∈ FootprintEdges T0)
(hreg' :
∀ x ∈ FootprintVertices T0', ∀ y ∈ FootprintVertices T0', FourNeighborAdjacent x y → {x, y} ∈ FootprintEdges T0')
(path : List GaussianInt)
(hp :
path.Nodup ∧ 2 ≤ path.length ∧ path.head? = some EM.point ∧ path.getLast? = some EP.point ∧ FootprintVertices T0 ∩ FootprintVertices T0' = ↑path.toFinset ∧ (∀ (a b : GaussianInt) (l r : List GaussianInt), path = l ++ a :: b :: r → FourNeighborAdjacent a b) ∧ ∀ (e : Finset GaussianInt),
e ∈ FootprintEdges T0 ∩ FootprintEdges T0' ↔ ∃ (a : GaussianInt) (b : GaussianInt) (l : List GaussianInt) (r : List GaussianInt),
path = l ++ a :: b :: r ∧ e = {a, b})
(hedges :
∀ (a b : GaussianInt) (l r : List GaussianInt),
path = l ++ a :: b :: r →
(∃ (U : ProtoTile) (g : PartialOdometer),
U ∈ (List.drop 1 tiles).dropLast ∧ (U, g) ∈ tiles.zip hs ∧ {a, b} ∈ FootprintEdges U ∧ AncestorOdometer (↑↑Ci) (↑↑C0) U T0 g h0) ∧ ∃ (V : ProtoTile) (k : PartialOdometer),
V ∈ (List.drop 1 reverseTiles).dropLast ∧ (V, k) ∈ reverseTiles.zip reverseHs ∧ {a, b} ∈ FootprintEdges V ∧ AncestorOdometer (↑↑Ci) (↑↑C0) V T0' k h0')
(x : GaussianInt)
:
x ∈ path →
(∀ (y : GaussianInt),
y = x ∨ y = x + 1 ∨ y = x - 1 ∨ y = x + { re := 0, im := 1 } ∨ y = x - { re := 0, im := 1 } →
y ∈ FootprintVertices T0 ∨ y ∈ FootprintVertices T0') →
∃ (y : GaussianInt) (U : ProtoTile) (V : ProtoTile) (g : PartialOdometer) (k : PartialOdometer),
((∃ (l : List GaussianInt) (r : List GaussianInt), path = l ++ x :: y :: r) ∨ ∃ (l : List GaussianInt) (r : List GaussianInt), path = l ++ y :: x :: r) ∧ U ≠ V ∧ {x, y} ∈ FootprintEdges U ∩ FootprintEdges V ∧ U ∈ (List.drop 1 tiles).dropLast ∧ (U, g) ∈ tiles.zip hs ∧ AncestorOdometer (↑↑Ci) (↑↑C0) U T0 g h0 ∧ V ∈ (List.drop 1 reverseTiles).dropLast ∧ (V, k) ∈ reverseTiles.zip reverseHs ∧ AncestorOdometer (↑↑Ci) (↑↑C0) V T0' k h0' ∧ (x ∈ U.cells ∧ x - 1 - { re := 0, im := 1 } ∈ V.cells ∨ x ∈ V.cells ∧ x - 1 - { re := 0, im := 1 } ∈ U.cells ∨ x - 1 ∈ U.cells ∧ x - { re := 0, im := 1 } ∈ V.cells ∨ x - 1 ∈ V.cells ∧ x - { re := 0, im := 1 } ∈ U.cells)