Documentation

DescriptiveComplexity.Problems.Pcp.Hardness.Interp

The interpretation: drawing the domino system first-order #

The first-order half of HALT ≤ᶠᵒ[≤] PCP: the defining formulas of an interpretation of Language.pcp in ordered machine instances, each realizing exactly the corresponding semantic predicate of DescriptiveComplexity.Problems.Pcp.Hardness.Draw – which is all the correctness proof of DescriptiveComplexity.Problems.Pcp.Hardness.Match consumes, through DescriptiveComplexity.HaltPcp.Reads.

Method #

As in the QSAT machine interpretation, every static decision is taken in Lean rather than in the formula: the tags of the arguments are pattern-matched, and / close the cases the tables decide. The one genuinely recursive piece is DescriptiveComplexity.HaltPcp.specListF, which turns a word table of DescriptiveComplexity.HaltPcp.LSpec entries into a disjunction of “argument 1 is the i-th shared position and argument 2 is the specified letter” clauses – realized, by one induction over the table, as membership of the zipped table, which is verbatim the semantic letter relation DescriptiveComplexity.HaltPcp.PUAt.

@[reducible, inline]

The vocabulary the reduction reads: machine instances with the ambient order.

Equations
Instances For
    Dependency graph

    The symbols of the ordered expansion #

    Dependency graph
    Dependency graph
    Dependency graph
    Dependency graph
    Dependency graph
    Dependency graph
    Dependency graph
    Dependency graph
    Dependency graph
    @[reducible, inline]

    The transition-destination symbol.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph

      The builders #

      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      Dependency graph
      noncomputable def DescriptiveComplexity.HaltPcp.minF {α : Type} (x : α) :

      x is the least element of the ambient order.

      Equations
      Instances For
        Dependency graph
        noncomputable def DescriptiveComplexity.HaltPcp.initTapeF {α : Type} (x y : α) :

        The cell x initially holds y: its input symbol, or the blank if it has none.

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

          Well-formedness of the machine, as a formula with unused free variables: the machine's order is linear, there is a position, the input is functional, and there is exactly one blank.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.HaltPcp.existsMoveF {α : Type} (right : Bool) (q a b q' : α) :

            Some transition with the given attributes exists; the direction of the move is a static decision.

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

              Realization of the builders #

              Dependency graph
              @[simp]
              Dependency graph
              Dependency graph
              @[simp]
              Dependency graph
              Dependency graph
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_mLeF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (mLeF x y).Realize v TMLe (v x) (v y)
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_srcF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (srcF x y).Realize v TMSrc (v x) (v y)
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_readF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (readF x y).Realize v TMRead (v x) (v y)
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_dstF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (dstF x y).Realize v TMDst (v x) (v y)
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_writeF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (writeF x y).Realize v TMWrite (v x) (v y)
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_inpF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (inpF x y).Realize v TMInp (v x) (v y)
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_ordF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (ordF x y).Realize v v x v y
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_eqF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (eqF x y).Realize v v x = v y
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_ordLtF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (ordLtF x y).Realize v v x < v y
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_mLtF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x y : α} :
              (mLtF x y).Realize v MLt (v x) (v y)
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_minF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {x : α} :
              (minF x).Realize v ∀ (a : A), v x a
              Dependency graph
              @[simp]
              Dependency graph
              Dependency graph
              @[simp]
              theorem DescriptiveComplexity.HaltPcp.realize_existsMoveF {α A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : αA} {right : Bool} {q a b q' : α} :
              (existsMoveF right q a b q').Realize v ∃ (τ : A), TMTr τ (if right = true then TMRight τ else ¬TMRight τ) TMSrc τ (v q) TMRead τ (v a) TMDst τ (v q') TMWrite τ (v b)
              Dependency graph

              The letter formulas #

              The word tables of DescriptiveComplexity.Problems.Pcp.Hardness.Draw are turned into formulas entry by entry: “argument 1 is the i-th shared position and argument 2 is the specified letter”.

              Dependency graph

              The shared positions are the constants of their tags.

              Dependency graph

              All five coordinates of the argument k are minimal.

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

                The four last coordinates of the argument k are minimal.

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

                  The letter argument is the constant letter of the tag s.

                  Equations
                  Instances For
                    Dependency graph
                    noncomputable def DescriptiveComplexity.HaltPcp.idxLF (s : PTag) (j : Fin 5) (tc : PTag) :

                    The letter argument carries the j-th coordinate of the domino argument.

                    Equations
                    Instances For
                      Dependency graph
                      Dependency graph
                      noncomputable def DescriptiveComplexity.HaltPcp.posIsF (i : ) (tp : PTag) :

                      The position argument is the i-th shared position.

                      Equations
                      Instances For
                        Dependency graph

                        The formula of a word table, entry by entry from the i-th shared position on.

                        Equations
                        Instances For
                          Dependency graph
                          noncomputable def DescriptiveComplexity.HaltPcp.uAtF (td tp tc : PTag) :

                          The formula of the top word of a domino tag.

                          Equations
                          Instances For
                            Dependency graph

                            The formula of the start domino's bottom word, by the tag of the position.

                            Equations
                            Instances For
                              Dependency graph
                              Dependency graph

                              The domino and order formulas #

                              The formula marking the dominoes: well-formedness of the machine and the side condition of the tag.

                              Equations
                              Instances For
                                Dependency graph

                                The ambient lexicographic order of the last four coordinates, as a formula.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.HaltPcp.leF (t t' : PTag) :

                                  The order of the drawn instance: the static comparisons are decided in Lean, the dynamic ones written out.

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

                                    The interpretation of the PCP vocabulary in an ordered machine instance.

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

                                      Realization of the letter formulas #

                                      theorem DescriptiveComplexity.HaltPcp.realize_minAllF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {k : Fin 3} {w : Fin 5A} (hv : ∀ (j : Fin 5), v (k, j) = w j) :
                                      (minAllF k).Realize v w = fun (x : Fin 5) => pbot
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_minTailF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {k : Fin 3} {w : Fin 5A} (hv : ∀ (j : Fin 5), v (k, j) = w j) :
                                      (minTailF k).Realize v w 1 = pbot w 2 = pbot w 3 = pbot w 4 = pbot
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.eq_cstE_iff {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {t t' : PTag} {w : Fin 5A} :
                                      (t, w) = cstE t' t = t' w = fun (x : Fin 5) => pbot

                                      A pair with the right tag is a constant element exactly when its tuple is padding.

                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.eq_idxE_iff {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {t t' : PTag} {w : Fin 5A} {a : A} :
                                      (t, w) = idxE t' a t = t' w 0 = a w 1 = pbot w 2 = pbot w 3 = pbot w 4 = pbot

                                      A pair with the right tag carries an element exactly when its head coordinate is it and its tail is padding.

                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_cstLF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wc : Fin 5A} {s tc : PTag} (hv2 : ∀ (j : Fin 5), v (2, j) = wc j) :
                                      (cstLF s tc).Realize v (tc, wc) = cstE s
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_idxLF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wd wc : Fin 5A} {s : PTag} {j : Fin 5} {tc : PTag} (hv0 : ∀ (i : Fin 5), v (0, i) = wd i) (hv2 : ∀ (i : Fin 5), v (2, i) = wc i) :
                                      (idxLF s j tc).Realize v (tc, wc) = idxE s (wd j)
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_specF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wd wc : Fin 5A} {sp : LSpec} {tc : PTag} (hv0 : ∀ (i : Fin 5), v (0, i) = wd i) (hv2 : ∀ (i : Fin 5), v (2, i) = wc i) :
                                      (specF sp tc).Realize v (tc, wc) = LSpec.eval wd sp
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_posIsF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wp : Fin 5A} {i : } {tp : PTag} (hv1 : ∀ (j : Fin 5), v (1, j) = wp j) :
                                      (posIsF i tp).Realize v (tp, wp) = posE i
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_specListF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wd wp wc : Fin 5A} {specs : List LSpec} {i : } {tp tc : PTag} (hv0 : ∀ (j : Fin 5), v (0, j) = wd j) (hv1 : ∀ (j : Fin 5), v (1, j) = wp j) (hv2 : ∀ (j : Fin 5), v (2, j) = wc j) :
                                      (specListF specs i tp tc).Realize v ((tp, wp), tc, wc) (List.map posE (List.range' i specs.length)).zip (List.map (LSpec.eval wd) specs)
                                      Dependency graph

                                      The top table relation, in terms of List.range'.

                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_uAtF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wd wp wc : Fin 5A} {td tp tc : PTag} (hv0 : ∀ (j : Fin 5), v (0, j) = wd j) (hv1 : ∀ (j : Fin 5), v (1, j) = wp j) (hv2 : ∀ (j : Fin 5), v (2, j) = wc j) :
                                      (uAtF td tp tc).Realize v PUAt (td, wd) (tp, wp) (tc, wc)
                                      Dependency graph

                                      The bottom table relation, in terms of List.range'.

                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_startBotF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wp wc : Fin 5A} {tp tc : PTag} (hv1 : ∀ (j : Fin 5), v (1, j) = wp j) (hv2 : ∀ (j : Fin 5), v (2, j) = wc j) :
                                      (startBotF tp tc).Realize v StartBotAt (tp, wp) (tc, wc)
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_vAtF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 3 × Fin 5A} {wd wp wc : Fin 5A} {td tp tc : PTag} (hv0 : ∀ (j : Fin 5), v (0, j) = wd j) (hv1 : ∀ (j : Fin 5), v (1, j) = wp j) (hv2 : ∀ (j : Fin 5), v (2, j) = wc j) :
                                      (vAtF td tp tc).Realize v PVAt (td, wd) (tp, wp) (tc, wc)
                                      Dependency graph

                                      Realization of the domino and order formulas #

                                      theorem DescriptiveComplexity.HaltPcp.realize_domF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {t : PTag} {v : Fin 1 × Fin 5A} {wd : Fin 5A} (hv : ∀ (j : Fin 5), v (0, j) = wd j) :
                                      (domF t).Realize v PDom (t, wd)
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_tupLeF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {v : Fin 2 × Fin 5A} {w w' : Fin 5A} (hv0 : ∀ (j : Fin 5), v (0, j) = w j) (hv1 : ∀ (j : Fin 5), v (1, j) = w' j) :
                                      Dependency graph
                                      theorem DescriptiveComplexity.HaltPcp.realize_leF {A : Type} [FirstOrder.Language.turing.Structure A] [LinearOrder A] {t t' : PTag} {v : Fin 2 × Fin 5A} {w w' : Fin 5A} (hv0 : ∀ (j : Fin 5), v (0, j) = w j) (hv1 : ∀ (j : Fin 5), v (1, j) = w' j) :
                                      (leF t t').Realize v PLe (t, w) (t', w')
                                      Dependency graph

                                      The reads #

                                      The interpreted structure reads as the drawn instance: each relation of Language.pcp, realized through the defining formulas, is the semantic predicate of the drawing.

                                      Dependency graph

                                      The image is a yes-instance exactly when the machine halts.

                                      Dependency graph