6  Semantic consequence and deductive reasoning

We examine the concept of semantic consequence (also called entailment) between two well-formed formulas. If \(F\) is a well-formed formula and \(\nu : \mathcal{A} \to \text{bool}\) is a valuation with associated interpretation \(\widehat{\nu} : \text{Wff} \to \text{bool}\), we will use the notation \([F]_\nu\) to designate the boolean \(\widehat{\nu}(F)\).

6.1 Entailment

Like semantic equivalence, semantic consequence is defined in terms of the (Boolean) semantics of well-formed formulas.

Definition 6.1 (Entailment) Let \(F\) and \(F'\) be well-formed formulas. We say that \(F\) entails \(F'\), (or that \(F'\) is a semantic consequence of \(F\)), if for every valuation \(\nu : \mathcal{A} \to \mathrm{bool}\) such that \([F]_\nu = \mathrm{true}\), we have \([F']_\nu = \mathrm{true}\). This will be denoted by \(F \vDash F'\).

Recall that the semantics of a well-formed formula are the valuations \(\nu\) for which \([F]_\nu\) evaluates to \(\mathrm{true}\). \[ \mathrm{sem}(F) := \{ \nu : \mathcal{A} \to \mathrm{bool}\ |\ [F]_\nu = \mathrm{true} \} \] So, from a set-theoretic perspective, we can say that \[ F \vDash F'\ \text{if}\ \mathrm{sem}(F) \subseteq \mathrm{sem}(F'). \]

6.1.1 Example

As an example of an entailment, we have \(F \wedge F' \vDash F'\). Indeed, if \(\nu\) is a valuation such that \([F \wedge F']_\nu =\text{true}\), then we must have \([F']_\nu = \text{true}\), as seen by examining the truth table of \([F \wedge F']_\nu\). More formally, we can pattern match on the boolean \([F']_\nu\) and derive \([F]_\nu = \text{true}\) as follows.

  • If \([F']_\nu = \text{true}\), then \([F']_\nu = \text{true}\).
  • if \([F']_\nu =\text{false}\), then (using the truth table of \([F \wedge F']_\nu\)) we obtain \([F \wedge F']_\nu = \text{false}\). Since by assumption \([F \wedge F']_\nu =\text{true}\), we deduce \(\text{false} = \text{true}\), hence also \([F']_\nu = \text{true}\) (where we have freely used the symmetry and transitivity of equality).

6.1.2 Non-example

In contrast, we do not necessarily have \((F \Rightarrow F') \vDash F'\). Indeed, if \(F\) and \(F'\) are atomic formulas, say, and \(\nu\) is a valuation such that \([F]_\nu = \text{false}\) and \([F]_\nu = \text{false}\), then, by definition of the interpretation of syntactic implication, we have \([F \Rightarrow F']_\nu = \text{true}\). So \([F \Rightarrow F']_\nu = \text{true}\) but \([F']_\nu = \text{false}\), so the entailment \(F \vDash F'\) does not hold.

6.2 Validity of an implication

Because of the way we have chosen to interpret syntactic implication (i.e. the way we have defined the semantics of \(F \Rightarrow F'\)), we get the following relation between entailment and validity of implication.

Theorem 6.1 (Validity of an implication) Let \(F\) and \(F'\) be well-formed formulas. Then \(F \vDash F'\) if and only if the well-formed formula \(F \Rightarrow F'\) is semantically valid. In other words, \(F'\) is a semantic consequence of \(F\) if and only if \(F \Rightarrow F'\) is a tautology.

Proof. We prove this equivalence by double implication.

  • Assume first that \(F \vDash F'\) and let us prove that \(F \Rightarrow F'\) is a tautology. We have to show that, for all valuation \(\nu : \mathcal{A} \to \text{bool}\), \([F \Rightarrow F'] = \text{true}\). To show this, let \(\nu\) be a valuation. Now we have to show that \([F \Rightarrow F']_\nu = \text{true}\). We will distinguish cases according to the truth values \([F]_\nu\) and \([F']_\nu\). Recall first the truth table for \([F \Rightarrow F']_\nu\). \[ \begin{array}{c|c|c} [F]_\nu & [F']_\nu & [F \Rightarrow F']_\nu \\ \hline \text{false} & \text{false} & \text{true} \\ \text{false} & \text{true} & \text{true} \\ \text{true} & \text{false} & \text{false} \\ \text{true} & \text{true} & \text{true} \end{array} \] So we have four cases to examine, depending on the truth values \([F]_\nu\) and \([F']_\nu\).
    • In cases 1, 2 and 4, we have \([F \Rightarrow F'] = \text{true}\), so we can close our goal in those cases.
    • The last remaining case is \([F]_\nu = \text{true}\) and \([F']_\nu = \text{false}\), but since we are assuming that \(F \vDash F'\), we have \([F]_\nu = [F']_\nu\), hence \(\text{true} = \text{false}\). Since when \([F]_\nu = \text{true}\) and \([F']_\nu = \text{false}\) we also have \([F \Rightarrow F']_\nu = \text{false}\), the symmetry and transitivity of equality imply that \([F \Rightarrow F']_\nu = \text{true}\), which again closes our goal.
  • Now assume that \(F \Rightarrow F'\) is a tautology and let us prove that \(F \vDash F'\). We have to show that, for all valuation \(\nu\) such that \([F]_\nu = \text{true}\), we have \([F']_\nu = \text{true}\). To show this, let \(\nu\) be a valuation such that \([F]_\nu = \text{true}\). Now we have to show that \([F']_\nu = \text{true}\). We will distinguish two cases, according to the truth value \([F']_\nu\).
    • If \([F']_\nu = \text{true}\), then \([F']_\nu = \text{true}\).
    • If \([F']_\nu = \text{false}\), then (as \([F]_\nu = \text{true}\)) the truth table of \([F \Rightarrow F']_\nu\) shows that \([F \Rightarrow F']_\nu = \text{false}\). Since we are assuming that \(F \Rightarrow F'\) is a tautology, we also have \([F \Rightarrow F']_\nu = \text{true}\). So \(\text{false} = \text{true}\), hence \([F']_\nu = \text{false} = \text{true}\), which again closes our goal.

This concludes the proof.

It is convenient to use the notation \(\vDash F\) to indicate that the well-formed formula \(F\) is a tautology. Then Theorem 6.1 says that \(F \vDash F'\) is equivalent to \(\vDash F \Rightarrow F'\) (as expressions written in the meta-language in which we state theorems and write proofs).

WarningObservation

Note that the expression \(F \vDash F'\) is not a well-formed formula (it is a meta-formula). In particular, it has no truth value with respect to a given valuation \(\nu : \mathcal{A} \to \mathrm{bool}\).

6.3 Semantic equivalence and entailment

Another example of a (meta-)theorem about entailement in our setting is given as follows.

Theorem 6.2 (Semantic equivalence and entailment) Let \(F\) and \(F'\) be well-formed formulas. Then \(F \equiv F'\) if and only if \(F \vDash F'\) and \(F' \vDash F\).

Proof. Let us give a short proof, using the set-theoretic perspective. By definition, the condition \(F \equiv F'\) is equivalent to \(\mathrm{sem}(F) = \mathrm{sem}(F')\). Then, by set extensionality, \(\mathrm{sem}(F) = \mathrm{sem}(F')\) if and only if \(\mathrm{sem}(F) \subseteq \mathrm{sem}(F')\) and \(\mathrm{sem}('') \subseteq \mathrm{sem}(F)\). Again by definition, the first consequence is equivalent to \(F \vDash F'\), and the second condition is equivalent to \(F' \vDash F\), which finishes the proof.

Another approach to Theorem 6.2 is given as follows:

  • By Theorem 5.3, the equivalence \(F \equiv F'\) holds if and only if \(F \Leftrightarrow F'\) is a tautology.
  • By Theorem 5.2, the well-formed formula \(F \Leftrightarrow F'\) is semantically equivalent to \((F \Rightarrow F') \wedge (F' \Rightarrow F)\).
  • Finally, Theorem 6.1 says that \(F \Rightarrow F'\) is a tautology if and only if the entailment \(F ⊨ F'\) holds. Similarly, \(F' \Rightarrow F\) is a tautology if and only if the entailment \(F' ⊨ F\) holds.
  • So, to prove Theorem 6.2, we can simply use Theorem 6.3 below. Indeed, by the above remarks, \(F \equiv F'\) if and only if \(F \Leftrightarrow F'\) is a tautology, which is equivalent to \((F \Rightarrow F') \wedge (F' \Rightarrow F)\) is a tautology, which in turn is equivalent (by Theorem 6.3) to \(F \Rightarrow F'\) and \(F' \Rightarrow F\) being tautologies. By Theorem 6.1 this is equivalent to \(F \vDash F'\) and \(F' \vDash F\).

In our meta-language, we can represent this chain of equivalences informally as follows (note the single left-right arrow \(\leftrightarrow\) used in place of the if and only if expression). \[ \begin{array}{rcl} F \equiv F' & \leftrightarrow & \vDash F \Leftrightarrow F' \\ & \leftrightarrow & \vDash (F \Rightarrow F') \wedge (F' \Rightarrow F) \\ & \leftrightarrow & \vDash F \Rightarrow F'\ \text{and}\ \vDash F' \Rightarrow F\\ & \leftrightarrow & F \vDash F'\ \text{and}\ F' \vDash F \end{array} \]

This sort of manipulation of well-formed formulas across entailment and semantic equivalence symbols can be quite useful in practice. To conclude, let us formally state and prove the result we have used to prove Theorem 6.2.

Theorem 6.3 (Conjonction and entailment) Let \(F_1, F_2\) be well-formed formulas. Then the well-formed formula \(F_1 \wedge F_2\) is a tautology if and only \(F_1\) and \(F_2\) are both tautologies.

Proof. Let us sketch the proof.

  • We first assume that \(F_1 \wedge F_2\) is a tautology and we show that \(F_1\) and \(F_2\) are both tautologies. Let \(\nu\) be a valuation. Since \(F_1 \wedge F_2\) is a tautology, we have \([F_1 \wedge F_2]_\nu = \text{true}\). The truth table of \([F_1 \wedge F_2]_\nu\) then shows that, necessarily, \([F_1]_\nu = [F_2]_\nu = \text{true}\). \[ \begin{array}{c|c|c} [F_1]_\nu & [F_1]_\nu & [F_1 \wedge F_2]_\nu \\ \hline \text{false} & \text{false} & \text{false} \\ \text{false} & \text{true} & \text{false} \\ \text{true} & \text{false} & \text{false} \\ \text{true} & \text{true} & \text{true} \end{array} \]
  • Conversely, let us assume that \(F_1\) and \(F_2\) are tautologies and show that \(F_1 \wedge F_2\) is a tautology. Let \(\nu\) be a valuation. Since \(F_1\) and \(F_2\) are tautologies, we have \([F_1]_\nu = [F_2]_\nu = \text{true}\), so \([F_1 \wedge F_2]_\nu = \text{true}\), by the truth table above.

This concludes the proof.

In the next lecture, we will use Rocq as a meta-language to formalise the proof of some of the results seen so far.

6.4 Relation to deductive reasoning

A natural question at this point is to ask whether we can use Boolean semantics to reason. In particular, starting from a premise, can we reach we a conclusion that is regarded as valid? In other words, can we combine arguments through a series of logical steps that guarantee the validity of the conclusion? One way to do that is to use reasoning rules that are themselves valid.

For instance, given well-formed formulas \(F\) and \(G\), we might be tempted to say that, if \(F \Rightarrow G\) and \(F\) evaluate to \(\text{true}\), then \(G\) evaluates to \(\text{true}\). This is the famous modus ponens rule, but in what sense does it hold? In the present context, the ideal property we can hope for is that \((F \Rightarrow G) \wedge F \Rightarrow G\) be a tautology, and it turns out that this is actually the case.

Theorem 6.4 (Modus ponens is semantically valid) Let \(F\) and \(G\) be well-formed formulas. Then \((F \Rightarrow G) \wedge F \Rightarrow G\) is a valid formula. Equivalently, \((F \Rightarrow G, F) \vDash G\).

Proof. Let \(\nu\) be a valuation such that \([F]_\nu = \text{true}\) and \([F \Rightarrow G]_\nu = \text{true}\). We want to show that \([G]_\nu = \text{true}\) and we can proceed by case analysis on \([G]_\nu\).

  • If \([G]_\nu = \text{true}\), then \([G]_\nu =\text{true}\).
  • If \([G]_\nu = \text{false}\), then the assumption that \([F]_\nu = \text{true}\) implies that \([F \Rightarrow G]_\nu = \text{false}\). But since we have assumed that \([F \Rightarrow G]_\nu = \text{true}\), we get \(\text{false} = \text{true}\), hence \([G]_\nu = \text{true}\).

Alternatively, we can look at the truth table of \([F \Rightarrow G]_\nu\) \[ \begin{array}{c|c|c} [F]_\nu & [G]_\nu & [F \Rightarrow G]_\nu \\ \hline \mathrm{false} & \mathrm{false} & \mathrm{true} \\ \mathrm{false} & \mathrm{true} & \mathrm{true} \\ \mathrm{true} & \mathrm{false} & \mathrm{false} \\ \mathrm{true} & \mathrm{true} & \mathrm{true} \end{array} \] and deduce from it that the only value of \([G]_\nu\) that is compatible with \([F]_\nu = \text{true}\) and \([F \Rightarrow G]_\nu = \text{true}\) is \([G]_\nu = \text{true}\).

Now let us assume that we want to examine the following entailment. \[ (A, B, C, A \wedge B \Rightarrow D, C \wedge D \Rightarrow E) \vDash E \] If we use the definition of entailment and the same methods as above to reason, we might say the following:

  • Let \(\nu\) be a valuation such that \([A]_\nu\), \([B]_\nu\), \([C]_\nu\), \([A \wedge B \Rightarrow D]_\nu\) and \([C \wedge D \Rightarrow E]_\nu\) are all equal to \(\text{true}\).
  • First, using that \(A, B \vDash A \wedge B\), we have \([A \wedge B]_\nu = \text{true}\).
  • Next, since we are assuming that \([A \wedge B \Rightarrow D]_\nu = \text{true}\), an application of modus ponens gives us that \([D]_\nu = \text{true}\).
  • Similarly to the first step, we deduce from \([C]_\nu = \text{true}\) and \([D]_\nu = \text{true}\) that \([C \wedge D]_\nu = \text{true}\).
  • Finally, since we are assuming that \([C \wedge D \Rightarrow E]_\nu = \text{true}\), one more application of modus ponens gives \([E]_\nu = \text{true}\).

So we can reason using entailment and this does indeed simplify the brute force approach in which we prove that \[ \big( A \wedge B \wedge C \wedge (A \wedge B \Rightarrow D) \wedge (C \wedge D \Rightarrow E) \big) \Rightarrow E \] is a tautology by examining the truth values of \(A, B, C, D\) and \(E\) (for which we would have \(2^5 =32\) possibilities to look at, a method that does not quite scale).

Note that, even when using entailment, the notion of validity of a formula depends (by definition) on our choice of semantics. In the example above, the entailmente holds because of our interpretation of the logical connectives and, to a lesser extent, the fact that we only have two possible truth values. A more general approach is possible, in which the formula can be examined for itself, independently of its boolean interpretation. This approach is based on the notion of a deductive system, which will be introduced in a forthcoming lecture.