- Without an assignment, $\mathcal M\models\varphi$ means that $\varphi$ is true under **every** $M$-assignment. Hence
This is not the same as $\mathcal M\models\neg\varphi$, which requires $\neg\varphi$ to hold under every assignment.
- **Example:** In the usual structure of the natural numbers, neither $x=0$ nor $\neg(x=0)$ is true under every assignment: the first fails at $b(x)=1$, the second at $b(x)=0$.
- A [[Knowledge/Sentence (First-Order Logic)|sentence]] $\sigma$ has no free variables. Its truth value does not depend on the assignment, so $\mathcal M\models\sigma[b]$ for one assignment if and only if $\mathcal M\models\sigma$.
Validity and finite validity
Fix a language . A formula is valid if it holds in every -structure, and finitely valid if it holds in every finite-structure:
- Every valid formula is finitely valid. Fixing a language means using the same language throughout; it does not by itself mean that its alphabet is finite.
- For a fixed finite signature, finite **non-validity** is [[Knowledge/Semi-decidable Predicate|semi-decidable]]: enumerate finite structures and assignments to the finitely many variables occurring in $\varphi$, and halt if one falsifies it. Consequently, finite validity is co-semi-decidable.
- Whether the corresponding sets are decidable depends on the language. Validity in the equality-only language is decidable; undecidability results for finite validity require a sufficiently expressive signature. Enumerating finite structures alone does not decide finite validity when no counterexample exists.
Let map propositional formulas to first-order formulas while preserving Boolean connectives and truth constants, for example:
- If $A$ is a propositional tautology, then $h(A)$ is valid. For any fixed structure and assignment, the truth values of the formulas $h(p_i)$ give a propositional assignment; $A$ is true under that assignment.
- In this terminology, a first-order tautology is such an image of a propositional tautology. Every tautology is valid, but not every valid formula is a tautology in this narrower sense.
- **Examples:** $(\forall x\,P(x))\to(\forall x\,P(x))$ has the propositional form $p\to p$. The formula $(\forall x\,P(x))\to(\forall y\,P(y))$ is valid, but its validity depends on the meaning of the quantifiers rather than its propositional form alone. Also $\forall x\,(x=x)$ is valid because equality is interpreted as identity.
Equality and Leibniz axioms
Equality is reflexive, symmetric and transitive:
- Equal objects can be substituted into relations and functions. For unary $P,f$ and binary $R$, examples are
Analogous axioms apply to symbols of other arities. These are valid because equal arguments denote the same objects.
- It preserves truth under the same structure and assignment. If $\hat b(\varphi)=1$ and $\hat b(\varphi\to\psi)=1$, then $\hat b(\psi)=1$: otherwise the implication would have value $1\to0=0$.
- Consequently, if $\Sigma\models\varphi$ and $\Sigma\models\varphi\to\psi$, then $\Sigma\models\psi$.
Formal derivations
For a set of premises, means that is derivable from . This is a syntactic relation; is a semantic relation about structures.
The derivable formulas form the smallest set containing all logical axioms and all formulas in and closed under modus ponens.
Equivalently, a formal derivation from is a finite sequence where each is a logical axiom, belongs to , or follows by modus ponens from two earlier formulas. Then exactly when such a sequence ends in .
Logical axioms are valid formulas specified by the calculus. Premises in need not be valid: they are assumed for this derivation. The axiom list introduced here is not yet complete.
Soundness and completeness
Soundness:, provided the logical axioms are valid and the inference rule preserves truth.
Proof by induction on the derivation: An axiom holds in every structure; a premise holds in every model of . If an entry follows by modus ponens, the induction hypothesis gives the two earlier entries in every model of , and modus ponens gives the new entry there as well.
Gödel’s completeness theorem: For a complete first-order calculus, . Together with soundness,
This converse requires the complete calculus, not merely the partial axiom list introduced so far.
Quantifier axioms
Distribution:
If both universally quantified premises hold, then for each $m\in M$, $\varphi\to\psi$ and $\varphi$ hold under $b_{x\mapsto m}$, so $\psi$ holds there as well.
- **Generalisation axiom:** $\varphi\to\forall x\,\varphi$ when $x$ does not occur free in $\varphi$. Changing the value of $x$ cannot change the truth of $\varphi$.
- Logical axioms include the pure axiom instances and their universal closures: if $\theta$ is a logical axiom, then $\forall x\,\theta$ is also a logical axiom. This is not an unrestricted rule for quantifying arbitrary formulas derived from premises.
- **Existence axioms:** $\exists x\,\varphi\to\neg\forall x\,\neg\varphi$ and $\neg\forall x\,\neg\varphi\to\exists x\,\varphi$.
Example formal proof
Write , and , where and are distinct. The following derivation uses the instance of the substitution axiom, whose general conditions remain to be specified:
- A useful proof strategy is to handle the quantifiers first, then use a propositional tautology and modus ponens to combine the resulting implications. The abbreviations $A,B,C$ stand for entire formulas.
Substitution in terms
For a variable and terms , write for the term obtained by replacing with . Recursively:
- The term substitution lemma relates syntactic replacement to changing the assignment:
Evaluate $t$ under the original $b$, assign that value to $x$, and evaluate the original term $s$. The identity can be proved by induction on $s$.
Substitution in formulas
Only free occurrences of the substituted variable are replaced. For and ,
The occurrences of $y$ are bound by $\exists y$ and are therefore not replaced.
- The intended substitution axiom is $\forall x\,\varphi\to\varphi[x:=t]$, but it is not valid for unrestricted textual replacement: a variable in $t$ may become bound after substitution. The admissibility condition and its repair are left for the next lecture.
- **Boundary case:** With $\varphi:=\exists y\,(x\neq y)$ and $t:=y$, naive substitution gives $\exists y\,(y\neq y)$. In a structure with at least two elements, $\forall x\,\exists y\,(x\neq y)$ is true while this result is false. The free $y$ in the substituted term has been captured by the quantifier.