Propositional logic talks about facts. First-order logic (FOL) talks about objects, their properties, and their relations.
Syntax additions over propositional logic
- Constants: — refer to specific objects.
- Variables: — range over objects.
- Predicates: , — true/false depending on the object(s).
- Functions: — return an object.
- Quantifiers: (for all ), (there exists ).
Famous example
Classical "Socrates is mortal" — a valid FOL inference.
Semantics
A model in FOL consists of a domain (set of objects) and interpretations of all constants, predicates, and functions over that domain. A sentence is true in the model if everything works out under that interpretation.
Inference rules
- Universal instantiation: from infer for any term .
- Existential instantiation: from infer for a fresh constant .
- Generalization: from where is arbitrary, infer .
- Modus ponens: from and infer .
These plus resolution give you a complete proof system for FOL — anything true is provable.
Decidability
Propositional logic is decidable (SAT is hard but decidable). FOL is semi-decidable: if a sentence is valid, you'll eventually prove it; if it's not, the algorithm may run forever. This is the classical Church-Turing undecidability result for FOL.
What FOL can't do
- Quantify over predicates ("there's a property such that..."). Need second-order logic.
- Capture inductive reasoning naturally (Peano axioms for arithmetic require an infinite axiom schema).
- Talk about probability or fuzziness directly.
Modern uses
- Theorem proving (Lean, Coq) — though those use higher-order logic.
- Knowledge bases (Prolog, Datalog — restricted fragments).
- Description logics — fragments of FOL that are decidable and used in ontologies (OWL, used by Wikipedia/Wikidata).
- Verification of distributed protocols (TLA+ uses something close to first-order set theory).