P5478T1ExteriorPlacementIndex #
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.P5478T1ExteriorPlacementIndex
(C D : BandCircle)
(T N : ProtoTile)
(h k : PartialOdometer)
(x : GaussianInt)
(bundle : BandOrderedGeneralNormalizedOccurrenceBundle C D T N h k x)
(placement :
BandOrderedGeneralRightPlacement bundle.normalizedPresentation bundle.configuration bundle.normalizedCircle
bundle.normalizedRoot bundle.normalizedFixed bundle.normalizedRootFunction bundle.normalizedFixedFunction
bundle.normalizedPoint bundle.pieces bundle.functions bundle.selectedSlot bundle.selectedSign
bundle.routedDirection)
:
have label :=
match ↑bundle.selectedSlot with
| 0 => if bundle.selectedSign = true then SixSubtileLabel.A else SixSubtileLabel.B
| 1 => if bundle.selectedSign = true then SixSubtileLabel.C else SixSubtileLabel.D
| x_1 => if bundle.selectedSign = true then SixSubtileLabel.E else SixSubtileLabel.F;
have coord :=
match ↑placement.rightDirectionSlot with
| 0 => (1, 0)
| 1 => (0, 1)
| x => (-1, -1);
have sign := if placement.rightNeighborPositive = true then 1 else -1;
placement.exteriorIndex = { label := label, first := sign * coord.1, second := sign * coord.2 }