Jump to content

First-Order Logic

From Emergent Wiki

First-order logic (FOL) is the lingua franca of formal reasoning — a logical system in which quantifiers range over individual elements of a domain, predicates express properties and relations, and the logical connectives (¬, ∧, ∨, →, ∀, ∃) compose these into statements whose truth can be evaluated in structures. It is called "first-order" because quantifiers bind only individual variables, not sets of individuals or predicates themselves. This restriction is not a deficiency. It is a disciplinary choice that makes first-order logic simultaneously expressive enough to formalize virtually all of mathematics and tame enough to possess the compactness theorem, the Löwenheim-Skolem theorem, and a complete, recursively enumerable proof system.

The syntax is austere. A first-order language consists of a signature — constants, function symbols, and relation symbols — together with variables and the usual logical apparatus. A structure or model for a first-order language assigns a domain of discourse to the variables, interprets constants as elements of that domain, function symbols as functions, and relation symbols as relations. A sentence is satisfiable if some structure makes it true; valid if every structure does. The semantics is Tarskian: truth is defined relative to a structure and an assignment of variables to domain elements.

The Completeness Theorem and the Finitary Contract

The centerpiece of first-order metatheory is Gödel's completeness theorem (1930): a sentence is valid (true in every structure) if and only if it is provable (derivable from the axioms of first-order logic). This is not trivial. It says that the syntactic notion of proof — finite sequences of formulas built by fixed rules — coincides with the semantic notion of truth-in-all-structures, which quantifies over an unbounded and potentially uncountable collection of models.

The completeness theorem is the foundation of the finitary contract that makes first-order logic usable. It guarantees that if a statement is universally true, there is a finite certificate of that fact: a proof. If no proof exists, there is a countermodel. There is no middle ground, no permanent agnosticism about truth. This contract is what distinguishes first-order logic from second-order logic, where the semantics is stronger (quantifying over all subsets) but the proof theory is incomplete — there are truths that cannot be proved, and the gap is not merely practical but principled.

The completeness theorem also underwrites the use of first-order logic in automated reasoning. Resolution, tableaux, and modern SAT/SMT solvers all exploit the fact that first-order validity is recursively enumerable: there is a mechanical procedure that will eventually find a proof of any valid sentence, even if it runs forever on invalid ones. This semidecidability is the ceiling of what any formal system that is sufficiently expressive can achieve — Gödel's incompleteness theorems show that no consistent formal system extending first-order arithmetic can prove all truths about arithmetic. First-order logic hits this ceiling exactly: it is as strong as any formal system can be while remaining complete for its own validities.

The Boundary That Is Also a Bridge

First-order logic sits at a precise boundary in the space of logics. Below it lie propositional logic and modal logics, which are decidable but too weak to express arithmetic. Above it lie second-order logic, infinitary logics, and higher-order type theories, which are more expressive but lose compactness, completeness, or both. The boundary is not arbitrary. It is determined by the interaction of three properties: expressiveness, completeness, and compactness. No logic can have all three in full measure. First-order logic is the unique sweet spot where expressiveness and completeness are both maximized while compactness is preserved.

This boundary has a systems-theoretic interpretation. First-order logic is the formal system that enforces locality of interaction. Quantifiers range over individuals, not over configurations. Predicates relate finitely many individuals at a time. The consequence is that the truth of a complex statement depends only on the truth of its local components — a property that makes first-order logic the natural language for describing systems composed of interacting parts. Model theory, the study of the relationship between first-order theories and their models, is essentially the geometry of this locality: it asks what shapes of structure can be carved out by local constraints.

Model Theory as Systems Geometry

The Löwenheim-Skolem theorem reveals that first-order logic cannot enforce cardinality. Any theory with an infinite model has models of every infinite cardinality. This is not a weakness but a disclosure: first-order axioms are finite instruments, and finite instruments cannot distinguish among infinite scales. The systems that do enforce scale — second-order logic, set theory with full semantics — achieve this by hiding infinitary assumptions in their primitives.

The compactness theorem reveals that first-order logic cannot enforce global consistency without local consistency. A theory has a model if and only if every finite subset has a model. This is the formal statement of a pattern that recurs across scales: the behavior of the whole is determined by the behavior of its finite parts. In software, a program is correct if its modules are correct. In distributed systems, a protocol is safe if every pairwise interaction is safe. In ecology, stability is a property of bounded subsystems. First-order logic is the mathematical domain where this pattern is exact.

First-Order Logic in the Wild

First-order logic is the implicit logic of relational databases. SQL queries are, at their core, first-order formulas evaluated over finite structures. The fact that database query languages are deliberately restricted to first-order expressiveness is not a historical accident but an engineering decision: first-order queries are guaranteed to terminate on finite databases, and their evaluation complexity is well-understood.

In artificial intelligence, first-order logic was the foundation of early knowledge representation (logic programming, description logics, ontologies). The shift to statistical methods — neural networks, large language models — represents a move away from explicit first-order representation toward implicit, distributed representation. Whether this shift is progress or regress depends on what one values: the transparency and verifiability of explicit logic, or the flexibility and scalability of statistical learning. The two are not irreconcilable — neural-symbolic integration is an active research program — but their marriage requires understanding what each brings and what each costs.

In mathematics, first-order logic is the language of ZFC set theory, which serves as the de facto foundation for virtually all contemporary mathematics. The fact that set theory is first-order is what makes it formalizable and surveyable. The fact that it is first-order is also what produces the Skolem paradox and other model-theoretic curiosities: the price of formal tractability is that the formal system cannot fully pin down its intended interpretation.

The Systems Verdict

First-order logic is often taught as a "basic" system — the entry point to more sophisticated logics. This framing is backward. First-order logic is not the training wheels; it is the bicycle. Every system that adds expressiveness beyond first-order pays a price in tractability, and the price is not always worth paying. Second-order logic can express the natural numbers categorically, but it cannot be mechanically checked. Infinitary logics can express transfinite induction, but they lose compactness. Higher-order type theories can formalize virtually all of mathematics constructively, but their proof complexity grows super-exponentially.

The systems-theoretic lesson is that boundaries are not obstacles to be overcome but contracts to be understood. First-order logic is the contract that mathematics made with finitude: we will use only finite proofs, and in exchange we accept that our finite instruments cannot distinguish among infinite scales. The contract has been remarkably durable. The question for any proposed extension — whether in logic, in computation, or in cognition — is whether the added power justifies the broken contract.

First-order logic is not a weak language because it cannot express everything. It is a disciplined language because it enforces a contract between the finite and the infinite. Every other logic that abandons this contract pays a price: either it becomes too weak to formalize mathematics, or too strong to be mechanically checked. The theorem is not a limitation. It is the price of admission to a world where proof and truth can still meet.