Documentation

CslibFrontier.Computability.WangTile.Robinson.Carrier.Borders

Recursive owners and selected borders of canonical Robinson patches #

Each coordinate belongs to its smallest enclosing positive-depth frame. The selected border at a quarter is the persistent outer opening or a boundary of one of the frames present at that substitution level. The checked finite halo invariant identifies this arithmetic union with the selected shade boundaries of the actual decorated substitution.

Main definitions #

Main results #

References #

After [JV20], §3.3, pp. 26–29. The recursive owner and halo argument is ported from lean-wang revision 64268a3aaaef3eac65559352ef94f62ab9c00482, ShadedCarrierHierarchy (lines 24–193), ShadedCarrierBorderGeometry, and ShadedCarrierBorderHierarchy. The arithmetic closely follows the source; the halo bridge is restructured around the named BorderState invariant.

theorem Cslib.WangTile.Robinson.Canonical.outerBorder_eq_some_iff (coordinate transverse : ℕ) (orientation : Bool) :
outerBorder coordinate transverse = some orientation ↔ coordinate = 1 ∧ 1 ≤ transverse ∧ orientation = true

The persistent outer opening occurs precisely at coordinate one with positive transverse coordinate, and points toward increasing coordinates.

Linear scale of a depth-depth frame, growing by four at each level.

Period of the depth-depth frames along either coordinate axis.

Opening boundary residue of a frame, one unit beyond its scale.

Closing boundary residue of a frame, three times its scale.

Whether a coordinate belongs to the closed interval of a depth-depth frame.

Whether a coordinate is an opening or closing boundary at the given depth.

theorem Cslib.WangTile.Robinson.Carrier.inFrame_eq_true_iff (depth coordinate : ℕ) :
inFrame depth coordinate = true ↔ frameStartResidue depth ≤ coordinate % period depth ∧ coordinate % period depth ≤ frameEndResidue depth

Membership in a frame is the pair of bounds on the coordinate's period residue.

theorem Cslib.WangTile.Robinson.Carrier.onFrameBoundary_eq_false_iff (depth coordinate : ℕ) :
onFrameBoundary depth coordinate = false ↔ coordinate % period depth ≠ frameStartResidue depth ∧ coordinate % period depth ≠ frameEndResidue depth

An interior coordinate has neither boundary residue.

Smallest frame depth at most bound containing a coordinate.

@[simp]
theorem Cslib.WangTile.Robinson.Carrier.depthAt_zero (coordinate : ℕ) :
depthAt 0 coordinate = none

A search with no positive depths has no owner.

theorem Cslib.WangTile.Robinson.Carrier.depthAt_eq_some_mono {small bound coordinate depth : ℕ} (owner : depthAt small coordinate = some depth) (hsmall : small ≤ bound) :
depthAt bound coordinate = some depth

Once a coordinate acquires an owner, increasing the search bound preserves it.

theorem Cslib.WangTile.Robinson.Carrier.depthAt_le {bound coordinate depth : ℕ} (owner : depthAt bound coordinate = some depth) :
depth ≤ bound

Every owner depth lies inside the bound searched by depthAt.

theorem Cslib.WangTile.Robinson.Carrier.depthAt_pos {bound coordinate depth : ℕ} (owner : depthAt bound coordinate = some depth) :
0 < depth

depthAt never returns the unsearched depth zero.

theorem Cslib.WangTile.Robinson.Carrier.inFrame_eq_true_of_depthAt_eq_some {bound coordinate depth : ℕ} (owner : depthAt bound coordinate = some depth) :
inFrame depth coordinate = true

An owner is a frame that actually contains the coordinate.

theorem Cslib.WangTile.Robinson.Carrier.inFrame_eq_false_of_depthAt_eq_none {bound coordinate depth : ℕ} (owner : depthAt bound coordinate = none) (hpositive : 0 < depth) (hbound : depth ≤ bound) :
inFrame depth coordinate = false

If no owner was found, none of the searched positive-depth frames contains the coordinate.

theorem Cslib.WangTile.Robinson.Carrier.depthAt_le_of_inFrame {bound coordinate ownerDepth depth : ℕ} (owner : depthAt bound coordinate = some ownerDepth) (hpositive : 0 < depth) (contained : inFrame depth coordinate = true) :
ownerDepth ≤ depth

The returned owner is the smallest positive frame containing the coordinate.

theorem Cslib.WangTile.Robinson.Carrier.depthAt_self_of_depthAt_eq_some {bound coordinate depth : ℕ} (owner : depthAt bound coordinate = some depth) :
depthAt depth coordinate = some depth

Restricting the search to the returned depth still finds the same owner.

Every frame has positive scale.

A frame period consists of four scale units.

Every frame period exceeds one.

The closing boundary lies strictly inside one period.

def Cslib.WangTile.Robinson.Carrier.frameBorder (depth coordinate transverse : ℕ) :

The border contributed by one frame depth: true is the opening toward increasing coordinates, false the closing toward decreasing coordinates.

def Cslib.WangTile.Robinson.Carrier.selectedBorder (level coordinate transverse : ℕ) :

All selected borders in a canonical level supertile, as a direct bounded search through its frame depths.

Rounding an opening boundary up recovers its positive coarse coordinate.

theorem Cslib.WangTile.Robinson.Carrier.period_succ (depth : ℕ) :
period (depth + 1) = 4 * period depth

Two substitutions multiply every frame period by four.

theorem Cslib.WangTile.Robinson.Carrier.inFrame_succ_iff_ceilDivFour (depth coordinate : ℕ) :
inFrame (depth + 1) coordinate = inFrame depth (Canonical.ceilDivFour coordinate)

A coordinate belongs to a refined frame exactly when its rounded coarse coordinate does.

theorem Cslib.WangTile.Robinson.Carrier.openingBoundary_succ_iff (depth coordinate : ℕ) :
coordinate % period (depth + 1) = frameStartResidue (depth + 1) ↔ Canonical.ceilDivFour coordinate % period depth = frameStartResidue depth ∧ coordinate % 4 = 1

An opening boundary survives refinement exactly at fine residue one.

theorem Cslib.WangTile.Robinson.Carrier.closingBoundary_succ_iff (depth coordinate : ℕ) :
coordinate % period (depth + 1) = frameEndResidue (depth + 1) ↔ Canonical.ceilDivFour coordinate % period depth = frameEndResidue depth ∧ coordinate % 4 = 0

A closing boundary survives refinement exactly at fine residue zero.

theorem Cslib.WangTile.Robinson.Carrier.period_dvd_scale_of_lt {small large : ℕ} (h : small < large) :
period small ∣ scale large

Every shallower frame period divides a deeper frame scale.

theorem Cslib.WangTile.Robinson.Carrier.largeOpening_mod_small {small large coordinate : ℕ} (h : small < large) (opening : coordinate % period large = frameStartResidue large) :
coordinate % period small = 1

A deeper opening has residue one in every shallower frame period.

theorem Cslib.WangTile.Robinson.Carrier.largeClosing_mod_small {small large coordinate : ℕ} (h : small < large) (closing : coordinate % period large = frameEndResidue large) :
coordinate % period small = 0

A deeper closing has residue zero in every shallower frame period.

The opening precedes the closing in every frame period.

theorem Cslib.WangTile.Robinson.Carrier.frameBorder_eq_some_true_iff (depth coordinate transverse : ℕ) :
frameBorder depth coordinate transverse = some true ↔ inFrame depth transverse = true ∧ coordinate % period depth = frameStartResidue depth

An increasing-facing border is exactly an opening with transverse coordinate inside its frame.

theorem Cslib.WangTile.Robinson.Carrier.frameBorder_eq_some_false_iff (depth coordinate transverse : ℕ) :
frameBorder depth coordinate transverse = some false ↔ inFrame depth transverse = true ∧ coordinate % period depth = frameEndResidue depth

A decreasing-facing border is exactly a closing with transverse coordinate inside its frame.

theorem Cslib.WangTile.Robinson.Carrier.selectedBorder_eq_some_iff (level coordinate transverse : ℕ) (orientation : Bool) :
selectedBorder level coordinate transverse = some orientation ↔ Canonical.outerBorder coordinate transverse = some orientation ∨ ∃ (depth : ℕ), 1 ≤ depth ∧ depth ≤ level ∧ frameBorder depth coordinate transverse = some orientation

The finite selector contains exactly the outer opening and the frame boundaries at depths 1 through level.

theorem Cslib.WangTile.Robinson.Carrier.supertileIndexGrid_zero_cases (level x y : ℕ) (hx : x < 4 ^ (level + 1)) (hy : y < 4 ^ (level + 1)) (indexZero : Canonical.supertileIndexGrid (level + 1) Canonical.seedNode x y = 0) :
x % 4 = 0 ∧ y % 4 = 0 ∧ Canonical.supertileIndexGrid level Canonical.seedNode (x / 4) (y / 4) = 0 ∧ x / 4 % 2 = 0 ∧ y / 4 % 2 = 0 ∨ x % 4 = 0 ∧ y % 4 = 0 ∧ Canonical.supertileIndexGrid level Canonical.seedNode (x / 4) (y / 4) = 4 ∧ x / 4 % 2 = 1 ∧ y / 4 % 2 = 1 ∨ x % 4 = 2 ∧ y % 4 = 2 ∧ x / 4 % 2 = 0 ∧ y / 4 % 2 = 0

The three certified ways index zero occurs in a canonical child block.

Actual selected vertical borders of the seed patch are precisely the arithmetic borders.

Actual selected horizontal borders of the seed patch are the transposed arithmetic borders.