14  Destruction rules and rewriting rules

The introduction rules that we have seen so far have all been so-called right introduction rules. This means that whatever construct is introduced when reading the rule from bottom to top, appears in the conclusion of the bottom sequent \(\Gamma \vdash F\) (on the right-hand side of the \(\vdash\) symbol).

Proof tree

If we read this from bottom to top, it means that, to show that \(\Gamma \vdash A \wedge B\) holds, it suffices to prove \(\Gamma \vdash A\) and \(\Gamma \vdash B\) hold.

14.1 Destruction rules

Destruction rules, in contrast, are left introduction rules. This means that whatever construct is introduced when reading such a rule rule from bottom to top, appears in the premises of the bottom sequent \(\Gamma \vdash F\) (on the left-hand side of the \(\vdash\) symbol).

14.1.1 Conjunction

Let us start with an example.

Theorem 14.1 (Destruction rule for conjunction) Let \(\Gamma\) be a context and let \(A, B, C\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

First, a comment on the proof. Observe that we used the weaken rule to claim the following.

Proof tree

Technically, with our definition (of \(\Gamma\) as a list of well-formed formulas and of the weaken rule as in Definition 10.2), we should work a little bit more to prove this formally. Namely, the proof tree of Theorem 14.1 should include the following sub-tree.

Proof tree

However, now that we have presented this kind of proof formally once, we shall henceforth use it informally.

Next, let us read the ∧-destruct rule of Theorem 14.1 from bottom to top. We see that the conjunction A ∧ B disappears from the context (hence the terminology of destruction rule) and the that the rule says the following: if we have A ∧ B in our context, we can assume that we have A and that we have B. Finally, we note that the ∧-destruct rule is a derived rule, in the sense that it is proven, not introduced as a definition.

As an application, we can prove the following theorem.

Theorem 14.2 (Symmetry of conjunction) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

14.1.2 Disjunction

The destruction rule for disjunction formalises the familiar situation of case analysis: to show that \(C\) is derivable from \(\Gamma, A \vee B\), it suffices to show that it is derivable both from \(\Gamma, A\) (first case) and from \(\Gamma, B\) (second case). The proof is a direct consequence of the elimination rule for . Importantly, we see that in order to reason formally by case analysis over \(A \vee B\), we need \(A \vee B\) to appear in the context.

Theorem 14.3 (Destruction rule for disjunction) Let \(\Gamma\) be a context and let \(A, B, C\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

As an application, we can prove the following theorem.

Theorem 14.4 (Symmetry of disjunction) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

14.1.3 Implication

The most basic destruction rule we can think of for implication is the following.

Theorem 14.5 (Basic destruction rule for implication) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

In Theorem 14.5, the goal of the bottom sequent is \(B\) and we remove \(A \Rightarrow B\) from the context. More generally, we have the following rule.

Theorem 14.6 (Full destruction rule for implication) Let \(\Gamma\) be a context and let \(A, B, C\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

14.1.4 Bottom

The following destruction rule says that, in intuitionnistic logic, if we have \(\bot\) in our context, then we can prove anything.

Theorem 14.7 (Destruction rule for falsity) Let \(\Gamma\) be a context and let \(A\) be a well-formed formula. Then the following rule holds.

Proof tree

Proof. Since we are reasoning with the rules of intuitionistic logic, we can use the \(\bot\)-elim rule.

Proof tree

14.2 Rewriting rules

Rewriting rules are convenient in natural deduction, because they enable us to substitute a well-formed formula by another, provided these formulas are equivalent. We will separate two kinds of substitution: in the goal and in the context.

14.2.1 In the goal

Theorem 14.8 (Basic rewrite) Let \(\Gamma\) be a context and let \(A, A'\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Recall that, by definition, \(A \Leftrightarrow A' = (A \Rightarrow A') \wedge (A' \Rightarrow A)\). So a proof of rewrite can be written as follows.

Proof tree

In practice, the rewrite rule is often applied when \(A \Leftrightarrow A'\) is already in the context, in which case \(\Gamma \vdash A \Leftrightarrow A'\) is discharged using the focus rule. This subst rule, whose proof is left as an exercise, can also be seen as a destruction rule for .

Proof tree

Next we show that we can perform a rewrite using \(\Gamma \vdash A \Leftrightarrow A'\) even when \(A\) is the argument of a constructor such as , or , or of a function such as ¬. While the proof of a specific rewrite rule depends on the function at hand, we will approach this somewhat systematically using the cut rule to get started in every case.

Theorem 14.9 (Rewrite for negation) Let \(\Gamma\) be a context and let \(A, A'\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

For the binary constructors , and , we can state and prove a rewrite rule that takes into account both arguments. In practice, if we want to apply it only to the first argument, say, then we simply use B ⇔ B for the second argument.

Theorem 14.10 (Rewrite for conjunction) Let \(\Gamma\) be a context and let \(A, A'\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

Theorem 14.11 (Rewrite for disjunction) Let \(\Gamma\) be a context and let \(A, A'\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

Theorem 14.12 (Rewrite for implication) Let \(\Gamma\) be a context and let \(A, A'\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Proof tree

14.2.2 In the context

The basic rule we need for rewriting in the context is the following.

Theorem 14.13 (Rewriting in the context) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. Then the following rule holds.

Proof tree

Proof. Recall that \(\vdash B \Leftrightarrow B\) holds. We can therefore use it as leaf in a proof tree. When we do so, we will refer to the rule we apply as a theorem (denoted by thm).

Proof tree

14.2.3 Composition of rewrite rules

In order to use rewrite rules in practice, it is convenient to have at our disposal a series of theorems of the form \(\Gamma \vdash F \Leftrightarrow F'\) where \(F\) and \(F'\) are well-formed formulas. We can use the rewrite rules proven so far to establish such theorems.

Theorem 14.14 (Equivalent formulas) Let \(\Gamma\) be a context and let \(A, B, A', B'\) be well-formed formulas. Assume throughout that the sequents \(\Gamma \vdash A \Leftrightarrow A'\) and \(\Gamma \vdash B \Leftrightarrow B'\) hold. Then the following sequents also hold:

  1. \(\Gamma \vdash \neg A \Leftrightarrow \neg A'\).
  2. \(\Gamma \vdash A \wedge B \Leftrightarrow A' \wedge B'\).
  3. \(\Gamma \vdash A \vee B \Leftrightarrow A' \vee B'\).
  4. \(\Gamma \vdash (A \Rightarrow B) \Leftrightarrow (A' \Rightarrow B')\)

Proof. We leave it as an exercise to deduce from Theorem 14.2 that \((\Gamma \vdash F \Leftrightarrow F') \to (\Gamma \vdash F' \Leftrightarrow F)\) for every well-formed formula \(F\). We will call this rule ⇔-symm.

  1. We start with \((\Gamma \vdash A \Leftrightarrow A' ) \to (\Gamma \vdash \neg A \Leftrightarrow \neg A')\).

    Proof tree

  2. Next, we prove that, for every connector \(\diamond \in \{ \wedge, \vee, \Rightarrow \}\), the foloowing proposition holds. \[(\Gamma \vdash A \Leftrightarrow A') \to (\Gamma \vdash B \Leftrightarrow B') \to (\Gamma \vdash A \diamond B \Leftrightarrow A' \diamond B')\]

    First, we apply ∧-intro.

    Proof tree

    Then, we prove the two top sequents separately. Due to the symmetry of the situation, it suffices to prove one of them. Note that we already have a rewrite rule for every well-formed formula \(A \diamond B\) that appears in the goal.

    Proof tree

What we have proven already applies in many situations. In particular, if we want to use a rewrite rule in the context, we can now do so by combining Theorem 14.13 and Theorem 14.14. For example, if \(\Gamma \vdash A \Leftrightarrow A'\) holds, then a sequent of the form \(\Gamma, A \Rightarrow B \vdash F\) can be converted to \(\Gamma, A' \Rightarrow B \vdash F\) by Theorem 14.13, because \(\Gamma \vdash (A \Rightarrow B) \Leftrightarrow (A' \Rightarrow B)\) by Theorem 14.14. Similarly, thanks to what we have already proved, we can do nested rewriting in compound formulas (in the goal and in the context).

Example 14.1 (Nested rewriting) Let \(\Gamma\) be a context and let \(A\) and \(B\) be well-formed formulas. Then the following holds.

Proof tree

We can prove it by rewriting the sequent in steps, from the outermost formula to the innermost formula, with the help of Theorem 14.14.

Proof tree

14.3 Double negation elimination implies excluded middle

As an application of the destruction and rewrite rules seen above, we can prove that double negation elimination implies excluded middle.

Theorem 14.15 (Double negation elimination implies excluded middle) Assume that the double negation elimination rule holds, meaning that for every context \(\Gamma\) and every well-formed formula \(F\), we have \(\Gamma \vdash \neg \neg F \to \Gamma \vdash F\). Then, for every context \(\Gamma\) and every well-formed formula \(A\), the following rule holds, where by c' we denote the natural deduction rules of minimal logic augmented with dne.

Proof tree

Proof. We apply dne to the formula \(F = A \vee \neg A\). Recall that \(\vdash_m \neg (A \vee B) \Leftrightarrow \neg A \wedge \neg B\) holds in minimal logic (De Morgan’s law).

Proof tree