First-Order Logic
First-order logic is the logic of statements about objects, such as numbers, which can use properties of the objects and the phrases “for all” and “there exists.” For example, first-order logic can write “every number squared is at least $0$” as $\forall x \, (x^2 \geq 0)$.
First-order logic is the formal system whose formulas are built from terms with relation symbols, logical connectives, and the quantifiers $\forall$ and $\exists$, where the quantified variables range over the objects of a domain of discourse. The truth value of a sentence is determined by an interpretation, which chooses the domain of discourse and the meaning of each symbol.
Examples
Worked examples
-
Value:
A sentence of first-order logic
$\forall x \, (x^2 \geq 0)$ is a sentence of first-order logic, because the quantifier $\forall x$ ranges over the objects of the domain of discourse, here the real numbers. -
Value:
Becomes a first-order sentence once $p$ and $q$ are replaced by sentences, such as $\forall x \, (x^2 \geq 0) \land \neg \exists x \, (x^2 < 0)$
$p \land \neg q$ describes how first-order sentences combine, because replacing $p$ and $q$ by first-order sentences gives a first-order sentence. -
The argument “All humans are mortal; Socrates is human; therefore, Socrates is mortal” UndergraduateValue:
$\forall x \, (H(x) \implies M(x)), \; H(s) \;\therefore\; M(s)$, which is valid
In first-order logic, the Socrates argument is valid, because the formulas show the shared parts of the statements: taking $x = s$ in $\forall x \, (H(x) \implies M(x))$ gives $H(s) \implies M(s)$, and with $H(s)$ this gives $M(s)$.
Properties
- “First-order” means that quantifiers range over objects only; second-order logic also quantifies over properties and sets of objects, as in “for every set $S$ of natural numbers, …”.
- First-order logic contains propositional logic: replacing the propositional variables of a propositional formula by sentences gives a sentence.
All definitions · All distinctions · All examples · Notation