2.3  Derived Rules: Proved Sequents as New Rules

Section 2.1 closed an impossible case by hand, and Section 2.2 proved negations by hand, one box at a time. By now the same few patterns keep coming back: the impossible case of Example (An impossible case), and a box that turns a known implication round. Mathematicians give such patterns names (“by contraposition”, “since P fails, Q”) and use them in one breath. This section proves three of them once, from the rules we have, and then allows each to be used as a single line. The one new thing is that permission: a derived rule.

2.3.1. A box that keeps coming back

Here are two short arguments from different corners of mathematics.

Let n be an integer whose square is not even. Suppose n is even. Then n2 is even, which contradicts the hypothesis. Hence n is not even.

Let x be a real number with x2<1. Suppose x≥1. Then x2≥x≥1, which contradicts x2<1. Hence x<1.

The subjects differ; the steps are the same. Each has a known implication (“if n is even, then n2 is even”; “if x≥1, then x2≥1”), and a fact saying that the implication’s conclusion fails. Each then opens a box on the implication’s hypothesis, fires the implication inside it by →E, meets the clash with ¬E, and closes the box by ¬I (Definition 2.2.1). (For reals, x2<1 and x<1 are the exact negations of x2≥1 and x≥1.) The same four lines appear whenever an implication is used backwards, from the failure of its conclusion to the failure of its hypothesis.

A mathematician does not write these four lines. She writes “since n2 is not even, n is not even”, or “by contraposition”, and moves on: the lines are the same every time. But a derivation is checked line by line against the rules, and “by contraposition” is not one of the rules. What licenses the short form? First we derive the pattern once, as a sequent, with the rules we have. Then we say exactly when a sequent already derived may be used as a single line.

2.3.2. Modus tollens, from the rules we have

The pattern of the two arguments is: from an implication and the negation of its conclusion, infer the negation of its hypothesis.

Proposition 2.3.1 (Modus Tollens)

P→Q,¬Q⊢¬P.

Idea. Read the skeleton off the goal. The goal ¬P is a negation, and Section 2.2’s move for a negated goal is a box opened on what is negated, here P, with goal ⊥. Inside the box, look for a clash (Section 2.1’s move for the goal ⊥). The premise ¬Q will clash with Q, so Q is the subgoal, and the premise P→Q gives it from the box’s own assumption. In the pictures, the box on P stands with its goal ⊥; then ¬E writes ⊥ from the subgoal Q, still unjustified.

1P→Q
2¬Q
3Pasm, for ¬I
⋮
5⊥
6¬P¬I 3–5
1P→Q
2¬Q
3Pasm, for ¬I
⋮
4Q
5⊥¬E 4, 2
6¬P¬I 3–5

Proof. The following is a derivation with premises P→Q and ¬Q, and last line ¬P.

1P→Q
2¬Q
3Pasm, for ¬I
4Q→E 1, 3
5⊥¬E 4, 2
6¬P¬I 3–5

Line 5 cites the premise on line 2, which lies in no box and so is available everywhere below it. The box 3–5 ends in ⊥ as a line of its own, so ¬I closes it on line 6. This proves the proposition.

The name is Latin for “the mode that takes away”: denying the conclusion takes away the hypothesis. Its partner, from P→Q and P to Q, is →E, traditionally modus ponens, “the mode that puts” (Definition 1.3.1). The derivation uses →E, ¬E, and ¬I, and nothing else.

A second form of the same fact packs the two premises into one implication. It is the form in which mathematicians state it: an implication implies its contrapositive.

Proposition 2.3.2 (Contrapositive)

P→Q⊢¬Q→¬P.

Idea. The goal is an implication, so Chapter 1’s first goal-directed move applies: open a box with its hypothesis ¬Q, and the new goal is ¬P. That goal is a negation, so open a second box, on P, inside the first. Inside both boxes we are exactly where the proof of Proposition 2.3.1 was: P and P→Q give Q, which clashes with ¬Q.

Proof. The following is a derivation with premise P→Q and last line ¬Q→¬P.

1P→Q
2¬Qasm, for →I
3Pasm, for ¬I
4Q→E 1, 3
5⊥¬E 4, 2
6¬P¬I 3–5
7¬Q→¬P→I 2–6

Line 5 may cite line 2, because the only box containing line 2, the box 2–6, also contains line 5 (the scope rule of Definition 1.4.2). The inner box closes on line 6, a line of the outer box itself, and line 7 closes the outer box. This proves the proposition.

The statement ¬Q→¬P is called the contrapositive of P→Q. Like modus tollens, its derivation uses only the rules so far: →I, →E, ¬I, and ¬E. The passage back, from ¬Q→¬P to P→Q, is a different matter (Common errors, below).

Now compare the two derivations. Lines 3–6 of the derivation of Proposition 2.3.1 are, line for line and citation for citation, lines 3–6 of the derivation of Proposition 2.3.2: P, then Q by →E 1,3, then ⊥ by ¬E 4,2, then ¬P by ¬I 3–5. And they are the four lines of the two arguments that opened this section. Writing them out every time buries the argument in bookkeeping.

2.3.3. What a derived rule is

A sequent that has been derived may be used as a rule.

This is what a mathematician does when she writes “by Lemma 3”: the lemma was proved once, and each use of it is a single step. For derivations we must say exactly what that step may do.

Definition 2.3.1 (Derived Rule)

Let α1,…,αn⊢β be a sequent, written with statement letters, that has already been derived earlier in the book. In a later derivation, replace each letter in α1,…,αn,β by a statement, the same statement for every occurrence of the same letter. If lines i1,…,in, all available at line k, hold the resulting instances of α1,…,αn, we may write the resulting instance of β on line k. The justification names the result and cites i1,…,in. A sequent used in this way is a derived rule. For example, Proposition 2.3.1 becomes the rule MT:

iφ→ψ
j¬ψ
k¬φMT i, j

In words: a proved sequent is a new rule. Its premises become the cited lines, its conclusion the line written, and its letters the metavariables of a schema (Definition 1.2.1). Read the definition clause by clause.

  1. “Already derived.” The sequent must have been derived before the line that uses it: earlier in the book, and never inside its own derivation. A derivation that used a sequent to derive that same sequent would prove nothing.
  2. “Replace each letter … the same statement for every occurrence.” The letters of a derived sequent stood for arbitrary statements all along (Definition 1.2.3), so they may be replaced by any statements, provided the replacement is uniform. From (A∧B)→C and ¬C, the rule MT gives ¬(A∧B), with the letters P and Q of Proposition 2.3.1 (written φ and ψ in the schema) replaced by A∧B and C.
  3. “Available at line k.” The scope rule of Definition 1.4.2 still governs every citation. A derived rule may not reach into a closed box, just as a primitive rule may not.
  4. “The resulting instance of β.” The rule writes the conclusion, with the same replacement, and nothing else. The derived rule does not open or close any box of the derivation that uses it.

We give the derived rules of this section short tags: MT for Proposition 2.3.1, CP for Proposition 2.3.2, and, once it is proved below, DS for Proposition 2.3.4. Every other derived sequent is a derived rule too, cited by its name: the four lines 2–5 of Example (An implication with an impossible hypothesis), for instance, are now one line citing Proposition 2.1.2.

Left: with the derived rule. Right: written out.

1P→Q
2¬Q
3¬PMT 1, 2
1P→Q
2¬Q
3Pasm, for ¬I
4Q→E 1, 3
5⊥¬E 4, 2
6¬P¬I 3–5

Line 3 on the left stands for lines 3–6 on the right: the same premises, the same last line.

A derived rule is shorthand for lines we could always write out, so it lets us prove nothing that the primitive rules could not.

Quick check. In the figure, which lines does line 3 on the left cite, and which lines on the right use those same two premises?

Solution. Lines 1 and 2. On the right, line 4 cites line 1 and line 5 cites line 2.

Second readingWhy a derived rule adds no power

Convenience, not power. A derived-rule line abbreviates a stretch of derivation that we could write out in full. To expand it, repeat each cited line by (D3) of Definition 1.4.2, then copy the derivation of the sequent below the repetitions, with its letters replaced, its premises replaced by the repetitions, and its line numbers shifted. Every citation inside the copy points inside the copy or to a repetition, all in the current box, so every citation is available. The copy’s boxes close before its last line, which is the instance of β. If the copy itself uses derived rules, expand those lines in the same way; this stops, because each derivation cites only results proved before it. So whatever can be derived with derived rules can be derived with the primitive rules alone.

The degenerate case is a sequent with nothing done to its premise, P⊢P, whose derivation is the single premise line (part (a) of Example (Derivations, simplest first)): as a derived rule it copies an available line, which repetition already does. The first use with content is modus tollens proved a second time, with CP as a rule. The premise P→Q invites CP, and its conclusion ¬Q→¬P is an implication whose hypothesis is the other premise.

1P→Q
2¬Q
3¬Q→¬PCP 1
4¬P→E 3, 2

Line 3 is the instance of Proposition 2.3.2 with P and Q replaced by themselves; line 4 is modus ponens on it. Written out in full, line 3 would become a repetition of line 1 followed by lines 2–7 of the derivation of Proposition 2.3.2. This is honest because Proposition 2.3.2 was derived from the primitive rules, not from Proposition 2.3.1: the chain of derived rules ends in primitive rules, without a loop.

Warning. A derived rule must match its sequent exactly, under one uniform replacement of letters. From P→Q and ¬R, MT gives nothing: no single statement in place of ψ turns the pair into φ→ψ and ¬ψ. Equally, from P→¬Q and Q, MT gives nothing yet: it needs the negation of the conclusion, ¬¬Q, and Q is not that line. (Here ¬I would give ¬¬Q first, as in Example (Two negations from one premise), and then MT applies.) Likewise DS, as stated below, refutes the left disjunct; applied blindly to P∨Q and ¬Q, it does not match.

In the Givens/Goal table, a derived rule adds its conclusion to the Givens in one row, as an elimination rule does.

2.3.4. Pasting whole derivations: weakening and cut

The figure expands one derived-rule line inside a derivation. Outside every box there is a cleaner statement, about whole derivations: two derivations can be joined end to end, and premises that are never used do no harm.

Lemma 2.3.3 (Weakening and Cut)

Let Γ and Δ be lists of statements, and let φ, ψ, α1,…,αm (m≥1), and β be statements.

  • (a) Weakening. If Γ⊢ψ and every member of Γ is a member of Δ, then Δ⊢ψ. In particular, Γ⊢ψ implies Γ,φ⊢ψ.
  • (b) Cut. If Γ⊢φ and Γ,φ⊢ψ, then Γ⊢ψ.
  • (c) Chaining. If Γ⊢αi for every i=1,…,m, and α1,…,αm⊢β, then Γ⊢β.

In words: (a) extra premises never hurt; (b) a statement that has been derived may be used as a premise; (c) a sequent already proved can be applied to statements already derived. Part (c) is Definition 2.3.1 for whole derivations, outside every box; inside a box, the expansion of the fold “Why a derived rule adds no power” does the same job.

Chaining and cut are the reason a derived-rule line outside every box is legitimate: the lines it cites lie in no box, so the derivation up to each of them derives it from Γ, and (c) then derives the instance of the sequent’s conclusion from Γ; by (b), the rest of the derivation may use that instance.

Second readingThe proof: pasting derivations

Idea. Part (a) is read off Definition 1.2.3, which asks only that the premises of the derivation belong to the list. For (b) and (c), write the derivations one after another and let the last one cite, instead of its premise αi, the last line of the derivation of αi. The only thing to check is the scope rule of Definition 1.4.2: the last line of a derivation lies in no box, so it stays available to everything written after it.

Proof. (a) A derivation witnessing Γ⊢ψ has premises that belong to Γ, hence to Δ, and its last line is ψ. By Definition 1.2.3 it witnesses Δ⊢ψ. The second sentence is the case where Δ is Γ,φ.

For (b) and (c) we prove one statement that contains both:

(∗) If Γ⊢αi for every i=1,…,m, and Γ,α1,…,αm⊢β, then Γ⊢β.

Part (b) is (∗) with m=1, α1=φ and β=ψ. Part (c) follows from (∗), since α1,…,αm⊢β gives Γ,α1,…,αm⊢β by (a).

To prove (∗), let Di be a derivation of αi with premises in Γ, for each i, and let E be a derivation of β with premises in Γ,α1,…,αm. If the last line of E is one of its premises, then β is a member of Γ, and the one-line derivation whose only line is the premise β shows Γ⊢β; or β is some αi, and Di shows Γ⊢β. Otherwise, build a list of lines F as follows.

  1. First, as premises, every premise of D1,…,Dm, and every premise of E that is a member of Γ.
  2. Then the lines of D1 that are not premises, then those of D2, and so on up to Dm, each with its boxes.
  3. Then the lines of E that are not premises, with its boxes.

Renumber the lines, and change each citation as follows. A citation of a premise that is in Γ now cites the premise line of step 1 carrying that statement. A citation in E of a premise αi that is not in Γ now cites the last line of Di; that line is not a premise of Di, because the premises of Di are in Γ and αi is not, so it was copied in step 2. Every other citation follows its line to its new number.

We check that F is a derivation (Definition 1.4.2). The premises come first and lie in no box. The boxes are those of the Di and of E, moved as blocks, so two boxes are still disjoint or nested, each still begins with its assumption, and each line lies in exactly the boxes it lay in before. Hence a line and a box that were available at a citing line are still available there, since the boxes containing each are unchanged. A premise line of step 1 lies in no box and comes first, so it is available at every later line. The last line of Di lies in no box (it was the last line of a derivation) and comes before every line of E, so it is available at every line of E. Each line carries the same statement and the same justification as before, citing lines with the same statements, so it is an instance of the same rule. Finally, the last line of F is the last line of E, namely β, and it lies in no box. The premises of F are all in Γ. Therefore Γ⊢β, which proves (∗).

Quick check. Given Proposition 2.3.1, which part of Lemma 2.3.3 gives P→Q, ¬Q, R⊢¬P at once? Given also Proposition 2.1.2, which part gives P→Q, ¬Q⊢P→R?

Solution. Part (a), weakening, with R as the extra premise. Part (c), chaining, with m=1, α1=¬P and β=P→R: Proposition 2.3.1 gives P→Q, ¬Q⊢¬P, and Proposition 2.1.2 with R in place of Q gives ¬P⊢P→R. (Part (a) and then part (b) do the same.)

2.3.5. Disjunctive syllogism: the impossible case, filed

The second pattern is the impossible case of Section 2.1. Every integer is even or odd; this one is not even; so it is odd. A disjunction, one side refuted, the other side left.

Proposition 2.3.4 (Disjunctive Syllogism)

P∨Q,¬P⊢Q.

Idea. This is Example (An impossible case) with a simpler clash. There, the case P produced R by →E, which clashed with ¬R. Here the case P clashes with the premise ¬P at once. So: split the premise P∨Q by ∨E, both boxes ending in the current goal Q. The Q box is its own assumption. The P box cannot reach Q honestly, so it reaches a clash and closes by ⊥E: an impossible case closes itself.

Proof. The following is a derivation with premises P∨Q and ¬P, and last line Q.

1P∨Q
2¬P
3Pasm, for ∨E
4⊥¬E 3, 2
5Q⊥E 4
6Qasm, for ∨E
7Q∨E 1, 3–5, 6–6

The two boxes 3–5 and 6–6 are separate. The second consists of its assumption alone, which is already the statement Q that ∨E needs. This proves the proposition.

Set the derivation beside that of Example (An impossible case). Both split P∨Q into the same two boxes, and in both the Q box is one line long. Inside the P box, two lines reached ⊥ there (lines 5–6) and one line does here (line 4); then ⊥E closes the box in the same way. From now on this whole stretch is one line, tagged DS.

The rule as stated refutes the left disjunct. To refute the right one, first put the disjunction in the other order; that, too, is now one line, since Example (First derivations with “or”) derived P∨Q⊢Q∨P. (Exercise B1 derives the mirror image directly.)

Example (Derived rules in use)
  • (a) Show that P→Q,Q→R,¬R⊢¬P, and then write the derivation out with primitive rules only.
  • (b) Show that P∨Q,¬P,Q→R⊢R.

Solution. Idea. A derived rule is a premise-directed shortcut: a line φ→ψ with a line ¬ψ invites MT; a disjunction with one side refuted invites DS. This is the move this section adds to the search for derivations: before opening a box by hand, ask whether a derived rule takes the step at once.

  • (a) Work backwards from the goal ¬P. The premise P→Q would give it by MT if ¬Q were available. And ¬Q comes by MT from Q→R and ¬R. So MT is used twice, the second time on the conclusion of the first.
    1P→Q
    2Q→R
    3¬R
    ⋮
    5¬P
    1P→Q
    2Q→R
    3¬R
    ⋮
    4¬Q
    5¬PMT 1, 4
    1P→Q
    2Q→R
    3¬R
    4¬QMT 2, 3
    5¬PMT 1, 4

    Line 4 is the instance with φ replaced by Q and ψ by R; line 5 the instance with P and Q. In primitive rules, each MT line becomes its four lines, as in lines 3–6 of the derivation of Proposition 2.3.1: a box on the hypothesis, →E, ¬E, ¬I. This natural expansion has eleven lines.

    1P→Q
    2Q→R
    3¬R
    4Qasm, for ¬I
    5R→E 2, 4
    6⊥¬E 5, 3
    7¬Q¬I 4–6
    8Pasm, for ¬I
    9Q→E 1, 8
    10⊥¬E 9, 7
    11¬P¬I 8–10

    The literal expansion of the fold “Why a derived rule adds no power” adds a repetition of each cited line and is longer; the natural one cites the available lines directly.

  • (b) The disjunction P∨Q has its left side refuted by ¬P, so DS gives Q, and then Q→R fires.
1P∨Q
2¬P
3Q→R
⋮
5R
1P∨Q
2¬P
3Q→R
⋮
4Q
5R→E 3, 4
1P∨Q
2¬P
3Q→R
4QDS 1, 2
5R→E 3, 4

Expanded, line 4 becomes lines 3–7 of the derivation of Proposition 2.3.4 (five lines), with a case split on line 1 and the case P closed by ⊥E.

Quick check. Which derived rule of this section, if any, gives a new line in one step from each pair of available lines?

  • (i) P→Q and ¬Q. (ii) P∨Q and ¬P. (iii) P∨Q and Q→R. (iv) P→¬Q and Q.

Solution.

  • (i) MT gives ¬P. (ii) DS gives Q. (iii) None: nothing is known about the case P. (iv) None in one step: MT needs the negation of the conclusion ¬Q, which is ¬¬Q, not Q. A ¬I box gives ¬¬Q from Q first, as in Example (Two negations from one premise), and then MT gives ¬P.

2.3.6. Modus tollens on numbers, and the green card

In a mathematical proof, MT is the step “since the conclusion fails, the hypothesis fails”. Here it is with numbers.

Example (Modus tollens on numbers)

Let x be a real number with x2≤4. Use the implication “if x>2, then x2>4” to show that x≤2, naming the derived rule.

Solution. Take P: “x>2” and Q: “x2>4”. The implication is P→Q. (It holds because x>2>0 gives x2=x⋅x>2x>4.) The hypothesis x2≤4 is ¬Q, since for real numbers x2≤4 and x2>4 are exact negations of each other. By MT (Proposition 2.3.1), ¬P, that is, ¬(x>2), which is x≤2.

The claim of Example (Four cards) (Section 1.3), for one card, is E→R, with E: “this card’s number is even” and R: “its color side is red”.

The card shows So we have What a rule gives Turn it?
6 E →E: R; the back must be red yes: a green back would break the claim
7 ¬E nothing about R: no rule takes E→R and ¬E to R or to ¬R no
red R nothing about E: concluding E would be affirming the consequent no
green ¬R MT: ¬E; the number must be odd yes: an even number would break the claim

Turning the green card tests exactly the line MT wrote: an even number there gives E, and with ¬R and E→R, →E and ¬E reach ⊥. Modus tollens is the step people skip.

CP turns the claim into its contrapositive ¬R→¬E, “a card whose color is not red has an odd number”, which carries the claim’s content to the green card; Section 2.5 derives the passage back, so the two say the same. The converse R→E, “a red card has an even number”, is a different claim, and the card rule never made it.

Quick check. Which card would MT settle if the claim were “if a card’s color side is red, then its number is even”?

Solution. The 7. The claim is R→E, the 7 shows ¬E, and MT gives ¬R, so its back must not be red: turn it.

Second readingModus tollens and testing a claim

A claim about every integer of a kind makes one prediction per instance. “For every prime p, the number 2p−1 is prime” predicts that 3, 7, 31 and 127 are prime, for p=2,3,5,7, and all four are. Write A for the claim and B for one prediction, so that A→B. The form “from A→B and B, conclude A” breaks (it is affirming the consequent, Section 1.3), so no number of confirming instances proves the claim. One failed instance refutes it, by MT on that instance: for p=11, 211−1=2047=23⋅89, so the prediction B fails, and from A→B and ¬B, MT gives ¬A. Scientists call a hypothesis that has survived many tests corroborated, not proved; a mathematician calls such a claim a conjecture.

2.3.7. How this rule looks in a mathematical proof

Theorem 2.1.3 (Section 2.1) says that for an integer n, if n2 is even then n is even. Section 2.1 proved it by cases, with the odd case shown impossible and closed by ⊥E. Here is the same theorem argued as mathematicians usually write it, with the derived rules doing the work. We use the facts (E1)–(E3) of Section 2.1: every integer is even or odd; no integer is both; the square of an odd integer is odd.

Written the way a mathematician would write it, the proof is four sentences: Suppose n2 is even. Then n2 is not odd, since no integer is both. By the contrapositive of (E3), n is not odd. As every integer is even or odd, n is even. Each sentence after the first is one named step: ¬I with (E2); CP with →E; DS, after exchanging the disjuncts of (E1), as line 11 of the derivation below does. The example below writes the same proof with every step tagged, and then as a derivation.

Example (Even square, even number, by contraposition)

Let n be an integer. Prove that if n2 is even, then n is even, using CP and DS, and label each step with its rule.

Solution. Idea. The hypothesis “n2 is even” hands us nothing to compute with, while “n is odd” hands us n=2k+1. So we turn (E3) round by CP: a number whose square is not odd is not odd itself. Then (E1), with one side refuted, leaves “even” by DS.

Suppose n2 is even [assumption for →I]. If n2 were odd [assumption for ¬I], it would be both even and odd [∧I], contradicting (E2) [¬E]; hence n2 is not odd [¬I]. By (E3), if n is odd then n2 is odd, so by contraposition, if n2 is not odd then n is not odd [CP]. Hence n is not odd [→E]. By (E1), n is even or odd, so n is odd or even [or commutes], by the exchange of disjuncts of Example (First derivations with “or”) used as a derived rule. Since n is not odd, n is even [DS]. This proves that if n2 is even, then n is even [→I].

With E: “n is even”, O: “n is odd”, S: “n2 is even”, T: “n2 is odd”, and the three facts as premises, the skeleton is this derivation.

1E∨O
2¬(S∧T)
3O→T
4Sasm, for →I
5Tasm, for ¬I
6S∧T∧I 4, 5
7⊥¬E 6, 2
8¬T¬I 5–7
9¬T→¬OCP 3
10¬O→E 9, 8
11O∨Eor commutes 1
12EDS 11, 10
13S→E→I 4–12

Line 11 is Example (First derivations with “or”) used as a derived rule, so that line 12 refutes the left disjunct, as DS requires.

Second readingThe two derivations of Even Square, line for line

Compare this with the twelve-line derivation after Theorem 2.1.3 in Section 2.1. There, line 11 split on (E1) at once, and the odd case, lines 6–10, got T from (E3), built S∧T, clashed with (E2), and closed by ⊥E. Here the same work is spread over named steps. The ¬I box on lines 5–7 does the clash with (E2), which there was lines 8–9. Lines 9 and 10, CP and →E, abbreviate a box that assumes O, gets T by (E3), as line 7 did there, and clashes with line 8. Line 12, DS, abbreviates a case split on the disjunction with the case O closed by ⊥E, as lines 5–11 did there. The short version reads the way people talk.

2.3.8. Common errors

Warning. A derived rule may be used only after its sequent has been derived, and never inside its own derivation. A “derivation” of Proposition 2.3.2 that justifies one of its lines by CP proves nothing: it assumes what it sets out to show. Exercise C2 is an example.

Warning. The converse of the contrapositive is a different sequent. CP passes from P→Q to ¬Q→¬P; it does not pass from ¬Q→¬P back to P→Q. Try it: in a box on P the goal is Q, a letter with no negation, and the natural box, on ¬Q, reaches ⊥ and so closes to ¬¬Q, not Q. Section 2.5 derives the passage back with a new rule.

2.3.9. The rule card

Example (Instances of MT, CP and DS)

A sequent is proved once, for letters, and used for every statement put in their place. So it pays to prove a lemma with the fewest premises and the most general letters it allows: one derivation, written once, serves every row of its rule below.

Rule Letters replaced Cited lines New line
MT φ:=P∨Q, ψ:=R∧S (P∨Q)→(R∧S), ¬(R∧S) ¬(P∨Q)
CP φ:=¬P, ψ:=Q→R ¬P→(Q→R) ¬(Q→R)→¬¬P
DS φ:=P→Q, ψ:=¬R∨S (P→Q)∨(¬R∨S), ¬(P→Q) ¬R∨S

Not an instance. From (P→Q)∨R and ¬P, DS gives nothing: the refuted line must be the negation of the whole left disjunct, ¬(P→Q), and ¬P is not that line.

Chapter 1’s seven rules are on the card at the end of Section 1.6; here are this chapter’s so far.

Rule Shape You write Lean
¬E φ, ¬φ ⟹ ⊥ “…, which contradicts …” exact hn hp (goal False)
⊥E ⊥ ⟹ any φ “This case cannot occur.” “So there is nothing to prove.” exfalso
¬I box φ … ⊥ ⟹ ¬φ “Suppose P. … This is a contradiction. Hence not P.” intro hp (goal False)
MT (derived) φ→ψ, ¬ψ ⟹ ¬φ “Since Q fails, so does P.” mt h hnq
CP (derived) φ→ψ ⟹ ¬ψ→¬φ “We prove the contrapositive: suppose not Q; … so not P.” mt
DS (derived) φ∨ψ, ¬φ ⟹ ψ “P is impossible, so Q.” h.resolve_left hnp

Warning (Not allowed: derived rules). Each step breaks the clause of the reading of Definition 2.3.1 shown.

  • “CP on a line of the derivation of Proposition 2.3.2”: the sequent is not yet derived where it is used (clause 1; Exercise C2).
  • “¬P by MT from (P∧Q)→R and ¬R”: MT writes the negation of the whole hypothesis, ¬(P∧Q) (clause 4).
  • “MT citing a line inside a closed box”: the scope rule still governs every citation (clause 3).
  • “¬P in one line from P→Q, Q→R, ¬R”: one instance per line; Example (Derived rules in use) (a) takes two MT lines (clause 4).
  • “P by ¬¬E from ¬¬P, here”: ¬¬E is derived only in Section 2.5 (clause 1).

Remark (Looking ahead). Chapter 4 makes exact the replacement of letters that a derived rule allows, under the name substitution.

2.3.10. Exercises

A. Check your understanding

Exercise (A1)
  • (a) State Definition 2.3.1 in your own words, including what “already derived” and “the same statement” require.

  • (b) Here is a derivation that uses MT. Rewrite it with primitive rules only.

    1R→P
    2¬P
    3¬RMT 1, 2
    4¬R∨S∨I 3
  • (c) True or false, with a reason: “¬Q→¬P follows from P→Q by CP, so P→Q follows from ¬Q→¬P by CP.”

Solution.

  • (a) If a sequent has been derived earlier (not inside the derivation that uses it), then in a later derivation we may replace its letters by statements, each letter by one statement everywhere it occurs, and, when available lines hold the resulting instances of its premises, write the resulting instance of its conclusion on one line, citing the sequent and those lines.

  • (b) Line 3 becomes a box on R, then →E, ¬E, and ¬I:

    1R→P
    2¬P
    3Rasm, for ¬I
    4P→E 1, 3
    5⊥¬E 4, 2
    6¬R¬I 3–5
    7¬R∨S∨I 6
  • (c) False. CP is the sequent P→Q⊢¬Q→¬P. Applied to ¬Q→¬P, with P replaced by ¬Q and Q by ¬P, it gives ¬¬P→¬¬Q, not P→Q. The passage from ¬Q→¬P to P→Q is the converse, a different sequent; Section 2.5 derives it with a new rule.
Exercise (A2: Drill)

Each part takes a line or two. The parts run from single steps, through a missing line and a justification column, to whole derivations. Let x be a real number.

  • (a) Lines 1 (A∧B)→C, 2 ¬C. What does “MT 1, 2” write?
  • (b) Lines 1 ¬P∨Q, 2 ¬¬P. What does “DS 1, 2” write?
  • (c) What does CP write from (x>0)→(x2>0)?
  • (d) Line 3 is ¬(P∨Q) and line 5 is ¬R→(P∨Q). What does “MT 5, 3” write?
  • (e) Written out with primitive rules, citing available lines directly, how many lines does one MT line become?
  • (f) Line 8 is ¬(R∧S), justified “MT 2, 6”, and line 6 is ¬T. What is line 2?
  • (g) Line 9 is R→S, justified “DS 4, 7”, and line 7 is ¬(P∧Q). What is line 4?
  • (h) Lines 1–4 are the premises P∨(Q→R), ¬P, S→Q, ¬R. Justify 5 Q→R; 6 ¬Q; 7 ¬S.
  • (i) Lines 1 P→¬Q, 2 Q. Does MT apply?
  • (j) Lines 1 P∨Q, 2 ¬Q. Does DS, as stated, apply?
  • (k) May a derivation of Proposition 2.3.2 use CP on one of its lines?
  • (l) Find the illegal line: 1 P→Q; 2 ¬P; 3 ¬Q, MT 1, 2.
  • (m) Derive P→(Q∧R), ¬R⊢¬P.
  • (n) Derive P∨Q, ¬P, ¬Q⊢R.
  • (o) Derive ¬P→Q, ¬Q⊢¬¬P in one line.

Solution.

  • (a) ¬(A∧B).

  • (b) Q (the letter P of DS replaced by ¬P).

  • (c) ¬(x2>0)→¬(x>0), that is, (x2≤0)→(x≤0).

  • (d) ¬¬R, with φ:=¬R and ψ:=P∨Q.

  • (e) Four: an assumption, →E, ¬E, ¬I (the figure).

  • (f) (R∧S)→T.

  • (g) (P∧Q)∨(R→S).

  • (h) 5 DS 1, 2; 6 MT 5, 4; 7 MT 3, 6.

  • (i) Not yet: MT needs ¬¬Q. Write it from Q by a ¬I box first; then MT gives ¬P.

  • (j) No: DS refutes the left disjunct. Use the other form (Exercise B1 (a)) or exchange the disjuncts first.

  • (k) No: a derived rule may be used only after its sequent has been derived.

  • (l) Line 3: MT needs the negation of the conclusion, ¬Q, and gives ¬P; line 3 runs it backwards, from ¬P to ¬Q. The form breaks at P false, Q true.

  • (m) 3 P, assumption; 4 Q∧R, →E 1, 3; 5 R, ∧E 4; 6 ⊥, ¬E 5, 2; 7 ¬P, ¬I 3–6. (MT does not match: ¬(Q∧R) is not available.)

  • (n) 4 Q, DS 1, 2; 5 ⊥, ¬E 4, 3; 6 R, ⊥E 5.

  • (o) 3 ¬¬P, MT 1, 2.

B. Practice

Exercise (B1: The other disjunctive syllogism, used later)
  • (a) Show that P∨Q,¬Q⊢P by a derivation from the primitive rules.
  • (b) Let x be a real number with x2=1 and x>0. You may use that x2=1 implies x=1 or x=−1. Deduce that x=1, naming the result you use.

Solution.

  • (a) As in Proposition 2.3.4, with the roles of the boxes exchanged: now the case Q is the impossible one.
    1P∨Q
    2¬Q
    3Pasm, for ∨E
    4Qasm, for ∨E
    5⊥¬E 4, 2
    6P⊥E 5
    7P∨E 1, 3–3, 4–6
  • (b) Since x2=1, we have x=1 or x=−1. Since x>0 and −1<0, we have x≠−1. By part (a), with P: “x=1” and Q: “x=−1”, used as a derived rule (Definition 2.3.1), we conclude x=1.
Exercise (B2: Putting a derivation in order)

Here are nine lines, each a statement with its justification. Seven of them, in the right order and with the right boxes, form a derivation of P→Q⊢¬Q→¬P from the primitive rules. Give the order, and say where each box opens and closes. Then say why each of the other two lines cannot be used.

  • (i) ¬Q→¬P, by →I on the box from ¬Q to ¬P.
  • (ii) Q, by →E from P→Q and P.
  • (iii) P→Q, premise.
  • (iv) ¬P, by ¬I on the box from P to ⊥.
  • (v) ¬Q, assumption.
  • (vi) ⊥, by ¬E from Q and ¬Q.
  • (vii) P, assumption.
  • (viii) ¬P, assumption, opening the box for the ¬I that proves ¬P.
  • (ix) Q, by →E from P→Q and the assumption P of (vii), written directly below (iv).

Solution. The order is (iii), (v), (vii), (ii), (vi), (iv), (i), with one box opened by (v) and closed after (iv), and a second box inside it, opened by (vii) and closed after (vi). This is the derivation of Proposition 2.3.2. It is the only admissible order. The premise comes first. (i) needs a box from ¬Q to ¬P, so (v) opens a box whose last line is (iv). (iv) needs a box from P to ⊥ inside it, so (vii) opens a box whose last line is (vi). Inside that box, (ii) needs (vii), and (vi) needs (ii) and (v).

  • (viii) cannot be used. ¬I proves ¬P from a box opened by P, the statement being negated (Definition 2.2.1). A box opened by ¬P and ending in ⊥ would give ¬¬P. (ix) cannot be used where it is placed. Directly below (iv), the box opened by (vii) has closed, so the assumption P is not available (Definition 1.4.2). Placed inside that box, the same line is (ii).
Exercise (B3: Two refutations)

A search for (P∨Q)→R,¬R⊢¬P∧¬Q has reached the stage below. You may use the derived rules of this section. Name the move, then complete it.

1(P∨Q)→R
2¬R
3¬(P∨Q)MT 1, 2
⋮
12¬P∧¬Q

Solution. The premises are an implication and the negation of its conclusion, which invites MT: it gives ¬(P∨Q). The goal is a conjunction, so we need ¬P and ¬Q, each a negation, each by a ¬I box. In the box of P, the clash is manufactured: ∨I gives P∨Q, which clashes with line 3. The box of Q is the same.

1(P∨Q)→R
2¬R
3¬(P∨Q)MT 1, 2
4Pasm, for ¬I
5P∨Q∨I 4
6⊥¬E 5, 3
7¬P¬I 4–6
8Qasm, for ¬I
9P∨Q∨I 8
10⊥¬E 9, 3
11¬Q¬I 8–10
12¬P∧¬Q∧I 7, 11

Line 3 is MT with φ replaced by P∨Q and ψ by R.

Exercise (B4: Dilemmas as derived rules, used later)
  • (a) Section 1.6 derived the constructive dilemma, Example (Constructive dilemma). Use it as a derived rule, tagged CD, together with Example (First derivations with “or”), to derive (P→R)∧(Q→R), P∨Q⊢R in four lines.
  • (b) Derive the destructive dilemma (P→R)∧(Q→S), ¬R∨¬S⊢¬P∨¬Q, using MT.
  • (c) Derive ¬(P∧Q)⊢P→¬Q: “P rules out Q”, the form in which the traditional modus ponendo tollens is used. Then break “from ¬(P∧Q) and ¬P, conclude Q”.
  • (d) Let n be an integer. Use (b) to show: if n is odd or n is not a multiple of 3, then n is not a multiple of 4 or not a multiple of 9. Take as premises that a multiple of 4 is even and a multiple of 9 is a multiple of 3, and read “odd” as “not even”.

Solution.

  • (a) Line 3 is Example (Constructive dilemma), (P→R)∧(Q→S), P∨Q⊢R∨S, with S replaced by R. Line 4 is the second sequent of Example (First derivations with “or”), P∨P⊢P, with P replaced by R.
    1(P→R)∧(Q→R)
    2P∨Q
    3R∨RCD 1, 2
    4Ror merges 3
  • (b) Split the premise ¬R∨¬S; in each case MT refutes one hypothesis, and ∨I builds the goal.
    1(P→R)∧(Q→S)
    2¬R∨¬S
    3P→R∧E 1
    4Q→S∧E 1
    5¬Rasm, for ∨E
    6¬PMT 3, 5
    7¬P∨¬Q∨I 6
    8¬Sasm, for ∨E
    9¬QMT 4, 8
    10¬P∨¬Q∨I 9
    11¬P∨¬Q∨E 2, 5–7, 8–10
  • (c) The goal is an implication, so open a box on P; its goal ¬Q is a negation, so open a ¬I box on Q inside it.
    1¬(P∧Q)
    2Pasm, for →I
    3Qasm, for ¬I
    4P∧Q∧I 2, 3
    5⊥¬E 4, 1
    6¬Q¬I 3–5
    7P→¬Q→I 2–6

    The look-alike breaks with P: “x>5” and Q: “x>3”, at x=0: ¬(P∧Q) and ¬P are true and Q is false, so the counterexample set ¬(P∧Q), ¬P, ¬Q is true. Modus ponendo tollens uses a negated conjunction and affirms one conjunct; DS uses a disjunction and refutes one disjunct; mixing the two is the error of the look-alike.

  • (d) Write F: “n is a multiple of 4”, E: “n is even”, N: “n is a multiple of 9”, T: “n is a multiple of 3”. The premises are (F→E)∧(N→T) (since 4k=2(2k) and 9k=3(3k)), and the hypothesis is ¬E∨¬T. Open a box on the hypothesis; inside it, (b) as a derived rule, with P, Q, R, S replaced by F, N, E, T, gives ¬F∨¬N; then →I closes the box on (¬E∨¬T)→(¬F∨¬N). For instance n=7 is odd, and not a multiple of 4.

Marking scheme. (10 points)

  • 2: (a), CD with the replacement S:=R named, then P∨P⊢P.
  • 3: (b), MT in each case box, both boxes ending in ¬P∨¬Q.
  • 3: (c), the nested ¬I box inside the →I box (2), and a correct break of the look-alike (1).
  • 2: (d), the letters, the premises, and the use of (b) inside a →I box.

Fatal error (0 for (b)): a case box citing a line of the other case box.

Exercise (B5: Derive or break)

For each claim, derive it with the rules so far, including MT, CP, DS and the sequents derived in this book so far, or break it by statements about a real number x that make its counterexample set true at one value of x.

  • (a) P∨Q, Q⊢¬P.
  • (b) (P∨R)→¬Q, Q⊢¬R.
  • (c) ¬P→Q⊢¬Q→¬P.
  • (d) P∨(Q∧R), ¬P⊢R.
  • (e) (P∧Q)→R, ¬R, P⊢¬Q.
  • (f) P→(Q∨R), ¬Q⊢P→R.
  • (g) P→(Q∨R), ¬Q⊢R.
  • (h) (P→Q)∧(R→S), ¬Q∨¬S⊢¬P∧¬R.

Solution.

  • (a) Break. Take P: “x>0” and Q: “x>1”. At x=2, P∨Q and Q are true and P is true, so the counterexample set (Definition 1.1.3) P∨Q, Q, ¬¬P is true. This is affirming a disjunct (Section 1.6).

  • (b) Derive. The goal is a negation: open a box on R, and manufacture the premise’s hypothesis by ∨I.

    1(P∨R)→¬Q
    2Q
    3Rasm, for ¬I
    4P∨R∨I 3
    5¬Q→E 1, 4
    6⊥¬E 2, 5
    7¬R¬I 3–6
  • (c) Break. Take P: “x>0” and Q: “x>5”. At x=1, ¬P→Q is true (its hypothesis fails), ¬Q is true and ¬P is false, so the counterexample set ¬P→Q, ¬(¬Q→¬P) is true. (CP on ¬P→Q gives ¬Q→¬¬P, not this.)

  • (d) Derive.

    1P∨(Q∧R)
    2¬P
    3Q∧RDS 1, 2
    4R∧E 3
  • (e) Derive. MT refutes the conjunction; then a ¬I box on Q rebuilds it from the premise P.
    1(P∧Q)→R
    2¬R
    3P
    4¬(P∧Q)MT 1, 2
    5Qasm, for ¬I
    6P∧Q∧I 3, 5
    7⊥¬E 6, 4
    8¬Q¬I 5–7
  • (f) Derive.
    1P→(Q∨R)
    2¬Q
    3Pasm, for →I
    4Q∨R→E 1, 3
    5RDS 4, 2
    6P→R→I 3–5
  • (g) Break. Take P: “x>5”, Q: “x>3”, R: “x>4”. The premise P→(Q∨R) is true for every x. At x=0, ¬Q is true and R is false, so the counterexample set P→(Q∨R), ¬Q, ¬R is true.

  • (h) Break. Take P: “x>5”, Q: “x>9”, R: “x>0”, S: “x>−1”. At x=1, P→Q is true (its hypothesis fails) and R→S is true (for every x), ¬Q∨¬S is true since ¬Q is, and ¬P∧¬R is false, since R is true. So the counterexample set (P→Q)∧(R→S), ¬Q∨¬S, ¬(¬P∧¬R) is true.

  • (i) and (c) are the look-alikes of DS and of CP; (g) drops the hypothesis that (f) keeps in its box; (h) is the destructive dilemma of Exercise B4 (b) with the ∨ of its conclusion made ∧.

Marking scheme. (16 points) For each claim: 1 for the verdict; 1 for a derivation every line of which checks, or for a choice of statements and one value of x at which every member of the counterexample set is true. Fatal errors (0 for the claim): a “break” at which a premise fails; RAA or ¬¬E in a derivation.

C. Going deeper

Exercise (C1: Two premises that cannot both fail, used later)
  • (a) Show that P→Q,¬P→R,¬Q,¬R⊢⊥, using MT twice.
  • (b) Hence show that P→Q,¬P→R⊢¬(¬Q∧¬R) with the rules so far.
  • (c) In words, the conclusion of (b) says that Q and R do not both fail. Explain why a derivation with the rules so far naturally ends at ¬(¬Q∧¬R) rather than at Q∨R.

Solution.

  • (a) The first MT has φ=P, ψ=Q. The second has φ=¬P, ψ=R, so it gives the negation of ¬P, which is ¬¬P. Lines 5 and 6 then clash.
    1P→Q
    2¬P→R
    3¬Q
    4¬R
    5¬PMT 1, 3
    6¬¬PMT 2, 4
    7⊥¬E 5, 6

    Line 7 cites ¬P and then ¬¬P: the unnegated line first, with φ of ¬E replaced by ¬P.

  • (b) The goal is a negation, so open a box on ¬Q∧¬R and aim at ⊥. Inside, ∧E supplies the two negated premises of (a), and the rest is (a).
    1P→Q
    2¬P→R
    3¬Q∧¬Rasm, for ¬I
    4¬Q∧E 3
    5¬R∧E 3
    6¬PMT 1, 4
    7¬¬PMT 2, 5
    8⊥¬E 6, 7
    9¬(¬Q∧¬R)¬I 3–8
  • (c) To reach Q∨R by ∨I we would need Q or R on its own. The premises give Q once P is known and R once ¬P is known, and nothing available says which of P, ¬P holds. What the rules so far can do is refute the opposite, ¬Q∧¬R, by a ¬I box, and that gives the negation in (b). The step from (b) to Q∨R uses the rule of Section 2.5.
Exercise (C2: A circular derivation)

A student offers this derivation of P→Q⊢¬Q→¬P.

1P→Q
2¬Qasm, for →I
3¬Q→¬PCP 1
4¬P→E 3, 2
5¬Q→¬P→I 2–4
  • (a) Every line is an instance of the rule it names. What is wrong?
  • (b) Give a correct derivation. May lines 3 and 4 be replaced by the one line “¬P, MT 1, 2”?

Solution.

  • (a) Line 3 uses CP, the derived rule whose sequent, P→Q⊢¬Q→¬P, is the very one being derived. Definition 2.3.1 allows a sequent to be used only when it has already been derived; here it has not, so line 3 has no justification. (The whole derivation is also pointless: line 3 alone is already the goal.)

  • (b) The derivation of Proposition 2.3.2, from the primitive rules:

1P→Q
2¬Qasm, for →I
3Pasm, for ¬I
4Q→E 1, 3
5⊥¬E 4, 2
6¬P¬I 3–5
7¬Q→¬P→I 2–6

Yes: lines 3–4 become the one line “¬P, MT 1, 2” inside the box of ¬Q, and line 5 becomes ¬Q→¬P, →I 2–3. This is legitimate, because Proposition 2.3.1 was derived from the primitive rules, without CP. What matters is that the chain of derived rules ends in primitive rules, without a loop.

Exercise (C3: Exit check: labeling a proof)

Here is a proof that for an integer n, if n2 is odd, then n is odd.

Suppose n2 is odd. If n were even, n=2k, then n2=2(2k2) would be even; so, by contraposition, since n2 is not even (it is odd, and no integer is both), n is not even. As every integer is even or odd, n is odd.

Label each sentence, or part of a sentence, with the rule or rules it uses, primitive or derived. Take as premises the facts (E1) and (E2) of Section 2.1 and the school computation “if n is even, then n2 is even”.

Solution. Write E: “n is even”, O: “n is odd”, S: “n2 is even”, T: “n2 is odd”.

  • “Suppose n2 is odd”: the assumption T of the box for →I, whose goal is O.
  • “If n were even, n=2k, then n2=2(2k2) would be even”: the implication E→S, a premise (the school computation). Reading the sentence as a →I box that proves E→S, assuming E and computing, is equally correct.
  • “n2 is not even (it is odd, and no integer is both)”: ¬S, by ¬I: a box on S builds S∧T by ∧I and clashes with (E2), ¬(S∧T), by ¬E.
  • “by contraposition … n is not even”: CP on E→S gives ¬S→¬E, and →E with ¬S gives ¬E. (One MT line does both.)
  • “As every integer is even or odd, n is odd”: DS on (E1), E∨O, with the left side E refuted, gives O.
  • The frame as a whole: →I, closing the box of T on O, gives T→O.

As a derivation:

1E∨O
2E→S
3¬(S∧T)
4Tasm, for →I
5Sasm, for ¬I
6S∧T∧I 5, 4
7⊥¬E 6, 3
8¬S¬I 5–7
9¬S→¬ECP 2
10¬E→E 9, 8
11ODS 1, 10
12T→O→I 4–11

The computation is right: (2k)2=4k2=2(2k2), and 2k2 is an integer.

Marking scheme. (10 points)

  • 2: identifies the frame as →I, with the box opened on the hypothesis “n2 is odd”.
  • 2: identifies “n2 is not even” as ¬I, naming the clash (with “no integer is both”, by ¬E).
  • 3: identifies CP (then →E), or MT, applied to “if n is even, then n2 is even”, with that antecedent and consequent. Reading the “if n were even” sentence as a premise or as a →I box that proves the implication earns these points equally.
  • 2: identifies DS on “every integer is even or odd”, naming “even” as the refuted side.
  • 1: names the closing →I.

Fatal errors (0 for the step): naming anything but ¬I for the “not even” step (it concludes a negation from a box on the unnegated statement); applying CP to the converse, “if n2 is even, then n is even”.