Automated Theorem Proving: Clauses, Unification, Equality, and Search

How proof procedures turn a mathematical problem into a search, and why representation, inference rules, and search strategy each matter.

Modern logic · Part 19Historical questions · mathematical ideas

How can an undecidable validity problem still support useful automated proof search?

Follow refutation, unification, factoring, and fair saturation; distinguish a found proof from an inconclusive search.

Selected landmarksSeries timeline ↗

Newell, Shaw, and Simon present an early program for searching for proofs.

Source: The Logic Theory Machine: A Complex Information Processing System (1956)

First-order validity is undecidable, but that does not prevent a program from finding proofs. A complete effective proof calculus permits systematic enumeration: valid formulas eventually receive proofs, while some invalid inputs may leave the search running indefinitely.

Practical automated theorem proving asks how to organize that search well enough to solve useful problems. Its history concerns representation, inference, redundancy, and heuristics as much as the existence of an algorithm.

Early procedures and early machines

Jacques Herbrand's 1930 work connected first-order reasoning with finite combinations of substitution instances. Later researchers turned related ideas into increasingly practical procedures.

The Logic Theorist, developed by Allen Newell, J. C. Shaw, and Herbert Simon in the 1950s, searched for proofs in propositional mathematics. Its historical importance includes the use of heuristic organization and its role in early artificial intelligence.

Herbert A. Simon, seated, and Allen Newell playing chess around 1958; J. C. Shaw is not pictured
Herbert A. Simon (1916–2001) and Allen Newell (1927–1992) With J. C. Shaw, heuristic proof search in the Logic Theorist.
Sources and credit for Herbert A. Simon and Allen Newell

Circa 1958. The Commons record credits Paolo Massa; the original photographer is not identified. J. C. Shaw is not pictured. Image source · Public domain · Herbert A. Simon: dates · Allen Newell: dates

Martin Davis and Hilary Putnam's 1960 procedure belongs to another important line. It reduced logical problems to systematic operations on clauses, helping establish the path toward propositional satisfiability procedures.

Portrait of Martin Davis
Martin Davis (1928–2023)
Sources and credit for Martin Davis

George Bergman. Via Wikimedia Commons. Image source · GFDL 1.2 · Biographical dates

Portrait of Hilary Putnam
Hilary Putnam (1926–2016)
Sources and credit for Hilary Putnam

Unknown photographer or artist. Via Wikimedia Commons. Image source · CC BY-SA 2.5 · Biographical dates

Portrait of Jacques Herbrand
Jacques Herbrand (1908–1931)
Sources and credit for Jacques Herbrand

Natascha Artin-Brunswick. Via Wikimedia Commons. Image source · CC BY 3.0 · Biographical dates

John Alan Robinson's 1965 resolution paper combined a powerful inference rule with unification. The combination made it possible to reason with variables directly rather than enumerate every ground substitution in advance.

These systems differed in scope and strategy. A single label such as “machine proof” can conceal those differences.

Clauses and refutation

A literal is an atomic formula or its negation. A clause is a disjunction of literals, conventionally with its variables understood as universally quantified.

Portrait of John Alan Robinson
John Alan Robinson (1930–2016)
Sources and credit for John Alan Robinson

David Monniaux. Via Wikimedia Commons. Image source · CC BY-SA 3.0 · Biographical dates

To prove that premises imply a goal, a refutation procedure adds the negation of the goal and seeks a contradiction.

Consider the premises

∀x (P(x)→Q(x)),∃x P(x),\forall x\,(P(x)\to Q(x)),\qquad \exists x\,P(x),

and the desired conclusion ∃x Q(x)\exists x\,Q(x).

Negating the conclusion gives ∀x ¬Q(x)\forall x\,\neg Q(x). Eliminating the existential premise introduces a fresh Skolem constant cc. The resulting clausal problem is

¬P(x)∨Q(x),P(c),¬Q(y).\neg P(x)\lor Q(x),\qquad P(c),\qquad \neg Q(y).

The constant denotes a witness in an expanded language. Skolemization preserves satisfiability in the appropriate sense: a model of the original existential statement can be expanded by choosing a witness, and a model of the Skolemized statement gives a model of the original statement after forgetting the new symbol.

It is not literal equivalence between formulas in the original language. When an existential depends on preceding universal variables, a Skolem function rather than a single constant is needed.

A complete resolution calculation

Resolve

¬P(x)∨Q(x)\neg P(x)\lor Q(x)

with P(c)P(c) using the substitution x:=cx:=c. The complementary literals cancel, leaving Q(c)Q(c).

Resolve Q(c)Q(c) with ¬Q(y)\neg Q(y) using y:=cy:=c. No literals remain. The result is the empty clause, representing falsity.

Every inference preserves the relevant consequence relation. The contradiction shows that the premises together with the negated goal are unsatisfiable; therefore the original conclusion follows.

This small example displays the whole architecture: normalize the problem, identify complementary literals, compute substitutions, and derive a refutation.

Larger problems introduce choices at every stage. Which clauses should be combined? Which literals should be selected? Which consequences are redundant? Those choices determine whether a mathematically complete method is computationally useful.

What unification contributes

Unification finds substitutions making expressions identical.

For instance, unifying

P(f(x),y)andP(f(a),b)P(f(x),y)\quad\text{and}\quad P(f(a),b)

requires x:=ax:=a and y:=by:=b.

A most general unifier leaves as much freedom as possible: every other unifier is an instance of it, in the standard sense. “Most general” does not mean the substitution with the fewest printed symbols.

The occurs check prevents an invalid finite-term solution to an equation such as

x=f(x).x=f(x).

No finite substitution can make xx and f(x)f(x) the same syntactic term: after substitution, one would be a proper subterm of the other. This is a statement about syntactic unification, not about equality in an arbitrary mathematical structure. If ff is interpreted as the identity function, the equation x=f(x)x=f(x) holds for every element. Some programming systems deliberately support cyclic or rational trees, but that changes the term domain and must be accounted for explicitly.

Unification allows one inference with variables to represent a family of ground inferences. It thereby converts a foundational existence theorem into a more economical computational method.

The lab below isolates one resolution inference. Choose complementary literals, inspect the unification equations and substitution, and then check the resulting clause. It does not claim to decide the full clause set.

Interactive lab · Automated deduction

Build a resolution inference

Choose one literal from each clause. Unify their atoms, then inspect the clause that follows.

Resolve P(?x) with ¬P(f(a)). Where else must the substitution be applied?

Write variables as ?x, constants as a, functions as f(a), negation as !, and disjunction as |. Subscripts ₁ and ₂ distinguish the clauses' independent variables. Input limits: six literals per clause and twelve nested term levels. Computation stops after 150 unification equations or 4,096 visited nodes in a term expansion.

Choose the complementary literals, then derive the resolvent.
Why the inference is sound

After substitution, the premises have the forms A ∨ C and ¬A ∨ D. In any model satisfying both, if A holds then D must hold; if A does not hold then C must hold. Hence C ∨ D holds. All free variables in the resulting clause are universally quantified.

Pfenning's lecture on substitution and unification explains the algorithm and its occurs check.

Scope and notation

One binary first-order resolution inference over finite syntactic terms. Variables are universally quantified within each clause and renamed apart before unification. The algorithm includes the occurs check and applies its substitution to both entire clauses. It does not perform factoring, equality reasoning, or complete proof search. Different constants need not denote different objects; a syntactic clash only prevents this inference.

Why factoring is part of completeness

A detail often lost in a summary of resolution is factoring: unifying two same-sign literals in one clause and keeping a single copy. Consider the universally quantified clauses

P(x)∨P(y),¬P(u)∨¬P(v).P(x)\lor P(y),\qquad \neg P(u)\lor\neg P(v).

The first forces every object to satisfy PP: instantiate xx and yy by the same object. The second forces every object not to satisfy PP. Over a nonempty domain they are inconsistent.

Factoring the positive clause with y:=xy:=x gives P(x)P(x); factoring the negative one gives ¬P(u)\neg P(u). A final resolution gives the empty clause. This explains why a completeness claim must specify the complete calculus, not only the familiar two-clause cancellation rule. In Robinson's 1965 presentation, the generalized resolution machinery incorporates the necessary unification of literals.

The mathematical bridge is a lifting argument. A refutation among particular ground instances can be represented by more general inferences on clauses with variables. Most general unifiers make that representation possible without committing prematurely to a particular ground term.

Herbrand's theorem and fairness

For an unsatisfiable set of equality-free first-order clauses in the usual Skolemized setting, Herbrand's theorem yields a finite collection of ground instances that is propositionally unsatisfiable: treating distinct ground atoms as Boolean variables already produces a contradiction. If the language has no ground term, one may add a fresh constant for the construction. Logical equality requires an additional treatment, such as equality axioms or an appropriate equality calculus; it cannot simply be treated as an unrelated predicate. The resolution account by Bachmair and Ganzinger explains the ground-instance and lifting arguments.

The theorem does not say that there is a small instance collection, or that an arbitrary enumeration will reach the right instances promptly.

Resolution's refutational completeness, with the appropriate treatment of factoring and the calculus's other requirements, shows that an unsatisfiable clause set has a resolution refutation. A search implementation must avoid indefinitely neglecting every route to such a refutation.

Fairness conditions make that requirement precise. Practical provers also use resource limits, selection policies, and incomplete modes. Failure to find a proof under those limits is not a proof that the conjecture is false.

How a saturation prover organizes its work

A useful architecture maintains processed clauses and a pool of unprocessed clauses. It selects a given clause from the pool, simplifies it, generates the permitted inferences involving that clause, then adds surviving consequences to the pool. These include inferences with processed clauses and any required one-clause inferences, such as factoring. Deriving the empty clause establishes unsatisfiability. Reaching a finite saturated set without it can support a satisfiability conclusion under the calculus's completeness and redundancy conditions; an unfinished run cannot.

Redundancy tests are therefore mathematical operations. For example, P(x)P(x) subsumes P(a)∨Q(a)P(a)\lor Q(a): substituting aa for xx makes the former's literals a subset of the latter's. The stronger clause already entails the weaker one. Deleting an arbitrary long clause merely because it is inconvenient has no such justification.

Selection also balances competing aims. Consistently choosing small clauses can produce useful short arguments but indefinitely postpone a necessary larger clause. Age-based selection can prevent that starvation. Practical combinations of size, age, term orderings, and literal selection connect logical completeness with the engineering of search. Bachmair and Ganzinger's account of saturation makes redundancy and fairness explicit parts of the theory, rather than afterthoughts to resolution.

Equality requires additional organization

Suppose we know a=ba=b and P(a)P(a). We want P(b)P(b).

One approach adds general equality axioms to an ordinary first-order prover. This is logically possible but can create a large and poorly directed search.

Paramodulation, associated with George Robinson and Larry Wos, incorporates replacement using equalities into the inference machinery. The example then becomes a direct replacement at the occurrence of aa.

The distinction between George Robinson and John Alan Robinson matters here: their contributions are often compressed into a single surname.

Term rewriting orients suitable equations as directed simplification rules. Knuth–Bendix completion, introduced in 1970, attempts to turn equations into a convergent rewriting system by resolving conflicts between reductions.

Completion can fail to terminate or encounter orientation difficulties. Its success depends on the equational theory and the chosen ordering; it is not a general decision procedure for all equations.

Superposition calculi, developed through work including Leo Bachmair and Harald Ganzinger, combine ordered equality reasoning with restrictions that control redundant inferences. This line became central to strong first-order provers with equality.

The Robbins problem

Herbert Robbins asked whether a particular equational axiom system already characterized Boolean algebras. The problem resisted substantial mathematical work.

In October 1996, William McCune's EQP found a proof establishing the needed result. The proof used earlier mathematical reductions, including work by Stephen Winker, and specialized equational reasoning.

McCune's project record preserves the input, proof, and program. The successful search established a Winker condition whose known consequence was that every Robbins algebra is Boolean.

The case illustrates a division of labor. Human work formulated the question, developed intermediate criteria, designed the prover, and configured the search. The machine found a particular formal derivation. Subsequent checking and mathematical exposition assessed and communicated the result.

It was a substantive mathematical discovery, but it does not show that general proof search had become easy or that every automated proof has the same architecture.

Induction created a different automation tradition

Portrait of Robert Boyer
Robert Boyer (b. 1946)
Sources and credit for Robert Boyer

Carlosusass. Via Wikimedia Commons. Image source · Public domain · Biographical dates

Portrait of J Strother Moore
J Strother Moore (b. 1947)
Sources and credit for J Strother Moore

Dennis Hamilton. Via Wikimedia Commons. Image source · CC BY 2.0 · Biographical dates

Structural mathematics and program verification frequently require induction. Resolution can reason from supplied induction instances, but first-order completeness does not discover the right invariant, generalization, or induction hypothesis automatically.

Robert Boyer and J Strother Moore began their prover in 1971 with recursive functions in a Lisp-based logic. Definitions had to satisfy a principle guaranteeing totality. Simplification and symbolic execution exposed the recursive structure from which the prover proposed induction schemes. Their first-person project history also explains the decisive role of user-proved rewrite lemmas; later Nqthm and ACL2 developed this approach further, with Matt Kaufmann central to ACL2.

For example, define list length by

ℓ([])=0,ℓ(a::xs)=1+ℓ(xs).\ell([])=0,\qquad \ell(a::xs)=1+\ell(xs).

To prove ℓ(xs++ys)=ℓ(xs)+ℓ(ys)\ell(xs\mathbin{++}ys)=\ell(xs)+\ell(ys), induction on xsxs follows the recursive definition of concatenation. The empty case reduces to ℓ(ys)=0+ℓ(ys)\ell(ys)=0+\ell(ys). In the step case, unfolding the definitions reduces the left side to 1+ℓ(xs++ys)1+\ell(xs\mathbin{++}ys). Applying the induction hypothesis gives 1+(ℓ(xs)+ℓ(ys))1+(\ell(xs)+\ell(ys)), equal by arithmetic to (1+ℓ(xs))+ℓ(ys)(1+\ell(xs))+\ell(ys).

The calculation is routine once the correct induction variable and generalized statement are available. Automated induction studies how to find those choices and supporting lemmas. The Boyer–Moore account of mechanized induction records the interaction of recursion analysis, simplification, generalization, and induction. These methods address a different organizing problem from unrestricted saturation, though systems can combine them.

Discovery and checking

A search program may contain complicated heuristics, indexing structures, and optimization code. A proof object or derivation trace can sometimes be checked by a simpler independent procedure.

This separation reduces the amount of search machinery that must be trusted for a particular conclusion. The checker must still implement the intended rules correctly, and the input must accurately formalize the theorem.

The distinction will recur in SAT certificates, proof assistants, and learned theorem proving. A method for proposing a proof and a method for accepting it need not be the same program.

The next computational limit

Undecidability explains why unrestricted first-order proof search cannot always decide its input. Even decidable reasoning tasks can require enormous resources. Propositional satisfiability exposes that second difficulty particularly clearly.

Check your understanding: what does a failed proof search establish?

Suppose a prover uses a sound, refutationally complete calculus but stops after sixty seconds without deriving the empty clause. Does that show the input is satisfiable?

No. Completeness says that an unsatisfiable input has a finite refutation, and a suitably fair unbounded search eventually finds one. It supplies no sixty-second bound. A satisfiability conclusion needs additional evidence, such as a model or a terminating saturated-set argument meeting the calculus's conditions. The same distinction applies if the timeout occurred while searching for a useful induction lemma.

Sources and further reading