Chapter 3: First-Order Logic
-
Valid formulas and universal closure
- For an
-structure with universe , satisfaction without an indicated assignment means truth under every assignment:
- For an
- Consequently,
- From left to right: every modified assignment $b_{x\to a}$ is an assignment, so $\varphi$ holds under it.
- From right to left: fix an arbitrary assignment $b$. The universal quantifier guarantees $\varphi[b_{x\to a}]$ for every $a\in M$. Choose $a=b(x)$, the value already assigned to $x$. Then $b_{x\to b(x)}=b$, so $\varphi[b]$ holds. Since $b$ was arbitrary, $\mathcal M\models\varphi$.
- The chosen object is $b(x)\in M$, not the assignment function $b:\operatorname{Var}\to M$ itself. Assigning $x$ its existing value leaves the entire function unchanged.
- Adding universal quantifiers for all free variables produces a [[Knowledge/Sentence (First-Order Logic)|sentence]] with the same truth in the sense of $\mathcal M\models$. This does not mean that $\varphi$ and $\forall x\,\varphi$ agree under each fixed assignment: in $\mathbb N$, $x=0$ holds when $b(x)=0$, whereas $\forall x\,(x=0)$ is false.
- Tautologies and logical axioms
- A first-order tautology is the image of a propositional tautology under a map
that replaces propositional variables with first-order formulas and preserves Boolean connectives. For example,
- A first-order tautology is the image of a propositional tautology under a map
- $(\forall x\,P(x))\to(\forall x\,P(x))$ is a tautology: treating the quantified subformula as one propositional variable gives $p\to p$. By contrast, $\forall x\,(x=x)$ has propositional form $p$, which is not a tautology. Its validity depends on equality being identity and the meaning of the universal quantifier.
- Assigning this abstract $p$ the value $0$ is not a first-order countermodel to $\forall x\,(x=x)$. The propositional test deliberately ignores the internal meaning of the quantified formula.
- The pure logical axiom schemata comprise tautologies, equality and Leibniz axioms, distribution, existence, generalisation and substitution. A schema stands for its permitted instances, not just one displayed example.
- Leibniz axioms cover both relations and functions. For example,
Here $+$ is a binary function symbol; the second axiom does not require its interpretation to be ordinary addition.
- Universal closures of pure axioms are also logical axioms. This does not permit arbitrary universal quantification of assumptions. The generalisation axiom $\varphi\to\forall x\,\varphi$ requires $x$ not to occur free in $\varphi$.
- Substitution in terms and formulas
- For terms
and a variable , write for the result of replacing with . This is the same substitution also written . - The term
may itself contain . Substitution acts once on the original occurrences, not repeatedly on the inserted term:
- For terms
- In a [[Knowledge/Formula (First-Order Logic)|formula]], replace only [[Knowledge/Free Variable (First-Order Logic)|free occurrences]] of $x$. The operation follows the formula's construction:
Other Boolean connectives are handled componentwise; the same quantifier cases apply to $\exists$. Truth constants remain unchanged.
- Under $\forall x$ or $\exists x$, occurrences of $x$ are [[Knowledge/Bound Variable (First-Order Logic)|bound]] and are not replaced. A different quantifier does not stop substitution, but may capture a variable of the inserted term. The syntactic definition above does not automatically rename bound variables.
- Substitution and assignment changes
- An assignment maps variables to objects. Its extension
evaluates terms in , while evaluates formulas in . - Term substitution lemma: For every assignment
,
- An assignment maps variables to objects. Its extension
The left side changes the term and keeps $b$. The right side first evaluates $t$ under the original $b$, assigns that object to $x$, and evaluates the original $s$.
- The term lemma follows by induction on $s$: the variable and constant cases are immediate; the function-symbol case applies the same interpreted function to argument values that agree by induction.
- Assignment changes satisfy
Changes at distinct variables commute; a later change at the same variable overwrites the earlier one.
- Permitted substitutions and variable capture
- A substitution
in is permitted if no variable occurrence introduced from becomes bound by a quantifier surrounding its insertion point. - For a quantified subformula
, where , the substitution is permitted if either: does not occur free in , so nothing is inserted there; or does not occur in , and is permitted in .
- The condition concerns actual insertion points. For example,
is permitted in when : there is no free to replace. - Counterexample: Let
and . Naive substitution gives
- A substitution
In a structure with universe $M=\{0,1\}$, the original formula is true under every assignment: choose the other object as the witness. The substituted formula is always false. The inserted $y$ is now controlled by the existential quantifier rather than the outer assignment.
- Renaming the bound variable to a fresh $z$ before substitution avoids capture:
The new $y$ remains free. Freshness can be ensured by choosing $z$ absent from both the formula and the inserted term.
- Formula substitution lemma
- Fix a structure
, a formula , a variable and a term such that is permitted in . For every assignment , put and . Then
- Fix a structure
- **Proof:** Induct on the construction of $\varphi$, proving the claim for all assignments simultaneously. This permits using the induction hypothesis under the modified assignments introduced by quantifiers.
- **Equality case:** The term lemma gives
Relations are handled similarly: the argument values agree, so the same relation is tested on the same tuple.
- **Conjunction case:** With multiplication of truth values $0,1$,
The other Boolean connectives likewise depend only on their component truth values.
- **Vacuous case:** If $x$ is not free in $\varphi$, substitution changes nothing and the [[Knowledge/Coincidence Lemma (First-Order Logic)|coincidence lemma]] gives $\hat b(\varphi)=\widehat{b'}(\varphi)$. This includes $\varphi=\forall x\,\psi$ and $\varphi=\exists x\,\psi$.
- The critical quantifier step
- Consider
with free in . Then . Permittedness ensures that does not occur in . - For each
, the current assignment inside the quantifier is . The induction hypothesis must use this assignment, including when evaluating :
- Consider
- Replacing $\overline{\tilde b}(t)$ directly with $\bar b(t)$ would be the error. For instance, if $t=y$, $b(y)=0$ and $m=1$, these values are $1$ and $0$ respectively.
- Since $y$ does not occur in $t$, changing $y$ cannot change its value. Thus, with $a=\bar b(t)$ and $b'=b_{x\to a}$,
- The complete calculation is therefore
For $\exists y$, replace the minimum with a maximum. These extrema exist even when $M$ is infinite: $M$ is non-empty and all values belong to $\{0,1\}$.
- Validity of the substitution axiom
- For every permitted substitution
in ,
- For every permitted substitution
- Fix arbitrary $\mathcal M,b$ and suppose $\mathcal M\models\forall x\,\varphi[b]$. Choose the particular object $a:=\bar b(t)\in M$. Then
If the antecedent is false, the implication is already true. Since $\mathcal M,b$ were arbitrary, the axiom is valid.
- Substitution acts on the inner $\varphi$, not the entire $\forall x\,\varphi$. In $\varphi$, $x$ may be free even though the outer quantifier binds it in $\forall x\,\varphi$.
- Without the permittedness condition, the two-element structure above would give a true antecedent and a false consequent:
- A formal proof of an existential implication
- Let
be unary and a constant symbol. The goal is . No arithmetic interpretation of is needed. - Use the abbreviations
- Let
The substitution axiom gives $A\to\neg B$. A tautology turns this into $B\to\neg A$, and the existence axiom gives $\neg A\to E$.
- The complete formal proof uses only axioms and [[Knowledge/Modus Ponens|modus ponens]]:
- Nested implications fit successive applications of modus ponens. From $P$, $Q$ and $P\to(Q\to S)$, first derive $Q\to S$, then $S$. The equivalent formula $(P\land Q)\to S$ would first require deriving the conjunction.
- $A\vdash B$ is read as “$B$ is derivable from $A$” (*aus $A$ ist $B$ herleitbar*). Here $A$ is an assumption; $\vdash A\to B$ instead states that the implication itself has a proof without additional assumptions.