Documentation

DescriptiveComplexity.Problems.Machine.AltInterp

The machine of a formula, written in first-order logic #

DescriptiveComplexity.AltQbf.altAccepts_iff_qbf says that the alternating machine built in an ordered QBF instance accepts exactly when the formula is true. This file writes that machine down: an FOInterpretation of the alternating-machine vocabulary in the ordered QBF vocabulary, dimension two, tagged by DescriptiveComplexity.AltQbf.AltTag.

The shape is the one of DescriptiveComplexity.SatTM.satTuringInterp:

The block marks are new here: blk i holds of a state exactly when DescriptiveComplexity.AltQbf.altBlockOf returns i, which is a function of the tag alone, so those formulas are ⊤ or ⊥ too.

The ordered vocabulary of the source #

@[reducible, inline]

The vocabulary of ordered QBF instances.

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

    Occurring positively.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      Occurring negatively.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        Carrying the mark of the i-th block.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The ambient order.

          Equations
          Instances For
            Dependency graph

            The formula builders #

            Dependency graph
            Dependency graph
            Dependency graph
            def DescriptiveComplexity.AltQbf.blkF {k : ℕ} {α : Type} (i : Fin k) (x : α) :

            x carries the mark of the i-th block.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph
              noncomputable def DescriptiveComplexity.AltQbf.minF {k : ℕ} {α : Type} (x : α) :

              x is the least element.

              Equations
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.AltQbf.minClF {k : ℕ} {α : 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.AltQbf.maxClF {k : ℕ} {α : 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.AltQbf.nextClF {k : ℕ} {α : 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
                      def DescriptiveComplexity.AltQbf.litF {k : ℕ} {α : Type} (v : Bool) (c x : α) :

                      The cell of x holding the value v satisfies the clause c: the literal test the check phase performs.

                      Equations
                      Instances For
                        Dependency graph

                        Realization of the builders #

                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_clF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {x : α} :
                        (clF x).Realize v ↔ QbfCl k (v x)
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_posF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {c x : α} :
                        (posF c x).Realize v ↔ QbfPos k (v c) (v x)
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_negF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {c x : α} :
                        (negF c x).Realize v ↔ QbfNeg k (v c) (v x)
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_blkF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {i : Fin k} {x : α} :
                        (blkF i x).Realize v ↔ QbfBlk i (v x)
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_ordF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {x y : α} :
                        (ordF x y).Realize v ↔ v x ≤ v y
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_eqF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {x y : α} :
                        (eqF x y).Realize v ↔ v x = v y
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_ordLtF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {x y : α} :
                        (ordLtF x y).Realize v ↔ v x < v y
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_minF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {x : α} :
                        (minF x).Realize v ↔ ∀ (a : A), v x ≤ a
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_minClF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {c : α} :
                        (minClF c).Realize v ↔ QbfMinCl k (v c)
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_maxClF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {c : α} :
                        (maxClF c).Realize v ↔ QbfMaxCl k (v c)
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_nextClF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {c c' : α} :
                        (nextClF c c').Realize v ↔ QbfNextCl k (v c) (v c')
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_noClF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} :
                        noClF.Realize v ↔ ∀ (e : A), ¬QbfCl k e
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.AltQbf.realize_litF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {v : α → A} {b : Bool} {c x : α} :
                        (litF b c x).Realize v ↔ QbfLit k (v c) (v x) b
                        Dependency graph

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

                        A side condition decided when the formula is built: the sweep indices are static, so “this is a real sweep” is a truth value, not a subformula.

                        Equations
                        Instances For
                          Dependency graph
                          @[simp]
                          theorem DescriptiveComplexity.AltQbf.realize_sideF {k : ℕ} {α A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] {p : Prop} [Decidable p] {v : α → A} :
                          (sideF α p).Realize v ↔ p
                          Dependency graph
                          noncomputable def DescriptiveComplexity.AltQbf.acstF {k : ℕ} (s t' : AltTag k) :
                          (qbfOrd k).Formula (Fin 2 × Fin 2)

                          The second argument is the constant of the tag s: the right tag, and both coordinates least.

                          Equations
                          Instances For
                            Dependency graph
                            noncomputable def DescriptiveComplexity.AltQbf.aoneF {k : ℕ} (s : AltTag k) (x : Fin 2 × Fin 2) (t' : AltTag k) :
                            (qbfOrd k).Formula (Fin 2 × Fin 2)

                            The second argument is the tag s carrying the value of x.

                            Equations
                            Instances For
                              Dependency graph

                              The block of a state, read off its tag #

                              The quantifier block of a state, as a function of its tag alone: this is what makes the block marks statically decided formulas.

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

                                The defining formulas #

                                One per symbol of FirstOrder.Language.turingAlt, each matching on the base tag of its arguments. The sweep index is static: a condition on it is sideF, and so is the block a state belongs to.

                                noncomputable def DescriptiveComplexity.AltQbf.posnF {k : ℕ} :
                                AltTag k → (qbfOrd k).Formula (Fin 1 × Fin 2)

                                Defining formula for posn.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.AltQbf.trF {k : ℕ} (cnf : Bool) :
                                  AltTag k → (qbfOrd k).Formula (Fin 1 × Fin 2)

                                  Defining formula for tr: the payload promises of DescriptiveComplexity.AltQbf.AltTr, the index conditions decided statically.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.AltQbf.startF {k : ℕ} :
                                    AltTag k → (qbfOrd k).Formula (Fin 1 × Fin 2)

                                    Defining formula for start.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Dependency graph
                                      noncomputable def DescriptiveComplexity.AltQbf.accF {k : ℕ} :
                                      AltTag k → (qbfOrd k).Formula (Fin 1 × Fin 2)

                                      Defining formula for acc: acceptance is read off the base tag alone.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        noncomputable def DescriptiveComplexity.AltQbf.blankF {k : ℕ} :
                                        AltTag k → (qbfOrd k).Formula (Fin 1 × Fin 2)

                                        Defining formula for blank.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          Dependency graph
                                          noncomputable def DescriptiveComplexity.AltQbf.rightF {k : ℕ} :
                                          AltTag k → (qbfOrd k).Formula (Fin 1 × Fin 2)

                                          Defining formula for right: a static condition on the tag.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            Dependency graph
                                            noncomputable def DescriptiveComplexity.AltQbf.inpF {k : ℕ} :
                                            AltTag k → AltTag k → (qbfOrd k).Formula (Fin 2 × Fin 2)

                                            Defining formula for inp, the initial tape.

                                            Equations
                                            • One or more equations did not get rendered due to their size.
                                            Instances For
                                              Dependency graph
                                              noncomputable def DescriptiveComplexity.AltQbf.tsrcF {k : ℕ} (cnf : Bool) :
                                              AltTag k → AltTag k → (qbfOrd k).Formula (Fin 2 × Fin 2)

                                              Defining formula for tsrc.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                Dependency graph
                                                noncomputable def DescriptiveComplexity.AltQbf.treadF {k : ℕ} :
                                                AltTag k → AltTag k → (qbfOrd k).Formula (Fin 2 × Fin 2)

                                                Defining formula for tread.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  Dependency graph
                                                  noncomputable def DescriptiveComplexity.AltQbf.tdstF {k : ℕ} (cnf : Bool) :
                                                  AltTag k → AltTag k → (qbfOrd k).Formula (Fin 2 × Fin 2)

                                                  Defining formula for tdst: the one place the instance is consulted, in the check clause, through DescriptiveComplexity.AltQbf.litF.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    Dependency graph
                                                    noncomputable def DescriptiveComplexity.AltQbf.twriteF {k : ℕ} :
                                                    AltTag k → AltTag k → (qbfOrd k).Formula (Fin 2 × Fin 2)

                                                    Defining formula for twrite.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      Dependency graph
                                                      noncomputable def DescriptiveComplexity.AltQbf.blkStF {k : ℕ} (i : Fin k) :
                                                      AltTag k → (qbfOrd k).Formula (Fin 1 × Fin 2)

                                                      Defining formula for the i-th block mark: the block of a state is a function of its tag.

                                                      Equations
                                                      Instances For
                                                        Dependency graph

                                                        The interpretation of alternating machine instances in ordered QBF instances: the machine M_φ of the formula, written down.

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

                                                          The realization lemmas #

                                                          One per symbol, each saying that its defining formula defines the corresponding predicate of DescriptiveComplexity.AltQbf.altMachine. The universe of the interpreted structure is definitionally DescriptiveComplexity.AltV k A.

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

                                                          Equations
                                                          Instances For
                                                            Dependency graph
                                                            @[simp]
                                                            theorem DescriptiveComplexity.AltQbf.altMapEquiv_apply {k : ℕ} {A : Type} (cnf : Bool) (p : AltV k A) :
                                                            (altMapEquiv cnf) p = p
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            Dependency graph
                                                            theorem DescriptiveComplexity.AltQbf.relMap_blk {k : ℕ} {A : Type} [(FirstOrder.Language.qbf k).Structure A] [LinearOrder A] (cnf : Bool) (hk : 0 < k) (j : ℕ) (p : AltV k A) :
                                                            ATMBlk j ((altMapEquiv cnf) p) ↔ AltBlkOf j p
                                                            Dependency graph

                                                            The machines agree, and the reduction #