Documentation

LeanPool.ApollonianSuperharmonic.FiniteSquareIncidenceIdentities

FiniteSquareIncidenceIdentities #

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.FiniteSquareIncidenceIdentities (T : ProtoTile) (hne : Finset.Nonempty T.cells) (hcheck : NoCheckerboardCellVertex ↑T.cells) :
have I := { re := 0, im := 1 }; have cornerBag := T.cells.val.bind fun (c : LatticeCell) => ↑[c, c + 1, c + I, c + 1 + I]; have N := fun (k : ℕ) => {z ∈ cornerBag.toFinset | Multiset.count z cornerBag = k}.card; 4 * Finset.card T.cells = N 1 + 2 * N 2 + 3 * N 3 + 4 * N 4 ∧ (FootprintVertices T).ncard = N 1 + N 2 + N 3 + N 4 ∧ 2 * (FootprintEdges T).ncard = 4 * Finset.card T.cells + (BoundaryFootprintEdges T).ncard ∧ (BoundaryFootprintEdges T).ncard = N 1 + N 2 + N 3