Documentation

Complexity.Computability.Complexity.Classes.Oracle.TQBF

The words of TQBF #

TQBF is a problem on formulas. As an oracle language it is the set encQBF '' TQBF of words encoding true closed formulas, and a decider must handle every word. A word encodes a formula exactly when its framed tokens decode to the token list of a formula, which is encoded back to the word (Cslib.Complexity.TQBF.isCode_iff). Token lists are decoded by the total decoders of Turing.MultiTapeTM.Decoder, and the token lists of formulas, in prefix order, are recognized by counting the formulas still expected: a token is expected when the count is positive, consumes one expected formula and announces as many as it has operands (Cslib.Complexity.TQBF.foldl_wfStep_eq_iff). Both tests are polynomial-time (Cslib.Complexity.TQBF.isCode_pt), and a word that encodes a formula is evaluated by the polynomial-space evaluator of TQBF. Hence encQBF '' TQBF is in PSPACE (Cslib.Complexity.image_TQBF_mem_PSPACE), and, through encQBF, PSPACE-hard (Cslib.Complexity.image_TQBF_pspaceHard) Sipser, Theorem 8.9.

Main definitions #

Main results #

References #

Well-formed token lists #

The number of operands of a node of the kind.

Instances For

    Whether the token can occur in a formula: only variables and quantifiers carry a variable.

    Instances For

      A step of the well-formedness check: whether every token so far has been expected, and the number of formulas still expected.

      Instances For

        The check accepts exactly the concatenated tokens of n formulas.

        Decoding words #

        The kind of a given index, all from 7 on.

        Instances For

          Kinds are decoded from the length of the word.

          Instances For

            Whether a token list is the token list of a formula.

            Instances For

              wellFormed ts holds exactly when ts is the token list of a formula.

              Whether a word encodes a formula: it decodes to a well-formed token list that is encoded back to the word.

              Instances For

                A word passes isCode exactly when it encodes a formula.

                The formula a word encodes, or bot if it encodes none.

                Instances For

                  A word is in encQBF '' TQBF when it encodes a formula that the evaluator accepts.

                  The words encoding true closed formulas are decided within polynomial space: a word is tested for encoding a formula in polynomial time, and then evaluated.

                  The words encoding true closed formulas are PSPACE-hard, through the encoding encQBF.

                  The words encoding true closed formulas are PSPACE-complete.