First-Order (Predicate) Logic
First-order logic (also called predicate logic) refines sentential logic by looking inside atomic statements — at objects, properties, relations, and quantifiers. It is the standard language in which modern mathematics is formalized. Where sentential logic cannot express that "every prime greater than is odd" follows from facts about individual numbers, first-order logic adds terms denoting objects, predicates denoting properties and relations, and quantifiers ranging over a domain.
As with sentential logic, the development separates syntax, semantics, and proof theory, and the central metatheorems — soundness, completeness, and compactness — tie them together.
Signatures and syntax
A first-order language (signature) specifies:
- a set of constant symbols (names for fixed objects);
- a set of function symbols , each with an arity ;
- a set of relation (predicate) symbols , each with an arity ;
- the distinguished binary relation equality (in first-order logic with equality).
Alongside there is a countable supply of variables .
Terms are built recursively: every variable and every constant is a term, and if are terms and is an -ary function symbol, then is a term. Terms are the noun phrases of the language — they denote objects.
Atomic formulas are for an -ary relation symbol , together with equalities . General formulas are built from atomic ones using the sentential connectives together with the quantifiers:
- the universal quantifier ("for all , ");
- the existential quantifier ("there exists such that ").
The two quantifiers are interdefinable: .
An occurrence of a variable is bound if it lies within the scope of a quantifier over that variable, and free otherwise. A sentence is a formula with no free variables — only sentences have a determinate truth value in a structure. Substitution replaces free occurrences of by the term , subject to the side condition that is free for in (no variable of is accidentally captured by a quantifier).
Structures and semantics (Tarski)
An -structure (model) consists of:
- a nonempty domain (universe) ;
- an element for each constant symbol ;
- a function for each -ary function symbol ;
- a relation for each -ary relation symbol .
To interpret formulas with free variables we also fix a variable assignment mapping variables to elements of . Terms denote via the obvious recursion, . Satisfaction is then defined by recursion on — Tarski's definition of truth:
- iff ;
- iff ;
- the connectives are handled by the sentential truth tables;
- iff for every ;
- iff for some .
For a sentence the assignment is irrelevant, and we write (" is a model of "). A set of sentences is a theory; means models every sentence of . The semantic notions lift directly:
- is valid () if it holds in every structure;
- entails () if every model of is a model of ;
- is satisfiable if it has at least one model.
Deductive systems
First-order proof systems extend the sentential ones with rules and axioms governing the quantifiers and equality. In a Hilbert-style presentation one typically adds:
- Universal instantiation: , provided is free for in ;
- Existential generalization: , with the same proviso;
- a generalization rule: from infer (when is not free in the assumptions);
- the equality axioms: reflexivity together with substitution/congruence schemas allowing equals to replace equals.
Natural-deduction and sequent formulations add matching / introduction and elimination rules with the customary eigenvariable side conditions. As before, denotes derivability.
The fundamental metatheorems
First-order logic sits at a remarkable sweet spot: it is expressive enough to formalize ordinary mathematics, yet well-behaved enough to satisfy strong metatheorems.
- Soundness: if then .
- Gödel's Completeness Theorem: if then . Equivalently, every consistent theory has a model. Thus and again coincide. (The standard proof is Henkin's: extend the theory with witnessing constants and build a term model out of the syntax itself.)
- Compactness Theorem: a theory has a model iff every finite subset of has a model. This follows from completeness, since proofs are finite. Compactness is the workhorse of model theory — it yields nonstandard models of arithmetic, infinite models from arbitrarily large finite ones, and much more.
- Löwenheim–Skolem Theorems: if a countable theory has an infinite model, it has models of every infinite cardinality. Downward: it has a countable model (the source of Skolem's paradox — a countable model of set theory that internally "believes" in uncountable sets; see Axiomatic Set Theory (ZFC)). Upward: it has arbitrarily large models. A corollary is that first-order logic cannot pin down an infinite structure up to isomorphism by its first-order theory alone.
These positive results are bounded by sharp limitations:
- Undecidability (Church–Turing): the set of first-order validities is not decidable — there is no algorithm that, given a sentence, always halts and correctly reports whether it is valid. It is, however, semidecidable (recursively enumerable): completeness guarantees a proof search that halts on every validity. This is the precise sense in which first-order logic is harder than sentential logic, whose validity is decidable by truth tables.
- Gödel's Incompleteness Theorems: any consistent, effectively axiomatized theory that interprets enough arithmetic is incomplete — there is a sentence with and — and moreover cannot prove its own consistency. (Note the contrast: completeness is a property of the logic — every valid sentence is provable; incompleteness is a property of particular theories — they fail to decide every sentence in their language.)
Beyond first order
First-order quantifiers range only over individuals. Second-order logic also quantifies over relations and functions and can categorically characterize structures like the natural numbers (Peano's axioms with full second-order induction), but it pays for this expressiveness by losing completeness and compactness — there is no sound and complete effective proof system for full second-order semantics. This trade-off, expressiveness against metatheoretic tameness, is exactly why first-order logic is the default foundation for mathematics. See Second-Order and Higher-Order Logic for the full development.
Sentential vs. first-order logic
| Sentential logic | First-order logic | |
|---|---|---|
| Atoms | propositional variables | predicates , equalities |
| Extra apparatus | truth-functional connectives only | terms, variables, quantifiers |
| Models | truth assignments | structures with a domain + interpretations |
| Soundness & completeness | yes | yes (Gödel) |
| Compactness | yes | yes |
| Decidable validity | yes (truth tables) | no — only semidecidable |
| Categoricity of | n/a | no (Löwenheim–Skolem) |
The recurring theme is the interplay of three layers — syntax, semantics, and proof — and the soundness/completeness theorems that lock provability () and truth () together in both systems.