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, |
Section 1.2 |
| resource |
take it apart by |
Section 1.2 |
| resource |
fire it on |
Section 1.3 |
| goal |
a box opened with |
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 |
Section 2.1 |
| resource |
clash it by |
Section 2.1 |
| goal |
a box opened with |
Section 2.2 |
| a pattern with a name | use the derived rule as one line ( |
Section 2.3 |
| goal |
two boxes, one for each direction | Section 2.4 |
| resource |
cross it by |
Section 2.4 |
| stuck | assume the negation of the goal ( |
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
3.1.2. Partial derivations
Here is the first snapshot of the first search below,
for
Each row
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
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
- Set up. Write the premises
at the top and at the bottom, with one gap between. - 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).
, , , or . - Premise-directed step. Take the
main connective of a resource and apply its elimination
rule:
freely (Section 1.2); and when the other statement they need is a resource, or can be made a new goal (Sections 1.3 and 2.4); 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 ; a resource with available gives by . - 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 : 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. - Stuck. Use
: 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 on a well-chosen statement , and split on by . 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 , with true and false, the step to 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
Choosing a side of
Step 5 also loses nothing, and still comes
last. If
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.
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)
- (b)
- (c)
- (d)
Solution.
- (a)
: a box opened with , goal . (b) : a box opened with , goal ; that goal is a disjunction, so it is postponed, and step 3 uses the new resource by . (c) : two gaps, with goals and , 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. on works: in the case , gives the left side; in the case , a box on clashes (its gives ) and gives , and 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.
Find a derivation of
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
Step 2, again. Both new goals have a
connective, so step 2 applies to each. The goal
Steps 3 and 4, first gap. The resources are
lines 1 and 2. Step 3 splits line 2 into
Steps 3 and 4, second gap. The resources are lines 1, 7, 8, and 9, and line 7 is not needed.
| Givens | Goal |
|---|---|
| … and |
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
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
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.
Find a derivation of
Solution. Step 1. The premises, one gap, the goal:
The goal
Inside the first box,
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.
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.
Find a derivation of
Solution. The tempting
start. The goal is a disjunction, and it is
tempting to choose a side at once, say
In the case
The diagnosis. Each case of the dead end
knew which side it wanted: the case
The dead end also names the statement to split on. If
Now each case decides the side. In the case
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
Warning. Do not choose a
disjunct early. A goal
3.1.7. When nothing else works
The fourth search reaches step 5 in the other form,
Find a derivation of
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
Step 5. We assume the negation of the goal.
The new goal is
Step 4 inside the box. The resources are two
negations,
The two small gaps. In the first, the
resources are lines 1, 2, and 3, and the goal
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
Second readingOther splits that also work
In Example (Choosing a side too early).
In Example (A search that reaches step 5 at once).
A split by
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.
In the box on
The new resource
Quick check. In the second
snapshot, which two resources of the gap clash, and what
does
Solution. Lines 3 (
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
. - Derive what needs nothing new before opening
a box.
on a resource, and or 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. ( 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).
Find a derivation of
Solution. The search. The
goal is a conjunction of two implications, so step 2
will open a box on
Before it does, the resources give lines that need
nothing new:
In the box of
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
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
Second readingWhy a detour’s line was within reach
After
Quick check. Lines 2 and 3 are
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
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
Every further move goes round in a circle:
| Attempt | What it needs | Why that goes round in a circle |
|---|---|---|
| step 3: |
||
| step 4: a clash | a negation among the resources | there is none |
| step 5: |
||
| step 5: |
in the case |
the same gap, one resource richer and no closer |
| step 5 further out: |
step 2 opens the same box on |
Every row returns to one gap, “
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
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
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
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.
Let
Solution. The skeleton.
The main connective is “if … then”, so step 2 opens a
The proof. Assume
First, if
Exchanging the roles of
What the method did. It fixed the first
sentence, the two paragraphs, and the last sentence; the
only computation is
Second readingThe givens and the goal
| Givens | Goal |
|---|---|
| the facts: every integer is even or odd, and not
both; if |
if |
| … and |
|
| the same | |
| … and |
Warning. Do not assume what
you want to prove. To derive a goal
Second readingLogic permits; it does not choose
A derivation of
In the other direction, at every gap the rules permit
far more lines than any search writes:
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 |
|---|---|---|---|
| “We show |
constructor |
||
| “In particular, |
h.1 (and h.2) |
||
| “Since |
exact h hp |
||
| box |
“Assume |
intro hp |
|
| “As shown above, |
exact hp |
||
| “So |
left (or Or.inl hp);
right |
||
| “Case 1: |
Or.elim h (or
cases h) |
||
| “…, which contradicts …” | exact hn hp (goal
False) |
||
| “This case cannot occur.” “So there is nothing to prove.” | exfalso |
||
| box |
“Suppose |
intro hp (goal False) |
|
| box |
“ |
constructor |
|
| “Since |
h.mp hp / h.mpr hq |
||
| box |
“Suppose, for a contradiction, that |
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),
Conjunction (Definition 1.2.5):
Implication (Definition 1.4.1):
Disjunction (Definition 1.6.1):
the two forms of
Contradiction and negation (Definition 2.1.1,
Definition 2.2.1):
Biconditional (Definition 2.4.1):
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.
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”.
Four rows are proved in exercises, not in the text:
the other form of
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
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
: if then . - (b) There is no
integer
with . - (c) For real
and : and . - (d) For an integer
: is odd if and only if is odd. - (e) The premise
, with the goal and the resources and . - (f) The premise
, with the goal and the resource .
Solution.
(a)
; : “Assume .” (Starting “Suppose ” inside that frame is an box on the goal , not the contrapositive; a proof through the contrapositive replaces the frame, proving “if then ” and then applying .)(b)
, since the claim is “not: there is an integer with ”; : “Suppose is an integer with ."(c)
; : “We prove the two statements in turn.”(d)
; : “ Assume is odd.”(e)
, which needs the hypothesis : make it a new goal, reached by from and ; then gives .(f)
, which needs beside : make the new goal (step 4), reached by from .
The parts run from one step of the method, through available lines and steps to judge, to short derivations.
- (a) The goal is
. What does step 2 set up? - (b) The goal is
. Which gaps does step 2 leave? - (c) The goal is
, and the resources are , , . What are the next two lines? - (d) The goal is
, and the one resource is . 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
box, and when? - (g) True or false: a failed search shows that the sequent is not derivable.
- (h) The goal is
, and the resources are , , . Should the search be expected to succeed? - (i) Lines 3 and 4
are
(a premise) and . A searcher writes 5 , assumption; 6 , 3, 5; 7 , 5–6; 8 , 7, 4. Which refinements of the section does this break, and what single line replaces lines 5–8? - (j) Find a
derivation of
. - (k) Find a
derivation of
. - (l) Find a
derivation of
.
Solution.
(a) A box opened with
, with the goal .(b) Two boxes: one on
with the goal , and one on with the goal .(c)
by , then by .(d) Step 2 postpones the goal. Step 3 needs
, which is not a resource, and making it a goal stalls. So step 5: on , 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.
false, true, false, true makes every resource true and false, so the claim breaks. In , the case gives only .(i) Two refinements. Lines 7–8 are a detour (
, then 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 , 3, 4.(j) 3
, 1, 2; 4 , 3.(k) 2
, assumption, for ; 3 , 2; 4 , 1, 3; 5 , .(l) 3
, 2; 4 , 2; 5 , 1, 3; 6 , 5, 4.
B. Practice
For each sequent, name the first goal-directed step, then find a derivation.
- (a)
. - (b)
. Which conjunct does your derivation obtain by , and which by alone? - (c)
.
Hint: in (c), look at what the premise is waiting for.
Solution.
- (a) The goal is an
implication: a box on
with the goal , a letter. Step 3 splits the premise; its half gives once we have , and the box’s assumption gives once we have , which the premise’s other half supplies. So the chain runs backwards from to to , and forwards it reads:12 asm, for3 14 2, 35 16 5, 47 2–6 - (b) The goal is a
conjunction: two gaps, with goals
and . The premise can be used only by , against , so in each gap we aim to manufacture . The goal is a negation: a box on , where follows by a box that repeats , and it clashes with the premise. The goal is a letter, and the resources give nothing, so step 5: on . Then follows by vacuous implication (Proposition 2.1.2, written VI), and it clashes with the premise. The conjunct is the one our derivation obtains by ; needs only . (That no derivation of from the premise avoids is true, but we do not prove it.)12 asm, for3 VI 24 3, 15 2–46 asm, for7 asm, for8 69 7–810 9, 111 6–1012 5, 11Written with primitive rules only, line 3 becomes the four lines of a box on
that clashes with , writes by , and closes by ; 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
, which is not a resource, and nothing clashes. Step 5, on , the statement the premise is waiting for: in the case , gives the left side; in the case , the premise gives and the right side.
The derivation has 8 lines. An
A search for
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
The box runs from its assumption
Find a derivation of
Solution.
The search: the goal is an implication, so a
goal-directed step opens a box on
The derivation below of
- (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
/ 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:
, then on line 6. Lines 9–10: , then 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:
123 14 2, 35 16 4, 5- (d) Line 3 takes the
place of the assumption on line 4. The box’s one other
line, “
, 2, 4”, becomes “ , 2, 3”, which is line 4 of (c).
C. Going deeper
A search for
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
Solution. The move is the chapter’s
main one again: read the skeleton off the goal, then
work from both ends. The current goal
Both boxes end in the current goal of the
- (a) Derive
. - (b) In a paragraph,
say which step of your derivation uses
or , 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)
on . In the case , the implication holds by a box that repeats . In the case , the implication holds by a box on that clashes with , followed by .12 asm, for3 asm, for4 25 3–46 57 asm, for8 asm, for9 8, 710 911 8–1012 1113 1, 2–6, 7–12 on works equally well, with the roles of the two sides exchanged. - (b)
is used at line 1; appears only inside the derivation of (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 cannot come first, because neither side follows from no premises (with true and false, is false; with false and true, 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 or an equivalent is a stronger claim, which we do not prove.
Marking scheme. (10 points)
- 3: a correct split by
(on or on ), with two case boxes combined by , or a correct 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
, or by VI (Proposition 2.1.2). - 1:
on the correct side in each case, every citation available. - 2: the paragraph names the
line (or the 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
Find a derivation of
Solution. The search.
- Step 1. The premise
on top, the goal at the bottom, one gap. - Step 2. The goal is a disjunction, so it is postponed: the premise does not say which side holds.
- Step 3. Nothing can be eliminated. The
premise is a negation, so it can be used only in a clash
(step 4), against
, and we do not have it. - Step 4. The goal is not
, and nothing clashes. We are stuck. - Step 5. We assume the negation of the goal,
, with the new goal . - Step 4, inside the box. The new assumption
clashes with
, which builds from either side. The side is a letter that nothing gives; the side is a negation, which step 2 can build. So becomes the goal: a box on , 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). - Step 4, in the box on
. The resources are the premise, the assumption of step 5, and . We aim at the premise: becomes the goal, and step 2 splits it. Its half is a resource; its half is a negation: a box on , with the goal . - Step 4, in the box on
. builds from , which clashes with the assumption of step 5. Now the boxes close from the inside out: , then , which clashes with the premise; then , then , which clashes with the assumption of step 5; and closes the outer box.
The classical step is line 13, the
A second route. Step 5 may take its other
form:
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
for a clash. - 2: step 5 is chosen:
on the whole goal, or on . ( on also works; our route with it then uses a second classical step, an for in the case ; award it.) A classical derived rule used at step 3, such as DM (d) on the premise followed by , is also accepted; its DM (d) and 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):
Derive each sequent, and say which of your two derivations needed the classical rule.
- (a)
. - (b)
.
Then explain why, in (b), the natural
Solution.
- (a) The goal is a
negation: a
box on , in which clashes with the first premise.123 asm, for4 2, 35 4, 16 3–5 - (b) The goal
is a letter, and the resources give nothing directly, so step 5: , a box on , in which clashes with the first premise.
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