Documentation

DescriptiveComplexity.Problems.Qbf

QBF: quantified Boolean formulas with bounded alternation #

Umbrella file for the problems DescriptiveComplexity.QBF k – quantified Boolean formulas with k alternating blocks of propositional quantifiers – the canonical complete problems for the levels of the polynomial hierarchy (Stockmeyer 1976; Wrathall 1976).

The parity of k #

The matrix of DescriptiveComplexity.QBF k is conjunctive for odd k and disjunctive for even k. This is forced, and is the standard form of the Σₖᵖ-complete quantified Boolean formula problems. The hardness proof encodes the first-order kernel of a second-order definition by the Tseitin translation (Tseitin 1968) of DescriptiveComplexity.Problems.Sat.Tseitin, which introduces auxiliary gate variables. Those are functionally determined by the block variables, so ∃ gates, CNF(atoms, gates) ↔ φ(atoms), and the gate quantifier can be absorbed into the innermost quantifier of the prefix only when that quantifier is existential – otherwise the universal player falsifies a gate clause and the instance collapses. For a prefix starting existentially the innermost quantifier is existential exactly when k is odd; at even k one uses the dual, disjunctive matrix, for which DescriptiveComplexity.dnfSat_iff_not_cnfSatWith_true turns the innermost universal quantifier back into an existential one over the gates.

Both halves are complete, for both families: DescriptiveComplexity.QBF_complete states that QBF (k + 1) is Σₖ₊₁ᵖ-complete and DescriptiveComplexity.QBFPi_complete that QBFPi (k + 1) is Πₖ₊₁ᵖ-complete, for every k. The two use the same reduction, DescriptiveComplexity.qbfReduction, which is parameterized by the starting polarity; only the parity of the matrix flips with it. At k = 0 they specialize to NP- and coNP-completeness (DescriptiveComplexity.QBF_one_NP_complete, DescriptiveComplexity.QBFPi_one_coNP_complete). Like the rest of the library the development is axiom-free: #print axioms reports only propext, Classical.choice and Quot.sound.

theorem DescriptiveComplexity.qbf_mem_sigmaP (k : ) :
(SigmaP (k + 1)).Mem (QBF (k + 1))

QBF with k + 1 blocks is in Σₖ₊₁ᵖ: the k + 1 truth assignments are guessed as monadic second-order relations, and the matrix is evaluated by a first-order kernel.

Dependency graph
theorem DescriptiveComplexity.qbfPi_mem_piP (k : ) :
(PiP (k + 1)).Mem (QBFPi (k + 1))

QBF with a universal outermost block and k + 1 blocks is in Πₖ₊₁ᵖ.

Dependency graph
theorem DescriptiveComplexity.qbfProblem_mem_sigmaP (k : ) (cnf : Bool) :
(SigmaP (k + 1)).Mem (QbfProblem (k + 1) true cnf)

Both matrix shapes stay inside the level: the shape only matters for hardness.

Dependency graph
theorem DescriptiveComplexity.qbfProblem_mem_piP (k : ) (cnf : Bool) :
(PiP (k + 1)).Mem (QbfProblem (k + 1) false cnf)

Dually for a universal outermost block.

Dependency graph

QBF with k + 1 alternating blocks is Σₖ₊₁ᵖ-complete. Membership is DescriptiveComplexity.qbf_mem_sigmaP – guess the k + 1 truth assignments as monadic second-order relations and evaluate the matrix first-order. Hardness is DescriptiveComplexity.qbf_hard_of_sigmaSODefinable, the marked Tseitin discharge.

Dependency graph
theorem DescriptiveComplexity.qbf_hard (k : ) :
(SigmaP (k + 1)).Hard (QBF (k + 1))

QBF is Σₖ₊₁ᵖ-hard.

Dependency graph

The dual family is Πₖ₊₁ᵖ-complete: QBFPi (k + 1), with a universal outermost block, is complete for Πₖ₊₁ᵖ. Membership is DescriptiveComplexity.qbfPi_mem_piP; hardness is DescriptiveComplexity.qbfPi_hard_of_piSODefinable, the same marked Tseitin discharge at the other starting polarity.

Dependency graph
theorem DescriptiveComplexity.qbfPi_hard (k : ) :
(PiP (k + 1)).Hard (QBFPi (k + 1))

QBFPi is Πₖ₊₁ᵖ-hard.

Dependency graph

QBF with one universal block is coNP-complete.

Dependency graph

QBF with one block and a conjunctive matrix is NP-complete – it is essentially SAT with all variables marked.

Dependency graph

QBF with one block is in NP.

Dependency graph