BandOrderedGeneralMarkedSectorTransport #
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.BandOrderedGeneralMarkedSectorTransport
(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)
(selectedEdge : Finset GaussianInt)
(hx : bundle.normalizedPoint ∈ selectedEdge)
(hedge :
selectedEdge ∈ FootprintEdges
(SubtileOccurrenceInterpretation placement.layout.P placement.layout.u placement.layout.v
placement.exteriorIndex) ∩
FootprintEdges
(SubtileOccurrenceInterpretation placement.layout.P placement.layout.u placement.layout.v
placement.centralIndex))
(row :
BandOrderedGeneralSelectedContactRow bundle.normalizedPresentation bundle.configuration bundle.normalizedCircle
bundle.normalizedFixed placement.layout placement.exteriorIndex placement.centralIndex)
:
have q := bundle.normalizedPresentation;
have occurrence := SubtileOccurrenceInterpretation placement.layout.P placement.layout.u placement.layout.v;
have observableEq := fun (A B : ProtoTile) => A.cells = B.cells ∧ (A.cells = ∅ → A.anchor = B.anchor);
have rowConclusion :=
fun (a b : PeriodicSubtileIndex)
(selectedRow :
BandOrderedGeneralSelectedContactRow bundle.normalizedPresentation bundle.configuration bundle.normalizedCircle
bundle.normalizedFixed placement.layout a b)
(oldRight : ProtoTile) =>
match b, a, selectedRow with
| .({ label := SixSubtileLabel.B, first := 0, second := 0 }),
.({ label := SixSubtileLabel.A, first := -1, second := -1 }),
BandOrderedGeneralSelectedContactRow.positiveL1 hne presentation =>
bundle.normalizedPoint ∉ FootprintVertices oldRight
| .({ label := SixSubtileLabel.B, first := 0, second := 0 }),
.({ label := SixSubtileLabel.A, first := 0, second := -1 }),
BandOrderedGeneralSelectedContactRow.positiveL2 hne presentation =>
bundle.normalizedPoint ∉ FootprintVertices oldRight
| .({ label := SixSubtileLabel.D, first := 0, second := 0 }),
.({ label := SixSubtileLabel.C, first := 1, second := 0 }),
BandOrderedGeneralSelectedContactRow.positiveL3 hne presentation =>
bundle.normalizedPoint ∉ FootprintVertices oldRight
| .({ label := SixSubtileLabel.A, first := 0, second := 0 }),
.({ label := SixSubtileLabel.B, first := 1, second := 1 }),
BandOrderedGeneralSelectedContactRow.reflectedL1 hne presentation =>
bundle.normalizedPoint ∉ FootprintVertices oldRight
| .({ label := SixSubtileLabel.A, first := 0, second := 0 }),
.({ label := SixSubtileLabel.B, first := 0, second := 1 }),
BandOrderedGeneralSelectedContactRow.reflectedL2 hne presentation =>
bundle.normalizedPoint ∉ FootprintVertices oldRight
| .({ label := SixSubtileLabel.C, first := 0, second := 0 }),
.({ label := SixSubtileLabel.D, first := -1, second := 0 }),
BandOrderedGeneralSelectedContactRow.reflectedL3 hne presentation =>
bundle.normalizedPoint ∉ FootprintVertices oldRight
| .({ label := SixSubtileLabel.C, first := 0, second := 0 }),
.({ label := SixSubtileLabel.A, first := -1, second := -1 }),
BandOrderedGeneralSelectedContactRow.positiveS1 presentation =>
have d := BandVectors.1 (bundle.configuration.firstPredecessor 0) (bundle.configuration.firstPredecessor 2);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.A, first := -1, second := -1 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 true) (-placement.layout.u - placement.layout.v + d)) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.E, first := 0, second := 0 }),
.({ label := SixSubtileLabel.A, first := 0, second := -1 }),
BandOrderedGeneralSelectedContactRow.positiveS2 presentation =>
have d :=
{ re := 0, im := 1 } ^ 3 * BandVectors.1 (bundle.configuration.firstPredecessor 3) (bundle.configuration.firstPredecessor 0);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.A, first := 0, second := -1 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 true) (-placement.layout.v + d)) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.E, first := 0, second := 0 }),
.({ label := SixSubtileLabel.C, first := 1, second := 0 }),
BandOrderedGeneralSelectedContactRow.positiveS3 presentation =>
have d := BandVectors.1 (bundle.configuration.secondPredecessor 0) (bundle.configuration.secondPredecessor 1);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.C, first := 1, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 1 true) (placement.layout.u + d)) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.A, first := 0, second := 0 }),
.({ label := SixSubtileLabel.C, first := 1, second := 1 }),
BandOrderedGeneralSelectedContactRow.positiveS4 presentation =>
have d := BandVectors.1 (bundle.configuration.firstPredecessor 0) (bundle.configuration.firstPredecessor 2);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.A, first := 0, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 true) d) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.A, first := 0, second := 0 }),
.({ label := SixSubtileLabel.E, first := 0, second := 1 }),
BandOrderedGeneralSelectedContactRow.positiveS5 presentation =>
have d :=
{ re := 0, im := 1 } ^ 3 * BandVectors.1 (bundle.configuration.firstPredecessor 3) (bundle.configuration.firstPredecessor 0);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.A, first := 0, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 true) d) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.C, first := 0, second := 0 }),
.({ label := SixSubtileLabel.E, first := -1, second := 0 }),
BandOrderedGeneralSelectedContactRow.positiveS6 presentation =>
have d := BandVectors.1 (bundle.configuration.secondPredecessor 0) (bundle.configuration.secondPredecessor 1);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.C, first := 0, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 1 true) d) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.D, first := 0, second := 0 }),
.({ label := SixSubtileLabel.B, first := 1, second := 1 }),
BandOrderedGeneralSelectedContactRow.reflectedS1 presentation =>
have d :=
{ re := 0, im := 1 } ^ 2 * BandVectors.1 (bundle.configuration.firstPredecessor 0) (bundle.configuration.firstPredecessor 2);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.B, first := 1, second := 1 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 false) (placement.layout.u + placement.layout.v + d)) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.F, first := 0, second := 0 }),
.({ label := SixSubtileLabel.B, first := 0, second := 1 }),
BandOrderedGeneralSelectedContactRow.reflectedS2 presentation =>
have d :=
{ re := 0, im := 1 } * BandVectors.1 (bundle.configuration.firstPredecessor 3) (bundle.configuration.firstPredecessor 0);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.B, first := 0, second := 1 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 false) (placement.layout.v + d)) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.F, first := 0, second := 0 }),
.({ label := SixSubtileLabel.D, first := -1, second := 0 }),
BandOrderedGeneralSelectedContactRow.reflectedS3 presentation =>
have d :=
{ re := 0, im := 1 } ^ 2 * BandVectors.1 (bundle.configuration.secondPredecessor 0) (bundle.configuration.secondPredecessor 1);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.D, first := -1, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 1 false) (-placement.layout.u + d)) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.B, first := 0, second := 0 }),
.({ label := SixSubtileLabel.D, first := -1, second := -1 }),
BandOrderedGeneralSelectedContactRow.reflectedS4 presentation =>
have d :=
{ re := 0, im := 1 } ^ 2 * BandVectors.1 (bundle.configuration.firstPredecessor 0) (bundle.configuration.firstPredecessor 2);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.B, first := 0, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 false) d) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.B, first := 0, second := 0 }),
.({ label := SixSubtileLabel.F, first := 0, second := -1 }),
BandOrderedGeneralSelectedContactRow.reflectedS5 presentation =>
have d :=
{ re := 0, im := 1 } * BandVectors.1 (bundle.configuration.firstPredecessor 3) (bundle.configuration.firstPredecessor 0);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.B, first := 0, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 0 false) d) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight)
| .({ label := SixSubtileLabel.D, first := 0, second := 0 }),
.({ label := SixSubtileLabel.F, first := 1, second := 0 }),
BandOrderedGeneralSelectedContactRow.reflectedS6 presentation =>
have d :=
{ re := 0, im := 1 } ^ 2 * BandVectors.1 (bundle.configuration.secondPredecessor 0) (bundle.configuration.secondPredecessor 1);
have newRight := TileTranslation (occurrence { label := SixSubtileLabel.D, first := 0, second := 0 }) d;
observableEq newRight (TileTranslation (placement.layout.P 1 false) d) ∧ (bundle.normalizedPoint ∈ FootprintVertices oldRight ↔ bundle.normalizedPoint ∈ FootprintVertices newRight);
have positiveFirst := TileTranslation bundle.normalizedFixed (-BandVectors.1 (q 0) (q placement.rightFirstSlot.succ));
have positiveSecond := TileTranslation bundle.normalizedFixed (-BandVectors.1 (q 0) (q placement.rightSecondSlot.succ));
have reflectedFirst := TileTranslation bundle.normalizedFixed (BandVectors.1 (q 0) (q placement.rightFirstSlot.succ));
have reflectedSecond := TileTranslation bundle.normalizedFixed (BandVectors.1 (q 0) (q placement.rightSecondSlot.succ));
(placement.rightNeighborPositive = true ∧ bundle.selectedSlot = placement.rightFirstSlot ∧ bundle.selectedSign = true →
rowConclusion placement.exteriorIndex placement.centralIndex row positiveFirst) ∧ (placement.rightNeighborPositive = true ∧ bundle.selectedSlot = placement.rightSecondSlot ∧ bundle.selectedSign = false →
rowConclusion placement.exteriorIndex placement.centralIndex row positiveSecond) ∧ (placement.rightNeighborPositive = false ∧ bundle.selectedSlot = placement.rightFirstSlot ∧ bundle.selectedSign = false →
rowConclusion placement.exteriorIndex placement.centralIndex row reflectedFirst) ∧ (placement.rightNeighborPositive = false ∧ bundle.selectedSlot = placement.rightSecondSlot ∧ bundle.selectedSign = true →
rowConclusion placement.exteriorIndex placement.centralIndex row reflectedSecond)