Introduction
Unlike SAT solvers QBF solvers and their proof systems aren’t as well studied. Modern SAT solvers have converged upon CDCL style solving and all competitive solvers emit proofs in the DRAT format. Unlike SAT, QBF solvers have two proof systems, with varying strengths and weaknesses. The two proof systems are:
- Exp+Res (Universal Expansion + Resolution) implemented by the FERPModels checker.
- QRAT implemented by the QRAT-Trim checker.
Often in practice we find that the types of instances solved by these proof systems are orthogonal. While why this is the case is an interesting question in itself, this explainer will focus on the former proof system.
Principals of -Expansion
Eliminating Universal Quantifiers
A universal quantifier () demands that the formula is true for all possible assignments of . In the Boolean domain, can only be 0 (False) or 1 (True). Therefore, stating that is true is mathematically equivalent to stating that both AND are true:
By replacing the universal variable with in one copy of the formula and in another, and joining them with a logical AND (), we eliminate the universal quantifier while preserving the exact truth value of the formula. If this expanded formula results in a logical contradiction (is Unsatisfiable / UNSAT), the original QBF is false.
Annotating Variables
In a QBF, the order of quantifiers in the prefix matters. An existential variable () is allowed to “react” to the choices made by any universal variables () to its left. If we expand a formula without labeling (read: creating a fresh copy) for each existential variable, we mathematically break the formula.
Let’s look at a tiny example to see why:
Meaning: “For whatever value is, must be the opposite.”
This QBF is obviously True, if , must be 1, and if , must be 0.
If we expand this without labeling:
- Branch :
- Branch :
Combining the branches yields . This unlabeled formula is UNSAT. If we stopped here, we would incorrectly declare a perfectly true QBF to be false! By forcing to be a single, static value across both branches, we stripped the existential player of its right to react.
To address this, we must label (annotate) existential variables based on the universal variables to their left.
- In branch , becomes .
- In branch , becomes .
The expanded formula properly becomes , which is perfectly SAT.
A Complete Expansion Example
Now, let’s look at a complex False QBF with two universal variables to see how expansion and labeling work together to prove a formula is False.
Consider the following False QBF:
- Prefix:
- Clause Matrix:
Before expanding, we determine our labels based on the prefix timeline:
- comes first. It depends on nothing. It is just .
- comes after . It splits into two versions: (when ) and (when ).
- comes after both and . It splits into four versions based on : .
To prove this QBF is false, we apply the complete -expansion step by step across all four combinations of the universal variables :
- Branch : Clauses 1, 3, and 5 expand to , , and . (Clauses 2 and 4 evaluate to True and are eliminated).
- Branch : Clauses 1, 4, and 5 expand to , , and .
- Branch : Clauses 2, 3, and 5 expand to , , and .
- Branch : Clauses 2, 4, and 5 expand to , , and .
Combining these branches creates a fully expanded formula. Evaluating this formula step by step proves it is mathematically false (UNSAT). Here is the logical resolution trace visualized:
graph TD C1("$$(\neg e_5^{00})$$") C2("($$\neg e_3^{0} ∨ e_5^{00}$$)") C3("$$(e_1 ∨ e_3^{0})$$") C4("($$¬e_5^{11})$$") C5("($$¬e_3^{1} ∨ e_5^{11})$$") C6("$$(¬e_1 ∨ e_3^{1})$$") R1("($$¬e_3^{0}$$)") R2("($$e_1$$)") R3("($$¬e_3^{1}$$)") R4("($$¬e_1$$)") Bot("$$⊥$$") C1 --> R1 C2 --> R1 R1 --> R2 C3 --> R2 C4 --> R3 C5 --> R3 R3 --> R4 C6 --> R4 R2 --> Bot R4 --> Bot classDef axiom fill:#f3f4f6,stroke:#4b5563,stroke-width:2px,color:#111827; classDef derived fill:#e0e7ff,stroke:#4338ca,stroke-width:2px,color:#111827; classDef bot fill:#fee2e2,stroke:#b91c1c,stroke-width:3px,color:#111827; class C1,C2,C3,C4,C5,C6 axiom; class R1,R2,R3,R4 derived; class Bot bot;
Partial Expansion
If we were to do a Complete Expansion, we would evaluate the matrix for all combinations of : (0,0), (0,1), (1,0), and (1,1).
This would duplicate the 5 clauses across 4 branches, resulting in a massive, unwieldy formula. Competitive QBF solvers based on this proof system don’t generate the complete expansion; they look for a Partial Expansion ()—a small subset of the expanded clauses. As long as this small subset contradicts itself (is UNSAT), the entire QBF is proven false.
If you look back at the resolution diagram, you’ll notice it only starts with 6 axioms at the top. We didn’t need all four branches to find a contradiction. The only expansions required were: and .
Proof Pipeline
Before we can check a proof, we have to generate it. The input to our pipeline is a QBF (written in standard QDIMACS format) that claims to be False. Our goal is to generate a unified file (written in the FERP format) that documents exactly why it’s False.
Here is what the proof generation pipeline looks like:
graph LR A[QDIMACS file] --> B(Ijtihad) B --> C[Partial ∀-Expansion DIMACS + Mappings] C --> D(PicoSAT) D --> E[Resolution Trace] C --> F(ToFerp) E --> F F --> G[FERP Proof File] classDef tool fill:#e1f5fe,stroke:#01579b,stroke-width:2px; classDef file fill:#f9fbe7,stroke:#827717,stroke-width:2px; class B,D,F tool; class A,C,E,G file;
Expansion Mappings
Standard SAT solvers read the DIMACS format, which only accepts variables as integers (e.g., 1, 2, 3). DIMACS does not support annotated variables like .
When the QBF solver outputs the partial expansion to the SAT solver, it maps our annotated variables to plain integers:
- 1
- 2
- 3
- 4
- 5
To allow the FerpCheck tool to verify the proof later, the solver embeds mapping comments directly into the FERP proof file. The syntax is c x [FERP_ID] 0 [QBF_ID] 0 [UNIVERSAL_ASSIGNMENTS] 0.
c x 1 0 1 0 0
c x 2 0 3 0 -2 0
c x 3 0 5 0 -2 -4 0
c x 4 0 3 0 2 0
c x 5 0 5 0 2 4 0
How to read these mappings:
x 1 0 1 0 0: FERP variable 1 maps to QBF variable , with no conditions.
x 3 0 5 0 -2 -4 0: FERP variable 3 maps to QBF variable , under the conditions that is false (-2) and is false (-4). This is exactly our variable!
x 5 0 5 0 2 4 0: FERP variable 5 maps to QBF variable , under the conditions is true (2) and is true (4). This is our variable.
The ToFerp tool packages these mappings alongside the SAT solver’s resolution steps into a single file. The proof checker (FerpCheck) can then read this file, reconstruct the exact mathematical logic of the partial expansion, and verify every step back to the original QBF—proving beyond a shadow of a doubt that the formula is false. Additionally, once verified, these FERP proofs can be used to synthesize Herbrand functions (representing winning strategies for the universal player) that witness the unsatisfiability of the QBF.