1.2 Derivations, Starting with And
The previous section stated a slogan: a proof is a chain in which every line is a premise, an assumption, or one application of a rule. This section makes the premises and the rule steps exact (assumptions wait until Section 1.4): what a derivation is, how each line carries its reason, and how anyone can check one. Then it gives the first two rules of logic, the rules for “and”.
1.2.1. Why check by matching
A proof in a research paper can run to hundreds of steps, too many to hold in mind at once, so it is checked one step at a time. Two careful readers can disagree about whether a step is “obvious”; a rule that says exactly which steps are allowed settles it, since a step matches the rule or does not. And programs that check proofs work in the same spirit: each step must match a pattern.
Here is a small case: the chain
if
and , then .
From
To check those two steps, a reader needs nothing
about fractions and nothing about what
1.2.2. A rule is a pattern
We borrow one fact about real numbers and use it as a rule.
- Tr (for “transitivity”, or
chaining): from
and , write .
It is a fact about numbers used as a rule, for practice; it is not a rule of logic.
A rule is applied by matching against a small picture of the lines it needs and the line it writes.
A rule is a pattern: given these lines, you may write that line.
A rule schema is a pattern of lines:
given lines at the top, possibly none,
and exactly one new line at the bottom,
whose justification names the rule and cites the given
lines. Line numbers in a schema are written
Here
In three points:
- The given lines may stand anywhere above the new line, in any order on the page, and need not be next to each other or to it.
- The citation’s order says which line plays which
part: “
” makes line play and line play , unless the rule says otherwise ( , below, accepts either order). - Letters are replaced consistently, symbol for
symbol. The middle letter
occurs in both given lines, so it must be replaced by the same string of symbols in both, not merely by the same number.
An instance first. Take
Now a noninstance, by a minimal change. Keep line 3
as
Why define rules this way? Because a rule applied by matching can be checked by someone who knows nothing about the subject. The schema turns “this step is obviously fine” into “this step matches that pattern”, a claim anyone can test.
From the rules of logic on, the letters in a schema
are Greek:
Warning. The middle expression must
match exactly, symbol for symbol. The
step “
1.2.3. Derivations without boxes
A proof strings steps together, each using what earlier steps produced. The next definition says exactly how.
Fix a list of rules, each given by schemas. A
box-free derivation is a finite list of
numbered lines
- (i) the first lines, possibly none and possibly all, are premises, justified by nothing; a short horizontal rule is drawn under the last premise;
- (ii) every later line is justified by one rule of the list, citing earlier lines, and it and the cited lines form an instance of a schema of that rule.
The premises of the derivation are its premise lines, and its conclusion is its last line.
In words. Clause (i) says where a derivation starts: with the statements it is given, which are not proved and need no reason. Clause (ii) says how it goes on: each further line is one step of one rule, and the only lines it may use are ones already written. The word “earlier” is the only condition on which lines may be cited for now. Section 1.4 adds assumptions made inside boxes, and then “earlier” is refined to “available”: an earlier line may become unusable once the box it sits in has closed.
The layout is always the same. Line numbers run down the left, statements sit in the middle, and each justification is on the right: the rule’s name, then the cited line numbers. A vertical bar runs down the left, and a short horizontal rule under the last premise separates what is given from what is derived. From Section 1.4 on, a box draws a second, shorter bar, and the bars beside a line show which assumptions it depends on.
1.2.4. First derivations
Here are two derivations with
Let
- (a) Premises
, , ; conclusion . - (b) Premises
, , ; conclusion .
Solution. (a)
Idea. The premises form a chain
Read it back. Lines 1–3 are the premises. Line 4:
lines 1 and 2 are an instance of
(b) Idea. This time the
chain is scrambled, so we work
backwards, from what we want. The goal
The search could have started instead from
Part (b) was found backwards, from the goal; part (a) forwards. The rest of this section names the two directions.
Quick check. Line 1 of a derivation
is
Solution. The first. With the
citation “1, 3”, line 1 plays
1.2.5. Reading a derivation
Finding a derivation may need an idea, as part (b) of Example (Chaining) did. Checking one never does. For each line after the premises, ask three questions.
- Which rule? Name the rule the justification cites, and check that it is on the list of rules.
- Do the cited lines and this line form an instance of that rule’s schema? Find the replacement of the letters: read it off the cited lines in the order the citation gives them (or, for a rule whose lines may be cited in either order, try both: the new line decides), and check that every letter gets the same expression each time it occurs, and that the new line is what the pattern then says.
- Are the cited lines earlier? Each cited number must be smaller than the number of the line doing the citing.
A line that passes all three is correct, whatever it says and whether or not it is true. Here is the check run on part (a) of Example (Chaining).
| Line | Rule | Cites | Instance (the letters’ values) | Earlier? |
|---|---|---|---|---|
| 1–3 | premises | — | — | — |
| 4 | 1, 2 | 1, 2 < 4: yes | ||
| 5 | 4, 3 | 4, 3 < 5: yes |
Every line passes, so the list is a derivation. Section 1.4 extends this table, when “earlier” becomes “available”.
Finding a derivation may need an idea; checking one never does.
Second readingTwo ways to break a derivation
A line can fail one question and pass the others. The next example breaks a correct derivation in two ways, each time with the smallest change that does it.
Each list below is the derivation of part (a) of Example (Chaining) with one change. Say which of the three questions of “Reading a derivation” fails, and at which line.
- (a) The statements
of lines 4 and 5 are swapped, each taking its
justification with it, so that line 4 is now “
, ” and line 5 is “ , ”. - (b) Line 5 is
justified “
” instead of “ ”.
Solution.
- (a) The list is the
following.
1234
Tr 5, 35 Tr 1, 2Line 5 passes all three questions, exactly as line 4 did before. Line 4 passes the first two: lines 5, 3, and 4 are an instance of
with , , replaced by , , . It fails the third, because it cites line 5, which is not earlier. So the list is not a derivation. (It would also be useless if it were one: its last line is now , not .) - (b) Line 5 is now
“
, ”. Lines 3 and 4 are earlier, so the third question passes, and the rule is named, so the first passes. The second fails. The citation makes line 3, , play , so is and is ; and it makes line 4, , play , so is . The letter cannot be both and , so there is no instance. The lines are the right ones in the wrong roles.
Change (b) shows why the citation order is part of the justification, and change (a) why the order of the lines is. Exercise C2 below asks what would go wrong if a line were allowed to cite a later one.
1.2.6. What a derivation proves
A derivation shows that its conclusion follows from
its premises. The symbol
Let
Here
Let
The symbol
In words, three remarks.
- Which derivations? Until Section 1.4, “derivation” means a box-free derivation (Definition 1.2.2). Section 1.4 widens the word to allow boxes; nothing proved before changes, since a box-free derivation is still a derivation.
- Not every premise must be used. A
derivation may ignore some statements of
, and it may even have no premise lines at all. It may not use a premise that is not in . - Relative to a list of rules. The symbol
always refers to a list of rules. From “The rules for and” below on, it is the rules of logic introduced so far; adding a rule never destroys a derivation, so a sequent once derived stays derived. Before that, we name the rule: “ with ”.
For instance, part (a) of Example (Chaining)
shows
In the derivations from here on, the capital letters
Quick check. What sequent “with
Solution.
Decide whether each of the following is a derivation, and if so, what it shows.
- (a) The single line
. - (b) The empty list, with no lines at all.
- (c) The derivation
of part (a) of Example (Chaining),
for the list of rules consisting of
alone.
Solution.
- (a) Yes. Its only
line is a premise, so clause (i) of Definition 1.2.2
holds, and clause (ii) has no lines to speak about. Its
last line is
. It shows : every statement is derivable from itself. No rule was used, so this holds whatever the list of rules is.
Parts (b) and (c) are answered in the fold below.
Second readingEdge cases
A derivation of one line. The degenerate case is worth a look. A single premise line, with nothing after it, satisfies both clauses of Definition 1.2.2: clause (i) holds, and clause (ii) has no lines to speak about. So it is a derivation, and its premise is its conclusion.
Part (b) of Example (Derivations, simplest first).
No. The definition asks for
Part (c) of Example (Derivations, simplest first).
Yes. Lines 1–3 are premises, with the rule drawn under
line 3: clause (i). Line 4 cites lines 1 and 2, which
are earlier, and lines 1, 2, 4 are an instance of
Warning. A premise is
given, not proved: from the false
premises
1.2.7. The rules for and
Analysis is full of chains such as
To prove “
The first schema is the rule
- Schema: the first one in the block above.
- Reading: two lines in hand, anywhere above and cited in either order; write their conjunction.
- Example: from line 2,
, and line 5, , “ 5, 2” (or “2, 5”) writes .
- Schema: the other two in the block.
- Reading: one line whose main
connective (Definition 1.1.2)
is
; write either side, one layer at a time. - Example: from
it writes or , never .
If
Warning.
Quick check. Which statements can
Solution. Only
Quick check. Line 1 is
Solution. No. Line 1’s main
connective is
1.2.8. Two directions of reasoning
A derivation has premises at the top and its goal, the conclusion we want, at the bottom. Between them is a gap, and finding a derivation means filling the gap. There are two places to start.
From the goal. Ask: what is the
goal’s main connective? If it is
From the premises. Ask: what are the
main connectives of the lines we already have?
A line whose main connective is
Work from both ends: take the premises apart, and build the goal from its parts.
The derivation is finished when the two ends meet.
Part (b) of Example (Chaining)
already worked backwards, with
Scratch work for a search fits in a two-column table:
the Givens, what is in hand (premises
and lines derived so far), and the
Goal, what is still needed. A
goal-directed step replaces a goal by its subgoals; a
premise-directed step adds to the Givens. The search is
finished when every goal is among the Givens. The search
for
| Givens | Goal |
|---|---|
The derivation this search finds is Proposition 1.2.1 below.
A goal line may carry its rule before its citation is
known. When the goal
1.2.9. First derivations with and
Give a derivation of each sequent.
- (a)
. - (b)
.
Solution.
- (a) Idea.
The goal
has main connective , so, goal-directed, its last line is with subgoals and . Both subgoals are premises, so the two ends meet at once.123 2, 1The citation “2, 1” lists
’s line first; “1, 2” would do as well, since the line shows the order. - (b) Idea.
The goal
is a letter, with no main connective, so the goal suggests no rule. The premise has main connective , so, premise-directed, take it apart; its right conjunct is the goal.
Line 2 is the second form of
The two derivations are box-free derivations in the
sense of Definition 1.2.2,
with
Second readingEdge cases for and-introduction
One line cited twice. Nothing in the
schema of
The first result is that the order of a conjunction does not matter.
Idea. Write the premise at the top,
the goal at the bottom, and leave a gap, and write
Proof. The following is a box-free
derivation with the single premise
Lines 2 and 3 are the two forms of
Read back in words, the derivation is a short
paragraph: We are given that
Nothing in the derivation looks at what
The second result is that the grouping of a conjunction does not matter either. It needs the premise taken apart in two layers.
Idea. From the goal: its main
connective is the outer
In pictures: the goal below a gap; then the first
round of
Proof. The following is a box-free
derivation with the single premise
Lines 2 and 3 apply
The lines could come in other orders. Line 3 could come after lines 4 and 5, for instance, since it is used only at line 6. What cannot move is the dependence: every line must come after each line it cites.
Remark. The converse,
A line is not used up
A line of a derivation is a statement that has been
established. Citing it does not consume it: it can be
cited again, by as many later lines as need it. The
derivation of
Idea. From the goal:
In pictures: the goal below a gap; then the subgoals as lines 5–6, not yet justified.
Line 2 is cited by lines 5 and 6, and line 1 by lines
3 and 4. In a written proof this is the everyday “we use
the hypothesis
Second readingAny rearrangement of a conjunction
Take everything apart, rebuild in the new
order. One more derivation rearranges four
letters:
Idea. From the premise: two layers
of
The recipe visibly does not depend on these
particular letters or brackets. Take the premise apart
with
1.2.10. How this looks in a mathematical proof
Real proofs mix the logical rules with facts about their subject.
Let
Solution. The hypothesis
Since
Finally, from
As a derivation, the same proof reads as follows.
Lines 7 and 8 are justified “algebra”: each is a step
by a fact about numbers used as a rule, exactly as Tr
was used above, and not a rule of logic. Line 7 uses “a
product of two positive numbers is positive”; line 8
uses “if
The facts about numbers supply the content of the
solution; the rules supply the joints, taking statements
apart and putting the pieces back together. The
goal-directed reading is visible in the prose too: “show
Second readingA chain in an analysis proof
A proof about sequences might contain the line
Written chains like this one are everywhere in analysis, and they are derivations with the justifications left off. Nobody writes the justifications out in a real proof about numbers. But a reader checking a hard chain does what the table of “Reading a derivation” does: for each step, which fact, applied to which earlier lines.
1.2.11. Common errors
Besides
Warning.
The illegal step leads from a true premise to a false line, so no rule that allowed it could be safe.
1.2.12. The rule card
Before the card, the two rules once more, matched
against statements larger than single letters. The
schema does not care how big the statements put in for
| Rule | Cited line(s) | New line | ||
|---|---|---|---|---|
Not an instance (
Not an instance (
The card gives each rule of logic so far, its shape,
the sentence that uses it in a written proof and, for
readers who meet a proof assistant, the Lean code that
performs it (h.1 names the left half of a
hypothesis h). Nothing later depends on the
last column.
| Rule | Shape | You write | Lean |
|---|---|---|---|
| “We show |
constructor |
||
| “In particular, |
h.1 (and h.2) |
Warning (Not allowed:
- “
from by ”: reaches through two layers; writes a conjunct of the cited line’s main connective (clause (ii): no instance). - “
from by ”: the main connective is , not (clause (ii): no instance). - “
from and by ”: joins whole cited lines; is not a line (clause (ii): no instance). - “line 4,
, 2, 6”: cites line 6, which is not earlier (clause (ii): a later line cited).
Quick check. Line 1 is
Solution. No:
Remark (Looking ahead). Chapter 4 checks, for every rule of Chapters 1 and 2 at once, that no rule leads from true lines to a false one. Until then each rule comes with the one-sentence reason it is safe, as the sentence after the bullets for “and” did.
1.2.13. Exercises
A. Check your understanding
(a) State the definition of a box-free derivation and of
, and write the three schemas of Definition 1.2.5 from memory, naming the rule of each.(b) Which statements does one application of
give from the line ?(c) In the derivation in the proof of Proposition 1.2.2, why must line 2 come before line 4?
(d) Fill in the justifications (i)–(iv) of the following derivation.
12 (i)3 (ii)4 (iii)5 (iv)(e) True or false, with a reason: if
with , and every statement in is true, then is true.(f) What sequent does the derivation in (d) show?
Solution.
(a) A box-free derivation, relative to a list of rules, is a finite list of numbered lines, at least one, each with a statement and a justification, in which the first lines, possibly none and possibly all, are premises, justified by nothing, and every later line is justified by one rule of the list, citing earlier lines, so that it and the cited lines form an instance of a schema of that rule (Definition 1.2.2). And
means that there is a derivation, using the rules of logic (or a named list of rules, as in “with ”), whose premises all belong to and whose last line is (Definition 1.2.3). For the schemas see Definition 1.2.5: has given lines : and : and new line : , cited “ ” (or ); the two forms of each have the given line : and the new line : , respectively , cited “ ”.(b)
, or . The main connective is the first , so is and is .(c) Line 4 is
, obtained by from line 2, . A rule may cite only earlier lines (Definition 1.2.2), and cannot be obtained from line 1 in one step, since line 1’s conjuncts are and .- (d)
- (i)
1; (ii) 1; (iii) 3; (iv) 4, 2. “ 2, 4” is equally right: the line shows which conjunct is on the left.
- (i)
(e) True.
leads from true lines to a true line: if and are true, so is . Go down the derivation: the premises are in , so they are true, and each later line comes from earlier, true lines by , so it is true too. Hence the last line, , is true. This is the property the Looking-ahead box of this section promises for the rules of logic.(f)
: its only premise is line 1, and its last line is .
Answer each part in a line or two.
(a) Lines 1
and 2 are given. What does “ 1, 2” justify?(b) Line 1 is
. List every statement can write from line 1 in one step.(c) Line 3 is
. Write the lines that “ 3” can give.(d) Line 6 is
, justified “ 2, 4”, and line 4 is . What is line 2?(e) Fill in the justifications of lines 2–6.
12 ?3 ?4 ?5 ?6 ?(f) Lines 1
and 2 are given. Is “ — 1, 2” justified?(g) The premises are 1
, 2 , 3 . Is “4. — 1, 3” justified?(h) In the list “1
, premise; 2 , premise; 3 — 2, 1”, which of the three questions of “Reading a derivation” fails?(i) May
be applied to the line ?(j) Lines 1
, 2 and 3 ( 1) are given. Which of the following can be line 4? (i) , 3, 2; (ii) , 3, 2; (iii) , 1; (iv) , 3.(k) Write
as a derivation of from its three links with .(l) Derive
.(m) Derive
.(n) Derive
.(o) Fill in the Givens/Goal table for
, one row per step.
Solution.
(a)
, with , , replaced by , , .(b)
and only; , , and each need further applications.(c)
and : the main connective is the middle , whatever the conjuncts contain.(d)
. Line 6 has the left conjunct and the right conjunct ; line 4 supplies , so line 2 must supply .(e) 2
1; 3 1; 4 2; 5 3, 4 (or 4, 3); 6 5, 2. Line 2 is cited twice.(f) No: the middles
and differ, so the lines are no instance of , although does follow (since ).(g) No: line 1 makes
the expression , and line 3 makes it .(h) The second: citing line 2 first makes
be (from line 2, as ) and (from line 1, as ). The rule is named and the cited lines are earlier.(i) Yes:
binds most tightly, so the main connective is , and writes or .- (j)
- (i) Yes. (ii) No:
joins the two cited lines whole, and line 3 is , not . (iii) No: lies a layer deeper in line 1. (iv) Yes.
- (i) Yes. (ii) No:
(k) Premises 1
, 2 , 3 ; then 4 , 1, 2; 5 , 4, 3.(l) 3
, 1; 4 , 2, 3.(m) 2
, 1; 3 , 2.(n) 3
, 1; 4 , 2; 5 , 4, 3.- (o)
| Givens | Goal |
|---|---|
B. Practice
Give a derivation of
Solution. From the goal:
Lines 2–5 were found from the premise, lines 6–7 from
the goal. With Proposition 1.2.2,
each of
Let
Let
and . Then .
Write out the proof in full, naming each use of
Solution. The hypotheses are the
conjunctions
By
As a derivation it has the same shape as the one in
Example (A product of numbers in the unit interval):
two premises, four
A search for
Solution. The move is work from
both ends (“Two directions of reasoning”). From the
goal: its main connective is
The ends meet at line 6: the subgoals
C. Going deeper
Add to
- (a) Derive
from the premise , using . - (b) Explain why a checker following “Reading a derivation” would accept your derivation.
- (c) What property
does
have that lacks?
Solution.
- (a)
12
Flip 1 (b) Line 1 is a premise. Line 2 names a rule on the list, cites line 1, which is earlier, and lines 1, 2 are an instance of the schema of
with replaced by and by . All three questions pass. The checker never asks whether a line is true, only whether it matches a rule, so a bad rule is invisible to it.(c)
never leads from true lines to a false one (A1(e)). does: from the true line it writes the false line . With such a rule, a derivation from true premises could end anywhere, so checking is only as good as the rules checked against. The rules of logic are chosen to have it; this section’s Looking-ahead box says where that is checked.
A student offers the following list as a derivation
of
- (a) Is
with ? - (b) Is the list a derivation? If not, name the line that fails and the clause of Definition 1.2.2 it breaks.
- (c)
(Challenge.) The two lines “1.
, ” and “2. , ” would each pass the first two questions of “Reading a derivation”. Use them to explain why a line may cite only earlier lines.
Solution.
- (a) Yes. Swap lines
5 and 6 and renumber:
12345
Tr 1, 26 Tr 5, 37 Tr 6, 4Each later line cites earlier lines and is an instance of
, with middles , , . So the student’s conclusion is derivable (and true). (b) No. Line 5 cites line 6, which is not earlier, so clause (ii) fails at line 5. Every line is an instance of
: lines 6, 3, 5 with middle ; lines 1, 2, 6 with middle ; lines 5, 4, 7 with middle . So the only fault is the order. That the conclusion is true and derivable does not repair the list: a derivation must meet the definition line by line.(c) Line 1 cites line 2 twice, and line 2 cites line 1 twice. Each is an instance of
with , , all replaced by : from and , write . So if lines could cite later lines, these two lines would justify each other, in a loop that rests on no premise, and the false statement would be derivable from nothing. Requiring cited lines to be earlier rules out every such loop: following the citations backwards from any line, the numbers go down, so they must end, and they can end only at premises.
Marking scheme. (10 points) - 3:
says the conclusion is derivable and gives a correct
derivation (every line an instance, every citation
earlier). - 3: names line 5 as the faulty line and the
broken clause: a cited line must be earlier. - 1: notes
that the other lines are instances of
A student offers the following derivation of
- (a) Is line 2 an
instance of a schema of
? Justify your answer. - (b) Is the conclusion derivable from the premise? Justify your answer.
- (c) The step at line 2 never leads from a true line to a false one. Why must a checker still reject it?
- (d)
(Challenge.) State, as a schema, a rule
that would allow line 2. Show that every use of in a derivation can be replaced by two uses of .
Solution.
(a) No. To match line 1 with
, we must read and off line 1’s main connective, which is the first : is and is . So writes or , and is neither.(b) Yes. Insert the missing layer.
12 13 14 35 4, 2(c) A derivation is checked by matching each line against the schemas of the rules on the list, and line 2 matches none. A checker that also accepted steps that “obviously follow” would need to understand the statements, and then its verdict would be only as reliable as that understanding. The steps that seem obvious are the ones nobody looks at twice, and they are where unnoticed errors live. (This item is not a find-the-error exercise in the usual sense: the step has no counterexample, since it never leads from truth to falsehood. It is simply not a step of this calculus.)
(d) One such rule, in schema form:
Suppose line
Marking scheme. (10 points)
- 2: (a) no, reading
and off the main connective of line 1. - 2: (b) yes, with a correct derivation.
- 2: (c) checking is by matching the schemas; a step that is not an instance is rejected, whether or not it is true.
- 2: (d) a correct schema, one given line and one new line.
- 2: (d) the replacement by two
lines, with the renumbering of later citations.
Fatal errors (0 for the step): claiming the conclusion is not derivable; offering a counterexample to line 2.
In this exercise read
Solution (Hint 1). Suppose some
line does contain
Solution (Hint 2). That first line is not a premise. Which rule wrote it, and which letters can that rule write?
Solution. Suppose, for a
contradiction, that some line of such a derivation
contains
Line
If it is
If it is
Either way line
The hypothesis on the letters matters. If
The argument, “look at the first bad line; it cannot be a premise, and no rule can create it from good lines”, is an induction on the lines of a derivation; Chapter 4 makes such arguments exact.
Marking scheme. (10 points)
- 2: considers a first line containing
, and says why a first one exists (finitely many lines); or, equally, goes down the derivation line by line, showing each line free of because every line it cites is. - 2: rules out a premise (
does not contain , since , , are different letters). - 2:
case: the new line is built from the statements of two earlier, -free lines. - 2:
case: the new line is part of an earlier, -free line. - 2: concludes that no line contains
, and so that is never a last line.
Fatal errors (0 for the step): arguing about one
particular derivation instead of every derivation;
arguing that