Limitations of First-Order Logic
Prerequisites
🎯 Learning Objectives
- Understand decidability vs. semi-decidability of FOL
- Learn the Church-Turing theorem and its implications
- Understand Herbrand’s theorem and the Herbrand universe
- Know limitations that motivate probabilistic and higher-order approaches
1. Decidability and Semi-Decidability
A logic is decidable if there exists an algorithm that, given any sentence α, will always terminate and correctly determine whether α is valid (a tautology) or not.
- Propositional logic: Decidable (truth table, resolution — worst case exponential, but always terminates).
- First-order logic: Semi-decidable (undecidable).
The validity (entailment) problem for FOL is undecidable — there is no algorithm that can determine for every FOL sentence whether it is valid.
However, FOL is semi-decidable (also called recursively enumerable):
- If α is valid, a proof procedure will find a proof in finite time.
- If α is not valid, the procedure may run forever.
This means that any complete FOL theorem prover (like resolution) is not guaranteed to terminate on non-valid inputs. In practice, provers use depth bounds and heuristics.
| Property | Propositional Logic | FOL |
|---|---|---|
| Satisfiability | Decidable (NP-complete) | Semi-decidable |
| Validity | Decidable (co-NP-complete) | Semi-decidable |
| Entailment | Decidable | Semi-decidable |
| Complete proof procedure | Yes (always terminates) | Yes, but may not terminate on non-entailments |
2. Herbrand’s Theorem
For a set of sentences S, the Herbrand universe H(S) is the set of all ground terms constructible from the constant and function symbols in S:
- All constants in S are in H(S). (If none, add an arbitrary constant, say a.)
- If t1, …, tn ∈ H(S) and f is an n-ary function symbol in S, then f(t1, …, tn) ∈ H(S).
Given S = {P(a), ∀x (P(x) → P(f(x)))}:
- H(S) = {a, f(a), f(f(a)), f(f(f(a))), …}
The Herbrand universe is infinite because of the function symbol f.
A set of clauses S is unsatisfiable if and only if there exists a finite set of ground instances of clauses in S that is unsatisfiable (in propositional logic).
Significance: This reduces FOL satisfiability checking to propositional satisfiability — but the ground instances may be drawn from the (potentially infinite) Herbrand universe.
It guarantees that if a set of FOL clauses is unsatisfiable, we can detect this by examining a finite subset of ground instances. This is the theoretical basis for the completeness of resolution: systematically generating ground instances will eventually reveal unsatisfiability.
3. Decidable Fragments of FOL
While full FOL is undecidable, several useful fragments are decidable:
| Fragment | Restriction | Complexity |
|---|---|---|
| Monadic FOL | Only unary predicates, no function symbols | Decidable (NEXPTIME) |
| Two-variable fragment (FO²) | At most 2 variables | Decidable (NEXPTIME) |
| Guarded fragment | Quantifiers guarded by atoms | Decidable (2EXPTIME) |
| Bernays-Schönfinkel class | ∃*∀* prefix, no function symbols | Decidable (NEXPTIME) |
| Datalog (no function symbols) | Function-free definite clauses | Decidable (P-complete for ground queries) |
Datalog is widely used in databases and program analysis precisely because it avoids function symbols, making inference decidable and often tractable.
4. Expressiveness Limitations
4.1 Things FOL Cannot Express
- Transitive closure / Reachability: “x is an ancestor of y” requires an infinite disjunction or recursive definition that FOL cannot finitely capture over arbitrary graph structures.
- Cardinality statements: “There are exactly 5 dogs” requires progressively longer formulas as the count grows (n = 5 is technically expressible but impractically long).
- Fixed-point definitions: FOL lacks built-in recursion/fixed-point operators.
4.2 Higher-Order Logic (HOL)
In second-order logic, we can quantify over predicates and functions:
Second-order logic can express transitive closure, but is incomplete — no sound and complete proof system exists (Gödel’s incompleteness).
5. Why AI Needs More than FOL
FOL is purely logical — statements are True or False. Real-world AI domains require:
| Limitation | What’s Needed | Solution |
|---|---|---|
| No uncertainty | Degrees of belief | Probabilistic reasoning (Ch. 7) |
| Monotonic reasoning | Retract conclusions on new evidence | Non-monotonic logics, belief revision |
| Closed-world assumption issues | Default reasoning | Default logic, answer set programming |
| No learning | Acquire knowledge from data | Machine learning (Ch. 8) |
| Brittleness | Graceful degradation | Fuzzy logic, neural approaches |
Questions about decidability of FOL appear regularly. Remember: FOL validity/entailment is semi-decidable but not decidable. Propositional logic is decidable. Datalog (FOL without function symbols, with only definite clauses) is decidable.
Summary
- FOL is semi-decidable (Church-Turing) — proofs for valid sentences are found, but non-valid sentences may loop forever.
- Herbrand’s theorem guarantees finite ground witnesses for unsatisfiability.
- Decidable fragments (monadic, FO², Datalog) sacrifice expressiveness for termination.
- FOL cannot express transitive closure natively; higher-order logic can but loses completeness.
- Real AI systems augment FOL with probability, non-monotonic reasoning, and learning.