Documentation

DescriptiveComplexity.Problems.Tiling.Membership

Tiling a square is existential second-order definable #

The membership half of the problem's completeness: a tiling is a certificate, and checking it is local. The Σ₁ definition guesses one ternary relation variable R x y t, read as “the cell in column x and row y carries the tile t”, and its first-order kernel says what a tiling is:

together with the well-formedness the yes-instances fold in – the order is linear and there is a position.

The guess has to be functional where a coloring's need not be (DescriptiveComplexity.paletteKernel): the accepting condition asks for a cell that carries an accepting tile, so a cell holding two tiles could satisfy the compatibility clauses by one and the acceptance by the other, which no tiling does.

The grid is indexed by the positions of the instance, so this is an n × n tiling and the definition is a Σ₁ one. Read over an exponential expansion the same sentence asks about a 2ⁿ × 2ⁿ square.

The guessed tiling #

The single existential block of the Σ₁ definition: one ternary relation variable, read as “the cell in this column and this row carries this tile”.

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

    The vocabulary of the kernel: tile systems together with the guessed tiling.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The position symbol in the kernel's vocabulary.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The tile symbol in the kernel's vocabulary.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The accepting-tile symbol in the kernel's vocabulary.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The order symbol in the kernel's vocabulary.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              The horizontal-compatibility symbol in the kernel's vocabulary.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]

                The vertical-compatibility symbol in the kernel's vocabulary.

                Equations
                Instances For
                  Dependency graph
                  @[reducible, inline]

                  The bottom-row symbol in the kernel's vocabulary.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]

                    The base-tile symbol in the kernel's vocabulary.

                    Equations
                    Instances For
                      Dependency graph
                      @[reducible, inline]

                      The start-tile symbol in the kernel's vocabulary.

                      Equations
                      Instances For
                        Dependency graph
                        @[reducible, inline]

                        The left-edge symbol in the kernel's vocabulary.

                        Equations
                        Instances For
                          Dependency graph
                          @[reducible, inline]

                          The right-edge symbol in the kernel's vocabulary.

                          Equations
                          Instances For
                            Dependency graph
                            @[reducible, inline]

                            The guessed tiling's symbol in the kernel's vocabulary.

                            Equations
                            Instances For
                              Dependency graph

                              The atoms, at an arbitrary index of free variables #

                              Dependency graph
                              Dependency graph
                              noncomputable def DescriptiveComplexity.tlAccF {γ : Type} (t : γ) :

                              t is an accepting tile.

                              Equations
                              Instances For
                                Dependency graph
                                Dependency graph
                                noncomputable def DescriptiveComplexity.tlHorizF {γ : Type} (t t' : γ) :

                                t' may stand immediately to the right of t.

                                Equations
                                Instances For
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.tlVertF {γ : Type} (t t' : γ) :

                                  t' may stand immediately above t.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.tlFirstF {γ : Type} (x t : γ) :

                                    The bottom row's cell in column x may carry t.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      Dependency graph
                                      Dependency graph
                                      noncomputable def DescriptiveComplexity.tlEdgeLF {γ : Type} (t : γ) :

                                      t may stand in the leftmost column.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        noncomputable def DescriptiveComplexity.tlEdgeRF {γ : Type} (t : γ) :

                                        t may stand in the rightmost column.

                                        Equations
                                        Instances For
                                          Dependency graph
                                          noncomputable def DescriptiveComplexity.tlRelF {γ : Type} (x y t : γ) :

                                          The cell in column x and row y carries the tile t.

                                          Equations
                                          Instances For
                                            Dependency graph
                                            noncomputable def DescriptiveComplexity.tlEqF {γ : Type} (x y : γ) :

                                            x and y are the same element.

                                            Equations
                                            Instances For
                                              Dependency graph

                                              What the kernel says #

                                              @[simp]
                                              Dependency graph
                                              @[simp]
                                              Dependency graph
                                              @[simp]
                                              Dependency graph
                                              @[simp]
                                              theorem DescriptiveComplexity.realize_tlLeF {A : Type} [FirstOrder.Language.tiling.Structure A] {γ : Type} (ρ : tileGuessBlock.Assignment A) {v : γA} (x y : γ) :
                                              (tlLeF x y).Realize v TLLe (v x) (v y)
                                              Dependency graph
                                              @[simp]
                                              theorem DescriptiveComplexity.realize_tlHorizF {A : Type} [FirstOrder.Language.tiling.Structure A] {γ : Type} (ρ : tileGuessBlock.Assignment A) {v : γA} (t t' : γ) :
                                              (tlHorizF t t').Realize v TLHoriz (v t) (v t')
                                              Dependency graph
                                              @[simp]
                                              theorem DescriptiveComplexity.realize_tlVertF {A : Type} [FirstOrder.Language.tiling.Structure A] {γ : Type} (ρ : tileGuessBlock.Assignment A) {v : γA} (t t' : γ) :
                                              (tlVertF t t').Realize v TLVert (v t) (v t')
                                              Dependency graph
                                              @[simp]
                                              theorem DescriptiveComplexity.realize_tlFirstF {A : Type} [FirstOrder.Language.tiling.Structure A] {γ : Type} (ρ : tileGuessBlock.Assignment A) {v : γA} (x t : γ) :
                                              (tlFirstF x t).Realize v TLFirst (v x) (v t)
                                              Dependency graph
                                              @[simp]
                                              Dependency graph
                                              Dependency graph
                                              Dependency graph
                                              Dependency graph
                                              @[simp]
                                              theorem DescriptiveComplexity.realize_tlRelF {A : Type} [FirstOrder.Language.tiling.Structure A] {γ : Type} (ρ : tileGuessBlock.Assignment A) {v : γA} (x y t : γ) :
                                              (tlRelF x y t).Realize v ρ () ![v x, v y, v t]
                                              Dependency graph
                                              @[simp]
                                              theorem DescriptiveComplexity.realize_tlEqF {A : Type} [FirstOrder.Language.tiling.Structure A] {γ : Type} (ρ : tileGuessBlock.Assignment A) {v : γA} (x y : γ) :
                                              (tlEqF x y).Realize v v x = v y
                                              Dependency graph

                                              The two order guards, as formulas #

                                              noncomputable def DescriptiveComplexity.tlMinPosF {γ : Type} (y : γ) :

                                              y is the least position.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                Dependency graph
                                                noncomputable def DescriptiveComplexity.tlMaxPosF {γ : Type} (y : γ) :

                                                y is the greatest position.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  Dependency graph
                                                  noncomputable def DescriptiveComplexity.tlSuccPosF {γ : Type} (x x' : γ) :

                                                  x' is the position immediately above x.

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

                                                    The clauses of the kernel #

                                                    The order is linear and there is a position: the well-formedness the yes-instances fold in.

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

                                                      Every cell of the grid carries a tile of the instance.

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

                                                        A cell carries at most one tile.

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

                                                          The bottom row is one the description allows: the tiles it names in that column, or a base tile where it names none.

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

                                                            The leftmost column carries tiles allowed there.

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

                                                              And the rightmost column those allowed there.

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

                                                                Horizontal neighbors are compatible.

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

                                                                  Vertical neighbors are compatible.

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

                                                                    Some cell of the grid carries an accepting tile.

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

                                                                      The first-order kernel of the Σ₁ definition: the tiling the block guesses is a tiling of the square, and the instance is well-formed.

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

                                                                        What each clause says #

                                                                        Dependency graph
                                                                        Dependency graph
                                                                        Dependency graph
                                                                        Dependency graph
                                                                        Dependency graph
                                                                        Dependency graph
                                                                        theorem DescriptiveComplexity.realize_tileHorizC {A : Type} [FirstOrder.Language.tiling.Structure A] (ρ : tileGuessBlock.Assignment A) :
                                                                        A tileHorizC ∀ (x x' y t t' : A), SuccPos (tileData A).Le (tileData A).Posn x x'TLPosn yρ () ![x, y, t]ρ () ![x', y, t']TLHoriz t t'
                                                                        Dependency graph
                                                                        theorem DescriptiveComplexity.realize_tileVertC {A : Type} [FirstOrder.Language.tiling.Structure A] (ρ : tileGuessBlock.Assignment A) :
                                                                        A tileVertC ∀ (x y y' t t' : A), TLPosn xSuccPos (tileData A).Le (tileData A).Posn y y'ρ () ![x, y, t]ρ () ![x, y', t']TLVert t t'
                                                                        Dependency graph
                                                                        Dependency graph

                                                                        The definition #

                                                                        theorem DescriptiveComplexity.realize_tileKernel {A : Type} [FirstOrder.Language.tiling.Structure A] (ρ : tileGuessBlock.Assignment A) :
                                                                        A tileKernel (tileData A).WellFormed (∀ (x y : A), TLPosn xTLPosn y∃ (t : A), ρ () ![x, y, t] TLTile t) (∀ (x y t t' : A), ρ () ![x, y, t]ρ () ![x, y, t']t = t') (∀ (x y t : A), TLPosn xMinPos (tileData A).Le (tileData A).Posn yρ () ![x, y, t](MinPos (tileData A).Le (tileData A).Posn xTLStart t) (¬MinPos (tileData A).Le (tileData A).Posn x(tileData A).FirstTile x t)) (∀ (x y t : A), TLPosn yMinPos (tileData A).Le (tileData A).Posn xρ () ![x, y, t]TLEdgeL t) (∀ (x y t : A), TLPosn yMaxPos (tileData A).Le (tileData A).Posn xρ () ![x, y, t]TLEdgeR t) (∀ (x x' y t t' : A), SuccPos (tileData A).Le (tileData A).Posn x x'TLPosn yρ () ![x, y, t]ρ () ![x', y, t']TLHoriz t t') (∀ (x y y' t t' : A), TLPosn xSuccPos (tileData A).Le (tileData A).Posn y y'ρ () ![x, y, t]ρ () ![x, y', t']TLVert t t') ∃ (x : A) (y : A) (t : A), TLPosn x TLPosn y ρ () ![x, y, t] TLAcc t

                                                                        What the kernel says, at an assignment of the guessed tiling: the instance is well-formed and the guess is a tiling of the square, read as a relation.

                                                                        Dependency graph

                                                                        Tiling a square is Σ₁-definable: guess the tiling as one ternary relation, and check first-order that it is one. Since NP is Σ₁-definability, this is the membership half of the problem's completeness.

                                                                        Dependency graph

                                                                        Tiling a square is in NP.

                                                                        Dependency graph