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 #
Cslib.Complexity.TQBF.tokensDecoder: the total decoder of token lists.Cslib.Complexity.TQBF.wellFormed: whether a token list is the token list of a formula.Cslib.Complexity.TQBF.isCode,Cslib.Complexity.TQBF.decodeQBF: whether a word encodes a formula, and the formula it encodes,botfor other words.
Main results #
Cslib.Complexity.TQBF.wellFormed_iff,Cslib.Complexity.TQBF.isCode_iff: the tests are correct.Cslib.Complexity.TQBF.isCode_pt,Cslib.Complexity.TQBF.decodeQBF_pt: they are polynomial-time.Cslib.Complexity.image_TQBF_mem_PSPACE,Cslib.Complexity.image_TQBF_pspaceHard,Cslib.Complexity.image_TQBF_pspaceComplete: the words ofTQBFarePSPACE-complete.
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
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
Whether a word encodes a formula is decidable in polynomial time.
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.