Documentation

DescriptiveComplexity.Problems.Wide.TilingHard.Yes

An accepting run tiles the emitted square #

The forward half of the hardness: the table of DescriptiveComplexity.TilingHard.tileAt is a tiling of the square the reduction emits. Each of the five conditions is one fact about the run –

The address a coordinate of the emitted grid is.

Equations
Instances For
    Dependency graph
    Dependency graph
    noncomputable def DescriptiveComplexity.TilingHard.tableTiling {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] (g : Config (WPoint A)) (tr : WPoint A) (n : ) :
    WPoint (TilePt A)WPoint (TilePt A)WPoint (TilePt A)

    The table a run draws: the row of rank k is the configuration at time k, and its cell at a column is the tile that configuration puts there.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph

      Every cell carries a tile #

      theorem DescriptiveComplexity.TilingHard.tpTile_tileAt {A : Type} [Nonempty A] [LinearOrder A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) (k : ) (cell : WPoint A) :
      TPTile (tileAt g tr n k cell)

      A head tile carries a transition the machine may fire, which is all DescriptiveComplexity.TPTile asks of it; every other kind of tile asks nothing.

      Dependency graph

      Some cell carries an accepting tile #

      theorem DescriptiveComplexity.TilingHard.tpAcc_tileAt {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hacc : (wideRegData A).Acc (g n).state) :
      TPAcc (tileAt g tr n n (g n).head)

      The accepting configuration's head cell carries an accepting tile: the run has stopped there, so the tile is the halt, and it carries the accepting state.

      Dependency graph

      One row becomes the next #

      theorem DescriptiveComplexity.TilingHard.tpNoHead_tileAt {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} (hh : (g k).head cell) :
      TPNoHead (tileAt g tr n k cell)

      A cell the head is not on carries no head.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.eq_of_not_lt {A : Type} {g : Config (WPoint A)} {n k : } (hfreeze : ∀ (i : ), n ig i = g n) (hk : ¬k < n) :
      g (k + 1) = g k

      After the last step the run stands still.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.head_ne_next {A : Type} [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) (hk : k < n) :
      (g k).head (g (k + 1)).head

      A step moves the head, so the cell it leaves is not the cell it enters.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.tape_frame {A : Type} [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) (hfreeze : ∀ (i : ), n ig i = g n) (hh : (g k).head cell) :
      (g (k + 1)).tape cell = (g k).tape cell

      A step writes under the head and leaves every other cell alone.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.tpVert_tileAt {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) (hfreeze : ∀ (i : ), n ig i = g n) (k : ) (cell : WPoint A) :
      TPVert (tileAt g tr n k cell) (tileAt g tr n (k + 1) cell)

      The row above is the step's: the head's cell holds what the step wrote, the cell the head is entering becomes the head, and every other cell copies itself.

      Dependency graph

      Neighbors in one row #

      theorem DescriptiveComplexity.TilingHard.head_eq_of_tileAt {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} (h : (tileAt g tr n k cell).1 = TileTag.head (tileAt g tr n k cell).1 = TileTag.halt) :
      (g k).head = cell

      A head or a halt tile stands where the head stands.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.head_of_tileAt {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} (h : (tileAt g tr n k cell).1 = TileTag.head) :
      (g k).head = cell k < n

      A head tile is the head, with a step left to take.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.arr_of_tileAt {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} {right : Bool} (h : (tileAt g tr n k cell).1 = if right = true then TileTag.arrL else TileTag.arrR) :
      (g k).head cell k < n (g (k + 1)).head = cell (WMRight (wpElt (tr k)) right = true)

      An arrival is the cell the head is entering, from the left when the transition moves right.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.tpTr_tileAt_head {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} (hh : (g k).head = cell) (hk : k < n) :
      tpTr (tileAt g tr n k cell) = wpElt (tr k)

      The transition a head tile of the table carries is the one the step fires.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.tpState_tileAt_arr {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} (hh : (g k).head cell) (hk : k < n) (hnext : (g (k + 1)).head = cell) :
      tpState (tileAt g tr n k cell) = wpElt (g (k + 1)).state

      The state an arrival of the table carries is the state the step reaches.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.tileAt_arr_tag {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n k : } {cell : WPoint A} (hh : (g k).head cell) (hk : k < n) (hnext : (g (k + 1)).head = cell) :

      The tag an arrival of the table carries names the side the head comes from.

      Dependency graph

      A transition moving right, read at the element it is.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.tpHoriz_tileAt {A : Type} [Nonempty A] [LinearOrder A] [Finite A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hlin : IsLinOrd WMLe) (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) {cL cR : WPoint A} (hs : SuccPos (wideRegData A).Le (wideRegData A).Posn cL cR) (k : ) :
      TPHoriz (tileAt g tr n k cL) (tileAt g tr n k cR)

      Neighboring cells of a row agree: the head is unique, so no two heads stand side by side; and the arrival next to it is on the side the transition moves, since the head moves to the neighbor in that direction.

      Dependency graph

      The bottom row is the initial tape #

      The elements the bottom row is described at are the ones carrying input: a digit whose element has an input symbol, since a cell holding that symbol and no head is always a tile of the emitted instance.

      Dependency graph

      The cells of the emitted file are the machine's register cells: a coordinate is a cell of the digit of x exactly when the address it is is the machine's cell of x.

      Dependency graph

      The bottom row of the emitted tiling is the machine's initial tape: the cell of an element may carry a tile holding that element's input symbol, and no head.

      Dependency graph

      The empty address is no register cell, so the machine starts on a blank.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.first_tableTiling {A : Type} [Nonempty A] [LinearOrder A] [Finite A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hwf : WideWF A) (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) (hinit : (wideRegData A).IsInit (g 0)) {x y : WPoint (TilePt A)} (hx : (wideTileData (TilePt A)).Posn x) (hy : MinPos (wideTileData (TilePt A)).Le (wideTileData (TilePt A)).Posn y) :

      The bottom row the table draws is one the description allows: the corner carries the machine's start – the head, on the blank cell it begins on – and every other column carries the input symbol of its element, or the blank where the description names none.

      Dependency graph

      The two edge columns #

      theorem DescriptiveComplexity.TilingHard.tpEdgeL_tileAt {A : Type} [Nonempty A] [Finite A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hlin : IsLinOrd WMLe) (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) {cell : WPoint A} (hmin : MinPos (wideRegData A).Le (wideRegData A).Posn cell) (k : ) :
      TPEdgeL (tileAt g tr n k cell)

      The head never arrives from the left at the first cell: an arrival from the left is a step moving right into that cell, and nothing lies below the least position.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.tpEdgeR_tileAt {A : Type} [Nonempty A] [Finite A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hlin : IsLinOrd WMLe) (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) {cell : WPoint A} (hmax : MaxPos (wideRegData A).Le (wideRegData A).Posn cell) (k : ) :
      TPEdgeR (tileAt g tr n k cell)

      And never from the right at the last cell: an arrival from the right is a step moving left into that cell, and nothing lies above the greatest position.

      Dependency graph

      The table is a tiling #

      theorem DescriptiveComplexity.TilingHard.tableTiling_tpCol {A : Type} [Nonempty A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (s r : AProp) :
      tableTiling g tr n (Sum.inl (tpCol s)) (Sum.inl (tpCol r)) = Sum.inr (tileAt g tr n (wideRank r) (Sum.inl s))

      The tile the table puts at a coordinate of the emitted square, read at the machine's own address and time.

      Dependency graph
      theorem DescriptiveComplexity.TilingHard.isTiling_tableTiling {A : Type} [Nonempty A] [LinearOrder A] [Finite A] [FirstOrder.Language.wide.Structure A] {g : Config (WPoint A)} {tr : WPoint A} {n : } (hwf : WideWF A) (hinit : (wideRegData A).IsInit (g 0)) (hlt : n < Nat.card { p : WPoint A // (wideRegData A).Posn p }) (hfreeze : ∀ (i : ), n ig i = g n) (hacc : (wideRegData A).Acc (g n).state) (hstep : i < n, StepWith (wideRegData A) (g i) (g (i + 1)) (tr i)) :

      An accepting run draws a tiling of the emitted square. Each of the five conditions is one fact about the run: every cell carries a tile because a head tile carries the transition the step fires; the bottom row is the initial tape; neighbors in a row agree because the head is unique; one row becomes the next because a step writes under the head and leaves every other cell alone; and the accepting configuration's own cell carries an accepting tile.

      Dependency graph

      An accepting run makes the emitted square tileable, which is the forward half of the hardness: the table the run draws is a tiling.

      Dependency graph