Documentation

DescriptiveComplexity.Problems.Qsat.Membership

QSAT is in PSPACE #

The membership half: the truth of a fully quantified Boolean formula is SO(TC) definable, hence in DescriptiveComplexity.PSPACE.

The walk is the classical depth-first evaluation of the game tree, which is where the polynomial space of PSPACE is spent: the stack is a set of variables, and a set is one monadic relation variable. Four relation variables make up a state:

No accumulator is needed, and that is what keeps the transition sentence short: the evaluation short-circuits. Having returned the value v of the first branch of a variable x, the walk pops x immediately when v already settles the node (v true at an existential x, v false at a universal one) and otherwise plays the second branch, whose value is then the value of the node. So a value is never combined with a remembered one, and each of the four transitions merely edits the state (DescriptiveComplexity.qsSpec_step_iff).

Why the walk computes the game value #

The transition relation is deterministic (DescriptiveComplexity.qsSpec_step_unique), and the run started at a position (D, τ) in descending mode comes back to D in returning mode carrying exactly QsatWins D τ (DescriptiveComplexity.qsSpec_run, by induction on the number of variables outside D). Determinism turns that into an equivalence: the returning state at D = ∅ is a dead end, and two dead ends reachable from one state coincide, so a walk accepting the specification has to be the run.

Well-formedness is checked by the source sentence, so a malformed instance – where the prefix order is not a linear order on the variables, and neither the next nor the last variable of a position need exist – has no starting state at all.

Generic sentence shapes #

Each shape is built over an arbitrary vocabulary and an arbitrary variable type, so that the same builder and the same realization lemma serve the current copy of the block, the next one, and the nesting inside a quantifier.

A relation variable of arity 0 read as a formula: a propositional bit.

Equations
Instances For
    Dependency graph
    Dependency graph
    Dependency graph
    noncomputable def DescriptiveComplexity.leastF {L' : FirstOrder.Language} {γ : Type} (mark d : L'.Relations 1) (prec : L'.Relations 2) (x : L'.Term γ) :
    L'.Formula γ

    x is marked, lies outside d, and no marked element outside d precedes it”: the element a position plays next.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph
      Dependency graph
      noncomputable def DescriptiveComplexity.greatestF {L' : FirstOrder.Language} {γ : Type} (mark d : L'.Relations 1) (prec : L'.Relations 2) (x : L'.Term γ) :
      L'.Formula γ

      x is marked, lies inside d, and precedes no marked element of d”: the element a position returns to.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        Dependency graph
        noncomputable def DescriptiveComplexity.coveredF {L' : FirstOrder.Language} {γ : Type} (mark d : L'.Relations 1) :
        L'.Formula γ

        “Every marked element lies in d”: the position is a leaf.

        Equations
        Instances For
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          noncomputable def DescriptiveComplexity.matrixF {L' : FirstOrder.Language} {γ : Type} (cl mark : L'.Relations 1) (pos neg : L'.Relations 2) (t : L'.Relations 1) :
          L'.Formula γ

          The matrix: every clause holds a literal on a marked element that t makes true.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph
            Dependency graph
            def DescriptiveComplexity.sameF {L' : FirstOrder.Language} {γ : Type} (a' a : L'.Relations 1) (y : L'.Term γ) :
            L'.Formula γ

            a' holds of y exactly when a does”: an unchanged component.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              def DescriptiveComplexity.updF {L' : FirstOrder.Language} {γ : Type} (a' a : L'.Relations 1) (φ : L'.Formula γ) (x y : L'.Term γ) :
              L'.Formula γ

              a' is a with the value of x set to φ”: the one update shape the walk needs – adding x (φ = ⊤) and removing it (φ = ⊥).

              Equations
              Instances For
                Dependency graph
                Dependency graph

                Well-formedness #

                The prefix order is a strict linear order on the marked elements.

                noncomputable def DescriptiveComplexity.wfMarkedF {L' : FirstOrder.Language} {γ : Type} (mark : L'.Relations 1) (prec : L'.Relations 2) :
                L'.Formula γ

                The prefix order only relates marked elements.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Dependency graph
                  noncomputable def DescriptiveComplexity.wfIrreflF {L' : FirstOrder.Language} {γ : Type} (prec : L'.Relations 2) :
                  L'.Formula γ

                  The prefix order is irreflexive.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    Dependency graph
                    noncomputable def DescriptiveComplexity.wfTransF {L' : FirstOrder.Language} {γ : Type} (prec : L'.Relations 2) :
                    L'.Formula γ

                    The prefix order is transitive.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Dependency graph
                      noncomputable def DescriptiveComplexity.wfTotalF {L' : FirstOrder.Language} {γ : Type} (mark : L'.Relations 1) (prec : L'.Relations 2) :
                      L'.Formula γ

                      The prefix order is total on the marked elements.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Dependency graph
                        noncomputable def DescriptiveComplexity.wfF {L' : FirstOrder.Language} {γ : Type} (mark : L'.Relations 1) (prec : L'.Relations 2) :
                        L'.Formula γ

                        The instance is well formed: the prefix order is a strict linear order on the marked elements.

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

                          The nine conjuncts of the transition sentence #

                          One conjunct per case of the walk and per kind of component: the two unary components are edited under a ∀ x y, the two bits under a ∀ x. All are built over an arbitrary vocabulary, with the current copy of the block (d, t, u, r) and the next one (d', t', u', r') as parameters.

                          def DescriptiveComplexity.popF {L' : FirstOrder.Language} (allv t : L'.Relations 1) (r : L'.Relations 0) {γ : Type} (x : L'.Term γ) :
                          L'.Formula γ

                          “The subtree of x is finished”: either its second value has been played already, or the value just returned settles the node – true at an existential x, false at a universal one.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            Dependency graph
                            Dependency graph
                            noncomputable def DescriptiveComplexity.downSetS {L' : FirstOrder.Language} (mark d t d' t' : L'.Relations 1) (prec : L'.Relations 2) :

                            Descending one step: the next variable joins the quantified set with the value false.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              Dependency graph
                              Dependency graph
                              noncomputable def DescriptiveComplexity.downBitsS {L' : FirstOrder.Language} (mark d : L'.Relations 1) (prec : L'.Relations 2) (u' r' r : L'.Relations 0) :

                              Descending one step: the mode stays descending and the value is carried along.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Dependency graph
                                Dependency graph
                                noncomputable def DescriptiveComplexity.leafSetS {L' : FirstOrder.Language} (mark d t d' t' : L'.Relations 1) :

                                At a leaf the two unary components are unchanged.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Dependency graph
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.leafBitsS {L' : FirstOrder.Language} (cl mark d t : L'.Relations 1) (pos neg : L'.Relations 2) (u' r' : L'.Relations 0) :

                                  At a leaf the walk starts returning, carrying the value of the matrix.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Dependency graph
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.upExS {L' : FirstOrder.Language} (mark d : L'.Relations 1) (prec : L'.Relations 2) :

                                    Returning is only possible from a nonempty branch.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      Dependency graph
                                      noncomputable def DescriptiveComplexity.popSetS {L' : FirstOrder.Language} (mark allv d t d' t' : L'.Relations 1) (prec : L'.Relations 2) (r : L'.Relations 0) :

                                      Popping a finished variable: it leaves the quantified set, the values are unchanged.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        Dependency graph
                                        noncomputable def DescriptiveComplexity.flipSetS {L' : FirstOrder.Language} (mark allv d t d' t' : L'.Relations 1) (prec : L'.Relations 2) (r : L'.Relations 0) :

                                        Playing the second value of an unfinished variable.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          Dependency graph
                                          noncomputable def DescriptiveComplexity.popBitsS {L' : FirstOrder.Language} (mark allv d t : L'.Relations 1) (prec : L'.Relations 2) (u' r' r : L'.Relations 0) :

                                          Popping a finished variable: the walk keeps returning, with the same value.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            Dependency graph
                                            noncomputable def DescriptiveComplexity.flipBitsS {L' : FirstOrder.Language} (mark allv d t : L'.Relations 1) (prec : L'.Relations 2) (u' r' r : L'.Relations 0) :

                                            Playing the second value: the walk goes back to descending.

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

                                              The block and the vocabularies #

                                              @[reducible, inline]

                                              The block of the SO(TC) specification of QSAT: two unary relation variables – the quantified set and the values it gave – and two relation variables of arity 0, i.e. two bits – the mode and the value being returned.

                                              Equations
                                              Instances For
                                                Dependency graph

                                                The unary relation variable of index i: the quantified set at false, the valuation at true.

                                                Equations
                                                Instances For
                                                  Dependency graph

                                                  The nullary relation variable of index i: the mode at false, the value being returned at true.

                                                  Equations
                                                  Instances For
                                                    Dependency graph
                                                    @[reducible, inline]

                                                    The input vocabulary together with the order, over which the sentences of an SO(TC) specification live.

                                                    Equations
                                                    Instances For
                                                      Dependency graph
                                                      @[reducible, inline]

                                                      The vocabulary of the endpoint sentences: one copy of the block.

                                                      Equations
                                                      Instances For
                                                        Dependency graph
                                                        @[reducible, inline]

                                                        The vocabulary of the transition sentence: two copies of the block.

                                                        Equations
                                                        Instances For
                                                          Dependency graph
                                                          @[reducible, inline]

                                                          An input symbol, in the endpoint vocabulary.

                                                          Equations
                                                          Instances For
                                                            Dependency graph
                                                            @[reducible, inline]

                                                            A unary relation variable, in the endpoint vocabulary.

                                                            Equations
                                                            Instances For
                                                              Dependency graph
                                                              @[reducible, inline]

                                                              A bit of the block, in the endpoint vocabulary.

                                                              Equations
                                                              Instances For
                                                                Dependency graph
                                                                @[reducible, inline]

                                                                An input symbol, in the transition vocabulary.

                                                                Equations
                                                                Instances For
                                                                  Dependency graph
                                                                  @[reducible, inline]

                                                                  A unary relation variable of the current state.

                                                                  Equations
                                                                  Instances For
                                                                    Dependency graph
                                                                    @[reducible, inline]

                                                                    A bit of the current state.

                                                                    Equations
                                                                    Instances For
                                                                      Dependency graph
                                                                      @[reducible, inline]

                                                                      A unary relation variable of the next state.

                                                                      Equations
                                                                      Instances For
                                                                        Dependency graph
                                                                        @[reducible, inline]

                                                                        A bit of the next state.

                                                                        Equations
                                                                        Instances For
                                                                          Dependency graph

                                                                          The SO(TC) specification of QSAT: the depth-first evaluation of the game tree. Descending, the walk plays the next variable with the value false, or – at a leaf – turns round carrying the value of the matrix; returning, it pops the last variable when its subtree is settled and otherwise plays its second value.

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

                                                                            Reading the specification back #

                                                                            The unary component i of a state.

                                                                            Equations
                                                                            Instances For
                                                                              Dependency graph

                                                                              The bit i of a state.

                                                                              Equations
                                                                              Instances For
                                                                                Dependency graph
                                                                                @[reducible, inline]

                                                                                The quantified set of a state.

                                                                                Equations
                                                                                Instances For
                                                                                  Dependency graph
                                                                                  @[reducible, inline]

                                                                                  The valuation of a state.

                                                                                  Equations
                                                                                  Instances For
                                                                                    Dependency graph
                                                                                    @[reducible, inline]

                                                                                    The mode of a state: True while returning a value.

                                                                                    Equations
                                                                                    Instances For
                                                                                      Dependency graph
                                                                                      @[reducible, inline]

                                                                                      The value a state is returning.

                                                                                      Equations
                                                                                      Instances For
                                                                                        Dependency graph
                                                                                        def DescriptiveComplexity.qsLift {A : Type} (D T : AProp) (u r : Prop) :

                                                                                        The state built from its four components.

                                                                                        Equations
                                                                                        Instances For
                                                                                          Dependency graph
                                                                                          @[simp]
                                                                                          theorem DescriptiveComplexity.qsSet_qsLift {A : Type} (D T : AProp) (u r : Prop) :
                                                                                          qsSet (qsLift D T u r) = D
                                                                                          Dependency graph
                                                                                          @[simp]
                                                                                          theorem DescriptiveComplexity.qsVal_qsLift {A : Type} (D T : AProp) (u r : Prop) :
                                                                                          qsVal (qsLift D T u r) = T
                                                                                          Dependency graph
                                                                                          @[simp]
                                                                                          theorem DescriptiveComplexity.qsUp_qsLift {A : Type} (D T : AProp) (u r : Prop) :
                                                                                          qsUp (qsLift D T u r) = u
                                                                                          Dependency graph
                                                                                          @[simp]
                                                                                          theorem DescriptiveComplexity.qsRes_qsLift {A : Type} (D T : AProp) (u r : Prop) :
                                                                                          qsRes (qsLift D T u r) = r
                                                                                          Dependency graph
                                                                                          theorem DescriptiveComplexity.qsAssignment_ext {A : Type} {ρ σ : qsBlock.Assignment A} (hD : ∀ (a : A), qsSet ρ a qsSet σ a) (hT : ∀ (a : A), qsVal ρ a qsVal σ a) (hu : qsUp ρ qsUp σ) (hr : qsRes ρ qsRes σ) :
                                                                                          ρ = σ

                                                                                          A state is determined by its four components.

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

                                                                                          Splitting the connectives of a sentence #

                                                                                          Instance search does not see through a specification's block, so the propositional connectives of the three sentences are split by hand.

                                                                                          Dependency graph
                                                                                          Dependency graph
                                                                                          Dependency graph
                                                                                          Dependency graph

                                                                                          The walk, read back #

                                                                                          The last variable of a branch: the prefixLt-greatest variable of D.

                                                                                          Equations
                                                                                          Instances For
                                                                                            Dependency graph
                                                                                            theorem DescriptiveComplexity.QGreatest.unique {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] (hwf : QsatWf A) {D : AProp} {x y : A} (hx : QGreatest D x) (hy : QGreatest D y) :
                                                                                            x = y

                                                                                            The last variable of a branch is unique.

                                                                                            Dependency graph

                                                                                            The subtree of x is settled by the value r just returned: either x has been played twice already, or r is decisive for its quantifier – true at an existential x, false at a universal one.

                                                                                            Equations
                                                                                            Instances For
                                                                                              Dependency graph
                                                                                              def DescriptiveComplexity.qRem {A : Type} (D : AProp) (x : A) :
                                                                                              AProp

                                                                                              Removing a variable from the quantified set.

                                                                                              Equations
                                                                                              Instances For
                                                                                                Dependency graph
                                                                                                theorem DescriptiveComplexity.qsSpec_step_iff {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] (ρ σ : qsBlock.Assignment A) :
                                                                                                qsSpec.Step ρ σ (¬qsUp ρ → ((∀ (x y : A), QLeast (qsSet ρ) x → (qsSet σ y qUpd (qsSet ρ) x true y) (qsVal σ y qUpd (qsVal ρ) x false y)) ∀ (x : A), QLeast (qsSet ρ) x¬qsUp σ (qsRes σ qsRes ρ)) ((∀ (z : A), IsQVar zqsSet ρ z)∀ (y : A), (qsSet σ y qsSet ρ y) (qsVal σ y qsVal ρ y)) ((∀ (z : A), IsQVar zqsSet ρ z)qsUp σ (qsRes σ QsatMatrix (qsVal ρ)))) (qsUp ρ(∃ (x : A), QGreatest (qsSet ρ) x) ((∀ (x y : A), QGreatest (qsSet ρ) xQPop (qsVal ρ) (qsRes ρ) x → (qsSet σ y qRem (qsSet ρ) x y) (qsVal σ y qsVal ρ y)) ∀ (x : A), QGreatest (qsSet ρ) xQPop (qsVal ρ) (qsRes ρ) xqsUp σ (qsRes σ qsRes ρ)) (∀ (x y : A), QGreatest (qsSet ρ) x¬QPop (qsVal ρ) (qsRes ρ) x → (qsSet σ y qsSet ρ y) (qsVal σ y qUpd (qsVal ρ) x true y)) ∀ (x : A), QGreatest (qsSet ρ) x¬QPop (qsVal ρ) (qsRes ρ) x¬qsUp σ (qsRes σ qsRes ρ))

                                                                                                The transition of the walk, read back: descending, either the next variable is played with the value false or the leaf is evaluated; returning, the last variable of the branch is popped or played a second time.

                                                                                                Dependency graph
                                                                                                Dependency graph

                                                                                                The starting states: a well-formed instance at the initial position – nothing quantified, about to descend.

                                                                                                Dependency graph

                                                                                                The accepting states: back at the initial position, returning the value true.

                                                                                                Dependency graph

                                                                                                The walk is the depth-first evaluation #

                                                                                                theorem DescriptiveComplexity.qUpd_true_eq_qAdd {A : Type} (D : AProp) (x : A) :
                                                                                                qUpd D x true = qAdd D x

                                                                                                Setting a variable to true is adding it.

                                                                                                Dependency graph
                                                                                                theorem DescriptiveComplexity.qUpd_false_eq_qRem {A : Type} (D : AProp) (x : A) :
                                                                                                qUpd D x false = qRem D x

                                                                                                Setting a variable to false is removing it.

                                                                                                Dependency graph
                                                                                                theorem DescriptiveComplexity.qsLift_congr {A : Type} {D D' T T' : AProp} {u u' r r' : Prop} (hD : ∀ (y : A), D y D' y) (hT : ∀ (y : A), T y T' y) (hu : u u') (hr : r r') :
                                                                                                qsLift D T u r = qsLift D' T' u' r'
                                                                                                Dependency graph

                                                                                                The quantified set of a position is downward closed for the prefix order: the variables already played are an initial segment.

                                                                                                Equations
                                                                                                Instances For
                                                                                                  Dependency graph
                                                                                                  Dependency graph
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.QLeast.qGreatest_qAdd {A : Type} [FirstOrder.Language.qsat.Structure A] (hwf : QsatWf A) {D : AProp} {x : A} (hx : QLeast D x) (hD : QDownClosed D) :
                                                                                                  QGreatest (qAdd D x) x

                                                                                                  The variable just played is the last one of the branch.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.QLeast.qRem_qAdd {A : Type} [FirstOrder.Language.qsat.Structure A] {D : AProp} {x : A} (hx : QLeast D x) :
                                                                                                  qRem (qAdd D x) x = D

                                                                                                  Popping the variable just played returns to the position before it.

                                                                                                  Dependency graph

                                                                                                  The four transitions #

                                                                                                  theorem DescriptiveComplexity.qsStep_leaf {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {D τ : AProp} (hcov : ∀ (z : A), IsQVar zD z) (r : Prop) :
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.qsStep_push {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] (hwf : QsatWf A) {D τ : AProp} {x : A} (hx : QLeast D x) (r : Prop) :
                                                                                                  qsSpec.Step (qsLift D τ False r) (qsLift (qAdd D x) (qUpd τ x false) False r)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.qsStep_pop {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] (hwf : QsatWf A) {D τ : AProp} {x : A} {v : Prop} (hx : QGreatest D x) (hp : QPop τ v x) :
                                                                                                  qsSpec.Step (qsLift D τ True v) (qsLift (qRem D x) τ True v)
                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.qsStep_flip {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] (hwf : QsatWf A) {D τ : AProp} {x : A} {v : Prop} (hx : QGreatest D x) (hp : ¬QPop τ v x) :
                                                                                                  qsSpec.Step (qsLift D τ True v) (qsLift D (qUpd τ x true) False v)
                                                                                                  Dependency graph

                                                                                                  The next and the last variable exist #

                                                                                                  theorem DescriptiveComplexity.exists_qLeast {A : Type} [FirstOrder.Language.qsat.Structure A] [Finite A] (hwf : QsatWf A) {D : AProp} (h : ∃ (z : A), IsQVar z ¬D z) :
                                                                                                  ∃ (x : A), QLeast D x

                                                                                                  On a finite well-formed instance a position that is not a leaf has a next variable.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.exists_qGreatest {A : Type} [FirstOrder.Language.qsat.Structure A] [Finite A] (hwf : QsatWf A) {D : AProp} (h : ∃ (z : A), IsQVar z D z) :
                                                                                                  ∃ (x : A), QGreatest D x

                                                                                                  On a finite well-formed instance a nonempty branch has a last variable.

                                                                                                  Dependency graph

                                                                                                  The walk is deterministic #

                                                                                                  theorem DescriptiveComplexity.qsSpec_step_unique {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] [Finite A] (hwf : QsatWf A) {ρ σ σ' : qsBlock.Assignment A} (h : qsSpec.Step ρ σ) (h' : qsSpec.Step ρ σ') :
                                                                                                  σ = σ'

                                                                                                  The transition relation is functional: every state has at most one successor, which is what turns the run of the walk into the only walk there is.

                                                                                                  Dependency graph
                                                                                                  theorem DescriptiveComplexity.qsSpec_no_step_of_empty {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] {ρ σ : qsBlock.Assignment A} (hempty : ∀ (y : A), ¬qsSet ρ y) (hup : qsUp ρ) :

                                                                                                  A state returning a value at the empty branch is a dead end: the walk is over.

                                                                                                  Dependency graph

                                                                                                  The run of the walk #

                                                                                                  theorem DescriptiveComplexity.qsSpec_run {A : Type} [FirstOrder.Language.qsat.Structure A] [LinearOrder A] [Finite A] (hwf : QsatWf A) (n : ) (D τ : AProp) :
                                                                                                  QDownClosed D{y : A | IsQVar y ¬D y}.ncard n∀ (r : Prop), ∃ (τ' : AProp), (∀ (y : A), D y → (τ' y τ y)) qsSpec.Reach (qsLift D τ False r) (qsLift D τ' True (QsatWins D τ))

                                                                                                  The run of the walk computes the game value: started at the position (D, τ) in descending mode, the walk comes back to D in returning mode carrying QsatWins D τ, having changed nothing on D.

                                                                                                  Dependency graph

                                                                                                  Correctness of the specification #

                                                                                                  The specification is correct: the walk accepts an instance exactly when the quantified formula it describes is true.

                                                                                                  Dependency graph

                                                                                                  QSAT is SO(TC) definable: the walk is the depth-first evaluation of the game tree, whose stack is the set of variables already played.

                                                                                                  Dependency graph
                                                                                                  Dependency graph