What It Adds Over Propositional Logic
Propositional logic treats whole sentences as atoms. It cannot say "every natural number has a successor"; it can only treat that English sentence as a single propositional letter. Predicate logic, also called first-order logic, breaks the atom open and gives us:
- Terms: variables (), constants (), and function symbols (, , ). Terms denote objects in the domain of discussion.
- Predicates: relation symbols (, , ). Predicates denote properties and relations.
- Quantifiers: the universal and the existential . Quantifiers say for all or there exists.
The combination is enough to express most of mathematics. Statements like "every prime greater than 2 is odd" or "there exists an irrational number whose square is rational" go directly into first-order logic over arithmetic. Whether everything in mathematics is expressible in first-order logic is a separate, more subtle question, taken up below.
This page assumes What Is Logic?, Validity vs Soundness, Syntax vs Semantics in Formal Systems, and Propositional Logic. The construction of predicate logic uses every concept introduced in those pages. If anything below is unfamiliar, read them first.
Notation: Terms, Atomic Formulas, Quantified Formulas
The alphabet of first-order logic over a signature :
- A countable set of variables: .
- The signature's constant symbols: .
- The signature's function symbols, each with an arity: .
- The signature's predicate symbols, each with an arity: .
- Logical connectives from propositional logic: .
- Quantifiers: (universal) and (existential).
- Auxiliary punctuation: parentheses, comma.
The signature is what fixes which "language" we are working in. Arithmetic uses plus equality. Set theory uses just plus equality. Group theory uses . Different signatures, same logical machinery on top.
The formation rules are recursive.
Terms:
- Every variable is a term.
- Every constant symbol is a term.
- If is an -ary function symbol and are terms, then is a term.
Atomic formulas:
- If is an -ary predicate symbol and are terms, then is an atomic formula.
- If and are terms, then is an atomic formula (if equality is included in the signature).
Formulas:
- Every atomic formula is a formula.
- If is a formula, so is .
- If and are formulas, so are , , , .
- If is a formula and is a variable, then and are formulas.
- Nothing else is a formula.
A sentence is a formula with no free variables (every variable is bound by a quantifier in whose scope it appears).
By these rules:
- is a sentence: every in the domain has property .
- is a sentence: some has both and .
- alone is a formula but not a sentence: is free.
- is a sentence: for every , there is some standing in relation to it.
Tarski-Style Semantics: Satisfaction in a Structure
A first-order formula does not have a truth value on its own. It has a truth value relative to a structure. This is the central conceptual move.
A structure for signature consists of:
- A non-empty domain (the universe of discourse).
- For each constant symbol , an element .
- For each -ary function symbol , a function .
- For each -ary predicate symbol , a relation .
- (When equality is in the signature) the relation is identity on .
An assignment is a function from variables to elements of . The assignment is needed to evaluate formulas with free variables; for sentences it is irrelevant.
Tarski's recursive definition of satisfaction. We write to mean the structure under assignment satisfies .1
For atomic formulas:
- iff .
- iff and are the same element of .
For propositional connectives:
- iff not .
- iff and .
- (etc., as in propositional logic)
For quantifiers:
- iff for every , .
- iff for some , .
Here denotes the assignment that agrees with everywhere except at , where it sends to .
A sentence is true in (write ) iff for any (equivalently, every) assignment . The choice of does not matter for sentences because none of their variables are free.
A set of sentences semantically entails , written , iff every structure that satisfies all of also satisfies .
A Worked Example
Take a tiny structure with domain , no constants, and one binary predicate interpreted as the standard ordering on :
.
Evaluate the sentence in .
Reading: "for every , there is some such that ."
Check:
- : is there with ? Yes: works (also ).
- : is there with ? Yes: .
- : is there with ? No: no element of is greater than 2.
So . The sentence is false in this structure. It would be true in because the natural numbers have no maximum, but it is false in the bounded .
Now evaluate in the same .
Reading: "there is some such that for every , ."
Check whether any is greater than every element. None: 0 is not greater than 1 or 2; 1 is not greater than 2; 2 is not greater than itself (since the ordering is strict). So .
The two sentences differ only in the order of the quantifiers. Both are false in this structure, but they are not the same sentence. In general, does not entail , and vice versa. The former says everyone has a partner; the latter says someone is everyone's partner. The order matters.
The Natural-Deduction Quantifier Rules
Predicate logic extends propositional natural deduction with introduction and elimination rules for the quantifiers.
Universal quantifier:
- -introduction: if you can derive for an arbitrary fresh constant that does not appear elsewhere in your assumptions, then you may infer .
- -elimination (universal instantiation): from , infer for any term .
Existential quantifier:
- -introduction (existential generalization): from , infer .
- -elimination: from , assume for a fresh constant ; if you can derive some conclusion (not mentioning ), discharge the assumption and infer .
The "fresh constant" condition in -introduction and -elimination is the classic technical hurdle for students. It captures the informal idea: to prove "for all," show it for an arbitrary individual; to use "there exists," reason about some individual whose specific identity does not enter the conclusion.
A worked derivation. To show :
1. ∀x (P(x) → Q(x)) premise
2. ∀x P(x) premise
3. P(c) → Q(c) ∀-elim from 1, with c fresh
4. P(c) ∀-elim from 2
5. Q(c) modus ponens on 3, 4
6. ∀x Q(x) ∀-intro on 5 (c fresh, not in 1 or 2)
The derivation is a syntactic proof. Combined with the soundness theorem below, it shows the conclusion is true in every structure satisfying both premises.
Soundness, Completeness, Undecidability
Three results that together characterize first-order logic. The first two are good news; the third is bad news.
Soundness theorem. If , then . Anything provable in the natural-deduction system is true in every model of the premises. The proof is by induction on the structure of derivations: each rule is shown to preserve truth in every structure.
Completeness theorem (Gödel 1929/30).2 If , then . Anything semantically valid has a syntactic proof. This is far harder than soundness; the standard proof uses Henkin's method (1949), constructing a witnessing model from a maximally consistent extension of .
Undecidability theorem (Church 1936; Turing 1936). There is no algorithm that, given an arbitrary first-order sentence , decides whether . The set of valid first-order sentences is recursively enumerable (we can list them by enumerating proofs) but not recursive (we cannot decide membership in finite time for arbitrary inputs).
The contrast with propositional logic is sharp:
| Property | Propositional logic | First-order logic |
|---|---|---|
| Sound? | Yes | Yes |
| Complete? | Yes (Post 1921) | Yes (Gödel 1930) |
| Decidable? | Yes (truth tables, ) | No (Church-Turing 1936) |
Predicate logic is the gold standard of formal mathematical reasoning, but the cost of the expressive jump from propositional logic is decidability.
What First-Order Logic Cannot Express
First-order logic is expressive enough for most working mathematics, but several intuitive concepts escape it.
Finiteness. "There are only finitely many such that " cannot be expressed in first-order logic. By the compactness theorem (a consequence of completeness), if a first-order theory has arbitrarily large finite models, it has an infinite model. A first-order theory cannot pin down "finite" exactly.
Continuity (in the standard formulation). The standard analytic definition of a continuous function uses second-order quantification over neighborhoods. First-order analysis can express continuity in a single signature with carefully chosen primitives, but the natural mathematical statement requires second-order machinery.
Identity-of-indiscernibles in the strong sense. "For any property, has it iff has it" requires quantifying over properties, which is second-order. First-order identity is a primitive relation between objects, not a quantification over their predicates.
The natural numbers up to isomorphism. First-order Peano arithmetic has non-standard models containing infinite-but-finite-looking elements. Pinning down uniquely requires second-order induction.
The standard escape is higher-order logic, which adds quantification over predicates and functions. Higher-order logic is more expressive but loses Gödel completeness: there are higher-order semantic validities that are not provable in any sound, recursively-axiomatizable system. Choosing first-order versus higher-order is therefore a genuine trade-off, not a question of one being uniformly better.
Common Confusions
Confusion 1: vs . The most common quantifier mistake. says "for each , some depends on it." says "there is one fixed that works for every ." The second implies the first; the first does not imply the second. Everyone has a mother (universal-existential) does not entail someone is everyone's mother (existential-universal).
Confusion 2: scope. is ambiguous in informal notation. Strictly, by precedence, scopes only over , so the formula reads with free in the consequent. The intended reading is usually , with parentheses making the scope explicit. When in doubt, parenthesize.
Confusion 3: completeness vs incompleteness. Gödel proved both a completeness theorem (1929/30, for first-order logic) and incompleteness theorems (1931, for formal arithmetic). They are not contradictory. First-order logic itself is complete: every semantic validity has a syntactic proof. Theories in first-order logic, like first-order Peano arithmetic, can be incomplete: there are sentences in their language that are neither provable nor refutable from the theory's axioms. The distinction is between the logic and a particular theory expressed in it.
Confusion 4: recursive vs recursively enumerable. First-order validity is recursively enumerable but not recursive. We can list valid sentences by enumerating proofs, but given an arbitrary sentence, there is no general algorithm to decide whether it is valid in finite time. If the sentence is valid, search will eventually find a proof; if it is invalid, search may run forever without ever discovering that fact.
Three Exercises
Exercise 1. Translate the following English statements into first-order logic, using a signature with constant , function symbol (successor), and binary predicate :
(a) Zero is the smallest natural number. (b) Every natural number has a successor. (c) For every natural number, there is a larger natural number. (d) No natural number is its own successor.
Exercise 2. Decide whether the inference is valid. If valid, give a natural-deduction derivation. If invalid, give a structure showing the premises true and the conclusion false.
Premise 1: . Premise 2: . Conclusion: .
Exercise 3. Consider the structure with domain , unary predicate with , and binary predicate with . Evaluate each sentence in :
(a) . (b) . (c) . (d) .
Answers
Answer 1:
(a) . This says every is either zero or greater than zero. (Equivalently: , depending on whether is strict.)
(b) . Every has some that is its successor. If we treat as a total function symbol, this is automatic from the syntax: is always a term, denoting an element of the domain. The interesting first-order statement is more often: , expressing the relation between successor and ordering.
(c) . The unboundedness statement.
(d) , equivalently .
Answer 2: valid. Derivation:
1. ∀x (P(x) → Q(x)) premise
2. ∃x P(x) premise
3. | P(c) assumption (for ∃-elim)
4. | P(c) → Q(c) ∀-elim from 1
5. | Q(c) modus ponens on 3, 4
6. | ∃x Q(x) ∃-intro on 5
7. ∃x Q(x) ∃-elim on 2, discharging 3
The fresh-constant convention is satisfied: does not appear in 1 or 2.
Answer 3.
(a) : false. but . The sentence requires every domain element to be in .
(b) : false. For : we need and . But , only . For : we need and . but . Neither works.
(c) : true. For : works since . For : works since .
(d) : true. For : holds. For : does not hold, but holds (with ).
Note that (b) and (c) differ only in quantifier order, and they have different truth values in the same structure. This is the canonical vs distinction in action.
Where Predicate Logic Lives in Practice
Three concrete uses.
Mathematical practice. Modern mathematical proofs are, with rare exceptions, formalizable in first-order logic plus set-theoretic axioms (typically ZFC). First-order logic is the default substrate of working mathematicians whether or not they consciously think in those terms. The Mizar, Metamath, and Lean libraries are large-scale formal-mathematics projects that demonstrate this concretely.
Database theory and query languages. First-order logic is essentially equivalent in expressive power to relational algebra, the formal foundation of relational databases. SQL queries can be translated to first-order formulas over the database's relations. Codd's seminal database papers (1970-1972) made this connection explicit.
Knowledge representation in AI. Description logics, OWL, and many classical AI knowledge bases use restricted fragments of first-order logic for tractability. The full first-order language is too expressive (undecidable) for general inference; carefully chosen sublanguages preserve decidability while keeping enough expressiveness for the domain.
The general lesson: first-order logic is the expressive target for many practical systems, with restrictions added to recover decidability or efficiency.
Prerequisites and Next Pages
- Prerequisites: What Is Logic?, Validity vs Soundness, Syntax vs Semantics in Formal Systems, Propositional Logic, What Is a Symbolic System?.
- Next: Modal Logic, the natural extension that adds operators for necessity and possibility.
- Next: Russell's Paradox, which exposes the naive comprehension principle that motivated the development of modern axiomatic set theory.
- Forward link: Goedel's incompleteness theorems (treated in Syntax vs Semantics) build directly on first-order Peano arithmetic.
References
Primary texts:
- Frege, Gottlob. Begriffsschrift. 1879. Introduces the modern notation for quantifiers and binding. The most important single document in the history of logic since Aristotle.
- Tarski, Alfred. "The Concept of Truth in Formalized Languages." 1933. The recursive definition of satisfaction. The technical foundation of modern model theory.
- Gödel, Kurt. Über die Vollständigkeit des Logikkalküls (On the Completeness of the Logical Calculus). 1929/30 dissertation. The completeness theorem for first-order logic.
- Church, Alonzo. "An Unsolvable Problem of Elementary Number Theory." American Journal of Mathematics 58, no. 2 (1936): 345-363.
- Turing, Alan M. "On Computable Numbers, with an Application to the Entscheidungsproblem." Proceedings of the London Mathematical Society s2-42 (1936): 230-265. The Church-Turing theorem on the undecidability of first-order validity.
- Henkin, Leon. "The Completeness of the First-Order Functional Calculus." Journal of Symbolic Logic 14, no. 3 (1949): 159-166. The standard modern proof of Gödel's completeness theorem.
Modern reference:
- Mendelson, Elliott. Introduction to Mathematical Logic. CRC Press, 6th ed., 2015. Standard graduate-level textbook with full treatment of soundness, completeness, and undecidability.
- Enderton, Herbert. A Mathematical Introduction to Logic. Academic Press, 2nd ed., 2001. Cleaner notation than Mendelson; same depth.
- van Dalen, Dirk. Logic and Structure. Springer, 5th ed., 2013. Uses natural deduction throughout; especially good on the proof-theoretic side.
- Boolos, George, John Burgess, and Richard Jeffrey. Computability and Logic. Cambridge, 5th ed., 2007. The bridge between first-order logic and computability theory.
Stanford Encyclopedia entries (link, do not paraphrase):
- "Classical Logic."
- "First-Order Model Theory."
- "Tarski's Truth Definitions."
- "Goedel's Theorems" (covers both completeness and incompleteness).
Footnotes
-
Tarski, Alfred. "The Concept of Truth in Formalized Languages." 1933. The recursive definition of satisfaction is the technical heart of the paper. The point is to define truth without circularity by stratifying object language and metalanguage. ↩
-
Gödel, Kurt. Über die Vollständigkeit des Logikkalküls. Doctoral dissertation, University of Vienna, 1929. Published in 1930. Often confused with Gödel's incompleteness theorems (1931), which are about formal systems for arithmetic, not first-order logic itself. The distinction is sharp: first-order logic is complete; first-order Peano arithmetic is incomplete. ↩