Maps to: Stanford CS 257 Introduction to Automated Reasoning (Winter 2026), Lecture 3 · Tue 01/13/2026 · Proof systems (guest lecture by Clark Barrett). Reading: a book chapter on proof systems (distributed on Canvas; not public). Basis: The Stanford slides are on Canvas and not public. This lecture follows the public deck Abstract Proof Systems of the Iowa course CS:4980 (Cesare Tinelli, Spring 2024), which states that it is based on slides by Tinelli and by Clark Barrett, Caroline Trippel and Andrew (Haoze) Wu at Stanford. “The slides” below means that deck. Its definitions and examples are reused here:
- proof states, rules as partial functions, rule schemas, and the rules MP, SPLIT and CONTR;
- the derivation tree from ;
- satisfiability proof systems, soundness, weakly and strongly satisfiability-preserving rules, and the exercise with eight candidate rules;
- completeness and termination, the stuck state ;
- the decision procedure and its two examples;
- strategies, the strategy and its exercise, properties of strategies, and Theorem 5.
These notes add proofs of the theorems, a careful reading of “progressive”, the resolution system of Lecture 2 recast in the same framework, Hilbert-style proof checking with the deduction theorem as an algorithm, and an introduction to proof complexity (Cook–Reckhow). Four experiments check every claim by machine, by exploring every derivation from thousands of small states. The experiments and their code were designed for these notes and do not reflect what was said in class. Code:
code/lecture03/(4 scripts + 1 module; Python standard library only, matplotlib optional; under 7 seconds each) Reading time: 3–4 hours including running the code
0. How to read this lecture
0.1 Learning goals
After this lecture you should be able to:
- Define an abstract proof system — states, rules, derivation trees, derivations — and present an algorithm as one.
- Define satisfiability proof systems, refutations and corroborations, and the two halves of soundness.
- Decide whether a rule is strongly, weakly or not satisfiability preserving, with a proof or a counterexample.
- Prove soundness from rule-level preservation, prove termination with a measure, and show incompleteness with a stuck state.
- Explain how a sound, complete and terminating proof system is a decision procedure, and why the choice of strategy then changes only the cost.
- State and use the theorem “complete iff there is a progressive and terminating strategy”.
- Check a Hilbert-style proof by program and expand the deduction theorem into a proof transformation.
- Explain the Cook–Reckhow view of proof systems and why proof size bounds the speed of every solver built on a proof system.
0.2 Prerequisites and scope
| Assumed | Introduced here | Developed later |
|---|---|---|
| truth tables, semantic arguments, H2 (Lecture 1) | the general framework they are instances of | abstract DPLL as a proof system (Lecture 4) |
| resolution, saturation, DP (Lecture 2) | the resolution system as a satisfiability proof system | abstract CDCL (Lecture 5), DPLL(T) (Lecture 10) |
| structural induction (Lecture 1) | induction on derivations, termination measures | the same proofs for every later procedure |
| “NP” and “coNP” informally | polynomially bounded proof systems, p-simulation | proof certificates from SAT solvers (Lecture 5) |
0.3 Map
§1 why present algorithms as proof systems
§2 abstract proof systems: states, rules, derivation trees, derivations ← code 01
§3 satisfiability proof systems and soundness; preserving rules; the slides' exercise ← code 02
§4 completeness and termination; from proof systems to decision procedures; P_E ← code 03
§5 strategies; π_PL; properties of strategies; Theorem 5 ← code 03
§6 the resolution system of Lecture 2, revisited ← code 03
§7 Hilbert systems: checking proofs, the deduction theorem as an algorithm, proof search ← code 04
§8 how long must proofs be? Cook–Reckhow and proof complexity ← code 04
§9 summary §10 common pitfalls §11 exercises §12 further reading §13 next lecture
0.4 Notation
| Symbol | Meaning |
|---|---|
| a proof system: states and rules | |
| proof states (here mostly sets of formulas) | |
| a rule: premises (all must hold) over conclusions (alternatives) | |
| SAT, UNSAT | the two distinguished states of a satisfiability proof system |
| a satisfiability predicate: the “satisfiable” states, containing SAT, not UNSAT | |
| derivation trees; a derivation is a sequence of them | |
| a strategy | |
| the set of propositional variables |
0.5 The code of this lecture
One module, proof_systems.py, turns every definition into code:
Rule(a function from a state to its applicable instances and their conclusions) andProofSystem(a list of rules);- derivation trees (
Node),derive(system, state, strategy)with strategies (leftmost_strategy,random_strategy, the slides’pi_pl), andformat_tree; - the systems of the lecture:
P_PL, the eight exercise rules,P_E,P_E_DNEG, and the resolution systemP_RES; - machine checks:
preservation(rule, states)classifies a rule as strongly / weakly / not preserving with a counterexample;explore(system, state)explores every derivation from a state and reports whether a refutation or a corroboration exists, the longest derivation, and stuck states; - Hilbert proofs:
check_hilbert,proof_of_identity,deduction(the deduction theorem as a proof transformation),forward_search.
1. Why present algorithms as proof systems?
Lectures 1 and 2 met several procedures: truth tables, semantic arguments, resolution saturation, Davis–Putnam. Each came with its own correctness argument. They have a common shape: a state of knowledge (“these formulas hold on this branch”, “these clauses have been derived”), and steps that transform the state, sometimes into several alternative states (case splits). Lecture 3 makes that shape a definition.
Intuition. Think of a board game. The rules say which moves are legal in which position; they do not say which move to make. A strategy chooses moves. A position is won (UNSAT reached on every branch, or SAT reached) or stuck (no legal move). Questions about the game split cleanly: “Do the rules allow a wrong win?” (soundness), “Can every game be won?” (completeness), “Does every game end?” (termination), and separately, “Which strategy wins fastest?” (efficiency).
The slides list the advantages of presenting automated-reasoning algorithms as proof systems:
- Modularity and composability. Rules are independent pieces; adding a rule (pure literals, learning, theory reasoning) means adding a piece and re-checking a local property.
- Easier proofs. Soundness of the whole system follows from a property of each rule separately (Theorem 1 below). Termination follows from one measure.
- Abstraction. The proof system says what may be done, not how to implement it. Data structures (watched literals, Lecture 4) and heuristics (VSIDS, Lecture 5) are implementation choices that do not affect correctness, as long as they only choose among legal rule applications.
This is how modern SAT and SMT procedures are specified in the literature: “Abstract DPLL” and “DPLL(T)” (Nieuwenhuis, Oliveras and Tinelli 2006) are proof systems in exactly this sense (Lectures 4, 5 and 10).
2. Abstract proof systems
2.1 States and rules
Definition. An abstract proof system is a pair , where is a set of proof states and a set of proof rules. A proof rule is a partial function from proof states to sets of proof states.
A state is a data structure representing what is known at a stage of the proof — for example a set of formulas. A rule takes a state, applies only if the state satisfies some premises, and returns one or more conclusions:
Premises are conjunctive (all must hold); conclusions are disjunctive (alternatives, i.e. a case split). A rule with transforms the state; a rule with branches.
Three rules on states that are sets of formulas:
These form the system . Technically each is a rule schema: are parameters, and every instantiation is a separate rule. Script 01 applies them to the slides’ examples:
| state | MP gives |
|---|---|
| does not apply ( is already in ) |
On , SPLIT has three instances — on , or — but none on , because is already there. Formally, maps that state to the set .
The premise "" of MP matters more than it looks: without it, MP would apply forever to the same pair and no derivation would end. Most rules in automated reasoning have such a “something new is added” premise.
2.2 Derivation trees and derivations
Definition. A derivation tree from is a finite tree whose nodes are states, whose root is , and in which the children of a node are the conclusions of one application of a rule to . A state is reducible if some rule applies to it, irreducible otherwise; a tree is reducible if at least one of its leaves is. A derivation from is a (possibly infinite) sequence of trees in which each is obtained from by applying a rule to one leaf. A derivation is saturated if it is finite and ends with an irreducible tree.
The slides’ example: from , script 01 (Part 2) prints the whole derivation , one tree per step. The final tree:
{¬c, b ⇒ c, ¬b ⇒ c}
├─ SPLIT b (case 1 of 2)
│ {b, ¬c, b ⇒ c, ¬b ⇒ c}
│ └─ MP b, b ⇒ c
│ {b, c, ¬c, b ⇒ c, ¬b ⇒ c}
│ └─ CONTR c
│ UNSAT
└─ SPLIT b (case 2 of 2)
{¬b, ¬c, b ⇒ c, ¬b ⇒ c}
└─ MP ¬b, ¬b ⇒ c
{c, ¬b, ¬c, b ⇒ c, ¬b ⇒ c}
└─ CONTR c
UNSAT
It is irreducible (both leaves are UNSAT, and no rule applies to UNSAT), so the derivation is saturated.
Note the distinction: a tree is a snapshot; a derivation is the history of how the snapshot was built. Properties like termination are about derivations (can the sequence be infinite?), while verdicts are read off the final tree.
3. Satisfiability proof systems and soundness
3.1 SAT and UNSAT
Definition. is a satisfiability proof system if contains two distinguished states SAT and UNSAT.
- A refuting rule has UNSAT as its only conclusion; a corroborating rule has SAT as its only conclusion.
- A refutation tree has only UNSAT leaves; a corroboration tree has at least one SAT leaf.
- A refutation of is a derivation from ending with a refutation tree; a corroboration one ending with a corroboration tree.
The asymmetry is natural. To show unsatisfiability, every case must fail; to show satisfiability, one case must succeed. becomes a satisfiability proof system by adding SAT to its states; CONTR is a refuting rule; has no corroborating rule.
3.2 What soundness means
Definition. A satisfiability predicate is a set with and . is refutation sound if no state with a refutation is in ; solution sound if every state with a corroboration is in ; sound if both.
For , .
Soundness is a property of whole derivations, which are hard to reason about directly. The trick is to find a local property of each rule that implies it:
Definition. A rule is weakly satisfiability preserving if for every state : if then some is in . It is (strongly) satisfiability preserving if: iff some is in .
Theorem 1. If every rule of is satisfiability preserving, then is sound.
Proof. By induction on the number of steps of a derivation, show the invariant: the root is in iff some leaf of the current tree is in . It holds for (the root is the only leaf). A step replaces a leaf by its conclusions ; by strong preservation, iff some , so “some leaf is in ” keeps its truth value. Now, a refutation tree has only UNSAT leaves, none in , so its root is not in : refutation soundness. A corroboration tree has a SAT leaf, which is in , so the root is: solution soundness. ∎
Look at the proof more closely: the “if root ∈ then some leaf ∈ ” half of the invariant needs only weak preservation, and it is all that refutation soundness uses. Solution soundness needs the other half. Script 02 confirms this split by machine (§3.4).
3.3 The slides’ exercise, decided by machine
Which of these rules are weakly / strongly / not satisfiability preserving (with respect to the predicate above)?
Script 02 (Part 1) checks every instance of every rule on 2,049 small states — every set of 1 to 3 formulas from a pool of 23 small formulas over , plus SAT and UNSAT — and prints a counterexample for each failure:
| rule | instances checked | verdict | counterexample |
|---|---|---|---|
| MP | 189 | strong | |
| SPLIT | 3,112 | strong | |
| CONTR | 44 | strong | |
| ADD-VAR1 | 5,169 | none | : satisfiable to unsatisfiable |
| ADD-VAR2 | 2,057 | strong | |
| AND1, AND2 | 1,270 each | strong | |
| OR-SPLIT | 1,270 | strong | |
| AND3 | 1,270 | weak | : unsatisfiable to satisfiable |
| AND4 | 1,270 | strong | |
| UNSAT → {α} | 4 | weak |
Why, rule by rule:
- Strongly preserving rules add a consequence (MP, AND1, AND2: , so has the same models), split into exhaustive cases (SPLIT, OR-SPLIT: every model of satisfies one case), replace a formula by an equivalent set (AND4), add a fact about a fresh variable (ADD-VAR2: any model extends with true), or detect an obvious contradiction (CONTR).
- ADD-VAR1 guesses a value of a variable that already occurs. It can destroy all models: not even weakly preserving.
- AND3 forgets . It never destroys models (weak), but it can create them from an unsatisfiable state.
- UNSAT → {α} is weakly preserving vacuously: its premise UNSAT is never in . It is not strongly preserving when is satisfiable.
(Rules whose parameter ranges over all variables or all formulas are instantiated with a small universe in the code: variables for ADD-VAR, four formulas for UNSAT → {α}. A machine check over finitely many states can refute a claim, never prove it; the verdicts “strong” are then backed by the one-line arguments above.)
3.4 What a single bad rule does
Script 02 (Part 2) builds the damage explicitly.
(a) Refutation soundness lost. + ADD-VAR1 on the satisfiable state (a model: ):
{¬b, a ⇒ b}
└─ ADD-VAR1 a
{a, ¬b, a ⇒ b}
└─ MP a, a ⇒ b
{a, b, ¬b, a ⇒ b}
└─ CONTR b
UNSAT
(b) Solution soundness lost. (§4.3) + AND3 on the unsatisfiable state : AND3 gives , and the SAT rule of concludes SAT.
Every other step in both derivations is impeccable; one bad rule suffices. Part 3 then explores all derivations of + AND3 from 276 states: 0 violations of refutation soundness, 43 of solution soundness — exactly as the analysis of Theorem 1’s proof predicted for a weakly-but-not-strongly preserving rule.
Part 4 confirms Theorem 1 on the systems we will rely on: for , and the resolution system, over every small state, no state is refuted wrongly and none is corroborated wrongly.
4. Completeness, termination, and decision procedures
4.1 Definitions
Definition. is complete (with respect to ) if every state has a refutation or a corroboration. is terminating if every derivation is finite.
Completeness is existential: some derivation reaches a verdict. Termination is universal: every derivation stops. Neither implies the other.
4.2 : terminating, not complete
Terminating. Every MP or SPLIT step adds a formula that was not there before, taken from a finite pool determined by the start state: consequents of implications occurring in it (MP), and literals of its variables (SPLIT). CONTR ends a branch. So no branch can be longer than the pool size plus one, and a tree with finitely many finite branches, built by adding finitely many children at each step, is finite. Script 03 (Part 1) explores every derivation from 276 small states: none is infinite, the longest branch has 5 steps, and every state stays within the bound.
Not complete. The slides ask for a satisfiable state other than SAT and UNSAT that is irreducible: . No rule applies (no implication, is already there, no contradiction), and there is no corroborating rule. Script 03 finds the extent of the problem: 274 of the 276 states have neither a refutation nor a corroboration. The stuck states are of two kinds:
- every satisfiable state (smallest: ), since can never conclude SAT;
- unsatisfiable states that cannot decompose, such as (reached from by SPLIT): there is no rule for ∧.
4.3 From proof systems to decision procedures
Proposition. If is sound, complete and terminating with respect to , it induces a decision procedure for membership in : start with and produce any derivation until no rule applies. It terminates; if the final tree is a refutation tree, ; otherwise .
Careful: “otherwise” relies on completeness in a strong sense — that a derivation which cannot be extended has reached a verdict. That holds when the only irreducible states are SAT and UNSAT, as in the system below. §5.4 returns to this point.
The slides’ decision procedure . The assignment induced by a set of formulas is if , false if , undefined otherwise. fully defines if every variable occurring in has or .
Theorem. Every rule of is satisfiability preserving; is sound, terminating and complete.
Proof. SPLIT: every model of makes true or false. SAT and UNSAT: when fully defines , every formula of has all its variables assigned, so ” is satisfiable” is equivalent to "" (any model of must agree with on the literals in , i.e. on all variables of ). Soundness follows by Theorem 1. Termination: each SPLIT adds a literal for one more of the finitely many variables of , so a branch has at most SPLITs and then one SAT/UNSAT step. Completeness: a state that does not fully define its assignment admits SPLIT; one that does admits exactly one of SAT and UNSAT. So the only irreducible states are SAT and UNSAT, and any maximal derivation ends with a verdict. ∎
Script 03 (Part 2): on all 276 small states, every state is refutable xor corroborable, matching the truth, and the longest branch has 3 steps. The slides’ two examples:
{a, a ⇒ ¬b, ¬a ∨ b} -> refutation {a, a ∧ ¬b, ¬a ∨ ¬b} -> corroboration
├─ SPLIT b (case 1 of 2) ├─ SPLIT b (case 1 of 2)
│ {a, b, a ⇒ ¬b, ¬a ∨ b} │ {a, b, a ∧ ¬b, ¬a ∨ ¬b}
│ └─ UNSAT v ⊭ a ⇒ ¬b │ └─ UNSAT v ⊭ a ∧ ¬b
│ UNSAT │ UNSAT
└─ SPLIT b (case 2 of 2) └─ SPLIT b (case 2 of 2)
{a, ¬b, a ⇒ ¬b, ¬a ∨ b} {a, ¬b, a ∧ ¬b, ¬a ∨ ¬b}
└─ UNSAT v ⊭ ¬a ∨ b └─ SAT v ⊨ S
UNSAT SAT
On 300 random states over , each run with a random strategy, all 300 verdicts were correct. That is the practical meaning of “sound, complete, terminating”: the strategy cannot affect the answer.
is the truth-table method written as a proof system: each branch is one row (restricted to the variables that occur). It is a bad algorithm but a clean specification. DPLL (Lecture 4) is a refinement of it: the same SPLIT, plus rules that deduce literals instead of guessing them.
5. Strategies
5.1 Definition
Rules are non-deterministic: at each step, several leaves and several rule instances may be eligible. A strategy resolves the choice.
Definition. A strategy for is a partial function that takes a derivation tree and returns a tree such that is a derivation step in . A derivation follows if each non-initial tree is applied to the previous one and, if the derivation is finite, is undefined on its last tree.
5.2 The slides’ strategy
Order literals alphabetically by variable, each variable before its negation (). For states whose formulas are literals or implications between literals:
- Find the first reducible leaf in a left-to-right depth-first traversal; if none, is undefined.
- If MP applies, apply it to and with minimal for , ties broken by minimal .
- Otherwise, if SPLIT applies, split on the smallest variable occurring in the state.
- Otherwise, apply CONTR if possible.
The slides’ exercise: apply to . Script 03 (Part 3) gives:
{a ⇒ c, a ⇒ ¬b, ¬b ⇒ ¬a}
├─ SPLIT a (case 1 of 2)
│ {a, a ⇒ c, a ⇒ ¬b, ¬b ⇒ ¬a}
│ └─ MP a, a ⇒ ¬b (¬b ≺ c breaks the tie between a ⇒ ¬b and a ⇒ c)
│ └─ MP a, a ⇒ c
│ └─ MP ¬b, ¬b ⇒ ¬a
│ {a, c, ¬a, ¬b, a ⇒ c, a ⇒ ¬b, ¬b ⇒ ¬a}
│ └─ CONTR a
│ UNSAT
└─ SPLIT a (case 2 of 2)
{¬a, a ⇒ c, a ⇒ ¬b, ¬b ⇒ ¬a}
├─ SPLIT b ... SPLIT c (four leaves, all irreducible and open)
(abbreviated). No MP applies at the root (no literal yet), so splits on . The -branch is refuted: forces and , and forces . The -branch contains no contradiction; it splits on and and ends in four irreducible open leaves — each one a model of , but has no rule to say so.
5.3 Properties of strategies
Definition. A strategy is
- solution sound if whenever a corroboration of follows ; refutation sound similarly; sound if both;
- terminating if every derivation following is finite;
- progressive if it is defined on every derivation tree that is not a refutation tree or a “saturated” tree (see §5.4).
Two easy facts: if is sound, every strategy for it is sound; if is terminating, every strategy for it is terminating. The interesting case is a system that is not terminating, where a strategy can restore termination.
Script 03 (Part 3) adds to the rule
which is strongly satisfiability preserving (it adds an equivalent formula) but makes the state space infinite: , , … Exploration from passes 2,000 states without end. Then:
| strategy on + DNEG | outcome |
|---|---|
| leftmost, DNEG first | never stops (300 steps, then cut off) |
| leftmost, DNEG last | corroboration after 2 steps |
| random (20 seeds) | all 20 stopped with a corroboration — by luck, nothing guarantees it |
Termination is a property of a system together with a strategy. Real solvers contain such rules — CDCL’s restarts and learning can, in principle, repeat forever — and their termination proofs are proofs about the strategy (Lecture 5).
5.4 Theorem 5, and how to read “progressive”
Theorem 5 (slides). is complete iff there exists a progressive and terminating strategy for it.
What does “not a saturated tree” mean in the definition of progressive? If “saturated” meant just “irreducible”, the theorem would be false: has a strategy (leftmost, as in script 01) that is defined on every reducible tree and always terminates, yet is incomplete — on the strategy is simply undefined. For the theorem to hold, “saturated” must be read as “has reached a verdict”: a progressive strategy is defined on every tree that is neither a refutation tree nor a corroboration tree. In particular, a progressive strategy can exist only if no stuck state is ever reached.
Proof (with that reading). (⇐) Given , run the strategy from . It terminates, so the derivation is finite, and at its end the strategy is undefined; since it is progressive, the last tree is a refutation or a corroboration tree. So every has one. (⇒) If is complete, then no state other than SAT/UNSAT is irreducible (an irreducible state has no derivation beyond itself, hence no verdict). For each start state , fix one refutation or corroboration of (it exists by completeness) and let the strategy follow it; on trees outside these fixed derivations, let it apply any applicable rule to any non-verdict leaf (one exists, because no other state is irreducible). Every derivation following the strategy from a one-node tree is one of the fixed finite derivations, so the strategy is terminating, and it is defined on every tree without a verdict, so it is progressive. ∎
The useful direction is (⇐): to build a decision procedure, design rules that are preserving, and one strategy that is progressive and terminating. That is the recipe Lectures 4 and 5 follow for DPLL and CDCL.
6. The resolution system of Lecture 2, revisited
Lecture 2 presented resolution as a satisfiability proof system with states :
In the language of this lecture: RESOLVE is strongly preserving (it adds a consequence), CLASH too (it removes a valid clause), UNSAT is a refuting rule whose premise makes the state unsatisfiable, and SAT is a corroborating rule whose premise — saturation — implies satisfiability by refutational completeness (Lecture 2, §6.3). Every derivation is finite (at most clauses over variables), and the only irreducible states are SAT and UNSAT. Script 03 (Part 4) explores all 987 sets of 1–3 clauses over : all decided correctly, no stuck state, longest derivation 10 steps.
The strategy changes the work. Script 03 counts RESOLVE steps until appears:
| unsatisfiable input | shortest | systematic | shortest-clause-first | of which used | 20 random strategies |
|---|---|---|---|---|---|
| the slides’ example | 3 | 4 | 9 | 4 | 9–21 (median 18) |
| random 2-CNF #1 (5 vars, 11 clauses) | 3 | 7 | 14 | 3 | 27–40 (median 38) |
| random 2-CNF #2 | 5 | 7 | 16 | 6 | 21–54 (median 48.5) |
| random 2-CNF #3 | 3 | 23 | 12 | 3 | 19–40 (median 36) |
| random 2-CNF #4 | 5 | 9 | 18 | 6 | 25–51 (median 49) |
(“shortest” is a breadth-first search over all derivations; “systematic” always resolves the first pair in a fixed order; “shortest-clause-first” is Lecture 2’s saturate, with the steps its extracted proof actually uses.)
Two lessons. The slides’ example has a refutation shorter than the slides’ 4-step one: resolve and into , then from the first two clauses, then . And the median random run does 6 to 13 times more work than necessary. Lecture 2 saw the same effect at scale: on the 4-hole pigeonhole formula, saturation kept 39,256 clauses while Davis–Putnam — another strategy for resolution — never held more than 113.
7. Hilbert systems: checking, the deduction theorem, and search
7.1 Two kinds of proof systems
The systems above are satisfiability proof systems: they refute or corroborate a set of formulas. Lecture 1 also met a theorem-proving proof system, the Hilbert system H2, which derives valid formulas from axioms:
It fits the abstract framework too (the state is the set of formulas proved so far; each axiom instance and MP are rules), but its use is different: a proof is a certificate of validity that anyone can check.
7.2 Checking is easy
check_hilbert checks each line: an axiom line must match its schema (the checker finds the substitution for α, β, γ itself, by structural pattern matching); a hypothesis must be in the hypothesis set; an MP line must cite two earlier lines and with line literally equal to “line ⇒ this line”. Script 04 (Part 1) checks the 5-line proof of and rejects three tampered copies, each with a precise message (a wrongly claimed schema, MP lines in the wrong order, an unjustified hypothesis). A few dozen lines of code suffice to trust any H2 proof.
7.3 The deduction theorem is an algorithm
The deduction theorem says: if then . Its proof is constructive, so it is an algorithm on proofs: replace each line of the old proof by a few lines proving :
| old line | new lines |
|---|---|
| the 5-line proof of | |
| an axiom or a hypothesis other than | ; [A1]; [MP] |
| MP from and | [A2]; two MPs with the already proved and |
Script 04 (Part 2) starts from the 5-line proof of and applies the transformation three times, checking each result:
| statement | lines | largest formula (nodes) |
|---|---|---|
| 5 | 3 | |
| 17 | 17 | |
| 53 | 47 | |
| 161 | 107 |
Each application triples the proof plus 2 lines, and the formulas grow as is prefixed to everything. Humans and proof assistants reason with the theorem (“assume α, prove β”); a fully expanded proof is long, but still checked by the same tiny program. Lecture 15 (proof automation in Lean) returns to this division of labour between a small trusted checker and powerful untrusted proof producers.
7.4 Finding proofs is hard
Script 04 (Part 3) runs a naive forward search for : take every axiom instance whose come from a small pool of formulas, then apply MP to all pairs, round by round.
| pool | formulas known after rounds 0, 1, 2, … | found |
|---|---|---|
| 16 → 20 → 22 | round 2 | |
| 288 → 324 → 327 | round 2 | |
| 175 → 200 → 202 | round 2 | |
| 96 → 112 → 112 → 112 | never |
The proof of needs an A2 instance whose is an implication — itself in Lecture 1’s proof, or , which the search found as an alternative. A search must guess such formulas; nothing in the rules points to them, and with literals only the search closes without ever reaching the goal. This is why the slides of Lecture 1 concluded that automated reasoning prefers systems with the subformula property — semantic arguments, resolution, DPLL — where every formula in a proof is built from pieces of the input, and the search space is finite.
8. How long must proofs be?
8.1 Proof systems as certificates (Cook and Reckhow)
Cook and Reckhow (1979) abstracted away the rules entirely:
Definition. A propositional proof system for unsatisfiability is a polynomial-time algorithm such that a formula is unsatisfiable iff there exists some (a “proof”) with .
The checkers of this lecture and of Lecture 2 are exactly such algorithms: check_refutation for resolution, check_hilbert for H2 (applied to ‘s validity), and even the truth table (a proof is the list of all rows, checked row by row). A proof system is polynomially bounded if every unsatisfiable has a proof of size polynomial in .
Theorem (Cook–Reckhow 1979). A polynomially bounded proof system exists iff NP = coNP.
So, unless NP = coNP (which most researchers doubt), every proof system has families of unsatisfiable formulas that need super-polynomially long proofs. The research field of proof complexity maps which systems are stronger than which. System p-simulates if proofs in can be translated into proofs in with only polynomial growth.
8.2 Why solver builders care
A solver that is a strategy for a proof system cannot run faster than the shortest proof the system allows: its trace is a proof. DPLL’s search tree is a tree-like resolution proof (Lecture 4); CDCL with restarts p-simulates general resolution (Pipatsrisawat and Darwiche 2011, as reported in the proof-complexity literature). So Haken’s pigeonhole bound (Lecture 2) applies to every CDCL solver, whatever its heuristics.
8.3 Measured: three systems, three families
Script 04 (Part 4) measures the size of the unsatisfiability certificates our own provers find: truth-table rows, semantic-argument lines (Lecture 1’s prover, goal “unsatisfiable”), resolution refutation steps (Lecture 2’s saturation).
| family | n | vars | clauses | truth table: rows | semantic argument: lines | resolution: proof steps |
|---|---|---|---|---|---|---|
| implication chain | 4 | 4 | 5 | 16 | 19 | 4 |
| implication chain | 20 | 20 | 21 | 1,048,576 | 99 | 20 |
| all clauses | 4 | 4 | 16 | 16 | 1,045 | 15 |
| all clauses | 5 | 5 | 32 | 32 | 17,621 | 31 |
| all clauses | 6 | 6 | 64 | 64 | > 200,000 | 63 |
| pigeonhole | 2 | 6 | 9 | 64 | 135 | 12 |
| pigeonhole | 3 | 12 | 22 | 4,096 | 6,929 | 66 |
| pigeonhole | 4 | 20 | 45 | 1,048,576 | > 200,000 | 362 |

- Implication chains: both deductive systems give linear proofs; the truth table needs rows.
- All clauses: resolution needs steps — linear in the input — while the semantic argument explodes, exactly the numbers of Lecture 1 (1,045 and 17,621). D’Agostino (1992): tableaux cannot even polynomially simulate truth tables.
- Pigeonholes: everything grows; resolution’s growth is unavoidable (Haken 1985). Stronger systems have polynomial-size pigeonhole proofs: Frege systems (Hilbert-style systems like H2; Buss 1987) and extended resolution (resolution plus Tseitin-style definitions of new variables; Cook 1976).
No system is best everywhere among those we can automate efficiently. The strongest systems (Frege, extended resolution) have short proofs but no known efficient proof search; the weaker ones (resolution) have good search (CDCL) but provably long proofs for some families. That trade-off shapes SAT solving: modern solvers emit proofs in DRAT, a format that extends resolution with new definitions, so that even preprocessing steps beyond resolution can be checked (Lecture 5).
Run it.
python3 04_hilbert_and_proof_size.py(about 7 seconds).
9. Summary
- An abstract proof system has states and rules; rules are partial functions from a state to one or more conclusion states (several = a case split). Derivations grow derivation trees one rule application at a time.
- A satisfiability proof system has SAT and UNSAT; refutations end with only UNSAT leaves, corroborations with a SAT leaf. Soundness has two halves: refutation soundness and solution soundness.
- If every rule is strongly satisfiability preserving, the system is sound (induction on derivations). Weak preservation gives refutation soundness only. One non-preserving rule is enough to “prove” falsehoods (measured).
- Completeness (some derivation reaches a verdict) and termination (every derivation is finite) are separate properties: terminates but gets stuck on and on 274 of 276 small states.
- Sound + complete + terminating = a decision procedure, and then every strategy gives the right answer: is such a system (the truth-table method as rules).
- A strategy turns non-deterministic rules into an algorithm. It cannot affect correctness in a sound system, but it decides cost, and it can restore termination in a non-terminating system. Theorem 5: complete iff a progressive and terminating strategy exists (with “progressive” read as “defined until a verdict”).
- Lecture 2’s resolution system fits the framework; strategies change its work by an order of magnitude.
- Hilbert proofs are easy to check and hard to find; the deduction theorem is a proof transformation that triples proof length per use.
- Cook–Reckhow: a proof system is a polynomial-time checker. No proof system has short proofs for all tautologies unless NP = coNP; solvers are limited by the proof systems they implicitly use.
10. Common pitfalls
| Pitfall | Why it is wrong | Correct view |
|---|---|---|
| “Each rule step is correct, so the system is sound” | “Correct” must mean satisfiability preserving in both directions | ADD-VAR1 and AND3 look harmless and break soundness (§3.4) |
| Treating weak preservation as enough | It gives refutation soundness only | AND3: 0 wrong refutations, 43 wrong corroborations |
| “Terminating implies complete” | terminates and gets stuck | Show that only SAT/UNSAT are irreducible |
| “Complete implies terminating” | + DNEG is complete, with infinite derivations | Completeness needs one good derivation; termination constrains all |
| “The strategy can make an unsound system sound” | Soundness is about all derivations that the rules allow | A strategy can only restrict which derivations run — it can make a run terminate, not make bad rules good |
| Reading “progressive” as “defined on every reducible tree” | Then would satisfy Theorem 5’s premise | “Defined on every tree without a verdict” (§5.4) |
| Confusing a rule with its instances | SPLIT is a schema: SPLIT, SPLIT, … | Count instances when reasoning about search |
| “Short proofs exist, so a solver will find them” | Frege has short pigeonhole proofs; no efficient search is known | Proof size is a lower bound on solver time, not an upper bound |
| Using the deduction theorem and then counting lines | Its expansion is ~3× per use | Check the expanded proof when certificates matter |
11. Exercises
Answers are collapsed; try each exercise first.
1. (rule properties) Prove by hand that MP, SPLIT and CONTR are strongly satisfiability preserving.
Answer
MP: if then , so and have the same models: one is satisfiable iff the other is. SPLIT: a model of makes true (then it models ) or false (); conversely a model of either conclusion is a model of . CONTR: if then is unsatisfiable, and UNSAT : both sides of the “iff” are false.
2. (soundness) Write out the induction of Theorem 1 for a derivation , and point to the place where each half of strong preservation is used.
Answer
Invariant : root ⇔ some leaf of is in . Base: has the root as its only leaf. Step: replaces leaf by ; the other leaves are unchanged. ”⇒” half of preservation ( ⇒ some in it) keeps “some leaf is in ” true when it was true because of ; the ”⇐” half ensures it does not become true if was not in . Refutation soundness uses only the first half (if the root were satisfiable, some leaf would be, but all leaves are UNSAT). Solution soundness uses the second (a SAT leaf makes the right side true, hence the root).
3. (completeness) Add a corroborating rule to that makes it complete on states whose formulas are literals and implications between literals. Prove it.
Answer
Use ‘s SAT and UNSAT rules (fully defined assignment, check every formula). With SPLIT already in , every state that does not fully define its assignment admits SPLIT, and one that does admits SAT or UNSAT: the only irreducible states are SAT and UNSAT, and the rules are preserving. (MP and CONTR become optional shortcuts.) Check it with explore(ProofSystem("P", [MP, SPLIT, CONTR, SAT_RULE, UNSAT_RULE]), S) on the small states.
4. (the exercise strategy) Apply by hand to and compare with §5.2. Which models of the state can be read off the open leaves?
Answer
As in §5.2: SPLIT ; the -branch closes by MP (, then , then ) and CONTR. The -branch splits on and : four open leaves, giving the models with any . All four are indeed models: with false, and hold, and holds since is true.
5. (termination measure) Give a natural-number measure on states of that every rule decreases.
Answer
for ordinary states and . SPLIT lowers the count of undefined variables by one in each conclusion (−2); SAT/UNSAT go from at least 1 to 0. For trees, use the multiset of leaf measures: replacing a leaf by finitely many smaller leaves decreases a multiset in the Dershowitz–Manna order, which is well-founded.
6. (strategies and termination) Show that every strategy for + DNEG that applies DNEG only when no other rule applies is terminating. Is the system still complete?
Answer
In , every state other than SAT/UNSAT admits SPLIT, SAT or UNSAT. So “DNEG only when nothing else applies” never applies DNEG, and the strategy’s derivations are -derivations: finite. It is also progressive, so by Theorem 5 the system is complete. Termination of the system fails, but that does not matter for a decision procedure that uses this strategy.
7. (resolution system) Is the resolution system still sound and complete without CLASH (tautologies stay in )? Still terminating?
Answer
Yes to all three. Tautologies are satisfied by everything, so keeping them changes no satisfiability; resolvents of a tautology are either tautologies or weaker than an existing clause, so they never help derive — refutational completeness is unaffected — and SAT still fires only at saturation. Termination: still at most distinct clauses (now counting tautologies, subsets of literals at most). CLASH is an efficiency rule.
8. (slides’ shorter proof) Find the 3-step refutation of and check it with check_refutation.
Answer
from clauses 1, 2 on ; from clauses 3, 4 on ; from those two on . In proof_lines format: inputs 1–4, then (5, {1}, (1, 2, 2)), (6, {-1}, (3, 4, 3)), (7, {}, (5, 6, 1)).
9. (deduction theorem) Apply the transformation of §7.3 by hand to the proof : line 1 (hyp), line 2 (A1), line 3 (MP 1, 2), with . How many lines?
Answer
Line 1 is : 5 lines (proof of ). Line 2 is an axiom: 3 lines (; its A1-weakening ; MP). Line 3 by MP: 3 lines (an A2 instance and two MPs). Total 11 lines proving — an instance of A1 that one line would prove! The transformation is mechanical, not clever.
10. (Cook–Reckhow) Show that the truth-table method is a propositional proof system in the Cook–Reckhow sense. Why is it not polynomially bounded, and why does that not contradict anything?
Answer
Let a “proof” of the unsatisfiability of over variables be the list of all rows with the value of in each. The checker verifies that all rows are present and evaluates on each: polynomial in the length of the proof (which is about ). It accepts iff is unsatisfiable. It is not polynomially bounded: the proof is exponential in , which can be linear in . Cook–Reckhow only says that some system would be polynomially bounded iff NP = coNP; a weak system failing proves nothing.
11. (programming) Write a strategy for that splits on the variable occurring in the most formulas of the leaf. Compare tree sizes with leftmost_strategy() on 300 random states over .
Answer
Copy leftmost_strategy and, instead of taking the first SPLIT instance, pick the instance whose variable maximizes sum(1 for f in S if name in variables(f)). Expect smaller trees on average when some variables are shared by many formulas (they settle more formulas at once). Lecture 4 develops such decision heuristics for DPLL.
12. (programming) Use explore to show that extended with OR-SPLIT and AND2 is still incomplete. Which states remain stuck?
Answer
Build ProofSystem("P", [MP, SPLIT, CONTR] + [r for r in EXERCISE_RULES if r.name in ("OR-SPLIT", "AND2")]) and explore the small states. Every satisfiable state is still stuck — there is still no corroborating rule. Some unsatisfiable states become refutable ( via AND2 and CONTR). Completeness needs a way to say SAT.
12. Further reading
- Slides: C. Tinelli, Abstract Proof Systems, Iowa CS:4980, Spring 2024 (based on slides by Tinelli and by Barrett, Trippel and Wu at Stanford).
- Proof systems for solvers
- R. Nieuwenhuis, A. Oliveras, C. Tinelli, “Solving SAT and SAT Modulo Theories: from an abstract Davis–Putnam–Logemann–Loveland procedure to DPLL(T)”, Journal of the ACM, 2006 — the “abstract DPLL” style of Lectures 4, 5 and 10.
- S. Krstić, A. Goel, “Architecting solvers for SAT modulo theories: Nelson–Oppen with DPLL”, FroCoS 2007.
- C. Tinelli, “A DPLL-based calculus for ground satisfiability modulo theories”, JELIA 2002 (derivation trees and strategies in this style).
- Proof complexity
- S. Cook, R. Reckhow, “The relative efficiency of propositional proof systems”, Journal of Symbolic Logic, 1979.
- A. Haken, “The intractability of resolution”, 1985; S. Buss, “Polynomial size proofs of the propositional pigeonhole principle”, Journal of Symbolic Logic, 1987.
- M. D’Agostino, “Are tableaux an improvement on truth-tables?”, 1992.
- K. Pipatsrisawat, A. Darwiche, “On the power of clause-learning SAT solvers as resolution engines”, Artificial Intelligence, 2011.
- S. Buss, J. Nordström, “Proof complexity and SAT solving”, Ch. 7 of the Handbook of Satisfiability, 2nd ed., 2021.
- Textbooks: M. Ben-Ari, Mathematical Logic for Computer Science, 3rd ed., Ch. 3 (Hilbert systems, the deduction theorem); H. Enderton, A Mathematical Introduction to Logic, §1.7 (soundness and completeness of a deductive calculus).
13. Next lecture
Lecture 4 (DPLL, guest lecture by Clark Barrett) applies this lecture’s recipe to the procedure at the heart of SAT solving.
- Abstract DPLL is a satisfiability proof system on states ( a partial assignment with decision marks): DECIDE, PROPAGATE, PURE, BACKTRACK, FAIL. Its soundness, completeness and termination are proved exactly as here.
- Why split on variables with unit propagation, rather than on formulas (Lecture 1) or by eliminating variables (Lecture 2)? Memory stays linear and every split is exclusive.
- The cost of a strategy, measured: decision heuristics, unit propagation with two watched literals, and the phase transition of random 3-SAT near 4.26 clauses per variable.
- DPLL refutations are tree-like resolution proofs, which our Lecture 2 checker will verify.
- Code:
dpll.py(recursive DPLL, the abstract transition system with traces, a watched-literal solver with heuristics, proof output).