The reduction to TQBF in polynomial time #
A formula is encoded by the list of its tokens in prefix order (Cslib.Complexity.encQBF), so a
formula is computed in polynomial time as soon as its tokens are
(Cslib.Complexity.TQBF.computableTidilyInPolyTime_of_tokens). The connectives of
Cslib.Logic.PL.QBF and the derived connectives of the midpoint formulas (blocks of quantifiers,
conjunctions of lists, implication, equivalence, literals, formulas in conjunctive normal form) get
composition rules for fun_prop, with their tokens written out explicitly
(Cslib.Logic.PL.QBF.tokens_exs, Cslib.Logic.PL.QBF.tokens_conj, …).
The variables of the blocks are numbered by 2 * Nat.pair (3 * i + kind) j for a level i and an
index j below the width w, so they are computed in unary, where their size is polynomial in
w, and converted to binary. The midpoint formula of level d is computed from its tokens
(Cslib.Complexity.TQBF.tokens_midpoint): the levels from d down to 1, each with O(w) tokens,
then the formula of level 0. So Savitch's formula is polynomial-time in the width and depth in
unary, the two words, and the formula of level 0
(Cslib.Complexity.TQBF.computableTidilyInPolyTime_savitchFormula).
The formula of level 0 numbers the variables of a Cook–Levin tableau by odd numbers
(Cslib.Complexity.TQBF.computableTidilyInPolyTime_tabVar), and is polynomial-time in the tableau.
Composed with the polynomial-time width and codes of the views
(Turing.MultiTapeNTM.computableTidilyInPolyTime_codeWidth) and the polynomial-time Cook–Levin
tableau (Cslib.Complexity.CookLevin.computableTidilyInPolyTime_tableau), the reduction
Cslib.Complexity.TQBF.reduce is polynomial-time, for every machine standing for the test of one
step or none and every polynomial time bound
(Cslib.Complexity.TQBF.computableTidilyInPolyTime_reduce). That test is itself polynomial-time
(Cslib.Complexity.TQBF.computableTidilyInPolyTime_edgeTest), which provides the machine.
Main results #
Cslib.Complexity.TQBF.computableTidilyInPolyTime_of_tokens: formulas from their tokens.Cslib.Complexity.TQBF.computableTidilyInPolyTime_savitchFormula: Savitch's formula is polynomial-time.Cslib.Complexity.TQBF.computableTidilyInPolyTime_baseFormula: a tableau as the formula of level0is polynomial-time.Cslib.Complexity.TQBF.computableTidilyInPolyTime_edgeTest: the test of one step or none is polynomial-time.Cslib.Complexity.TQBF.computableTidilyInPolyTime_reduce: the reduction is polynomial-time.
References #
Formulas from their tokens #
The tokens of an encoded formula, the identity on encoded values.
A formula is polynomial-time when its tokens are.
A variable, from its number in binary.
Negation.
Conjunction.
Disjunction.
A block of existential quantifiers, over a list of variables in binary.
A block of universal quantifiers, over a list of variables in binary.
The conjunction of a list of formulas.
Implication.
Equivalence.
A literal, from its variable in binary and its sign.
A formula in conjunctive normal form, from its clauses in the encoding of
Cslib.Complexity.encCNF.
The midpoint formulas #
A block variable, from its kind, level and index in unary, in binary.
The variables of a block, from the width, kind and level in unary.
The equality of two blocks.
A block holding a word.
The hypothesis of a level.
The tokens a level adds to the midpoint formula.
The midpoint formula of level d, from the width and level in unary and the formula of
level 0.
Savitch's formula is polynomial-time in the width and depth in unary, the formula of
level 0, and the two words.
The formula of level 0 #
The numbering of the tableau variables by odd numbers, in binary.
The block variable holding a certificate bit, from the width and the index in unary.
A tableau as the formula of level 0 is polynomial-time in the tableau and the width in
unary.
The reduction #
The width of the words of the reduction, in unary.
The test of one step or none between codes is polynomial-time, on the instance and the concatenation of the two codes.
The reduction to TQBF is polynomial-time, for every machine tmV standing for the test
of one step or none and every time bound cV * (n + 1) ^ dV allowed to it.