12 Conjunction, disjunction and equivalence
Our current version of natural deduction was a very simplified one, with \(\Rightarrow\) as sole constructor for well-formed formulas. This enabled us to easily prove soundness of the Boolean interpretation and the equivalence with the Hilbert system KS+mp that we constructed for the same toy version of well-formed formulas.
In order to eventually be able to reason about the whole set of well-formed formulas, we will now introduce more natural deduction rules (a.k.a. constructors for the inductive predicate IsSequent). More precisely, in this lecture, we will present introduction and elimination rules for the logical connectives \(\wedge\) (conjunction) and \(\vee\) (disjunction).
Before we get started, let us recall the natural deduction rules that we already have.
12.1 Conjunction
There is only one introduction rule for well-formed formulas of the form \(A \wedge B\). That rule says that, to prove \(A \wedge B\) in context \(\Gamma\), it suffices to have a proof of \(A\) and a proof of \(B\) in that context.
Let us now give the elimination rules for conjunction. This means, an unconditional way to remove (eliminate) the symbol \(\wedge\) from our expression. As such, there are two of them, called elim-left and elim-right, for convenience.
As an example, let us prove the following rule.
Theorem 12.1 (Symmetry rule for conjunction) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. If \(\Gamma \vdash A \wedge B\) holds, then \(\Gamma \vdash B \wedge A\) holds. Equivalently, in tree form:
Proof.
We can now combine this with \(\Rightarrow\)-elim to prove a basic tautology, namely that for every context \(\Gamma\) (including the empty context \([\ ]\)), the sequent \(\Gamma \vdash A \wedge B \Rightarrow B \wedge A\) holds. Note that here we are applying \(\wedge\)-symm in the context \(\Gamma' := \Gamma, A \wedge B\).
12.2 Disjunction
In a kind of dual way to conjunction, disjunction has two introduction rules and one elimination rule.
There is only one introduction rule for well-formed formulas of the form \(A \wedge B\). That rule says that, to prove \(A \wedge B\) in context \(\Gamma\), it suffices to have a proof of \(A\) and a proof of \(B\) in that context.
At first sight, the introduction rules for \(\vee\) might strike us as strange, because we are seemingly deducing the proposition \(\Gamma \vdash A \vee B\) from the more precise one \(\Gamma \vdash A\) (or \(\Gamma \vdash B\)). However, it is quite natural. Say you want to want to prove an inequality of the form \(x \leqslant 4\), where the latter is defined as \(x < 4 \vee x =4\). Then surely you will prove in which branch of the alternative you are in order to conclude that \(x \leqslant 4\). This is particularly apparent if your \(x\) depends on a parameter. To see this, consider the sequence \((u_n)_{n : \mathbb{N}}\) defined by \(u_0 = 4\) and \(u_{n + 1} = 3\). Then in order to prove that, given \(n : \mathbb{N}\), \(u_n \leqslant 4\), we will pattern-match on \(n\) and prove, in the first case (when \(n\) is \(0\)), that \(u_0 = 4\) (by reflexivity), and, in the second case (when \(n\) is a successor), that \(3 < 4\) (by definition of the ordering on \(\mathbb{N}\)). In any case, these introduction rules seem like a minimalistic way to prove that \(\Gamma \vdash A \vee B\) (note that no other constructor for well-formed formulas is used in the definition).
The elimination rule is even stranger than the introduction rules, because it involves a third well-formed formula \(C\). As we shall see later, it is related to the fact that we can prove \(\Gamma \vdash A \vee B \Rightarrow C\) by introducing \(A \vee B\) into the context and performing case analysis. For now, let us use it to prove the expected \(\vee\)-symm rule.
Theorem 12.2 (Symmetry rule for conjunction) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. If \(\Gamma \vdash A \vee B\) holds, then \(\Gamma \vdash B \vee A\) holds. Equivalently, in tree form:
Proof.
12.3 Hilbert systems
We have seen above what the natural deduction rules for the logical connectives conjunction and disjunction are. It is also possible to reason about well-formed formulas built using \(\wedge\) and \(\vee\) by adding axioms to our Hilbert system KS+mp. A good exercise would then be to prove the equivalence between the two deductive reasoning systems thus obtained. To be thorough, let us spell out the axioms of the Hilbert system corresponding to the enriched natural deduction system constructed in this lecture. Axioms \(H_1\) and \(H_2\) correspond to the rules \(K\) and \(S\).
\[ \begin{array}{rcl} H_1 & : & A \Rightarrow B \Rightarrow A \\ H_2 & : & (A \Rightarrow B \Rightarrow C) \Rightarrow (A \Rightarrow B) \Rightarrow (A \Rightarrow C) \\ H_3 & : & A \wedge B \Rightarrow A \\ H_4 & : & A \wedge B \Rightarrow B \\ H_5 & : & A \Rightarrow B \Rightarrow A \wedge B \\ H_6 & : & A \Rightarrow A \vee B \\ H_7 & : & B \Rightarrow A \vee B \\ H_8 & : & (A \Rightarrow C) \Rightarrow (B \Rightarrow C) \Rightarrow (A \vee B \Rightarrow C) \end{array} \]
Then one needs only add the modus ponens rule, which we can write in tree form and in which \(\Gamma\) is a context and \(F\) and \(G\) are well-formed formulas.
Each of these axioms should be provable in our natural deduction system. Indeed, we have already checked that \(H_1\) and \(H_2\) were derived rules in natural deduction (Theorem 10.5 and Theorem 10.6). As for \(H_3\), \(H_4\) and \(H_5\), they are easily deduced from the introduction and elimination rules for \(\wedge\). The same holds for \(H_6\) and \(H_7\). To illustrate our point, let us derive \(H_8\) using natural deduction.
Theorem 12.3 Let \(\Gamma\) be a context and let \(A\), \(B\) and \(C\) be well-formed formulas. Then \(\Gamma \vdash (A \Rightarrow C) \Rightarrow (B \Rightarrow C) \Rightarrow (A \vee B \Rightarrow C)\) is derivable using using natural deduction.
Proof.
Exercise 12.1 Show that the following well-formed formulas are provable in the empty context, first using natural deduction rules and then using the above Hilbert system.
- \((A \Rightarrow B \Rightarrow C) \Rightarrow (A \wedge B \Rightarrow C)\).
- \((A \wedge B \Rightarrow C) \Rightarrow (A \Rightarrow B \Rightarrow C)\).
12.4 Equivalence
In principle, we also want to consider well-formed formulas of the form \(A \Leftrightarrow B\) and reason about them. This means defining introduction and elimination rules for sequents of the form \(\Gamma \vdash A \Leftrightarrow B\). Another approach is to just define \(A \Leftrightarrow B\) as \[A \Leftrightarrow B := (A \Rightarrow B) \wedge (B \Rightarrow A)\] and deduce the following rules from it. Namely,
and
whose proofs are left as an exercise.
12.5 A use rule
The following rule has been used implicitly in the comparison theorem between Hilbert systems and natural deduction, but it is useful to spell it out explicitly. Indeed, it is not only of practical use (as we have seen), but from a theoretical point of view, it also shows that our choice to represent contexts as lists does not cause unintended issues: we can access any well-formed in the context and put in a position where we can use the focus rule on it.
Theorem 12.4 (The use rule) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. If \(B \in \Gamma\) and \(\Gamma, B \vdash A\) holds, then \(\Gamma \vdash A\) holds.
Proof. Applying the cut rule, we know that we can deduce \(\Gamma \vdash A\) from \(\Gamma, B \vdash A\) and \(\Gamma \vdash B\). The first one is one of our assumptions so we can stop here. For the second one, we need to prove that \(\Gamma \vdash B\) using our assumption that \(B \in \Gamma\). For that, we use an auxiliary result about lists: if \(B \in \Gamma\), then there exists lists \(\Gamma_1, \Gamma_2\) such that \(\Gamma = \Gamma_1 \texttt{++} ([B] \texttt{++} \Gamma_2)\). So let us fix such \(\Gamma_1, \Gamma_2\) and replace \(\Gamma\) by \(\Gamma_1 \texttt{++} ([B] \texttt{++} \Gamma_2)\) in the sequent \(\Gamma \vdash B\) that we want to prove. By associativity of \(\texttt{++}\), we are left with the task of proving that \((\Gamma_1 \texttt{++} [B]) \texttt{++} \Gamma_2 \vdash B\) holds.
By induction on \(\Gamma_2\) (the proof has also been given in a previous lecture), we can show that this follows from \(\Gamma_1 \texttt{++} [B] \vdash B\), which now follows from the focus rule, so we are done (with no assumption left).
We have written the proof in the meta-language for this course (which can be taken to be Rocq), but it is tempting to write as a proof tree, which is already what we are doing when we write the Rocq proposition \(\Gamma \vdash A \rightarrow \Gamma \vdash A \Rightarrow B \rightarrow \Gamma \vdash B\) as follows.
So for the proof Theorem 12.4, we might be tempted to write the following.
This is very suggestive and it helps with the understanding, but note that we are using rules that are not part of our natural deduction system, such as rewrite on a context or induction, which may be a source of confusion. If not, then we can even state Theorem 12.4 as follows, even though the proposition \(B \in \Gamma\) is not a sequent.
Another possibility is the following, which only keeps sequents as nodes of the tree.
In this second form, the use rule looks more like a natural deduction rule, but we still must pay attention the side condition \(B \in \Gamma\). Writing the use rule and its proof as a natural deduction rule can sometimes be convenient but, to avoid any mistakes, we will always point it out explicitly if we do abuse the notation in this way. Note that, to apply the use rule, you need to supply a proof of the proposition \(B \in \Gamma\).