Documentation

DescriptiveComplexity.Problems.Tiling.Defs

Tiling a square: the local problem behind the machines #

The problem the exponential classes are usually read on (Fürer 1983; Börger, Grädel & Gurevich 1997 is the book-length account).

A tile system is a set of tiles with two compatibility relations – which tile may stand immediately to the right of which, and which immediately above which – a description of the bottom row, and a set of accepting tiles. The question is whether the square whose sides are the positions of the instance can be tiled: every cell carries a tile, neighbors are compatible, the bottom row and the two edge columns are as described, and some cell carries an accepting tile.

Nothing here is about resources. As with DescriptiveComplexity.NTMAccept, the grid is indexed by the elements the instance marks as positions, so an instance of size n asks about an n × n square and the problem sits in NP; read over an exponential expansion, the same definition asks about a 2ⁿ × 2ⁿ square and sits one exponential up (DescriptiveComplexity.Problems.Wide.Tiling).

Why the tiling and not the machine #

A tile system has no head, no clock and no time: its conditions are local in two dimensions and quantify over neighbors alone. That is what makes it the cheap second complete problem of a class whose first one is a machine – the work is a drawing, not an evaluator.

The shape of the conditions #

The two edge columns carry tiles marked ledge and redge, which is what the border colors of a classical tiling problem do: a condition on neighbors says nothing about the column at either end, where one neighbor is missing.

The bottom row is described by a relation first p t rather than listed, exactly as a machine's initial tape is described by inp p a: a first-order condition on the position, which is what an expansion can carry. The accepting condition is a mark on tiles, and it is what turns a tiling into a decision: without it every tile system with a compatible bottom row is a yes-instance.

Relation symbols of tile-system instances.

  • posn : tilingRel 1

    posn p: p is a position – a column, and equally a row.

  • tile : tilingRel 1

    tile t: t is a tile.

  • tacc : tilingRel 1

    tacc t: t is an accepting tile.

  • tle : tilingRel 2

    tle p q: the linear order along which the grid is read.

  • horiz : tilingRel 2

    horiz t t': t' may stand immediately to the right of t.

  • vert : tilingRel 2

    vert t t': t' may stand immediately above t.

  • first : tilingRel 2

    first p t: the cell of the bottom row in column p may carry t.

  • base : tilingRel 1

    base t: t is a base tile – what the bottom row carries in a column the description says nothing about.

  • tstart : tilingRel 1

    tstart t: t is a start tile – what the corner of the grid carries.

  • ledge : tilingRel 1

    ledge t: t may stand in the leftmost column.

  • redge : tilingRel 1

    redge t: t may stand in the rightmost column.

Instances For
    Dependency graph
    Dependency graph
    def FirstOrder.Language.instDecidableEqTilingRel.decEq {a✝ : } (x✝ x✝¹ : tilingRel a✝) :
    Decidable (x✝ = x✝¹)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph

      The relational vocabulary of tile-system instances: positions with their order, tiles with their two compatibility relations, the bottom row and the accepting tiles.

      Equations
      Instances For
        Dependency graph
        Dependency graph
        Dependency graph
        Dependency graph
        @[reducible, inline]

        The accepting-tile symbol.

        Equations
        Instances For
          Dependency graph
          Dependency graph
          @[reducible, inline]

          The horizontal-compatibility symbol.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The vertical-compatibility symbol.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              @[reducible, inline]

              The base-tile symbol.

              Equations
              Instances For
                Dependency graph
                Dependency graph
                Dependency graph
                Dependency graph

                The tile system an instance describes #

                A tile system, read off an instance: the positions with their order, the tiles with their compatibilities, the bottom row and the accepting tiles. As with DescriptiveComplexity.TMData, the record is a plain bundle of predicates, so everything about tilings is stated once and read at whatever structure supplies them.

                • Posn : AProp

                  Being a position – a column, and equally a row.

                • Le : AAProp

                  The order on positions.

                • Tile : AProp

                  Being a tile.

                • Acc : AProp

                  Being an accepting tile.

                • Horiz : AAProp

                  The right neighbor may carry this tile.

                • Vert : AAProp

                  The upper neighbor may carry this tile.

                • First : AAProp

                  The bottom row's cell in this column may carry this tile.

                • Base : AProp

                  Being a base tile: what a column the description says nothing about carries in the bottom row.

                • Start : AProp

                  Being a start tile: what the corner of the grid carries.

                • EdgeL : AProp

                  Being a left-edge tile: what the leftmost column may carry.

                • EdgeR : AProp

                  Being a right-edge tile: what the rightmost column may carry.

                Instances For
                  Dependency graph

                  The tiles the bottom row may carry in a column: the ones the description names there, and the base tiles in a column it names none. This is DescriptiveComplexity.TMData.InitTape's device – a description of the row rather than a listing – and it is what lets an expansion carry it.

                  Equations
                  Instances For
                    Dependency graph
                    def DescriptiveComplexity.TileData.IsTiling {A : Type} (T : TileData A) (τ : AAA) :

                    A tiling of the square: every cell carries a tile, the bottom row is one the description allows, the two edge columns carry tiles allowed there, horizontal and vertical neighbors are compatible, and some cell carries an accepting tile.

                    The two edge conditions are what the classical border colors of a tiling problem do. A condition on neighbors says nothing about a column with no neighbor on one side, so without them a tile whose meaning is “something is arriving from the left” could stand in the leftmost column, justified by nothing; a machine drawn as a tiling would then grow a head out of nowhere.

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

                      The square is tileable: some assignment of tiles to cells is a tiling. The assignment is a function on the whole universe – what it does off the grid is not read, so nothing is lost by not restricting it.

                      Equations
                      Instances For
                        Dependency graph

                        Well-formedness, folded into the yes-instances exactly as DescriptiveComplexity.TMData.WellFormed is: the order is linear, and there is a position to index the grid by.

                        Equations
                        Instances For
                          Dependency graph

                          Transport along a bijection #

                          theorem DescriptiveComplexity.TileData.minPos_map {A : Type} (T : TileData A) {B : Type} (u : A B) (S : TileData B) (hposn : ∀ (a : A), T.Posn a S.Posn (u a)) (hle : ∀ (a a' : A), T.Le a a' S.Le (u a) (u a')) (a : A) :
                          MinPos T.Le T.Posn a MinPos S.Le S.Posn (u a)

                          The least position of the image is the image of the least position.

                          Dependency graph
                          theorem DescriptiveComplexity.TileData.maxPos_map {A : Type} (T : TileData A) {B : Type} (u : A B) (S : TileData B) (hposn : ∀ (a : A), T.Posn a S.Posn (u a)) (hle : ∀ (a a' : A), T.Le a a' S.Le (u a) (u a')) (a : A) :
                          MaxPos T.Le T.Posn a MaxPos S.Le S.Posn (u a)

                          The greatest position of the image is the image of the greatest one.

                          Dependency graph
                          theorem DescriptiveComplexity.TileData.succPos_map {A : Type} (T : TileData A) {B : Type} (u : A B) (S : TileData B) (hposn : ∀ (a : A), T.Posn a S.Posn (u a)) (hle : ∀ (a a' : A), T.Le a a' S.Le (u a) (u a')) (a a' : A) :
                          SuccPos T.Le T.Posn a a' SuccPos S.Le S.Posn (u a) (u a')

                          And the successor of the image is the image of the successor.

                          Dependency graph
                          theorem DescriptiveComplexity.TileData.isTiling_map {A : Type} (T : TileData A) {B : Type} (u : A B) (S : TileData B) (hposn : ∀ (a : A), T.Posn a S.Posn (u a)) (hle : ∀ (a a' : A), T.Le a a' S.Le (u a) (u a')) (htile : ∀ (a : A), T.Tile a S.Tile (u a)) (hacc : ∀ (a : A), T.Acc a S.Acc (u a)) (hhoriz : ∀ (a a' : A), T.Horiz a a' S.Horiz (u a) (u a')) (hvert : ∀ (a a' : A), T.Vert a a' S.Vert (u a) (u a')) (hfirst : ∀ (a a' : A), T.First a a' S.First (u a) (u a')) (hbase : ∀ (a : A), T.Base a S.Base (u a)) (hstart : ∀ (a : A), T.Start a S.Start (u a)) (hedgeL : ∀ (a : A), T.EdgeL a S.EdgeL (u a)) (hedgeR : ∀ (a : A), T.EdgeR a S.EdgeR (u a)) {τ : AAA} (h : T.IsTiling τ) :
                          S.IsTiling fun (x y : B) => u (τ (u.symm x) (u.symm y))

                          A bijection matching the two systems carries a tiling across.

                          Dependency graph
                          theorem DescriptiveComplexity.TileData.tileable_map {A : Type} (T : TileData A) {B : Type} (u : A B) (S : TileData B) (hposn : ∀ (a : A), T.Posn a S.Posn (u a)) (hle : ∀ (a a' : A), T.Le a a' S.Le (u a) (u a')) (htile : ∀ (a : A), T.Tile a S.Tile (u a)) (hacc : ∀ (a : A), T.Acc a S.Acc (u a)) (hhoriz : ∀ (a a' : A), T.Horiz a a' S.Horiz (u a) (u a')) (hvert : ∀ (a a' : A), T.Vert a a' S.Vert (u a) (u a')) (hfirst : ∀ (a a' : A), T.First a a' S.First (u a) (u a')) (hbase : ∀ (a : A), T.Base a S.Base (u a)) (hstart : ∀ (a : A), T.Start a S.Start (u a)) (hedgeL : ∀ (a : A), T.EdgeL a S.EdgeL (u a)) (hedgeR : ∀ (a : A), T.EdgeR a S.EdgeR (u a)) (h : T.Tileable) :

                          And with it, tileability.

                          Dependency graph
                          theorem DescriptiveComplexity.TileData.wellFormed_map {A : Type} (T : TileData A) {B : Type} (u : A B) (S : TileData B) (hposn : ∀ (a : A), T.Posn a S.Posn (u a)) (hle : ∀ (a a' : A), T.Le a a' S.Le (u a) (u a')) (h : T.WellFormed) :

                          And well-formedness: the order is linear and there is a position.

                          Dependency graph

                          The shorthands of the vocabulary #

                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph
                          Dependency graph

                          The tile system an instance describes.

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

                            The problem #

                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            Dependency graph
                            theorem DescriptiveComplexity.isTiling_map {A B : Type} [FirstOrder.Language.tiling.Structure A] [FirstOrder.Language.tiling.Structure B] (e : FirstOrder.Language.tiling.Equiv A B) {τ : AAA} (h : (tileData A).IsTiling τ) :
                            (tileData B).IsTiling fun (u v : B) => e (τ (e.symm u) (e.symm v))

                            An isomorphism carries a tiling across: the tiling of the image is the tiling of the source read through the isomorphism, and every condition is a condition on relations the isomorphism preserves.

                            Dependency graph

                            And it carries well-formedness across: the order and the positions are relations of the vocabulary.

                            Dependency graph
                            Dependency graph
                            Dependency graph

                            Tiling a square. Can the square whose sides are the positions of the instance be tiled, with the bottom row the description allows and an accepting tile somewhere? The well-formedness promises of DescriptiveComplexity.TileData.WellFormed are folded into the yes-instances, exactly as for DescriptiveComplexity.NTMAccept.

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