10. Semantics of First-Order Logic

In propositional logic, we saw how to use truth tables to evaluate formulas. In first-order logic, the evaluation of sentences (or closed formulas) requires a bit more machinery.

Domains and Structures

The signature of a first-order language specifies which symbols are used to represent constants, functions, and predicates. But it does not specify how we interpret those symbols. The interpretation is given by a structure.

Definition. The structure \(\mathcal{M}\) for a signature specifies:

Note that the domain in a structure can be either finite or infinite. And infinite domains can be countable or not. They can also contain any arbitrary sets of elements. But they must include at least one element.

Examples.

In general the structure need not correspond to a natural interpretation of a signature. For instance,

Evaluating Formulas

Once we have fixed a structure \(\mathcal{M}\) on the first-order language with a given signature, we can then evaluate the truth value of sentences.

Definition. The valuation of a sentence \(\phi\) with respect to the structure \(\mathcal{M}\) over the signature \(\sigma\), denoted \(\mathrm{val}_{\mathcal{M}}(\phi),\) is defined recursively.

\[\begin{align*} \mathrm{val}_\mathcal{M}(\phi \wedge \psi) &= \mathrm{val}_\mathcal{M}(\phi) \wedge \mathrm{val}_\mathcal{M}(\psi) \\ \mathrm{val}_\mathcal{M}(\phi \vee \psi) &= \mathrm{val}_\mathcal{M}(\phi) \vee \mathrm{val}_\mathcal{M}(\psi) \\ \mathrm{val}_\mathcal{M}(\neg \phi &= \neg \mathrm{val}_\mathcal{M}(\phi) \\ \mathrm{val}_\mathcal{M}(\phi \to \psi) &= \mathrm{val}_\mathcal{M}(\phi) \to \mathrm{val}_\mathcal{M}(\psi) \\ \mathrm{val}_\mathcal{M}(\phi \leftrightarrow \psi) &= \mathrm{val}_\mathcal{M}(\phi) \leftrightarrow \mathrm{val}_\mathcal{M}(\psi). .\end{align*}\]

With this recursive method of evaluation, a structure \(\mathcal{M}\) causes all closed formulas to evaluate to either True or False. All formulas that contain free variables are not assigned a truth value.

Example.

Validity and Satisfiability

Definition. The structure \(\mathcal{M}\) satisfies the sentence \(\phi\), which we write as

\[\mathcal{M} \vDash \phi,\]

when \(\mathrm{val}_{\mathcal{M}}(\phi) = True\).

The sentence \(\phi\) is satisfiable when there exists a structure \(\mathcal{M}\) that satisfies \(\phi.\)

The sentence \(\phi\) is (logically) valid when every structure \(\mathcal{M}\) satisfies \(\phi.\) We write \(\vDash \phi\) when \(\phi\) is valid.

Examples.

Valid formulas in first-order logic are analogous to tautologies in propositional logic. Of even more interest, however, is the extension of the notion of logical consequence in propositional logic to first-order logic.

Definition. The sentence \(\phi\) is a (logical) consequence of the set \(\Gamma\) of sentences, denoted

\[\Gamma \vDash \phi,\]

when every structure \(\mathcal{M}\) that satisfies all the sentences in \(\Gamma\) also satisfies \(\phi.\)

Examples. Fix any signature that includes unary predicates \(P\) and \(Q\). Then

However,

As the last three examples demonstrate, it’s usually not obvious if a logical consequence holds or not. We will explore how to establish or refute logical consequences in the next lecture. But for today, we conclude with the last bit of terminology that we use extensively in the study of first-order logic.

Axioms, Theories, and Models

A set of axioms in a first-order language is a set \(\Gamma\) of sentences in that language.

The (first-order) theory corresponding to a set of axioms \(\Gamma\) is the set of sentences that are logical consequences of \(\Gamma.\)

Definition. A model for the theory corresponding to the set \(\Gamma\) of axioms is a structure that satisfies all of the sentences in \(\Gamma.\)

Example.

\[\begin{align*} &\forall x_1 (((1 \cdot x_1) = x_1) \wedge ((x_1 \cdot 1) = x_1)), \\ &\forall x_1 (((x_1 \cdot \mathrm{inv}(x_1)) = 1) \wedge ((\mathrm{inv}(x_1) \cdot x_1) = 1)), \mbox{ and} \\ &\forall x_1 \forall x_2 \forall x_3 ((x_1 \cdot (x_2 \cdot x_3)) = ((x_1 \cdot x_2) \cdot x_3)). \end{align*}\]

The theory of the axiom system \(\Gamma_g\) is the set of sentences that are true for all groups. Every group also forms a model for the theory of \(\Gamma_g\). (The simplest model of this theory is obtained by considering a domain \(D\) that consists of a single element, and defining \(1\), \(\mathrm{inv}\), and \(\cdot\) accordingly.)

We will see many other theories and models in the next lecture.