Abstract

This note describes the algorithm for synthesizing Herbrand functions (representing winning strategies for the universal player) from FERP (Forall Expansion + Resolution Proofs) certificates for false Quantified Boolean Formulas (QBFs). The extraction process operates within the refutation DAG cone in three phases: leaf labeling based on firing conditions over outermost existential variables (Phase 1), propagating these conditions up the DAG using a Shannon-expansion-based merge formula at resolution steps (Phase 2), and reading off the final boolean circuit representation at the root (Phase 3). We trace the algorithm step-by-step using a sequential two-player game example to show how the Herbrand function is constructed.

Preliminaries

We consider QBFs in prenex conjunctive normal form, where with and for , and is a propositional CNF over . We write and for the universal and existential variables of . The prefix induces a total order on variables: we say is outer to , written , whenever . For a variable we write and . We call the variables in the first existential block in the prefix the outermost existentials, denoted .

We assume is false. A set of Herbrand functions for is a set , where each

assigns a truth value to given a truth assignment to the existential variables outer to it, such that substituting for every renders unsatisfiable under every existential assignment.

Running Example. We use the following false QBF throughout:

with and . In QDIMACS, with , , , :

p cnf 4 6
e 1 0          % x (outermost existential)
a 2 3 0        % y1, y2 (universals)
e 4 0          % z (inner existential)
 1  2  3  4 0  % clause 1: (x ∨ y1 ∨ y2 ∨ z)
 1  2  3 -4 0  % clause 2: (x ∨ y1 ∨ y2 ∨ ¬z)
-1  2  3  4 0  % clause 3: (¬x ∨ y1 ∨ y2 ∨ z)
-1  2  3 -4 0  % clause 4: (¬x ∨ y1 ∨ y2 ∨ ¬z)
-1 -2 -3  4 0  % clause 5: (¬x ∨ ¬y1 ∨ ¬y2 ∨ z)
-1 -2 -3 -4 0  % clause 6: (¬x ∨ ¬y1 ∨ ¬y2 ∨ ¬z)

FERP (Forall Expansion + Resolution Proofs) certificates refute via partial universal expansion. Each x-line introduces a fresh propositional copy of some , annotated by a specific assignment recording the universal context under which was expanded. Only copies sufficient to derive a contradiction are introduced. Since has outer to it, the proof introduces two copies annotated by and respectively; carries no annotation:

x 1 0 1 0 0           % prop var 1 = x,  annotation ∅
x 2 0 4 0  2  3 0     % prop var 2 = z,  annotation {y1=⊤, y2=⊤}
x 3 0 4 0 -2 -3 0     % prop var 3 = z,  annotation {y1=⊥, y2=⊥}

Expansion lines: introduce the fresh propositional variable, the original QBF variable, and the annotation as a list of signed universal literals terminated by . Note that the universal variables themselves acquire no propositional copy; they are absorbed entirely into the annotations of the existential copies.

Axiom clauses (a-lines) are the leaves: each records a clause over propositional variables together with the index of its originating matrix clause. Expanding the six matrix clauses of over and yields six axiom clauses in the proof:

where arise from QBF clauses respectively under the universal context , and arise from clauses under :

a 1  1  3 0  1 0   % A1: (x ∨ z^{ȳ1, ȳ2}), from clause 1
a 2  1 -3 0  2 0   % A2: (x ∨ ¬z^{ȳ1, ȳ2}), from clause 2
a 3 -1  3 0  3 0   % A3: (¬x ∨ z^{ȳ1, ȳ2}), from clause 3
a 4 -1 -3 0  4 0   % A4: (¬x ∨ ¬z^{ȳ1, ȳ2}), from clause 4
a 5 -1  2 0  5 0   % A5: (¬x ∨ z^{y1, y2}), from clause 5
a 6 -1 -2 0  6 0   % A6: (¬x ∨ ¬z^{y1, y2}), from clause 6

Derived clauses (d-lines) are the internal nodes of the proof DAG: each records a clause together with its list of antecedents — the clauses from which it was obtained by resolution. The proof DAG terminates at the root — the empty clause , demonstrating unsatisfiability:

d 7 -1 0  5 6 0   % D7 = A5 ⊗_{z^{y1, y2}} A6 = (¬x)
d 8  1 0  1 2 0   % D8 = A1 ⊗_{z^{ȳ1, ȳ2}} A2 = (x)
d 9  0    7 8 0   % D9 = D7 ⊗_x            D8 = ⊥

where denotes resolution on pivot . Note that and appear in the proof but do not participate in the refutation — they lie outside the cone of the proof.

Herbrand Synthesis

Given and its FERP proof, our goal is to extract a set of Herbrand functions , each represented as a boolean circuit. The natural domain of is — all existential variables outer to in .

The QBF is a sequential two-player game of perfect information, with turns ordered by . The existential player chooses values for and the universal player for , each observing the full history of play before moving. Now consider the universal player choosing . Any inner existential with is not a free input — it is itself a rational response to the history of play, determined by and the universal choices preceding it. The universal player can therefore substitute through every such , reducing the domain of to .

In our running example, and . There are no inner existentials between and or , so the domain of both functions is . The extraction algorithm recovers these functions from the FERP proof.

Algorithm Overview

The FERP proof demonstrates that the existential player has no winning strategy: there is no assignment to the existential copies that satisfies under the universal assignments recorded in the annotations. The extraction algorithm reads the universal player’s winning Herbrand functions directly from this proof.

The algorithm operates within the cone of the proof — the set of clauses reachable from the root . In our running example, and lie outside this cone; only participate.

Each axiom clause in the cone may contain literals over variables. If any such literal evaluates to , the clause is already satisfied and need not contribute to the refutation. The clause must participate precisely when all of its literals are falsified — we call this its firing condition. Crucially, the firing condition is what the universal player actively forces the existential player into. In our running example: and contain literal , so their firing condition is . and contain literal , so their firing condition is .

Propagating firing conditions from axioms to root reveals, for each propositional copy , the exact -context under which the universal player forced it to fire. Since carries an annotation recording the universal assignment under which it was introduced, this context directly encodes the Herbrand function for the corresponding universal variable.

To track this propagation, each clause carries three components: a label recording the clause’s own firing condition, and two variable activity maps. records the current activity of each propositional copy present in the clause. accumulates a permanent historical record — as a copy is resolved away at a pivot, its activity is preserved in rather than discarded. It is this history that the readoff phase consults at the root.

The algorithm proceeds in three phases:

  1. Phase 1 initializes the label, , and for each axiom clause in the cone from its firing condition.
  2. Phase 2 traverses the cone from leaves to root, merging labels and activity maps at each resolution step via a Shannon expansion formula.
  3. Phase 3 reads the Herbrand functions off at the root. We trace each phase on the running example in the sections below.

Phase 1: Leaf Labeling

Phase 1 initializes the label, , and for each axiom clause in the cone. The label is the firing condition: the conjunction of falsification conditions over the clause’s literals. For a positive literal , the falsification condition is ; for a negative literal , it is . A clause with no literals fires unconditionally and receives label .

The activity maps and are then initialized per propositional copy in the clause. Two cases arise:

  • copies: variables in are free inputs to the circuit — they are not introduced by the expansion and carry no annotation. Their activity is not tracked individually but flows through the clause label directly. We therefore set , signalling to Phase 2 that these copies bypass the routing guards of the merge.
  • Inner existential copies: these are proper propositional copies introduced by the expansion. They inherit the clause’s firing condition: .

Applying this to the four cone axioms in our running example:

: literal , falsified when .

: literal , falsified when .

: literal , falsified when .

: literal , falsified when .

Phase 2: The Shannon Merge

Phase 2 traverses the cone from leaves to root. At each resolution step, two parent clauses and are merged into a child clause on a pivot . The challenge is that the pivot’s activity and may differ between the two parents — each parent may have tracked the pivot under a different -context. The child’s firing condition must correctly combine both parents’ conditions across all -contexts. This is achieved via a Shannon expansion on and .

The child’s label is:

This captures three cases:

  • Standard resolution (): the pivot is active in both parents. The child fires when both parents fire simultaneously.
  • Left bypass (): the pivot activity is in — the pivot is an variable whose contribution flows through directly. The child inherits ‘s firing condition.
  • Right bypass (): symmetric.

For each non-pivot propositional copy , the variable activities and are merged by the same case structure:

where (or for the historical map). The pivot is removed from — it has been resolved away — but preserved in , permanently recording the -context under which it participated.

Applying this to the three resolution steps in our running example:

: , . Standard resolution:

: , . Standard resolution:

: , . Both parents bypass on :

At the root , is empty — all copies have been resolved away — and carries the complete historical record. We read the Herbrand functions off this map in Phase 3.

Phase 3: Readoff

At the root , the historical map records, for each propositional copy, the -context under which it drove the contradiction. Phase 3 reads the Herbrand functions off this map.

For each universal variable , we collect all propositional copies annotated with . Each such copy carries an activity — the -context under which it fired — and an annotation recording the full universal assignment under which it was introduced. Since may have been introduced under a joint assignment to multiple universals, its activity should only contribute to under the full context of that assignment. We therefore guard each copy’s contribution by the conjunction of universal literals in its annotation corresponding to universals already decided before in :

The Herbrand function for is then assembled as a disjunction over all contributing copies:

Without the guard, a copy annotated with a joint universal context would incorrectly contribute to even under incorrect outer universal decisions. The guard restricts the copy’s contribution to precisely the context of outer universals under which it was introduced.

In our running example, (ordered ) and .

  • For : The only copy annotated with is (copy 2), with activity . Since is the outermost universal, no preceding universals exist, so . Therefore:

  • For : The only copy annotated with is (copy 2), with activity . Since is outer to in the prefix, we have (matching the positive literal in its annotation). Therefore:

Why the Guard is Strictly Necessary

Consider the play context where the existential player chooses , and the universal player has already chosen . In this state, the universal player must play to win:

  • If universal plays , the matrix clauses reduce to:
    • which yields a contradiction , meaning the universal player wins.
  • If universal plays , all six matrix clauses evaluate to (are satisfied), so the existential player wins.

Let’s evaluate both versions of the extracted function in this state ():

  • Without the guard: simplifies to , which evaluates to . The universal player plays , which is a losing move!
  • With the guard: , which evaluates to . The universal player correctly plays , which is the winning move.

This demonstrates that the guard is essential for capturing context-dependent strategies correctly.