Documentation

DescriptiveComplexity.Problems.Machine.QsatInterp

The transcription: QSAT ≤ᶠᵒ[≤] DTMAcceptSpace #

The first-order half of the reduction. The machine of a quantified Boolean formula was built semantically in DescriptiveComplexity.Problems.Machine.QsatProgram, and its correctness DescriptiveComplexity.QsatTM.qsatMachine_correct proved in DescriptiveComplexity.Problems.Machine.QsatRun. This file writes the defining formulas of an interpretation of Language.turing in ordered QSAT instances and shows each realizes exactly the corresponding predicate of the machine.

Method #

The method is that of DescriptiveComplexity.Problems.Machine.Interp, one level up: the elements of the machine have only two shapes, qCst s and qOne s x, so the binary symbols get one shape helper each (DescriptiveComplexity.QsatTM.qCstF, DescriptiveComplexity.QsatTM.qOneF) with one realization lemma, and every defining formula then matches on its first tag alone. Comparisons of tags – which are static data – are decided in Lean rather than in the formula, so and do most of the work.

@[reducible, inline]

The vocabulary the reduction reads: quantified CNF instances with the ambient order.

Equations
Instances For
    Dependency graph

    The symbols of the ordered expansion #

    @[reducible, inline]

    The symbol for “is a quantified variable”.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The symbol for “is universally quantified”.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The symbol for the quantifier prefix.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The symbol for “is a clause”.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The symbol for a positive occurrence.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]

              The symbol for a negative occurrence.

              Equations
              Instances For
                Dependency graph
                Dependency graph

                The builders #

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

                x is the least element of the ambient order.

                Equations
                Instances For
                  Dependency graph

                  The tape order on elements: quantified variables first in prefix order, everything else after them in the ambient order.

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

                    c is the lowest clause.

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

                      c is the highest clause.

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

                        c' is the clause immediately above c.

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

                          The cell of x, holding the value b, satisfies the clause c.

                          Equations
                          Instances For
                            Dependency graph
                            Dependency graph

                            Well-formedness of the instance, as a sentence with unused free variables.

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

                              Realization of the builders #

                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_vF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x : α} :
                              (vF x).Realize v IsQVar (v x)
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_aF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x : α} :
                              (aF x).Realize v IsQAll (v x)
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_precF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x y : α} :
                              (precF x y).Realize v QPrec (v x) (v y)
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_clF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x : α} :
                              (clF x).Realize v QCl (v x)
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_posF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {c x : α} :
                              (posF c x).Realize v QPosIn (v c) (v x)
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_negF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {c x : α} :
                              (negF c x).Realize v QNegIn (v c) (v x)
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_ordF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x y : α} :
                              (ordF x y).Realize v v x v y
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_eqF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x y : α} :
                              (eqF x y).Realize v v x = v y
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_ordLtF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x y : α} :
                              (ordLtF x y).Realize v v x < v y
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_minF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x : α} :
                              (minF x).Realize v ∀ (a : A), v x a
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_pLeF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x y : α} :
                              (pLeF x y).Realize v PLe (v x) (v y)
                              Dependency graph
                              Dependency graph
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_nextClF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {x y : α} :
                              (nextClF x y).Realize v QNextCl (v x) (v y)
                              Dependency graph
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_litF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {b : Bool} {c x : α} :
                              (litF b c x).Realize v QLit (v c) (v x) b
                              Dependency graph
                              @[simp]
                              theorem DescriptiveComplexity.QsatTM.realize_shortF {α A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {v : αA} {b : Bool} {x : α} :
                              (shortF b x).Realize v QShort b (v x)
                              Dependency graph
                              Dependency graph

                              The two shapes of the machine's elements, as formulas #

                              noncomputable def DescriptiveComplexity.QsatTM.qCstF (s t' : QTag) :

                              The second argument of a binary symbol is the constant qCst s.

                              Equations
                              Instances For
                                Dependency graph
                                noncomputable def DescriptiveComplexity.QsatTM.qOneF (s : QTag) (x : Fin 2 × Fin 2) (t' : QTag) :

                                The second argument of a binary symbol is qOne s (v x).

                                Equations
                                Instances For
                                  Dependency graph
                                  theorem DescriptiveComplexity.QsatTM.realize_qCstF {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 2 × Fin 2A} {s : QTag} {q : QV A} (h0 : v (1, 0) = q.2 0) (h1 : v (1, 1) = q.2 1) :
                                  (qCstF s q.1).Realize v q = qCst s
                                  Dependency graph
                                  theorem DescriptiveComplexity.QsatTM.realize_qOneF {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 2 × Fin 2A} {s : QTag} {x : Fin 2 × Fin 2} {q : QV A} (h0 : v (1, 0) = q.2 0) (h1 : v (1, 1) = q.2 1) :
                                  (qOneF s x q.1).Realize v q = qOne s (v x)
                                  Dependency graph

                                  The defining formulas #

                                  Dependency graph

                                  Defining formula for tr: the payload promises of DescriptiveComplexity.QsatTM.QTr.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    Dependency graph

                                    Defining formula for acc: the accepting state, guarded by well-formedness of the instance.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      Dependency graph
                                      Dependency graph

                                      Defining formula for le: the tag indices are static, so only the same-tag case needs a formula.

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

                                        Defining formula for tsrc.

                                        Equations
                                        Instances For
                                          Dependency graph

                                          Defining formula for tread.

                                          Equations
                                          Instances For
                                            Dependency graph

                                            Defining formula for tdst: the only place the instance is consulted is the evaluation sweep, where the new flag depends on the literal test.

                                            Equations
                                            Instances For
                                              Dependency graph

                                              Defining formula for twrite.

                                              Equations
                                              Instances For
                                                Dependency graph

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

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

                                                  Each formula defines its predicate #

                                                  The identity equivalence between the tagged tuples and the interpreted universe.

                                                  Equations
                                                  Instances For
                                                    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

                                                    The reduction #

                                                    Dependency graph
                                                    Dependency graph

                                                    QSAT ≤ᶠᵒ[≤] DTMAcceptSpace: the deterministic space-bounded machine that evaluates a quantified Boolean formula, built inside its instance.

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