First-Order Logic and Predicate Calculus
First-Order Logic (FOL), also called predicate calculus, is a formal system that extends propositional logic with quantifiers (∀, ∃), variables, predicates, and functions, allowing precise statements about objects and their relationships. Key result: FOL is sound and complete (Gödel, 1929) — every logically valid formula is provable, and every provable formula is valid. Where it applies: mathematics foundations, automated theorem proving, formal verification, database query languages, and the semantics of natural language. Who/when: Frege (1879), Peirce, Skolem, Hilbert & Ackermann, and Gödel (1929–1930).
Propositional logic treats "Socrates is mortal" as a single opaque atom. First-order logic decomposes it into a predicate applied to a term: . By introducing variables and quantifiers, we can then say things like "every human is mortal," , and combine such statements to derive new ones. The genius is the clean separation between syntax (what strings count as formulas and proofs) and semantics (what those strings mean over a structure), bridged by the soundness and completeness theorems.
Formal Statement
A first-order signature (or vocabulary) consists of:
- A set of constant symbols (names for fixed objects).
- A set of function symbols , each with an arity .
- A set of predicate (relation) symbols , each with an arity .
Together with a fixed countable supply of variables , the logical symbols , the quantifiers , the equality symbol (in FOL with equality), and parentheses.
Terms are defined recursively:
Derivation hint: A term is either a variable, a constant, or a function symbol applied to the right number of previously-built terms; this recursion bottoms out at variables and constants.
Formulas are defined recursively:
Derivation hint: Atomic formulas come from applying a predicate to terms or asserting equality; complex formulas are built by connectives and quantifiers. The first two cases (atomic) anchor the recursion.
An occurrence of a variable is bound if it lies within the scope of a quantifier or ; otherwise it is free. A formula with no free variables is a sentence (closed formula). Only sentences have a definite truth value in a structure. The set of free variables of is written . The substitution replaces every free occurrence of by the term , provided is free for in (no variable of becomes accidentally captured by a quantifier).
A structure (model) for signature consists of a nonempty domain and an interpretation assigning:
- to each constant an element ;
- to each -ary function symbol a function ;
- to each -ary predicate a relation .
A variable assignment maps variables to elements of . The value of a term and the satisfaction relation are defined recursively. The two crucial clauses are:
Derivation hint: The universal quantifier is satisfied exactly when the body holds under every possible reassignment of to an element of the domain — the assignment agrees with except it sends to .
Derivation hint: The existential is the dual; satisfaction needs only one witness . Note , so [4] follows from [3] and the clause for .
- is valid () if for every structure and assignment.
- is satisfiable if some structure satisfies it.
- A set of sentences entails () if every model of all of is also a model of .
Derivation hint: If every model of satisfies , no model can satisfy both and , and conversely; this is the semantic refutation principle underlying resolution.
For a first-order theory with a sound and complete deductive system (e.g., a Hilbert system or natural deduction):
Derivation hint: Soundness () is proved by induction on proof length, checking each inference rule preserves truth. Completeness () is proved by contraposition: if then is consistent, hence (Henkin construction) has a model, so .
Compactness: has a model iff every finite subset of has a model.
Downward Löwenheim–Skolem: If a countable signature theory has an infinite model, it has a countably infinite model.
Upward Löwenheim–Skolem: If it has an infinite model, it has models of every infinite cardinality .
Why It Holds / Derivation
We show by induction on the length of the derivation, using a natural-deduction-style system.
Step 1 (Base — assumptions/axioms). If , then trivially every model of satisfies . Logical axioms (e.g., ) are tautologies, valid in every structure.
Step 2 (Modus ponens). Suppose by induction and . Take any model . Then and , so by the semantic clause for , . Hence .
Step 3 (Universal generalization). Suppose and ; we must show . Let under assignment . For any , since is not free in , also under , so . By [3], .
Step 4 (Universal instantiation). From infer for free for . If , then holds for every domain element, in particular for , which (by the substitution lemma) is what asserts. Each rule preserves validity over models of ; by induction the full derivation does.
∎Goal: a consistent has a model.
Step 1. Expand the language with a countable set of fresh witness constants. For each formula , add a Henkin axiom with a new constant . The resulting theory remains consistent.
Step 2. Extend to a maximal consistent set (Lindenbaum's lemma): every sentence or its negation is in , and is deductively closed.
Step 3. Build the term model: the domain is the set of closed terms, quotiented by the equivalence . Interpret symbols by their syntactic action on terms.
Step 4 (Truth lemma). Prove by induction on formula structure that . The Henkin axioms make the existential case work: a witness constant supplies the required domain element.
Step 5. Since , . Thus consistency implies satisfiability; contrapositively, .
∎Born in Brünn (now Brno), Gödel proved the completeness theorem for first-order logic in his 1929 doctoral dissertation at the University of Vienna, settling a problem Hilbert and Ackermann had posed. Just two years later he overturned the foundationalist program with his incompleteness theorems, showing that any consistent, sufficiently strong, recursively axiomatized theory cannot prove its own consistency and leaves true arithmetical sentences unprovable. The contrast is essential: completeness is about the logic (FOL captures all valid consequences), while incompleteness is about particular theories (no axiom set fully captures arithmetic). Gödel later emigrated to Princeton, became a close friend of Einstein, and made deep contributions to set theory (the constructible universe and the consistency of CH and AC) and even general relativity.
Building Intuition
Think of FOL as a precise grammar for "objects and their relationships." A structure is a world: a bag of objects together with facts about which properties they have and which relations hold among them. A formula with free variables is like a sentence with blanks — "___ loves ___" — that becomes true or false only once you fill the blanks with specific objects (the assignment ). The quantifiers automate the filling: says "try every object in the blank and it always works," while says "some object makes it work." The key conceptual leap from propositional logic is quantifier scope and variable binding. The same letter can mean different things in different scopes, exactly like local variables in a programming function. Capture-avoiding substitution is the logical analogue of safe variable renaming. And the order of quantifiers matters profoundly: "" (every number has a bigger one — true for integers) is wholly different from "" (one number bigger than all — false).
Worked Examples
Given: Domain , with the usual interpretation of and . Consider the sentence
Step 1 — Read the structure. The quantifiers range over all integers; is integer addition; is equality.
Step 2 — Verify the body for arbitrary . Fix any integer (the value assigned to ). We need a with .
Step 3 — Supply a witness. Take , which exists in . Then holds. By clause [4], is satisfied under .
Step 4 — Generalize. Since was arbitrary, by clause [3] the universal statement holds.
Boxed answer:
Contrast: over this is false (no witness for , since ) — demonstrating that truth depends on the structure.
Given: Prove
Step 1 — Existential elimination. From , introduce a fresh constant (not occurring elsewhere) with the assumption .
Step 2 — Universal instantiation. From infer by substituting for (rule from proof Step 4 above).
Step 3 — Modus ponens. From and derive .
Step 4 — Existential introduction. From derive .
Step 5 — Discharge. Since contains no occurrence of the fresh constant , the -elimination box closes legitimately, yielding from the original premises.
Boxed answer:
The eigenvariable condition (fresh not in conclusion or premises) is what makes Step 5 valid; violating it leads to fallacies.
Common Misconceptions
A very common error is treating and as interchangeable — they are not (see the diagram above). Another frequent mistake is illegitimate substitution that captures variables: substituting for in would wrongly yield , a falsehood, because was not free for . Always rename bound variables first. Finally, in natural deduction, the eigenvariable / fresh-constant condition on -introduction and -elimination is not optional bookkeeping — dropping it lets you "prove" , which is invalid.
One might hope FOL can characterize the natural numbers. It cannot. By compactness, add to the Peano axioms a new constant together with the infinitely many sentences . Every finite subset is satisfiable (interpret as a large enough standard number), so by compactness the whole set has a model — a nonstandard model of arithmetic containing an "infinite" element unreachable from by finitely many successors. Likewise, "there are finitely many objects" is not expressible by any single first-order sentence, nor is the notion of a well-ordering or connectedness of a graph. These limitations motivate second-order logic and infinitary logics.
Connections
First-order logic sits between weaker and stronger systems. It strictly extends Propositional Logic by adding quantifiers and internal structure to atomic statements; conversely, the propositional fragment is recovered by treating -ary predicates as proposition letters. Above it lies Second-Order Logic, which quantifies over predicates and sets, gaining expressive power (it can characterize categorically) but losing completeness and compactness. FOL is the working language of Zermelo–Fraenkel Set Theory, in which virtually all mathematics is formalized, and its metatheory connects to Model Theory (study of structures and definability) and Computability Theory (via the undecidability of validity). The deductive side links to Natural Deduction and Resolution, the backbone of automated provers.
Real-World Applications
Historical Development
Subtleties & Limits
First-order logic is undecidable in general (no algorithm decides validity), yet many fragments are decidable, and the precise boundary is a rich research area: the two-variable fragment is decidable, as is the guarded fragment, while is undecidable. Determining the exact complexity of important fragments (e.g., extensions with counting quantifiers, transitive closure, or modal/temporal operators) remains active. Open and hard practical questions include: scalable decision procedures for combined theories (SMT), the precise expressive trade-offs of description logics for the Semantic Web, and the long-standing program of finite model theory — where compactness and completeness fail and whose central question, the existence of a logic capturing exactly the polynomial-time queries (Chandra–Harel / Gurevich conjecture), is intimately tied to P versus NP.
See Also
Propositional Logic · Second-Order Logic · Model Theory · Zermelo–Fraenkel Set Theory · Gödel's Incompleteness Theorems · Natural Deduction · Resolution · Computability Theory · Finite Model Theory