Hardness of QBF #
The hardness half of the completeness of DescriptiveComplexity.QBF: every problem
definable by a second-order sentence with k + 1 alternating blocks admits an
ordered first-order reduction to DescriptiveComplexity.QBF (k + 1)
(DescriptiveComplexity.qbf_hard_of_sigmaSODefinable). This is the Cook–Levin discharge
of
DescriptiveComplexity.Problems.Sat.Hardness with block marks added.
The quantifier prefix of a second-order definition is merged into a single
block (DescriptiveComplexity.SecondOrderMerge), the Tseitin translation
(Tseitin 1968) of the resulting first-order kernel is
interpreted inside an ordered input structure exactly as for SAT
(DescriptiveComplexity.qbfTseitinInterp), and each propositional variable is marked
with the quantifier block it belongs to: an atom variable with the block its
relation variable comes from, and every gate variable with the innermost
block.
Gate variables can only be marked innermost, and only work out when the
innermost quantifier is existential – they are functionally determined by the
atoms, so ∃ gates, CNF ↔ φ, whereas a universal player could falsify a gate
clause. With an existential outermost block the innermost quantifier is
existential exactly when k is odd, which is why the literal signs of the
interpretation are swapped (the parameter sw), and the kernel negated, when
k is even: the disjunctive matrix of DescriptiveComplexity.QBF k at even k is, by
DescriptiveComplexity.dnfSat_iff_not_cnfSatWith_true, the negation of a conjunctive
matrix with all signs swapped, and that negation turns the innermost universal
quantifier back into an existential one over the gates. The swap is arranged
so that the parity disappears from the correctness proof: whichever of
posIn/negIn a satisfied clause must make true always carries the positive
Tseitin literals (DescriptiveComplexity.qbfT_lit_pos).
The key correctness statement is DescriptiveComplexity.qbfT_clauses_iff, the
∃-free form of DescriptiveComplexity.tseitin_satisfiable_iff: with the truth
assignment given – as the quantifier prefix of a QBF supplies it, rather
than existentially quantified as for SAT – the clauses of the encoding hold
exactly when the induced valuation satisfies every Tseitin gate and makes the
root variable true.
The discharge itself is DescriptiveComplexity.qbf_hard_of_sigmaSODefinable; together
with the membership half of DescriptiveComplexity.Problems.Qbf.Membership it gives the
completeness theorem DescriptiveComplexity.QBF_complete.
The block of Tseitin gate variables: one relation variable per subformula
position of the kernel, of the interpretation's dimension. Reducible, so that
(gateBlock M ψ).ι unfolds to the type of subformula positions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The Tseitin interpretation with block marks: the CNF instance of the
encoding of ψ, with each propositional variable marked by the quantifier
block it belongs to. The signs of the literals are swapped when sw is
true, i.e. when the innermost quantifier of the prefix is universal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Characterization of the interpreted relations #
Dependency graph
Dependency graph
Dependency graph
The literals of the interpretation are those of the Tseitin encoding, with
the signs swapped when sw is true.
Dependency graph
A variable is marked by exactly the block it belongs to; clause elements are marked by no block at all.
Dependency graph
The literal that a satisfied clause needs to make true: whichever of
posIn/negIn carries the positive Tseitin literals.
Dependency graph
The literal that a satisfied clause needs to make false.
Dependency graph
Correctness at a fixed valuation #
The Tseitin correctness proof of DescriptiveComplexity.Problems.Sat.Hardness is stated
with the truth assignment existentially quantified. Here the assignment is
given, since the quantifier prefix of the QBF supplies it: the clauses of
the encoding hold under val exactly when the induced valuation satisfies
every gate and makes the root true.
Correctness of the interpretation at a fixed valuation.
Dependency graph
The reduction #
Padding a tuple that already has the interpretation's dimension does nothing.
Dependency graph
Reindexing an alternating quantification along an equality of lengths.
Dependency graph
Whether the innermost quantifier of an existentially-starting prefix with
Bs.length + 1 blocks is universal – equivalently, whether Bs.length + 1 is
even. The Tseitin gates can only be absorbed by an existential quantifier, so
this is the flag that decides both the shape of the matrix and whether the
kernel gets negated.
Equations
Instances For
Dependency graph
The sentence that is actually Tseitin-encoded: the merged kernel, negated when the innermost quantifier is universal.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The block of gate variables of the encoding.
Equations
- DescriptiveComplexity.qbfGt st B Bs φ = DescriptiveComplexity.gateBlock (DescriptiveComplexity.mergeBlocks (B :: Bs)) (DescriptiveComplexity.qbfEnc st B Bs φ)
Instances For
Dependency graph
The block marks of the interpreted instance: a relation variable is marked by the block it comes from, a gate variable by the innermost block.
Equations
- DescriptiveComplexity.qbfMk st B Bs φ vt = Fin.cast ⋯ (DescriptiveComplexity.markC (DescriptiveComplexity.qbfGt st B Bs φ) B Bs vt)
Instances For
Dependency graph
The interpretation of the reduction: the Tseitin encoding of the merged
kernel, with block marks. Reducible, so that the characterizations of
DescriptiveComplexity.qbfTseitinInterp apply to it directly.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The swap flag is the parity of the number of blocks: with an existential
outermost block, the matrix of DescriptiveComplexity.QBF k is disjunctive exactly when
a swap is needed.
Dependency graph
Dually, with a universal outermost block.
Dependency graph
Realization of a sentence in the expansion by an assignment is
DescriptiveComplexity.Tseitin.RealizeWith.
Dependency graph
The gates are functionally determined: some gate valuation satisfies every gate, so quantifying them existentially adds nothing.
Dependency graph
The reading of the interpreted instance: each propositional variable is read at its canonically padded tuple.
Equations
- DescriptiveComplexity.qbfRd st B Bs φ a₀ i ν a = ν (Sum.inr (DescriptiveComplexity.splitIdx (DescriptiveComplexity.qbfGt st B Bs φ) B Bs i), DescriptiveComplexity.pad a₀ a)
Instances For
Dependency graph
The innermost quantifier absorbs the gates: quantifying the gate block
with the innermost polarity, over the Tseitin condition, is exactly the truth
of the merged kernel. When the innermost quantifier is existential this is
DescriptiveComplexity.exists_gates; when it is universal it is the same fact under the
negation that the swapped encoding introduces.
Dependency graph
Correctness of the reduction: the interpreted quantified Boolean formula is true exactly when the second-order sentence holds.
Dependency graph
The generic marked Tseitin reduction: an ordered first-order reduction to a quantified Boolean formula problem, from any problem defined on nonempty finite structures by a second-order sentence with a nonempty prefix.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Hardness #
Hardness of QBF: every problem definable by a second-order sentence
with k + 1 alternating blocks starting existentially admits an ordered
first-order reduction to DescriptiveComplexity.QBF (k + 1).
This is the Cook–Levin discharge one level up: the quantifier prefix is merged
into a single block, its first-order kernel is Tseitin-translated into a CNF
instance inside an ordered input structure, and the propositional variables
are marked with the block they belong to – the gate variables with the
innermost one, which is why the matrix and the encoded sentence follow the
parity of k + 1.
Dependency graph
Hardness of the dual: every problem definable by a second-order
sentence with k + 1 alternating blocks starting universally admits an
ordered first-order reduction to DescriptiveComplexity.QBFPi (k + 1).
This is the same construction at the other starting polarity. The parity of
the matrix flips with it: the innermost quantifier of a universally-starting
prefix of k + 1 blocks is existential exactly when k + 1 is even, so
QBFPi k takes a conjunctive matrix for even k and a disjunctive one for
odd k – the mirror image of DescriptiveComplexity.QBF.