8.5 Writing a Proof
Section 8.4 trained a reader to say what licenses each line of a proof, as Example (Explaining a proof, well and badly) did line by line. This section turns to the writer. A proof is written for a reader who will check it in exactly that way, so the writer’s job is to make each line’s warrant visible. The section gives a procedure that leads from a statement to plain prose, the conventions of written mathematics, each a rule of Chapters 1–7 made audible, and four worked examples.
8.5.1. A procedure
A reader checks a proof forwards, one line at a time. A writer finds a proof mostly backwards, from the goal. The two directions are not in conflict: Section 3.1 showed that the search for a derivation is goal-directed, and Definition 1.4.2 says that the derivation found is a list in which each line cites only lines above it. The procedure below keeps both, the search in scratch work and the derivation on the page. Its steps 3 and 6 use the levels of Definition 8.3.1 and the convention of Definition 8.3.2 from Section 8.3.
Algorithm. Writing a proof of a statement.
- Write the goal in symbols. Translate the statement, its hypotheses and its conclusion into a formula, as in Section 6.1, with every quantifier and its bound. Read a letter that is not introduced as universally quantified (Section 5.1). Set up the Givens/Goal table: the hypotheses on the left, the goal on the right.
- Unwind the definitions. Replace
each defined word (“bounded”, “converges”, “irrational”,
“
”) by its definition, in the hypotheses and in the goal. This is on a definition. - Read the skeleton off the goal
(Section 3.1, extended in Section 6.3), and write it at
level 1: the boxes, their first lines and their last
lines. Open the
boxes of existential hypotheses early. - Fill the boxes: backwards in scratch, forwards on the page. The search runs from the goal; the written proof runs from the hypotheses, each line citing lines above it. What the search found goes into the Idea, not into the Proof.
- Choose constants last in the search, and write them first on the page, each with what it depends on.
- Write level 3, leaving silent exactly the steps that Definition 8.3.2 allows, and no others.
- Reread as a checker: for each line, is it true, and by which rule does it follow from which available lines? (Section 8.6 makes this a two-column check.)
Steps 1–3 involve no mathematics, only logical form, and they fix the first and last sentence of every box before anything is invented (“skeleton first”). A picture after the next example shows steps 4 and 5.
Quick check. Which step of the
procedure produces the sentence “Let
Solution. Step 3. Unwound in step
2, the goal begins
8.5.2. The procedure, run once
This example runs all seven steps on a statement not
seen before. Sets of reals are used here as Chapter 5
used them, with “
Let
Solution. Steps 1 and 2: the
goal in symbols, unwound. Over the domain
| Givens | Goal |
|---|---|
| the same | |
| the same, and |
|
| the same, and |
The second row is step 2; each later row is one move of steps 3 and 4; the table’s last row is where the search ends.
Step 3: the skeleton. The goal is an
existential, so it is postponed: no witness is in sight
yet. The assumption “
Step 4: filling the box. Backwards: the goal
needs a witness
The side conditions hold:
Step 5: the constant. The witness for the
goal is the bound
Step 6: level 3.
Suppose
is bounded above, and choose an upper bound of (depending on only). Let . Since , we have , and so . Hence is an upper bound of , and is bounded above.
The two instances of
Step 7: reread. The order of the first two
sentences matters. With “let
Second readingWhat the example used
The example used
Scratch paper and the page
Steps 4 and 5 say that the search runs backwards and the page runs forwards. Here is the example’s search beside its page.
| Scratch paper (from the goal, backwards) | The page (from the hypotheses, forwards) |
|---|---|
| 1. Goal: an |
1. Suppose |
| 2. |
2. Let |
| 3. Need |
3. Since |
| 4. That needs |
4. So |
| 5. |
5. Hence |
Read the scratch column from the bottom up and it is
the page, except for the constant:
Second readingWhy the page runs forwards
Step 4 as a logical fact. The search
of Section 3.1 opens a box for the goal before it knows
how the box will be filled, and it postpones an
existential goal until a witness appears; that is why it
works backwards. But a derivation is a list in which
line
Step 5 as a logical fact. A chosen
constant, such as “let
Warning. The search is not
the proof. A page that reads “we want
Warning. A constant without
its dependencies is a claim nobody can check.
In a proof that
Quick check. On the page, which
sentence carries the witness of the final
Solution. “Hence
Quick check. A writer’s scratch
paper reads: “want
Solution. “Let
8.5.3. Conventions of written mathematics
A handful of conventions make a proof checkable. Each is a rule of Chapters 1–7 heard in a sentence.
- Announce the skeleton. “We prove
the contrapositive”, “by induction on
”, “we consider two cases”, “suppose, for a contradiction, that …”. An announcement tells the reader which box is opening, and so what its last line must be. - Name every object when it is
introduced, by “let” (an arbitrary object,
), “choose” (a witness, , with a fresh name), or “let … …” (a constant, the witness of ), and say what a chosen object depends on. - One claim per sentence. A sentence carries one line, or a short chain of lines joined by “so”, each step of which the reader can name. Two unrelated claims joined by “and” hide which one is used later.
- End with what was shown. The last sentence of a proof states the goal, or the last line before only closings that Definition 8.3.2 lets be silent. If it is not the statement to be proved, the reader should be told how the two are related.
- Label displayed claims that will be
cited,
or (1), and cite them by the label. A citation is a line number in prose.
None of these is a matter of style. An object used without being introduced is a line citing nothing, and an announcement that does not match its box (assuming the conclusion of an implication) proves the converse; these are entries (N9) and (N5) of the catalogue in Section 8.6.
8.5.4. Matching sentences and rules
The next two examples go in opposite directions.
Here is a short proof. Label each sentence with the rule it uses.
Claim. For a real number
, if , then . Proof. (1) Assume
. (2) Every real number is at least or below it, so either or . (3) Suppose first that . (4) Then . (5) Suppose instead that . (6) Then , so . (7) Hence , that is, . (8) In either case , which proves the claim.
Solution.
| Sentence | What it does | Rule |
|---|---|---|
| (1) | opens a box with the hypothesis | assumption for |
| (2) | states the disjunction the split needs | a fact about real numbers |
| (3) | opens the first case | assumption for |
| (4) | algebra | |
| (5) | opens the second case | assumption for |
| (6) | algebra | |
| (7) | uses the assumption of (1), whose box is still open | algebra |
| (8) | combines the cases, then closes the outer box |
Sentence (7) uses the assumption made in (1), and it may: that box is still open.
Measured against Definition 8.3.2,
nothing that must be written is missing: the split is on
the page with a disjunction that covers every real
Second readingEvery sentence labeled, school facts included
| Sentence | What it does | Rule |
|---|---|---|
| (1) | opens a box with the hypothesis | assumption for |
| (2) | states a fact about real numbers | a school fact, entered as a line |
| (3) | opens the first case box | assumption for |
| (4) | ||
| (5) | opens the second case box | assumption for |
| (6) | computes |
|
| (7) | uses the assumption of (1) | |
| (8) | combines the cases, then closes the outer box |
The facts of school algebra enter as implications,
each used by
Measured against Definition 8.3.2,
the proof leaves out nothing that must be written: the
split in (2) is on the page, and the disjunction it
splits is a school fact (every real number is at least
The second direction starts from a derivation whose premises are facts about integers.
Let
Solution.
Every integer is even or odd, so we consider two cases. If
is even, then has an even factor, and so it is even. If is odd, then is even, since an odd number plus one is even; so again has an even factor and is even. In either case is even.
Compare the two. The paragraph keeps one sentence for
each box and each rule that matters: line 1 becomes “we
consider two cases”, with its reason; the two boxes
become the two “if” sentences; line 10 becomes “in
either case”. It drops the line numbers and the rule
names, and it merges the two
By Definition 8.3.2,
the closing “in either case …” could be dropped at level
3; the split of line 1, with the reason it covers every
integer, could not. The paragraph leaves the premises
unproved. Premises 2–4 are one line of algebra each (for
instance,
8.5.5. Generalizing a proof
A proof written about one object sometimes proves
much more. To generalize it, replace
the object by a fresh name, the move of
Here are two proofs that one of
Solution. (P1) does not generalize:
it uses a fact about
Let
be an integer [assumption for ]. Dividing by , there is an integer with , or ; choose such a [ ]. If , is a multiple of . If , then . If , then . In every case one of the three is a multiple of [ ]. Since was arbitrary, this holds for every integer [ ].
(P2) was the third case, with
The test: after renaming, can every line
still be justified from what the box of
Quick check. A proof that
Solution. No: it computes with
8.5.6. Exercises
A. Check your understanding
Here is a proof.
Claim. For real numbers
and , if , then or .
- Assume
. (2) Suppose, for a contradiction, that it is not the case that or . (3) Then fails and fails. (4) So and . (5) Adding, . (6) This contradicts . (7) Hence or , which proves the claim.
- (a) Label each sentence with the rule it uses, as in Example (Label every sentence).
- (b) Which sentence
closes an
box, and which uses one of De Morgan’s laws (Proposition 2.5.5)? Which law? - (c) Everything inside the box of (2) follows from (2) alone, until the clash in (6). Which face of “by contradiction” (Section 8.1) does the proof wear, and which face is it really? Write the first sentence of the rewritten proof.
- (d) Sentence (7) closes two boxes. Which of the two closings may be silent at level 3, by Definition 8.3.2?
Solution. (a)
| Sentence | Rule |
|---|---|
| (1) | assumption, opening the |
| (2) | assumption |
| (3) | Proposition 2.5.5
(a), |
| (4) | |
| (5) | |
| (6) | |
| (7) |
(b) Sentence (7) closes the
(c) It wears face (iii), genuine
(d) The closing of the
Answer each part in a line. The parts follow the procedure: (a)–(b) symbols and unwinding, (c)–(d) the skeleton, (e) the order on the page, (f), (g), (i) the conventions, (h) the search and the page, (j)–(k) generalizing, (l) the Givens/Goal table.
- (a) Write in
symbols, with every quantifier and bound: “the square of
every odd integer is odd” (domain
). - (b) Unwind “the
sequence
is bounded” (Section 5.6). - (c) The goal is
. What are the first and the last line of the outer box? - (d) A hypothesis
says “some integer
has ”. When does its box open? - (e) On the page,
which comes first: “let
” or “let be a real number with ”? - (f) “
is positive and is negative, and so and .” Which convention does this break? - (g) A proof uses
in its fourth sentence, and appears nowhere before. Which convention, and which entry of Section 8.6? - (h) Is “this holds
if
” a sentence of the page? - (i) Claim:
for . A proof ends “… so .” What is missing? - (j) A proof about
the number
uses only “ is a multiple of ”. For which integers does the same proof prove the same claim? - (k) A proof about
“an arbitrary odd
” uses in one line. What does it prove? - (l) Givens
and ; Goal . Write the next row of the Givens/Goal table.
Solution.
(a)
.(b)
.(c) First: the assumption
, “Let ” (assumption for ). Last: , by with the chosen .(d) At once (step 3): an
box with a fresh name .(e) The constant (step 5). The box of
needs ; chosen after , could depend on .(f) One claim per sentence: two claims joined by “and” hide which one is used later.
(g) Name every object when it is introduced; (N9), a line that cites nothing.
(h) No. It points backwards, from the goal, and belongs to scratch work or the Idea (step 4).
(i) The end:
and , so the product is negative. The last sentence must be the claim (end with what was shown).(j) For every multiple of
: rename to a fresh , with the assumption .(k) Only the claim for positive odd
. For all odd , the box would have to assume no more than oddness, so that line must be proved again without .(l) Givens: the same, and
( , fresh). Goal: .
B. Practice
Each part gives a statement and a level-1 skeleton of its proof. Write the proof at level 3, keeping every step that Definition 8.3.2 says is never silent.
(a) For every integer
, if is odd, then is even. (Domain .)1 asm, for2 asm, for3 arith 24 35 1, 2–46 1–57 1–6(b) No real number
satisfies . (Domain .)1 asm, for2 asm, for3 arith 24 arith5 arith 3, 46 arith7 5, 68 1, 2–79 1–8(c) For a real number
: if and only if , or . (Here is fixed; “or” chains group to the right.)1 asm, for2 arith 13 product zero, arith 24 asm, for5 asm, for6 arith 57 asm, for8 asm, for9 arith 810 asm, for11 arith 1012 7, 8–9, 10–1113 4, 5–6, 7–1214 1–3, 4–13
Hint: line 3 of (c) uses the school fact that a product of real numbers is zero only if one of its factors is zero.
Solution. (a) Let
“Choose an integer
(b) Suppose, to the contrary, that some real
“Suppose, to the contrary” opens the
(c) Let
This proves the equivalence.
Both directions are written, and the citation in line
3 is visible. The two splits of
Let
- (i) Let
with . - (ii) Since
and , choose (depending on ) such that for every . - (iii) Let
, where and serve every at once. - (iv) Then
and . - (v) Let
. - (vi) Since
and were arbitrary, . - (vii) Choose
such that for every . - (viii) Let
. - (ix) So
. - (x) Since
and , choose (depending on ) such that for every .
Solution. An admissible order: (v), (x), (ii), (viii), (i), (iv), (ix), (vi).
The only other admissible order swaps (x) and (ii),
which use only
Distractor (iii) claims that
Distractor (vii) applies the hypothesis at
Here is a level-1 skeleton for the statement “for
real numbers
and its level-3 prose, with the closing sentence of
the
Let
be rational and irrational. Suppose is rational. Then is a difference of two rational numbers, so is rational. This contradicts the irrationality of .
Name the move, then complete it.
Solution. The move is
skeleton first: the blank is line 8, the line written
after the
Completion. “Hence
The conclusion of a
Two proofs that
(P1) “
.” (P2) “
, a product of three consecutive integers; one of them is even and one is a multiple of , so divides the product.”
- (a) Which proof
generalizes to “for every integer
, ”, and why does the other not? - (b) Write the general proof at level 3, with its fresh name and every fact it uses.
- (c) Which fact about
does (P2) leave unstated?
Solution. (a) (P2)
generalizes; (P1) computes with
(b) Let
(c) “If
Marking scheme. (10 points) - 2: (a)
(P2), with the reason (P1) fails. - 2: (b) the
factorization and the fresh name. - 2: (b) a multiple of
C. Going deeper
Let
Solution (Hint 1). Compute
Solution (Hint 2). The Proof
begins: “Let
Solution. Idea. We want
Proof. Let
The Idea reads the computation from the goal back to
Marking scheme. (10 points) - 2: an
Idea that computes
A sequence
We want some
with . For big , is near , so is less than if we use for . The small are only finitely many, so take the biggest. So is the max of all of them and it works.
- (a) Name three faults of the text, each by the convention it breaks (this section) or the step that is not written.
- (b) Rewrite the proof at level 3.
Solution (Hint 1). Which objects does the text use without introducing them, and what does each depend on?
Solution (Hint 2). The rewrite
begins: “Apply the definition of
Solution. (a) (i) It
writes the search: “we want some
(b) Apply the definition of
The
Marking scheme. (10 points) - 3: (a)
three genuine faults, each tied to a convention or an
unwritten step (1 each). - 2: (b) applies the hypothesis
at a named positive
The level-3 proof of Theorem 2.2.1 in Example (The irrationality of the square root of two at four levels) uses (L) and Theorem 2.1.3.
- (a) Rewrite it as a
proof that no rational number has square
. You may use : every rational number is with integers , , , not both multiples of . Prove the lemma your proof needs in place of Theorem 2.1.3. - (b) Rewrite it once
more for
, with : every rational number is with integers , , , not both multiples of , which is true. Which line fails? Why must some line fail? - (c) Say in one sentence what a generalization keeps and what it must prove again.
Solution (Hint 1). The lemma is “if
Solution (Hint 2). Let
Solution. (a) Lemma: if
The proof. “Let
(b) The line “
(c) A generalization keeps the skeleton (the boxes, the choices, the clash) and every line that used only properties shared by the new object; it must prove again each line that used a property of the old one, here the lemma.
Marking scheme. (10 points) - 3: (a)
the lemma proved by the residues mod 3, with the clash