Undecidability of Validity and Satisfiability
Undecidability of Validity and Satisfiability
Undecidability of Validity and Satisfiability
In this lecture we consider the computational problems of determining validity and satisfiability of
first-order formulas. We show that both validity and satisfiability are undecidable. On a positive
note, we show that validity is semi-decidable (or recursively enumerable). Intuitively this is because
a valid formula F has a finite witness of its validity—namely a finite resolution refutation of ¬F .
Satisfiability is not semi-decidable however. Intuitively, there need not be finite witness that a
given formula is satisfiable. In particular, there are satisfiable formulas that have no finite models.
1 Semi-Decidability of Validity
Theorem 1. Validity of first-order formulas is semi-decidable.
Proof. Recall that a semi-decision procedure for validity should halt and return “valid” when given
a valid formula as input, but otherwise may compute forever. Such a procedure is as follows. (Note
that there is no loss of generality in restricting to closed formulas since F is valid iff ∀xF is valid.)
The procedure relies on the fact that F is valid if and only if ¬F is unsatisfiable. To show
unsatisfiability of ¬F we transform it into an equisatisfiable formula G in Skolem form. Then, by
the refutation completeness of ground resolution, G is unsatisfiable iff there is a ground resolution
refutation of G. If such a refutation exists it will eventually be discovered by the procedure. Note
that for each n the set of clauses Res∗ (G1 ∪ . . . ∪ Gn ) that can be derived by resolution from
G1 ∪ . . . ∪ Gn is computable in a finite amount of time. (Here we regard each Gi as a set of
clauses.)
In the above proof it was convenient to invoke the refutation completness of ground resolution.
However ulitmately the result relies on Herbrand’s Theorem and the Compactness Theorem for
propositional logic, which together guarantee that that F is valid if and only if some finite subset
of E(G) is unsatisfiable.
1
2 Undecidability of Validity and Satisfiability
In this section we recall the definition of Post’s Correspondence Problem (PCP), and show how to
transform a given instance of this problem into a first-order formula such that the instance has a
solution if and only if the formula is valid. It follows that the validity problem for first-order logic
is undecidable.
An instance of Post’s correspondence problem consists of a finite set of tiles. Each tile has a
bit-string on the top and a bit-string on the bottom. For example, we could have tiles
1 10 011
, ,
101 00 11
A solution to the problem is a sequence of tiles, allowing the same tile multiple times, such that
the top string equals the bottom string. In the above example a solution is
1 011 10 011
101 11 00 11
F1 = P (f1 (e), f101 (e)) ∧ P (f10 (e), f00 (e)) ∧ P (f011 (e), f11 (e))
F2 = ∀u ∀v (P (u, v) → P (f1 (u), f101 (v)) ∧ P (f10 (u), f00 (v)) ∧ P (f011 (u), f11 (v)))
F3 = ∃u P (u, u) .
We claim that F1 ∧ F2 → F3 is valid if and only if the PCP instance has a solution.
Given a general instance P = {(x1 , y1 ), . . . , (xk , yk )} of PCP we have the formulas
k
^
F1 = P (fxi (e), fyi (e))
i=1
k
^
F2 = ∀u ∀v (P (u, v) → P (fxi (u), fyi (v)))
i=1
F3 = ∃u P (u, u) .
2
Sketch. Suppose that F1 ∧ F2 → F3 is valid. Consider the Herbrand structure H for which
PH = {(fu (e), fv (e)) : ∃i1 . . . ∃it . u = xi1 . . . xit and v = yi1 . . . yit } .
Clearly H satisfies F1 ∧ F2 . Thus it must hold that H satisfies F3 . But this means that P has a
solution.
Conversely suppose that P has a solution. We show that F1 ∧ F2 → F3 is valid. To this end,
consider a structure A that satisfies F1 ∧ F2 . Then we can show by induction on t that for any
sequence of tiles i1 . . . it , A |= P (fu (e), fv (e)), where u = xi1 . . . xit and v = yi1 . . . yit . But since P
has a solution, A |= P (fu (e), fu (e)) for some string u. Thus A |= F3 .
Corollary 3. The satisfiability and validity problems for first-order logic are undecidable.
It follows from Theorem 1 and Corollary 3 that satisfiability is not even semi-decidable. Indeed
if satisfiability were semi-decidable then we could decide validity as follows. Given a formula F ,
either F is valid or ¬F is satisfiable. Thus we could decide validity of F by simultaneously running
a semi-decision procedure for validity on F and a semi-decision procedure for satisfiability on ¬F .