Documentation

CslibFrontier.Computability.WangTile.Robinson.RedPaths.Basic

Quarter ports and oriented red paths #

The corrected Robinson tiles have four quarter sites. Red wires occupy specific lanes and corners; walks through their ports record the parity of horizontal-to-vertical crossings. A bounded walk keeps every intermediate port inside its stated rectangle.

Main definitions #

Main results #

References #

The red-wire construction is after [JV20], §§3.2–3.3, Figures 16–18 (manuscript pp. 26–28). Prior formalization: lean-wang, revision 64268a3, modules Closed104.TileSubdivision, QuarterGeometry, Quarters, RedCycleExpansion, RedCycleScaling, RedBoards, OrientedRedCycles, RedShadeGraph and RedShadeGraphBoundedPath. The port and crossing parity semantics are unchanged; wire incidence is independent of shades. Internal seam colours use this library's WangTile code, in top/bottom/left/right order, an injective recolouring of the source's north/south/east/west code.

The four quadrants of a subdivided Wang tile.

Instances For

    Horizontal coordinate of a quadrant: false for west, true for east.

    Vertical coordinate of a quadrant: false for south, true for north.

    The quadrant with the specified horizontal and vertical bits.

    All four quarter positions, in southwest/southeast/northwest/northeast order.

    Every quadrant occurs in the enumeration.

    Horizontal macro-edge colors are split by west/east half.

    Vertical macro-edge colors are split by south/north half.

    Internal vertical seam color between west and east quadrants.

    Internal horizontal seam color between south and north quadrants.

    The quadrant tile of t in the 2x2 subdivision.

    Matching quarter edges identify internal parents or matching external macro-edges.

    The vertical counterpart of quarter-edge matching.

    A quarter of one indexed tile of the corrected Robinson alphabet.

    • index : Index

      The parent tile.

    • quadrant : Quadrant

      The quarter occupied in that parent.

    The ordinary Wang tile encoding a quarter and its internal seams.

    The four red lane atoms: east vertical, north horizontal, west vertical, south horizontal.

    Membership of a red lane in a thick component; green lanes are omitted.

    Red vertical path in the west (false) or east (true) half of a tile.

    Red horizontal path in the south (false) or north (true) half of a tile.

    def Cslib.WangTile.Robinson.cornerWest (component : Thick) (quadrant : Quadrant) :

    Red corner path entering the west edge of this quarter.

    def Cslib.WangTile.Robinson.cornerEast (component : Thick) (quadrant : Quadrant) :

    Red corner path entering the east edge of this quarter.

    def Cslib.WangTile.Robinson.cornerSouth (component : Thick) (quadrant : Quadrant) :

    Red corner path entering the south edge of this quarter.

    def Cslib.WangTile.Robinson.cornerNorth (component : Thick) (quadrant : Quadrant) :

    Red corner path entering the north edge of this quarter.

    A horizontal red wire crosses this quarter.

    def Cslib.WangTile.Robinson.hasVertical (component : Thick) (quadrant : Quadrant) :

    A vertical red wire crosses this quarter.

    def Cslib.WangTile.Robinson.hasWest (component : Thick) (quadrant : Quadrant) :

    A red wire meets the west edge of this quarter.

    def Cslib.WangTile.Robinson.hasEast (component : Thick) (quadrant : Quadrant) :

    A red wire meets the east edge of this quarter.

    def Cslib.WangTile.Robinson.hasSouth (component : Thick) (quadrant : Quadrant) :

    A red wire meets the south edge of this quarter.

    def Cslib.WangTile.Robinson.hasNorth (component : Thick) (quadrant : Quadrant) :

    A red wire meets the north edge of this quarter.

    The quarter selected by the parity of its coordinates.

    @[simp]

    The horizontal bit of a quarter is the parity of its horizontal coordinate.

    @[simp]

    The vertical bit of a quarter is the parity of its vertical coordinate.

    Thick component at quarter coordinates, grouped by pairs in each direction.

    @[reducible, inline]

    Thick component of an indexed tile.

    The southwest child preserves the complete old thick component.

    structure Cslib.WangTile.Robinson.CycleOn (grid : ℕ → ℕ → Index) (west east south north : ℕ) :

    A rectangular red cycle with the four inward-facing lane orientations.

    theorem Cslib.WangTile.Robinson.CycleOn.congr {g h : ℕ → ℕ → Index} {w e b t : ℕ} (c : CycleOn g w e b t) (eq : ∀ (x y : ℕ), x ≤ e → y ≤ t → g x y = h x y) :
    CycleOn h w e b t

    An oriented red cycle transfers across grids agreeing from the origin through its northeast corner.

    theorem Cslib.WangTile.Robinson.CycleOn.refine {grid : ℕ → ℕ → Index} {west east south north : ℕ} (cycle : CycleOn grid west east south north) :
    CycleOn (refineIndexGrid grid) (2 * west) (2 * east) (2 * south) (2 * north)

    Substitution doubles an oriented red cycle and preserves all four lanes.

    theorem Cslib.WangTile.Robinson.fixed_cycle (parent : Index) :
    CycleOn (iterateRefine 2 fun (x x_1 : ℕ) => parent) 1 3 1 3

    Every twice-substituted tile contains the same oriented red board.

    theorem Cslib.WangTile.Robinson.CycleOn.iterateRefine {grid : ℕ → ℕ → Index} {w e s n : ℕ} (cycle : CycleOn grid w e s n) (level : ℕ) :
    CycleOn (Robinson.iterateRefine level grid) (2 ^ level * w) (2 ^ level * e) (2 ^ level * s) (2 ^ level * n)

    Every further substitution preserves the board and scales its coordinates by two.

    A quarter-tile edge at an absolute coordinate.

    Instances For
      @[instance_reducible]

      The four possible port sides form a finite alphabet.

      A side of a quarter at a nonnegative coordinate.

      • x : ℕ

        Horizontal quarter coordinate.

      • y : ℕ

        Vertical quarter coordinate.

      • side : Side

        The edge of the quarter.

      def Cslib.WangTile.Robinson.portPresent (grid : ℕ → ℕ → Index) (port : Port) :

      Whether the unshaded quarter geometry carries a red wire at a port.

      inductive Cslib.WangTile.Robinson.Path (indexGrid : ℕ → ℕ → Index) :
      Port → Port → Bool → Prop

      A finite red-wire walk, labelled by the parity of its crossings.

      • refl {indexGrid : ℕ → ℕ → Index} (port : Port) : Path indexGrid port port false
      • trans {indexGrid : ℕ → ℕ → Index} {first second third : Port} {firstParity secondParity : Bool} : Path indexGrid first second firstParity → Path indexGrid second third secondParity → Path indexGrid first third (firstParity ^^ secondParity)
      theorem Cslib.WangTile.Robinson.Path.symm {grid : ℕ → ℕ → Index} {first second : Port} {parity : Bool} (path : Path grid first second parity) :
      Path grid second first parity

      Reversing a walk preserves its crossing parity.

      def Cslib.WangTile.Robinson.PortInBounds (port : Port) (width height : ℕ) :

      A port lies in the quarter rectangle with the specified width and height.

      inductive Cslib.WangTile.Robinson.BoundedPath (indexGrid : ℕ → ℕ → Index) (width height : ℕ) :
      Port → Port → Bool → Prop

      A parity-labelled red walk whose every endpoint stays in a fixed rectangle.

      theorem Cslib.WangTile.Robinson.BoundedPath.path {indexGrid : ℕ → ℕ → Index} {width height : ℕ} {first second : Port} {parity : Bool} (path : BoundedPath indexGrid width height first second parity) :
      Path indexGrid first second parity

      Forgetting the rectangle bounds gives an ordinary red walk.

      theorem Cslib.WangTile.Robinson.BoundedPath.first_inBounds {indexGrid : ℕ → ℕ → Index} {width height : ℕ} {first second : Port} {parity : Bool} (path : BoundedPath indexGrid width height first second parity) :
      PortInBounds first width height

      The first endpoint of a bounded red walk lies in its bounding rectangle.