3.1  How to Find a Derivation

We now have every rule for the connectives. Checking a derivation is mechanical, as Definition 1.4.2 makes it: for each line, which rule, which lines, and are they available. Finding one is not, since an assumption may be any statement at all. Yet every Idea in Chapters 1 and 2 found its derivation with the same handful of moves. This section introduces no new rule. It collects those moves into one method, puts them in order, says why the order is right, and then watches the method work: on five searches that succeed, one that fails, and one mathematical goal. It ends with every rule in one place.

3.1.1. The moves so far

Each section since Section 1.2 has added a move, either to the list read off the goal (goal-directed: which introduction rule builds the goal’s main connective?) or to the list read off the premises (premise-directed: which elimination rule uses an available line’s main connective?). Here they are together, with the section where each first appeared.

The situation The move First met
goal φ∧ψ two subgoals, φ and ψ, joined by ∧I Section 1.2
resource φ∧ψ take it apart by ∧E Section 1.2
resource φ→ψ fire it on φ by →E; if φ is missing, make it a subgoal Section 1.3
goal φ→ψ a box opened with φ, with the new goal ψ Section 1.4
goal φ∨ψ postpone; choose a side only when it is in hand Section 1.5
resource φ∨ψ two cases, each ending in the current goal Section 1.6
goal ⊥ find a clash, or manufacture one; an impossible case closes itself by ⊥E Section 2.1
resource ¬φ clash it by ¬E: make φ a subgoal Section 2.1
goal ¬φ a box opened with φ, with the new goal ⊥ Section 2.2
a pattern with a name use the derived rule as one line (MT, DS, …) Section 2.3
goal φ↔ψ two boxes, one for each direction Section 2.4
resource φ↔ψ cross it by ↔E once one side is on a line Section 2.4
stuck assume the negation of the goal (RAA), or split on χ∨¬χ (LEM) Section 2.5

Thirteen moves is a lot to hold in mind at a blank page. The method below turns them into an order of attack. Every assumption a search opens says, in its justification column, which move opened it: “asm, for →I” is the goal step for →, “asm, for ∨E” the resource step for ∨, “asm, for RAA” step 5. To state it we need a name for a derivation that is only half written.

3.1.2. Partial derivations

Here is the first snapshot of the first search below, for P→¬Q⊢¬(P∧Q)∧(Q→¬P), drawn as in every section since Section 1.2:

1P→¬Q
⋮
7¬(P∧Q)
⋮
13Q→¬P
14¬(P∧Q)∧(Q→¬P)∧I 7, 13

Each row ⋮ is a gap. The written line just below a gap, here line 7 or line 13, is the gap’s current goal; it has no justification yet. The lines available at that goal, here the premise for the first gap and the premise and line 7 for the second, are the gap’s resources. The definition says the same thing exactly.

Definition 3.1.1 (Partial Derivation)

A partial derivation is a list of lines laid out as a derivation (Definition 1.4.2), except that some stretches of lines are still missing. Each missing stretch is a gap, drawn as a row ⋮. The line just below a gap is its current goal; it is already written, but it has no justification yet, since the lines of the gap are to supply one. The lines available at the current goal, in the sense of Definition 1.4.2, are the gap’s resources.

In words: every line that has been written is a premise, an assumption, a current goal, or a line justified by a rule from lines and boxes available to it; the boxes are nested and closed as in any derivation; only the gaps are missing. A search starts with a single gap, below the premises and above the conclusion, and each step replaces a gap by lines, boxes, and smaller gaps. It ends when no gap is left, and then the partial derivation is a derivation.

The snapshots in the worked searches below are all partial derivations; a line carries the number it will have in the finished derivation, and a line whose place is not yet fixed carries no number. On paper you would number the lines at the end.

Second readingA snapshot that is not a partial derivation

Nonexample. Take a snapshot and leave one of its boxes open at the bottom, so that the conclusion sits inside the box. That is not a partial derivation, even though every line is correct so far: Definition 1.4.2 asks that every box close and that the last line lie outside every box, and a gap cannot repair that, since filling a gap adds lines only above its current goal.

3.1.3. The method

Work from both ends: let the goal choose the boxes, let the premises choose the eliminations, and meet in the middle.

Algorithm. Searching for a derivation of Γ⊢φ.

  1. Set up. Write the premises Γ at the top and φ at the bottom, with one gap between.
  2. Goal-directed step. Take the main connective of the current goal (Definition 1.1.2) and set up its introduction rule:
    • ψ∧χ: two gaps, with goals ψ and χ (Section 1.2);
    • ψ→χ: a box opened with ψ; inside it, the new goal is χ (Section 1.4);
    • ¬ψ: a box opened with ψ; inside it, the new goal is ⊥ (Section 2.2);
    • ψ↔χ: two boxes, one from ψ to χ and one from χ to ψ (Section 2.4);
    • ψ∨χ: postpone; do not choose a side yet (Section 1.5).
    Repeat while the current goal is a ∧, →, ¬, or ↔.
  3. Premise-directed step. Take the main connective of a resource and apply its elimination rule: ∧E freely (Section 1.2); →E and ↔E when the other statement they need is a resource, or can be made a new goal (Sections 1.3 and 2.4); ∨E by opening two boxes, one per disjunct, each ending in the current goal (Section 1.6). A derived rule may do the work of several lines (Section 2.3): a resource ψ→χ with ¬χ available gives ¬ψ by MT; a resource ψ∨χ with ¬ψ available gives χ by DS.
  4. Clash. If the current goal is ⊥, look for a pair χ, ¬χ among the resources, or make χ the new goal for some resource ¬χ and manufacture it, starting again at step 2 for that goal. Whatever the current goal, if the resources clash, or a clash with a resource ¬χ can be manufactured, write ⊥ and then the goal by ⊥E: an impossible case closes itself (Section 2.1). When the clash needs a disjunction whose negation is a resource, either side may be chosen to build it: once the disjunction is written, ⊥ follows.
  5. Stuck. Use RAA: open a box with the negation of the current goal, whose new goal is ⊥; if that gives nothing, try the same with a goal further out whose box contains the stalled gap. Or use LEM on a well-chosen statement χ, and split on χ∨¬χ by ∨E. Then return to step 3 (Section 2.5).

When no gap is left, number the lines and check the derivation as Definition 1.4.2 says.

The steps are listed in the order in which to try them, and the order has reasons.

  • Step 2 loses nothing. If a gap with the goal ψ→χ can be filled at all, so can the gap inside a box on ψ with the goal χ.
  • Choosing a side of ∨ can leave a goal that does not follow. From P∨Q, with P true and Q false, the step to Q breaks.
  • Step 5 loses nothing either, and still comes last. The goal ⊥ gives step 2 nothing to work with, and a good statement to split on must be chosen.
Second readingWhy the order loses nothing

The goal-directed steps lose nothing. Suppose the goal ψ→χ is derivable from the resources Γ at all, by some derivation D. Then χ is derivable from Γ together with ψ: add ψ to the premises of D (Definition 1.2.3 asks only that the premises belong to the list), and append the line χ by →E, citing the last line of D and the premise ψ. A derivation from Γ and ψ can be written inside the box, its premises from Γ cited as available lines and ψ as the box’s assumption (the pasting of Lemma 2.3.3). So opening a box on ψ never turns a derivable gap into an underivable one. With ∧E, ¬E, or ↔E as the appended line, the same argument covers ∧, ¬, and ↔. That is why step 2 may be applied without thinking.

Choosing a side of ∨ can leave a goal that does not follow. A disjunction can be derivable when neither side follows from the resources. From P∨Q the goal Q∨P is derivable (Example (First derivations with “or”)), but P∨Q does not say which side holds, so a last line ∨I from Q, or from P, leaves a gap whose goal does not follow from its resources: P true and Q false makes P∨Q true and Q false. Choosing a side is safe only once the resources decide it, typically inside a case of ∨E, or when the disjunction is being manufactured for a clash (step 4) with a resource that is its negation: then the resources derive ⊥ as soon as they derive the disjunction, and from ⊥ every statement, either side included, by ⊥E.

Step 5 also loses nothing, and still comes last. If φ is derivable from the resources, then ⊥ is derivable from them together with ¬φ, by one appended ¬E; so an RAA box is always safe. A split on χ∨¬χ is safe too, since each case only adds a resource. Step 5 comes last because the goal ⊥ gives step 2 nothing to work with, because a good χ must be chosen, and because a derivation that did not need the classical step reads worse with it (the costume of Section 2.5).

The same method as a chart. A move counts only if the gap it makes is not already open above it, with the same goal and resources. When no move is left, go back to the gap that made this one.

Diagram. Labels: no, a gap: its goal\and its resources, is the goal\a resource?, is the goal a wedge , to ,\\neg or leftrightarrow ?, can a resource be taken\apart by a move untried\for this gap?, is the goal bot , or do the\resources clash, with a clash\untried for this gap?, is RAA on this goal, or LEM on\a well-chosen statement,\still untried for this gap?, no move left: back to the gap\that made this one; at the first\gap , stop and try to break the claim, done: cite it,\or copy it by R, step 2: its introduction\rule (boxes or two gaps), step 3: its elimination rule\\(veeE : both boxes end in the goal), step 4: find or build\the clash; botE if needed, step 5: RAA on the goal\\(not bot ), or LEM\on that statement

Quick check. For each goal, with no premises, name the first rule the method aims for and the box or gaps it sets up.

  • (a) ¬(P∧¬P)
  • (b) (P∨Q)→(Q∨P)
  • (c) (P→Q)∧(Q→(P→Q))
  • (d) P∨¬(P∧Q)

Solution.

  • (a) ¬I: a box opened with P∧¬P, goal ⊥. (b) →I: a box opened with P∨Q, goal Q∨P; that goal is a disjunction, so it is postponed, and step 3 uses the new resource P∨Q by ∨E. (c) ∧I: two gaps, with goals P→Q and Q→(P→Q), each then a box. (d) Step 2 postpones the disjunction, and with no premises steps 3 and 4 have nothing to use, so the search is at step 5 at once. LEM on P works: in the case P, ∨I gives the left side; in the case ¬P, a ¬I box on P∧Q clashes (its ∧E gives P) and gives ¬(P∧Q), and ∨I gives the right side.

3.1.4. Splitting the goal

We now run the method. The first search uses only steps 2, 3, and 4. It is the full version of the chapter’s main move, read the skeleton off the goal, then work from both ends, which comes back twice in the exercises with parts left blank.

Example (Splitting the goal, then using the premise)

Find a derivation of P→¬Q⊢¬(P∧Q)∧(Q→¬P).

Solution. Step 1. The premise on top, the goal at the bottom, one gap. The resources of the gap are the premise alone.

Step 2, first pass. The goal’s main connective is ∧, so it splits into two gaps, with goals ¬(P∧Q) and Q→¬P, joined at the end by ∧I:

1P→¬Q
⋮
7¬(P∧Q)
⋮
13Q→¬P
14¬(P∧Q)∧(Q→¬P)∧I 7, 13

Step 2, again. Both new goals have a connective, so step 2 applies to each. The goal ¬(P∧Q) asks for a ¬I box opened with P∧Q and ending in ⊥. The goal Q→¬P asks for a →I box opened with Q; inside it the goal ¬P asks, in turn, for a ¬I box opened with P. Every gap now has the goal ⊥, and step 2 has nothing more to do:

1P→¬Q
2P∧Qasm, for ¬I
⋮
6⊥
7¬(P∧Q)¬I 2–6
8Qasm, for →I
9Pasm, for ¬I
⋮
11⊥
12¬P¬I 9–11
13Q→¬P→I 8–12
14¬(P∧Q)∧(Q→¬P)∧I 7, 13

Steps 3 and 4, first gap. The resources are lines 1 and 2. Step 3 splits line 2 into P and Q by ∧E. Now P is the hypothesis of line 1, so →E gives ¬Q. Step 4 finds the pair Q, ¬Q.

Steps 3 and 4, second gap. The resources are lines 1, 7, 8, and 9, and line 7 is not needed.

Givens Goal
P→¬Q, ¬(P∧Q), Q, P ⊥
… and ¬Q (→E 1, 9) ⊥ ✓ (Q and ¬Q clash)

→E on lines 1 and 9 gives ¬Q, which clashes with line 8. Both gaps close:

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

What the method did. The goal-directed steps wrote nine of the fourteen lines, every box among them, before the premise was used; the premise-directed steps wrote four, lines 3, 4, 5, and 10. The premise itself was used once in each gap, by the same →E. Line 10 cites line 1 from inside two boxes, which is legal because line 1 is a premise and so is available everywhere below it.

Notice how little thinking the search needed. That is the typical shape of a successful search: the goal fixes the skeleton, and the premises fill in the flesh.

Quick check. In the second snapshot of Example (Splitting the goal, then using the premise) above, the second gap has the current goal ⊥ on line 11, and line 7 is one of its resources, though the gap never uses it. Why is line 7 available there, and why are lines 2–6 not?

Solution. Line 7 lies in no box and above the gap, so it is available, though this gap will not need it. Lines 2–6 are not resources: they lie in a box that has closed.

3.1.5. Cases must end in the goal

When the goal gives nothing, the premises must. The next search is driven by a disjunction among the premises.

Example (Proof by cases, found by the method)

Find a derivation of P∨Q, P→R, Q→R⊢R.

Solution. Step 1. The premises, one gap, the goal:

1P∨Q
2P→R
3Q→R
⋮
8R

The goal R is a letter, so step 2 has nothing to do. Step 3 looks at the resources. →E on P→R needs P, and making P a new goal is hopeless: from P∨Q we know that one of P, Q holds, not which. The disjunction itself is the resource to use, by ∨E, with two boxes that each end in the current goal R:

1P∨Q
2P→R
3Q→R
4Pasm, for ∨E
⋮
5R
6Qasm, for ∨E
⋮
7R
8R∨E 1, 4–5, 6–7

Inside the first box, P is a resource, so →E on line 2 closes the gap at once; the second box is the same with line 3:

1P∨Q
2P→R
3Q→R
4Pasm, for ∨E
5R→E 2, 4
6Qasm, for ∨E
7R→E 3, 6
8R∨E 1, 4–5, 6–7

This is the pattern that Section 1.6 called the skeleton of almost every proof by cases (compare Example (Cases on a hypothesis are two implications), which packages the same two boxes into one implication). The method found it without being told.

Why the boxes end in the current goal. ∨E (Definition 1.6.1) gives, after the two boxes, their common last line and nothing else. A box that ends in anything but the current goal leaves that goal still to be reached, and two boxes that end in different statements cannot be combined at all.

3.1.6. Postponing a disjunction

The third search has a disjunction as its goal. It shows why step 2 postpones one, and how a dead end can name the statement to split on.

Example (Choosing a side too early)

Find a derivation of P→(Q∨R)⊢(P→Q)∨(P→R).

Solution. The tempting start. The goal is a disjunction, and it is tempting to choose a side at once, say P→Q, and finish with ∨I. The new goal is an implication, so we open a box on P; then →E gives Q∨R, and ∨E splits into the cases Q and R, each to end in the current goal Q. The first case ends at once. The second is a dead end:

1P→(Q∨R)
2Pasm, for →I
3Q∨R→E 1, 2
4Qasm, for ∨E
5Rasm, for ∨E
⋮
Q
Q∨E
P→Q→I
(P→Q)∨(P→R)∨I

In the case R the resources are P→(Q∨R), P, Q∨R, and R, and none of them yields Q: no resource has Q as a conclusion except Q∨R, which is already split, and nothing clashes. Choosing the right side instead fails in the mirror image, in the case Q. In fact neither side follows from the premise alone: with P and Q true and R false the premise is true and P→R is false, and with P and R true and Q false the premise is true and P→Q is false.

The diagnosis. Each case of the dead end knew which side it wanted: the case Q wanted P→Q, and the case R wanted P→R. But those cases were opened inside the box of P, too late to choose the side of a disjunction that stands outside it. The side must be decided before any box is opened, and the premise does not decide it. Steps 2–4 are used up: we are at step 5.

The dead end also names the statement to split on. If Q holds, the left side is easy. If Q fails, then from P the premise gives Q∨R with its left side refuted, and DS gives R. So we use LEM on Q, and each case gets the whole goal:

1P→(Q∨R)
2Q∨¬QLEM
3Qasm, for ∨E
⋮
7(P→Q)∨(P→R)
8¬Qasm, for ∨E
⋮
13(P→Q)∨(P→R)
14(P→Q)∨(P→R)∨E 2, 3–7, 8–13

Now each case decides the side. In the case Q, the goal is P→Q: a box on P whose last line repeats Q. In the case ¬Q, the goal is P→R: a box on P, then Q∨R by →E, then R by Proposition 2.3.4 used as a derived rule, citing Q∨R and ¬Q. Then ∨I, on the correct side each time:

1P→(Q∨R)
2Q∨¬QLEM
3Qasm, for ∨E
4Pasm, for →I
5QR 3
6P→Q→I 4–5
7(P→Q)∨(P→R)∨I 6
8¬Qasm, for ∨E
9Pasm, for →I
10Q∨R→E 1, 9
11RDS 10, 8
12P→R→I 9–11
13(P→Q)∨(P→R)∨I 12
14(P→Q)∨(P→R)∨E 2, 3–7, 8–13

What the method did. Step 2 postponed the goal, the tempting start broke that rule, and its dead end showed both why the rule exists and what to do instead. Line 5 repeats line 3 because →I needs Q as a line of the box of line 4 itself.

Warning. Do not choose a disjunct early. A goal ψ∨χ tempts us to pick a side and prove it, and the choice usually fails, as the first attempt above did: neither P→Q nor P→R follows from the premise. Postpone the ∨ goal, use the resources first, and choose a side only inside a case that decides it.

3.1.7. When nothing else works

The fourth search reaches step 5 in the other form, RAA, and then needs steps 2 and 4 inside the box.

Example (A search that reaches step 5 at once)

Find a derivation of ¬(P↔Q)⊢P∨Q.

Solution. Steps 1–4. The goal is a disjunction, so step 2 postpones it. The one resource is a negation, and a negation can be used only in a clash (step 4), and here no clash can be found or manufactured. Neither side is in hand: the premise says only that P and Q differ, not which one holds. Steps 2–4 have nothing to offer.

Step 5. We assume the negation of the goal. The new goal is ⊥, and the gap has one more resource:

1¬(P↔Q)
2¬(P∨Q)asm, for RAA
⋮
12⊥
13P∨QRAA 2–12

Step 4 inside the box. The resources are two negations, ¬(P↔Q) and ¬(P∨Q), and no pair clashes yet. So we choose a statement to manufacture: P↔Q, to clash with line 1, or P∨Q, to clash with line 2. The second is the goal we started from, a disjunction of two letters with no side in hand, so aiming at it leads back to the start. So we choose P↔Q, and it is a biconditional, so step 2 sets up two boxes:

1¬(P↔Q)
2¬(P∨Q)asm, for RAA
3Pasm, for ↔I
⋮
6Q
7Qasm, for ↔I
⋮
10P
11P↔Q↔I 3–6, 7–10
12⊥¬E 11, 1
13P∨QRAA 2–12

The two small gaps. In the first, the resources are lines 1, 2, and 3, and the goal Q is a letter that no resource produces. But the resources clash once a line is manufactured: ∨I builds P∨Q from line 3, which clashes with line 2, and ⊥E writes Q (step 4: an impossible case closes itself). The second gap is the mirror image:

1¬(P↔Q)
2¬(P∨Q)asm, for RAA
3Pasm, for ↔I
4P∨Q∨I 3
5⊥¬E 4, 2
6Q⊥E 5
7Qasm, for ↔I
8P∨Q∨I 7
9⊥¬E 8, 2
10P⊥E 9
11P↔Q↔I 3–6, 7–10
12⊥¬E 11, 1
13P∨QRAA 2–12

What the method did. Step 5 came first, because nothing else applied, and after it steps 2 and 4 did the rest: step 4 chose which clash to aim for, step 2 read the two boxes off P↔Q, and step 4 closed each box with a manufactured clash and ⊥E. In words: suppose neither P nor Q holds; then each of them implies the other, since neither can hold at all; so P↔Q, against the premise. The assumption of line 2 is used twice, at lines 5 and 9.

Second readingOther splits that also work

In Example (Choosing a side too early). LEM on P, the first split one thinks of, also succeeds, but less well: in the case P the premise gives Q∨R, and a second ∨E, with two more implication boxes, is needed inside it; the finished derivation has 22 lines against these 14.

In Example (A search that reaches step 5 at once). A split by LEM on P also works, but less well: in the case ¬P the goal side Q is a letter that the resources do not give, and the search is stuck there a second time.

Step 5’s advice to try a goal further out is shown on Peirce’s law in the fold below.

Second readingStep 5 one level out: the search for Peirce’s law

The derivation of Peirce’s law (Proposition 2.5.4, in the fold of Section 2.5) adds one detail to step 5.

1(P→Q)→Pasm, for →I
Pasm, for →I
⋮
Q
P→Q→I
P→E
((P→Q)→P)→P→I

In the box on P with the goal Q, the search stalls: assuming ¬Q gives nothing new, since a clash with ¬Q needs Q itself. One level out, the search assumes ¬P:

1(P→Q)→Pasm, for →I
2¬Pasm, for RAA
3Pasm, for →I
⋮
5Q
6P→Q→I 3–5
7P→E 1, 6
8⊥¬E 7, 2
9PRAA 2–8
10((P→Q)→P)→P→I 1–9

The new resource ¬P is available in every gap inside its box, including the stalled one, where it clashes with line 3. That is why step 5 says to try a goal further out.

Quick check. In the second snapshot, which two resources of the gap clash, and what does ⊥E then write?

Solution. Lines 3 (P) and 2 (¬P) give ⊥ by ¬E 3, 2 at line 4, and ⊥E 4 writes Q, line 5.

3.1.8. Four refinements

The method finds a derivation; these four refinements usually find a shorter or more direct one.

  • Find the goal among the resources. Before step 2, ask whether the current goal is already available; if so, cite it, or copy it into the current box by R.
  • Derive what needs nothing new before opening a box. ∧E on a resource, and →E or ↔E when both of their lines stand, may be written at once, above the boxes the goal asks for: a line outside the boxes is available inside all of them, so it is written once instead of once per box. (∨E is not such a step: it opens boxes.)
  • Look first for a clash partner already on a line. When the goal is ⊥, scan the resources for a negation ¬χ whose χ is cheap, or for χ and ¬χ both in reach, before manufacturing anything (step 4).
Example (Lines that need nothing new)

Find a derivation of P∧(P→Q), Q→R⊢(S→R)∧(T→(Q∧R)).

Solution. The search. The goal is a conjunction of two implications, so step 2 will open a box on S and a box on T:

1P∧(P→Q)
2Q→R
⋮
13(S→R)∧(T→(Q∧R))

Before it does, the resources give lines that need nothing new: P and P→Q by ∧E, then Q by →E, and then R by →E on the second premise. With Q and R outside every box, the two boxes are short:

1P∧(P→Q)
2Q→R
3P∧E 1
4P→Q∧E 1
5Q→E 4, 3
6R→E 2, 5
7Sasm, for →I
⋮
8R
9S→R→I 7–8
10Tasm, for →I
⋮
11Q∧R
12T→(Q∧R)→I 10–11
13(S→R)∧(T→(Q∧R))∧I 9, 12

In the box of S the goal R is a resource, copied by R. In the box of T, ∧I joins Q and R:

1P∧(P→Q)
2Q→R
3P∧E 1
4P→Q∧E 1
5Q→E 4, 3
6R→E 2, 5
7Sasm, for →I
8RR 6
9S→R→I 7–8
10Tasm, for →I
11Q∧R∧I 5, 6
12T→(Q∧R)→I 10–11
13(S→R)∧(T→(Q∧R))∧I 9, 12

Quick check. In Example (Lines that need nothing new), which refinement does line 8 use, and which do lines 3–6 use?

Solution. Line 8 finds the goal R among the resources (line 6) and copies it into the box of S. Lines 3–6 need nothing new and are written before any box opens, so both boxes can use them.

No detours. Never build a line by an introduction rule and then, at once, take that line apart by the matching elimination. The line the pair produces was within reach without it. This includes ¬I followed by ¬E on the negation it built. A manufactured clash is not a detour: ∨I followed by ¬E against ¬(φ∨ψ) uses the new line with a different connective. The book uses this as advice, not as a theorem: a detour is legal, and cutting one need not shorten a derivation, since an introduced line cited elsewhere stays.

Second readingWhy a detour’s line was within reach

After ∧I joins lines i and j, ∧E on the new line gives back line i or line j. After →I closes a box from φ to ψ, →E on the new implication and a line φ gives ψ; the box’s lines, copied with that line in place of the assumption, give ψ directly. After ¬I closes a box from φ to ⊥, ¬E on the new negation and a line φ gives ⊥; the box’s lines, copied likewise, give ⊥ directly. After ∨I builds φ∨ψ from a line φ, ∨E on it gives what its first case gives, and the first case’s lines, copied with the line φ in place of the assumption, give that directly. Every copied citation stays legal by the scope rule of Definition 1.4.2, since the line put in place of the assumption stands above the copy.

Quick check. Lines 2 and 3 are P and R; line 4 is P∧R, ∧I 2, 3; line 5 is R, ∧E 4. Which refinement does this break, and what should line 5 cite instead?

Solution. No detours. Lines 4–5 build a conjunction and take it apart at once; line 5’s statement is line 3, so cite line 3, or copy it by R where it must lie in the current box.

3.1.9. A search that fails

The method is not a machine that always succeeds. Here it fails, and the failure is instructive.

Try P→Q⊢Q→P. Step 2 opens a box on Q with the goal P:

1P→Q
2Qasm, for →I
⋮
P
Q→P→I

Every further move goes round in a circle:

Attempt What it needs Why that goes round in a circle
step 3: →E on line 1 P P is the goal
step 4: a clash a negation among the resources there is none
step 5: RAA, a box on ¬P P, to clash with ¬P P is the goal
step 5: LEM on P in the case ¬P, the goal P the same gap, one resource richer and no closer
step 5 further out: RAA on ¬(Q→P) Q→P, to clash step 2 opens the same box on Q with the same goal P

Every row returns to one gap, “P from P→Q and Q”. That is affirming the consequent (Section 1.3).

Quick check. Which row of the table would close the gap if affirming the consequent were a rule?

Solution. The first: the mirror image of →E would give P from P→Q and the resource Q.

But notice what we have not shown. A search that fails proves nothing about derivations in general. An assumption may be any statement at all, by the assumption clause of Definition 1.4.2, so there are infinitely many derivations to consider, and a cleverer one might exist. To show that no derivation of Q→P from P→Q exists, we need a different tool.

We show that something is derivable by exhibiting a derivation; how could we ever show that something is not? Section 1.1’s move already breaks Argument B’s form, from P→Q to Q→P: with P false and Q true, the premise is true and the conclusion false. What it cannot yet tell us is that no derivation leads from a premise to a conclusion that some choice of statements makes false. Section 3.2 gives this question a sharper form, and the chapter ends on it.

3.1.10. A mathematical goal

The method reads the frame of a proof off the goal whether the statements are letters or facts about numbers. In ordinary mathematics its payoff is that the first and last sentences of a proof, and its division into parts, are fixed before any mathematics is done.

Example (Building a skeleton)

Let m and n be integers. Prove that if mn is odd, then m is odd and n is odd.

Solution. The skeleton. The main connective is “if … then”, so step 2 opens a →I box: “Assume mn is odd. … Hence m is odd and n is odd.” The new goal is a conjunction, so step 2 again: two separate proofs, one that m is odd and one that n is odd. Each is a letter as far as logic can see, and the one resource, “mn is odd”, cannot be taken apart. So step 3 brings in facts we can compute with: “if m is even then mn is even” is one, and CP (Proposition 2.3.2) turns it into “if mn is not even then m is not even”, which the resource can feed. Then “every integer is even or odd” and DS finish. The givens and the goal are tabulated in the fold below.

The proof. Assume mn is odd. We show that m is odd and that n is odd.

First, if m is even, say m=2k with k an integer, then mn=2(kn) is even. By the contrapositive (Proposition 2.3.2), if mn is not even, then m is not even. Now mn is odd, so it is not even, since no integer is both; hence m is not even. Since every integer is even or odd, m is odd, by Proposition 2.3.4.

Exchanging the roles of m and n in the previous paragraph shows that n is odd. Hence m and n are both odd.

What the method did. It fixed the first sentence, the two paragraphs, and the last sentence; the only computation is mn=2(kn). No step uses RAA: the classical-looking move from “m is not even” to “m is odd” is disjunctive syllogism on the fact that every integer is even or odd.

Second readingThe givens and the goal
Givens Goal
the facts: every integer is even or odd, and not both; if m is even, then mn is even; if n is even, then mn is even if mn is odd, then m is odd and n is odd
… and mn odd (→I) m odd and n odd
the same m odd; n odd (∧I: two goals)
… and mn not even (“not both”); m not even (CP, →E) m odd ✓ (DS); n odd by the same steps, with m and n exchanged

Warning. Do not assume what you want to prove. To derive a goal φ, it is tempting to open a box with φ. The box reaches φ at once, but after it closes it gives φ→φ, not φ, and its assumption is gone. An assumption is useful when the goal asks for it: the hypothesis of an implication (step 2), the negated goal of RAA (step 5), a disjunct of a resource (step 3). Opening the box on the conclusion of an implication is the converse error of Argument B, diagnosed in Section 1.4.

Second readingLogic permits; it does not choose

A derivation of Γ⊢φ says that whoever accepts every member of Γ is committed to φ. It does not say that φ should now be believed. If φ is plainly false, say 0=1, the derivation is a reason to give up a member of Γ, and it does not say which. A mathematician who derives 0=1 from the hypotheses of a lemma has learned that those hypotheses cannot hold together; Section 3.2 calls such a list inconsistent, and a proof by contradiction is built to reach exactly that.

In the other direction, at every gap the rules permit far more lines than any search writes: ∧E on every conjunction, ∨I with any statement at all. The rules choose none of them. The method chooses, and the method is advice, not logic: two searchers may find two different derivations, and both are correct.

3.1.11. The rules in one place

Here are all the primitive rules of Chapters 1 and 2 on one card.

Rule Shape You write Lean
∧I φ, ψ ⟹ φ∧ψ “We show P, and we show Q.” constructor
∧E φ∧ψ ⟹ φ (or ψ) “In particular, P.” h.1 (and h.2)
→E φ→ψ, φ ⟹ ψ “Since P implies Q, and P holds, Q.” exact h hp
→I box φ … ψ ⟹ φ→ψ “Assume P. … Hence Q.” intro hp
R φ (available) ⟹ φ, copied “As shown above, P.” exact hp
∨I φ ⟹ φ∨ψ (or ψ∨φ) “So P or Q holds.” left (or Or.inl hp); right
∨E φ∨ψ, box φ … χ, box ψ … χ ⟹ χ “Case 1: P. … so R. Case 2: Q. … so R. In either case, R.” Or.elim h (or cases h)
¬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)
↔I box φ … ψ, box ψ … φ ⟹ φ↔ψ “(⇒) Suppose P. … so Q. (⇐) Suppose Q. … so P.” constructor
↔E φ↔ψ, φ ⟹ ψ (or with ψ, φ) “Since P holds if and only if Q does, and P holds, so does Q.” h.mp hp / h.mpr hq
RAA box ¬φ … ⊥ ⟹ φ “Suppose, for a contradiction, that P fails. … This is impossible. Hence P.” by_contra h

This is the reference sheet for Chapters 1 and 2: every primitive rule as its schema, with the label that defines it. As in every schema (Definition 1.2.1), φ,ψ,χ stand for any statements, replaced consistently, and i,j,k,… for line numbers. Each box rule needs the box’s last line as a line of that box itself, not inside a further box, and every cited line or box must be available (Definition 1.4.2).

Conjunction (Definition 1.2.5): ∧I, and the two forms of ∧E.

iφ
jψ
kφ∧ψ∧I i, j
iφ∧ψ
kφ∧E i
iφ∧ψ
kψ∧E i

Implication (Definition 1.4.1): →I and →E.

iφasm, for →I
⋮
jψ
kφ→ψ→I i–j
iφ→ψ
jφ
kψ→E i, j

Disjunction (Definition 1.6.1): the two forms of ∨I, and ∨E, whose two boxes end in the same statement χ.

iφ
kφ∨ψ∨I i
iφ
kψ∨φ∨I i
iφ∨ψ
jφasm, for ∨E
⋮
kχ
lψasm, for ∨E
⋮
mχ
nχ∨E i, j–k, l–m

Contradiction and negation (Definition 2.1.1, Definition 2.2.1): ¬E, ⊥E (which may write any statement φ), and ¬I.

iφ
j¬φ
k⊥¬E i, j
i⊥
kφ⊥E i
iφasm, for ¬I
⋮
j⊥
k¬φ¬I i–j

Biconditional (Definition 2.4.1): ↔I, and ↔E, which works in both directions.

iφasm, for ↔I
⋮
jψ
kψasm, for ↔I
⋮
lφ
mφ↔ψ↔I i–j, k–l
iφ↔ψ
jφ
kψ↔E i, j
iφ↔ψ
jψ
kφ↔E i, j

Reductio ad absurdum (Definition 2.5.1), the one classical rule, and repetition, clause (D3) of Definition 1.4.2, which copies an available line into the current box.

i¬φasm, for RAA
⋮
j⊥
kφRAA i–j
iφ
⋮
kφR i

Derived rules. Each is a proved sequent, used as one line that cites the lines holding its premises (Definition 2.3.1). The table lists the sequents of Chapters 1 and 2 that searches use most; every other sequent proved there may be used in the same way. Where a rule has no short name, the justification names the result, as “(ex falso)” or “VI”.

In a justification Sequent Proved in Our derivation uses RAA
(and commutes) P∧Q⊢Q∧P Proposition 1.2.1 no
(implication is transitive) P→Q, Q→R⊢P→R Proposition 1.4.1 no
(curry) (P∧Q)→R⊣⊢P→(Q→R) Proposition 1.4.2 no
(or commutes) P∨Q⊢Q∨P Example (First derivations with “or”) no
(or merges) P∨P⊢P Example (First derivations with “or”) no
(and regroups) (P∧Q)∧R⊢P∧(Q∧R) Proposition 1.2.2 no
(or regroups) P∨(Q∨R)⊢(P∨Q)∨R Example (Regrouping a disjunction) no
(distributivity) P∧(Q∨R)⊣⊢(P∧Q)∨(P∧R) Proposition 1.6.1 no
(cases on a hypothesis) (P→R)∧(Q→R)⊣⊢(P∨Q)→R Example (Cases on a hypothesis are two implications); the converse Example (A disjunctive hypothesis splits into two implications) no
CD (constructive dilemma) (P→R)∧(Q→S), P∨Q⊢R∨S Example (Constructive dilemma) no
(destructive dilemma) (P→R)∧(Q→S), ¬R∨¬S⊢¬P∨¬Q Exercise (B4: Dilemmas as derived rules, used later) (b) no
(modus ponendo tollens) ¬(P∧Q)⊢P→¬Q Exercise (B4: Dilemmas as derived rules, used later) (c) no
(ex falso) P, ¬P⊢Q Proposition 2.1.1 no
VI (vacuous implication) ¬P⊢P→Q Proposition 2.1.2 no
MT P→Q, ¬Q⊢¬P Proposition 2.3.1 no
CP P→Q⊢¬Q→¬P Proposition 2.3.2 no
DS P∨Q, ¬P⊢Q Proposition 2.3.4 no
(DS, other disjunct) P∨Q, ¬Q⊢P Exercise (B1: The other disjunctive syllogism, used later) (a) no
(iff symmetric) P↔Q⊢Q↔P Example (An iff read both ways) no
(iff as two implications) P↔Q⊣⊢(P→Q)∧(Q→P) Proposition 2.4.1 no
(iff of negations) P↔Q⊢¬P↔¬Q, and its converse Example (Negating both sides of an iff); the converse Exercise (B2: Back from negated sides, used later) the converse only
(equivalence cycle) P→Q, Q→R, R→P⊢P↔Q Proposition 2.4.6 no
¬¬I P⊢¬¬P Proposition 2.5.1 (a), first in Example (Two negations from one premise) no
¬¬E ¬¬P⊢P Proposition 2.5.1 (b) yes
(CP, converse) ¬Q→¬P⊢P→Q Proposition 2.5.2 yes
LEM ⊢P∨¬P Proposition 2.5.3 yes
(Peirce) ⊢((P→Q)→P)→P Proposition 2.5.4 yes
DM the four laws of Proposition 2.5.5 Proposition 2.5.5 (d) only
(implication as disjunction) ¬P∨Q⊢P→Q, and its converse Proposition 2.5.6 the converse only, through LEM

Four rows are proved in exercises, not in the text: the other form of DS, the destructive dilemma, modus ponendo tollens, and the converse of the iff of negations. Exercises may use them as rules; the text’s own proofs do not.

Each rule is also a move: the table of moves at the start of this section is the decision chart of Section 1.6, grown to every connective, read by the goal for the introduction rules and by an available line for the elimination rules; the chart after the method’s steps draws their order.

Warning. Cite only what is already proved. A derived rule is an abbreviation for its derivation, so it may be used only after that derivation exists, and never inside it. For example, the second route to Proposition 2.5.5 (d) splits on excluded middle; a proof of excluded middle that used De Morgan’s law (d) along that route would be circular. In this book the check is simple: cite only labels that appear earlier.

3.1.12. Exercises

A. Check your understanding

Exercise (A1)

For (a)–(d), name the goal’s main connective, the first rule the method aims for, and the first sentence of a proof. For (e)–(f), name the elimination rule the premise invites, and what it needs.

  • (a) For real x: if x3<0 then x<0.
  • (b) There is no integer n with 2n=7.
  • (c) For real x and y: |xy|=|x||y| and |x+y|≤|x|+|y|.
  • (d) For an integer n: n is odd if and only if n2 is odd.
  • (e) The premise (P∧Q)→R, with the goal R and the resources P and Q.
  • (f) The premise ¬(P∨Q), with the goal ⊥ and the resource Q.

Solution.

  • (a) →; →I: “Assume x3<0.” (Starting “Suppose x≥0” inside that frame is an RAA box on the goal x<0, not the contrapositive; a proof through the contrapositive replaces the frame, proving “if x≥0 then x3≥0” and then applying CP.)

  • (b) ¬, since the claim is “not: there is an integer n with 2n=7”; ¬I: “Suppose n is an integer with 2n=7."

  • (c) ∧; ∧I: “We prove the two statements in turn.”

  • (d) ↔; ↔I: “(⇒) Assume n is odd.”

  • (e) →E, which needs the hypothesis P∧Q: make it a new goal, reached by ∧I from P and Q; then →E gives R.

  • (f) ¬E, which needs P∨Q beside ¬(P∨Q): make P∨Q the new goal (step 4), reached by ∨I from Q.

Exercise (A2: Drill)

The parts run from one step of the method, through available lines and steps to judge, to short derivations.

  • (a) The goal is ¬(P∨Q). What does step 2 set up?
  • (b) The goal is (P→Q)∧¬R. Which gaps does step 2 leave?
  • (c) The goal is ⊥, and the resources are ¬(P∧Q), P, Q. What are the next two lines?
  • (d) The goal is P∨Q, and the one resource is ¬P→Q. Which step does the work, and how?
  • (e) In a partial derivation the current goal is line 9, inside the boxes opened at lines 3 and 6. Line 1 is a premise, and lines 4–5 form a box inside box 3 that has closed. Which of lines 1, 3, 4, 6 are resources?
  • (f) Which step of the method opens an RAA box, and when?
  • (g) True or false: a failed search shows that the sequent is not derivable.
  • (h) The goal is R, and the resources are P∨Q, P→R, Q→S. Should the search be expected to succeed?
  • (i) Lines 3 and 4 are Q→R (a premise) and Q. A searcher writes 5 Q, assumption; 6 R, →E 3, 5; 7 Q→R, →I 5–6; 8 R, →E 7, 4. Which refinements of the section does this break, and what single line replaces lines 5–8?
  • (j) Find a derivation of P∨Q, ¬P⊢Q∨R.
  • (k) Find a derivation of (P∨Q)→R⊢Q→R.
  • (l) Find a derivation of P→(Q→R), P∧¬R⊢¬Q.

Solution.

  • (a) A box opened with P∨Q, with the goal ⊥.

  • (b) Two boxes: one on P with the goal Q, and one on R with the goal ⊥.

  • (c) P∧Q by ∧I, then ⊥ by ¬E.

  • (d) Step 2 postpones the goal. Step 3 needs ¬P, which is not a resource, and making it a goal stalls. So step 5: LEM on P, whose negation the resource waits for.

  • (e) 1, 3 and 6; not 4.

  • (f) Step 5, when steps 2–4 give nothing.

  • (g) False: it shows only that this search failed.

  • (h) No. P false, Q true, R false, S true makes every resource true and R false, so the claim breaks. In ∨E, the case Q gives only S.

  • (i) Two refinements. Lines 7–8 are a detour (→I, then →E on its own implication). Line 7 rebuilds a resource, and find the goal among the resources would have cited line 3. Replace lines 5–8 by 5 R, →E 3, 4.

  • (j) 3 Q, DS 1, 2; 4 Q∨R, ∨I 3.

  • (k) 2 Q, assumption, for →I; 3 P∨Q, ∨I 2; 4 R, →E 1, 3; 5 Q→R, →I 2–4.

  • (l) 3 P, ∧E 2; 4 ¬R, ∧E 2; 5 Q→R, →E 1, 3; 6 ¬Q, MT 5, 4.

B. Practice

Exercise (B1: Three searches)

For each sequent, name the first goal-directed step, then find a derivation.

  • (a) P∧(Q→R)⊢(P→Q)→R.
  • (b) ¬(P→Q)⊢P∧¬Q. Which conjunct does your derivation obtain by RAA, and which by ¬I alone?
  • (c) ¬P→Q⊢P∨Q.

Hint: in (c), look at what the premise is waiting for.

Solution.

  • (a) The goal is an implication: a box on P→Q with the goal R, a letter. Step 3 splits the premise; its half Q→R gives R once we have Q, and the box’s assumption gives Q once we have P, which the premise’s other half supplies. So the chain runs backwards from R to Q to P, and forwards it reads:
    1P∧(Q→R)
    2P→Qasm, for →I
    3P∧E 1
    4Q→E 2, 3
    5Q→R∧E 1
    6R→E 5, 4
    7(P→Q)→R→I 2–6
  • (b) The goal is a conjunction: two gaps, with goals P and ¬Q. The premise can be used only by ¬E, against P→Q, so in each gap we aim to manufacture P→Q. The goal ¬Q is a negation: a box on Q, where P→Q follows by a box that repeats Q, and it clashes with the premise. The goal P is a letter, and the resources give nothing, so step 5: RAA on ¬P. Then P→Q follows by vacuous implication (Proposition 2.1.2, written VI), and it clashes with the premise. The conjunct P is the one our derivation obtains by RAA; ¬Q needs only ¬I. (That no derivation of P from the premise avoids RAA is true, but we do not prove it.)
    1¬(P→Q)
    2¬Pasm, for RAA
    3P→QVI 2
    4⊥¬E 3, 1
    5PRAA 2–4
    6Qasm, for ¬I
    7Pasm, for →I
    8QR 6
    9P→Q→I 7–8
    10⊥¬E 9, 1
    11¬Q¬I 6–10
    12P∧¬Q∧I 5, 11

    Written with primitive rules only, line 3 becomes the four lines of a box on P that clashes with ¬P, writes Q by ⊥E, and closes by →I; the derivation then has 15 lines instead of 12.

  • (c) The goal is a disjunction, so step 2 postpones it; the premise is waiting for ¬P, which is not a resource, and nothing clashes. Step 5, LEM on P, the statement the premise is waiting for: in the case P, ∨I gives the left side; in the case ¬P, the premise gives Q and ∨I the right side.
1¬P→Q
2P∨¬PLEM
3Pasm, for ∨E
4P∨Q∨I 3
5¬Pasm, for ∨E
6Q→E 1, 5
7P∨Q∨I 6
8P∨Q∨E 2, 3–4, 5–7

The derivation has 8 lines. An RAA box on ¬(P∨Q) also works, with two manufactured clashes inside it.

Exercise (B2: The last step)

A search for P→Q, R→¬Q⊢P→¬R has reached the stage below; only the last line is missing. Name the move, then complete it.

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

Solution. The move is the chapter’s main one: the skeleton was read off the goal, and the gap was filled from both ends. The goal P→¬R is an implication, so the outer box opened with P (line 3); its new goal ¬R is a negation, so the inner box opened with R (line 5). The premises then met the goal in the middle: →E at lines 4 and 6 gave Q and ¬Q, and the clash at line 7. The inner box was closed at line 8. What remains is to close the outer box on its goal, by →I 3–8:

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

The box runs from its assumption P, line 3, to its last line ¬R, line 8, which lies in the outer box itself and not in the inner one, as →I requires.

Exercise (B3: Two boxes and a chain)

Find a derivation of P→(Q→R), P→(R→S)⊢P→(Q→S), and describe the search in three sentences, naming its goal-directed and premise-directed steps.

Solution.

1P→(Q→R)
2P→(R→S)
3Pasm, for →I
4Q→R→E 1, 3
5R→S→E 2, 3
6Qasm, for →I
7R→E 4, 6
8S→E 5, 7
9Q→S→I 6–8
10P→(Q→S)→I 3–9

The search: the goal is an implication, so a goal-directed step opens a box on P with the goal Q→S, and a second goal-directed step opens a box on Q with the goal S. With P a resource, premise-directed steps fire both premises by →E, giving Q→R and R→S. Then a backward chain from the goal S (it needs R, which needs Q, a resource) is written forwards as two more →E lines, and the two boxes close in the reverse order of opening. (Lines 4 and 5 may equally be written inside the box of Q.)

Exercise (B4: Cut the detours)

The derivation below of P∧Q, Q→R⊢R∧P is correct but contains detours.

1P∧Q
2Q→R
3Q∧E 1
4Qasm, for →I
5R→E 2, 4
6Q→R→I 4–5
7R→E 6, 3
8P∧E 1
9R∧P∧I 7, 8
10R∧E 9
11R∧P∧I 10, 8
  • (a) Find each pair of lines in which a line is built by an introduction rule and taken apart at once by the matching elimination.
  • (b) Which line rebuilds a premise?
  • (c) Rewrite the derivation without the detours.
  • (d) To cut the →I/→E detour, the box is copied with a line in place of its assumption: which line, and what does the copy give?

Solution.

  • (a) Lines 6–7: →I, then →E on line 6. Lines 9–10: ∧I, then ∧E on line 9. (Line 11 then rebuilds line 9.)

  • (b) Line 6 is premise 2, rebuilt by a box. Find the goal among the resources would have cited line 2.

  • (c) Six lines instead of eleven:

    1P∧Q
    2Q→R
    3Q∧E 1
    4R→E 2, 3
    5P∧E 1
    6R∧P∧I 4, 5
  • (d) Line 3 takes the place of the assumption on line 4. The box’s one other line, “R, →E 2, 4”, becomes “R, →E 2, 3”, which is line 4 of (c).

C. Going deeper

Exercise (C1: The second half)

A search for P∨(Q∧R)⊢(P∨Q)∧(P∨R) has used the premise by ∨E and finished the first case; the second case is blank. Name the move, then complete it.

1P∨(Q∧R)
2Pasm, for ∨E
3P∨Q∨I 2
4P∨R∨I 2
5(P∨Q)∧(P∨R)∧I 3, 4
6Q∧Rasm, for ∨E
⋮
11(P∨Q)∧(P∨R)
12(P∨Q)∧(P∨R)∨E 1, 2–5, 6–11

Solution (Hint 1). The current goal of the blank box is a conjunction. What does step 2 do with it, and what does step 3 do with the box’s assumption?

Solution (Hint 2). Line 7 is Q, by ∧E from line 6.

Solution. The move is the chapter’s main one again: read the skeleton off the goal, then work from both ends. The current goal (P∨Q)∧(P∨R) is a conjunction, so step 2 splits it into the goals P∨Q and P∨R, to be joined by ∧I. Both are disjunctions, so they are postponed, and step 3 turns to the resource Q∧R: ∧E gives Q and R. Now each disjunction has a side that is a resource, so ∨I is safe.

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

Both boxes end in the current goal of the ∨E, as that rule requires. Here ∨I adds P on the left of Q and of R; in the first case it added Q and R on the right of P. Citing line 2 inside the second box would be the sibling-box error of Exercise (C2: Find the error, used later).

Exercise (C2: A disjunction from nothing)
  • (a) Derive ⊢(P→Q)∨(Q→P).
  • (b) In a paragraph, say which step of your derivation uses RAA or LEM, and why the method cannot avoid step 5 on this goal.

Solution (Hint 1). The goal is a disjunction and there are no premises. Which steps of the method does that leave?

Solution (Hint 2). Step 5 has two forms. Which statement would make each side of the goal easy, if you knew whether it held?

Solution.

  • (a) LEM on Q. In the case Q, the implication P→Q holds by a box that repeats Q. In the case ¬Q, the implication Q→P holds by a box on Q that clashes with ¬Q, followed by ⊥E.
    1Q∨¬QLEM
    2Qasm, for ∨E
    3Pasm, for →I
    4QR 2
    5P→Q→I 3–4
    6(P→Q)∨(Q→P)∨I 5
    7¬Qasm, for ∨E
    8Qasm, for →I
    9⊥¬E 8, 7
    10P⊥E 9
    11Q→P→I 8–10
    12(P→Q)∨(Q→P)∨I 11
    13(P→Q)∨(Q→P)∨E 1, 2–6, 7–12

    LEM on P works equally well, with the roles of the two sides exchanged.

  • (b) LEM is used at line 1; RAA appears only inside the derivation of LEM (Proposition 2.5.3) that line 1 abbreviates. The method cannot avoid step 5 here. Step 2 postpones the ∨ goal; with no premises, step 3 has nothing to eliminate and step 4 nothing to clash; and ∨I cannot come first, because neither side follows from no premises (with P true and Q false, P→Q is false; with P false and Q true, Q→P is false; Chapter 4 turns such choices into proofs). So a resource must be created from nothing, and only step 5 does that. This shows that the method needs step 5; that every derivation of the sequent uses RAA or an equivalent is a stronger claim, which we do not prove.

Marking scheme. (10 points)

  • 3: a correct split by LEM (on Q or on P), with two case boxes combined by ∨E, or a correct RAA box on the negated goal.
  • 2: in one case, the implication by a box that repeats the case assumption.
  • 2: in the other case, the implication by a box that clashes with the case assumption, then ⊥E, or by VI (Proposition 2.1.2).
  • 1: ∨I on the correct side in each case, every citation available.
  • 2: the paragraph names the LEM line (or the RAA line) and explains why no other step of the method applies.

Fatal errors (0 for the step): choosing a side of the goal before the split; citing one case’s assumption in the other case. A correct derivation by RAA on the negated goal earns full marks: its 2 + 2 + 1 points go to the two implications derived inside the RAA box (one by a box that repeats an assumption, one by a clash and ⊥E, or by VI (Proposition 2.1.2) once ¬Q or ¬P has been derived) and to the ∨I lines that clash with the RAA assumption.

Exercise (C3: Exit check: search)

Find a derivation of ¬(¬P∧Q)⊢P∨¬Q by the method of this section. Write one sentence for each step of the method you take, and point to the classical step of your derivation.

Solution. The search.

  1. Step 1. The premise ¬(¬P∧Q) on top, the goal P∨¬Q at the bottom, one gap.
  2. Step 2. The goal is a disjunction, so it is postponed: the premise does not say which side holds.
  3. Step 3. Nothing can be eliminated. The premise is a negation, so it can be used only in a clash (step 4), against ¬P∧Q, and we do not have it.
  4. Step 4. The goal is not ⊥, and nothing clashes. We are stuck.
  5. Step 5. We assume the negation of the goal, ¬(P∨¬Q), with the new goal ⊥.
  6. Step 4, inside the box. The new assumption clashes with P∨¬Q, which ∨I builds from either side. The side P is a letter that nothing gives; the side ¬Q is a negation, which step 2 can build. So ¬Q becomes the goal: a box on Q, with the goal ⊥. Choosing a side is safe here, since the disjunction is manufactured for a clash with a resource that is its negation (step 4 allows either side when the disjunction is built for a clash with its own negation).
  7. Step 4, in the box on Q. The resources are the premise, the assumption of step 5, and Q. We aim at the premise: ¬P∧Q becomes the goal, and step 2 splits it. Its half Q is a resource; its half ¬P is a negation: a box on P, with the goal ⊥.
  8. Step 4, in the box on P. ∨I builds P∨¬Q from P, which clashes with the assumption of step 5. Now the boxes close from the inside out: ¬P, then ¬P∧Q, which clashes with the premise; then ¬Q, then P∨¬Q, which clashes with the assumption of step 5; and RAA closes the outer box.
1¬(¬P∧Q)
2¬(P∨¬Q)asm, for RAA
3Qasm, for ¬I
4Pasm, for ¬I
5P∨¬Q∨I 4
6⊥¬E 5, 2
7¬P¬I 4–6
8¬P∧Q∧I 7, 3
9⊥¬E 8, 1
10¬Q¬I 3–9
11P∨¬Q∨I 10
12⊥¬E 11, 2
13P∨¬QRAA 2–12

The classical step is line 13, the RAA that closes the box of line 2; every other box closes by ¬I. The assumption of line 2 is used twice, at lines 6 and 12, just as in Example (A search that reaches step 5 at once).

A second route. Step 5 may take its other form: LEM on P. In the case P, ∨I gives the goal. In the case ¬P, the goal’s side ¬Q is a negation: a box on Q builds ¬P∧Q, which clashes with the premise, so ¬Q, and ∨I. That derivation has 11 lines, and its classical step is the LEM line.

Marking scheme. (10 points)

  • 2: step 2 postpones the disjunctive goal, with the reason (neither side is in hand).
  • 2: steps 3 and 4 find that the premise can be used only by producing ¬P∧Q for a clash.
  • 2: step 5 is chosen: RAA on the whole goal, or LEM on P. (LEM on Q also works; our route with it then uses a second classical step, an RAA for P in the case Q; award it.) A classical derived rule used at step 3, such as DM (d) on the premise followed by ¬¬E, is also accepted; its DM (d) and ¬¬E lines are the classical lines, and naming either earns the point.
  • 3: the inner boxes and their clashes are correct, and every citation is available.
  • 1: the classical line is named.

Fatal errors (0 for the step): ∨I as the last line, from a disjunct derived from the premise alone; on the RAA route, an RAA box on the whole goal opened with anything but ¬(P∨¬Q).

Exercise (C4: Two sequents that look alike)

Derive each sequent, and say which of your two derivations needed the classical rule.

  • (a) ¬(P∧Q), P⊢¬Q.
  • (b) ¬(P∧¬Q), P⊢Q.

Then explain why, in (b), the natural ¬I box on ¬Q ends at ¬¬Q and not at Q.

Solution.

  • (a) The goal is a negation: a ¬I box on Q, in which P∧Q clashes with the first premise.
    1¬(P∧Q)
    2P
    3Qasm, for ¬I
    4P∧Q∧I 2, 3
    5⊥¬E 4, 1
    6¬Q¬I 3–5
  • (b) The goal Q is a letter, and the resources give nothing directly, so step 5: RAA, a box on ¬Q, in which P∧¬Q clashes with the first premise.
1¬(P∧¬Q)
2P
3¬Qasm, for RAA
4P∧¬Q∧I 2, 3
5⊥¬E 4, 1
6QRAA 3–5

The derivation of (b) needed the classical rule, at line 6; the derivation of (a) did not. The two have the same shape, and the difference is the goal. In (a) it is a negation, which ¬I builds. In (b) it is a letter, and the box that reaches ⊥ opens with ¬Q; ¬I writes the negation of a box’s assumption, so closing that box by ¬I gives ¬¬Q, and our derivation reaches Q with the classical rule instead: RAA in place of ¬I (or ¬¬E after it).