5.4 Proving “For Every”: Let x Be Arbitrary
Section 5.3 gave the rule for using a universal
statement, and ended at a stall: from
5.4.1. One number we know nothing about
Here is a fact of school algebra.
For every real number
, .
We cannot check it number by number; there are too
many numbers. The proof everyone writes takes
one real number and argues about it:
Let
Chapter 1 adopted a convention for sentences like
“let
The argument about
Everything depends on “nothing”. If the argument had
used a fact about
5.4.2. The flagged box
To prove “for every
In a derivation the argument about the arbitrary
The rule on the left is
appears in no premise, appears in no assumption of a box still open at line , and does not appear in .
The rule on the right is
In words: to prove that
A first flagged box: how the rule looks in a mathematical proof
Here is the opening proof as a derivation, with the general fact about squares as a premise and the algebra as one line justified “arith” (Section 5.3).
The goal is universal, so the box opens first, with
the goal’s instance at
The finished derivation:
| Line | Sentence |
|---|---|
| box |
“Let |
| 2 | “Then |
| 3 | “That is, |
| 4 | “Since |
Lines 2 and 3 are the derivation of Section 5.3 with
the flag
Since the domain is
Reading the rule
Here are the two boxes side by side: the box of
Both draw a boundary and both are cited as a range
This rule has conditions that matter; read each one. Read the rule part by part: the flag, the three clauses of the side condition, and the last line.
- The flag. Opening the box is the
written “let
be arbitrary”. The flag is always a variable, never a constant: a constant has a fixed meaning, while the whole point of is that it may stand for anything. The book writes flags with a subscript , , , , so that they stand out. - No premise, no open assumption (the
first and second clauses). This is “we know nothing
about
”. What is known at line is the premises and the assumptions of the boxes still open there. If none of them mentions , then nothing that was used about inside the box is special to . - Not in the conclusion (the third
clause). The name must not leak out. Inside the box it
stood for an arbitrary object, and
is meant to speak about all objects through the bound . A conclusion that still mentions ties what it says to the one object names, while claiming it of everything. - The last line.
is what was proved about , and it must be a line of the flagged box itself, just as the last line of a box must be (Section 1.4). A line inside a further box would still depend on that box’s assumption.
“Appear” is the word of Section 5.2: written anywhere
in the formula, including just after a quantifier
symbol. So a box flagged
In practice: choose as flag a letter
written nowhere in the derivation so far, and as the
quantified letter
Second readingFresh is not the same as new
The condition asks about three places only: the
premises, the open assumptions, and the conclusion.
Lines outside the box may mention
Quick check. A derivation has used
the letters
Solution. Any letter written
nowhere yet, for example
Why each clause
Each clause stops a derivation of a false conclusion from true premises. Here is one failure for each.
A name in a premise. If
Over
A name in an open assumption. Suppose
On the left, line 3 breaks the second clause, since
Second readingThe same error, as a false sentence
With one more flagged box, the error of the minimal derivation becomes a false sentence:
Line 3 breaks the second clause:
A name in the conclusion. From the premise
Line 2 is
The requirement on the last line is the one Chapter 1 already imposed on every box rule, for the same reason.
5.4.3. Derivations with flagged boxes
The search method of Section 3.1 gets a new
goal-directed step: when the goal is
Give a derivation of each sequent.
- (a)
. - (b)
. - (c)
.
Solution.
- (a) Idea.
The goal begins with
, so the goal-directed step opens a box flagged , and the new goal is . That goal names the term for (Section 5.3’s step): instantiate the premise at , twice.13412 13412 13 24 2–3The side condition at line 4:
does not appear in the premise, no box is open at line 4, and does not appear in . Lines 2 and 3 instantiate at the variable , which is free for and for , since the formulas contain no quantifier on . Compare Section 5.3, (b), which reached only : there the term was a constant, a name fixed by the language, and nothing can be generalized over a constant; here it is a flag, a variable that no premise mentions. - (b) Idea.
The goal is universal: a box flagged
, whose last line must be . Both premises are universal; instantiate each at the term the box’s goal names, , and finishes.Givens Goal ,the same, and the fresh name ( opens a box)+ , ( at , twice)+ ( ) ✓1256123 14 256123 14 25 3, 46 3–5At line 6,
appears in neither premise nor in , and no box is open. - (c) Idea.
Read the goal’s quantifiers from the outside:
first, so open a box flagged ; the new goal is again universal, so open a box flagged inside it; the innermost goal is . Two boxes, opened in the goal’s order. Now the premise’s quantifiers are removed in its order: at , then at .
The box flagged
Nothing in (c) used that the formula under the
quantifiers is
Quick check. Suppose premise 2 of
(b) were
Solution. No:
Quick check. Could both boxes of
(c) be flagged
Solution. No. The inner box would
end in
Second readingThe front renaming, derived
Section 5.2 took renaming of a bound variable as a
convention and promised to derive it at the front of a
formula. For a formula
Take
Now the sequent at which Section 5.3 stalled,
together with its converse. “For every
Idea.
The search, for
For
Proof.
At lines 4 and 7,
At line 7,
The first derivation is the answer to Section 5.3’s
stall: its lines 1–4 derive
Fine print: flagged boxes in a
derivation. Definition 1.4.2
(Section 1.4) said that a box is a block of consecutive
lines whose first line is an assumption. We now extend
that definition, and two things change. First, a box may
be flagged: it carries a name, a
variable written at its top, and a flagged box need
not open with an assumption. The box of
5.4.4. Every element of the empty set
Section 5.1 read
Let
Here is how the search grows it, and the result:
Line 3 uses VI (Proposition 2.1.2)
as one line, with the formulas
Second readingWhy a derived rule may stand in a flagged box
Using VI inside the box is allowed because the
derivation of Proposition 2.1.2
uses only
One more flagged box gives a statement about upper bounds:
Over
5.4.5. Common errors
Three errors with
- Checking instances. Verifying
at , or at a thousand values, proves , , , and so on, and not . The rule needs one proof about a fresh name, not many proofs about particular terms. Exercise C2 shows how plausible this error can look. - Generalizing over a name in an open
assumption. Inside “suppose
”, the name is not arbitrary. The left-hand derivation of the pair in “Why each clause” shows where this leads. - Generalizing over a name in a
premise. A premise about
, such as “ is even”, makes special. The first derivation of “Why each clause” shows it.
Warning. “Let
Quick check. In the derivation
below, line 6 is justified by
Solution. No. Lines 1–5 are legal;
in particular line 5 may cite line 1, which lies in no
box. But at line 6 the flag
Here is a proof. Is its claim true? Which step fails?
Claim. Some real number is at least as large as every real number.
Proof. Let
be a real number, and put . Then . Since was arbitrary, for every real , so is such a number.
Solution. The claim is false:
whatever
Line 2 breaks the third clause: the flag is still in
the conclusion. The box earns
5.4.6. The rule card
In each row the box’s flag is in no premise and no open assumption.
| flag | the box’s last line | the new line |
|---|---|---|
Not an instance. A box flagged
Chapters 1 and 2’s thirteen rules are on the card at the end of Section 3.1; here are this chapter’s so far.
| Rule | Shape | Side condition | You write | Lean |
|---|---|---|---|---|
| “In particular, for |
h t (or
specialize h t) |
|||
| box |
“Let |
intro x |
Other forms of the opening phrase are “let intro x turns the goal
forall x, P x into the goal
P x with a new name x in
context, about which nothing is assumed: Lean’s version
of opening the flagged box. The same tactic opened the
In the Givens/Goal table,
Warning (Not allowed:
- Generalize over a flag that a premise mentions: the first clause.
- Generalize over a flag that an open assumption mentions: the second clause (the pair in “Why each clause”).
- Write a conclusion that still mentions the flag: the third clause (Example (A Proof to Check)).
- Cite a line inside a flagged box that has closed: the scope rule of Definition 1.4.2, as for every box.
5.4.7. The search method: one more step
- A goal
. Open a flagged box with a fresh name , one that appears in no premise, in no open assumption, and not in the goal. The new goal, the box’s last line, is .
This step is safe, in the sense of
Section 3.1. If
Remark (Looking ahead). Chapter 8 collects the errors of this section, with others, in a catalogue of steps a proof may not take.
5.4.8. Exercises
A. Check your understanding
Three derivations, D1, D2 and D3, are used in part (b).
D1:
D2:
D3:
- (a) Write the schema
of
with its side condition. - (b) For each of D1,
D2, D3, decide whether its
line is legal. If not, name the clause of the side condition that fails. - (c) True or false,
with a reason: “fresh” means that
appears nowhere in the derivation outside its flagged box. - (d) In the
derivation of the
half of Proposition 5.4.1, the name flags two boxes. Why does the side condition allow this?
Solution.
(a) A box flagged
, with no assumption, from line to line , whose last line is , a line of the flagged box itself; then line : , justified “ – ”. At line the name appears in no premise, in no assumption of a box still open at line , and not in (Definition 5.4.1).(b) D1: not legal. At line 5 the flag
appears in the premise on line 2 (the first clause). Over , with and both read as “ is even” and naming , both premises are true and line 5, “every integer is even”, is false.D2: legal. Line 2 mentions
outside the box, and that is allowed: it is neither a premise nor an assumption, and the conclusion does not contain . Line 3 cites line 2, which is available, since no box contains it. (It is also correct in meaning: line 2 came from a premise that says nothing about , so it holds whatever names.)D3: not legal. At line 3 the assumption
on line 1 is still open, and appears in it (the second clause). Line 4, which closes the box legally, then says “if is below , everything is below ”: false over with read as , as and as .(c) False. The side condition asks about the premises, the assumptions of boxes still open at the
line, and the conclusion of that line. Other lines may mention , as line 2 of D2 does, and a closed flagged box may share its name with a later one.(d) At line 7, which closes the second box, the side condition asks whether
appears in the premise (no), in an assumption of an open box (no box is open), and in (no). The first box’s lines mention , but they are neither premises nor open assumptions, and the box closed at line 3, so its lines are not even available at line 7.
Each part takes a line or two. The parts run from single steps, through a missing line, a justification column and a judgement on one step, to whole derivations.
- (a) What does opening a flagged box say, in the words of a proof?
- (b) A box flagged
ends in , and is in no premise and no open assumption. Which line may write? - (c) Line 9 is
, justified “ 4–8”, the box flagged . What is line 8? - (d) Justify each
line after the premise: 1
, premise; a box flagged holding 2 , 3 , 4 , 5 ; then 6 . - (e) The premise is
. May a box flagged that ends in be closed with ? If not, which clause does it break? - (f) May a flag be
the constant
? - (g) A box flagged
ends in . Is a legal line? If not, which clause does it break? - (h) Inside the box
of an assumption
, a box flagged ends in . May close it? If not, which clause does it break? - (i) Derive
. - (j) Derive
. - (k) Derive
. - (l) Derive
.
Solution.
(a) “Let
be arbitrary.”(b)
.(c)
, the instance at the flag.(d) 2
1 (at ); 3 2; 4 2; 5 3, 4; 6 2–5.(e) No, the first clause:
appears in a premise.(f) No: a flag is always a variable.
(g) No, the third clause:
appears in the conclusion.(h) No, the second clause:
appears in an open assumption.(i) A box flagged
: 2 , 1; then 3 , 2–2.(j) A box flagged
: 2 , 1; 3 , 2; then 4 , 2–3.(k) A box flagged
: 3 , 2; 4 , 1; 5 , 3, 4; then 6 , 3–5.(l) A box flagged
, and inside it the box of 1 ; 2 , 1–1; then 3 , 1–2 (cited from line 1, the convention for a flagged box that immediately contains another).
B. Practice
A search for
Solution. The moves are let
The goal is universal, so open a box flagged
The flagged box immediately contains the
- (a) Give a
derivation of
. - (b) Try to derive
the converse,
. Say where the search stalls, and which side condition stops it.
Solution.
- (a) The goal is an
implication: a
box on , with goal . That is universal: a box flagged , with goal . That is a negation: a box on , with goal . Inside, instantiate both universal lines at and look for a clash: and the instance of the premise give , and the assumption at gives .12 asm, for3 asm, for4 15 4, 36 27 5, 68 3–79 3–810 2–9At line 9, the open box is the
box of line 2, whose assumption does not contain ; the premise and the conclusion do not contain it either. So the side condition holds, even though the flagged box sits inside an open box. - (b) The goal is
universal, so open a box flagged
, then a box on , with goal . The only premise is an implication, . Using it needs its hypothesis , which nothing supplies; and its conclusion, , would clash with and close the case by . So everything turns on deriving . The goal is atomic and nothing produces it, so the method’s last resort is an box on . Inside, the available facts about are , and to reach from it we would close a flagged box over . The side condition forbids it: appears in the open assumptions and . A fresh name does not help either, since nothing tells us anything about . The search stalls at the second clause of the side condition.
A stalled search proves nothing by itself; a cleverer derivation might exist. Section 7.2 settles the question with a structure in which the premise is true and the conclusion false, and shows that the converse does not follow.
Example (A number is at most its absolute value)
(Section 1.6) derived
Solution. The goal is universal, so
the derivation of Section 1.6 must run inside a box
flagged
Lines 7–13 are the derivation of Example (A number is at most its absolute value)
with
If instead the premises were
- (a) Derive
with and , not . Why can the flagged box not be flagged ? - (b) Explain why no
flag at all gives a derivation of
by this route, and give a counter-reading to the sequent.
Solution.
- (a)
12
13 2–2With the flag
, the conclusion contains (the letter after the quantifier counts: that is what “appear” means), so the third clause fails, whatever else holds. - (b) With the flag
, the line is available, but appears in the premise and in the conclusion. With any other flag , the box needs the line , and the search finds nothing that gives it: the premise is about , and no line mentions . A stalled search proves nothing by itself, since a cleverer derivation might exist; the counter-reading settles it. Over , read as “even” and let name : the premise is true and is false. (Section 7.2 makes this a counter-model.)
Marking scheme. (10 points) - 3: the
derivation of (a). - 3: the flag
A two-place predicate
- (a) asymmetric
irreflexive. - (b) irreflexive
asymmetric. - (c) irreflexive,
transitive
asymmetric. - (d) symmetric,
transitive
reflexive. - (e) symmetric,
transitive,
reflexive. - (f) reflexive
symmetric.
Solution.
- (a) Derive. The goal
is universal, so a flagged box; its goal
is a negation, so a box; the premise at , twice, gives the clash.12 asm, for3 14 35 4, 26 2, 57 2–68 2–7At line 8,
is not in the premise, no box is open, and is not in . (b) Break. The domain
, true of and only. No element is related to itself; and both hold.(c) Derive: two flags, then an
box, then a box. Transitivity at , , turns the two assumptions into , which irreflexivity refutes.123 asm, for4 asm, for5 26 57 68 3, 49 7, 810 111 9, 1012 4–1113 3–1214 3–1315 3–14At line 14,
is in no premise, the only open box (flagged ) has no assumption, and is not in the conclusion; at line 15 the same holds for , with no box open.(d) Break. The domain
, true of only. is symmetric and transitive (the only pair is ), and fails.(e) Derive. Inside the box, the partner
plays the part that played in Exercise C1 of Section 5.3.1234 35 16 57 6, 48 29 810 911 4, 712 10, 1113 4–12At line 13,
is in no premise, no box is open, and is not in the conclusion.(f) Break. The domain
, true of , and . is reflexive; holds and does not.(g) and (b) are converses, and only (a) derives. (d) is the trap “symmetric and transitive give reflexive”, which breaks at an element related to nothing, and (e) repairs it by giving every element a partner
(Exercise C1 of Section 5.3 shows the same for one element that has a partner).
Marking scheme. (10 points) - 2 each
for (a), (c), (e): flags opened in the order read off
the goal, every
C. Going deeper
- (a) Give a
derivation of
in which the line is written before a flagged box that uses the same name . Check every clause of the side condition at the line. - (b) A stronger
condition is sometimes proposed: “
occurs nowhere in the derivation outside its box”. Does your derivation meet it? Explain why the conclusion of your derivation is nonetheless correct, so that the stronger condition forbids more than it needs to. - (c) Could the last
line of the flagged box in (a) be obtained by
, repeating the earlier line ? Is the result a derivation?
Solution (Hint 1). The goal is a
conjunction. Derive the left conjunct first, by two
Solution (Hint 2). For the right
conjunct, open a box flagged
Solution.
- (a)
12
13 24 15 46 4–57 3, 6The side condition at line 6. Premises: the only premise is line 1,
, and does not appear in it. Open assumptions: no box is open at line 6, so there are none. Conclusion: does not contain . The last line of the box, line 5, is and is a line of the box itself. So line 6 is legal, and the derivation has 7 lines. Lines 2, 3 and 7 mention outside the box, and the side condition does not ask about them. (b) No: lines 2, 3 and 7 mention
outside its box. Yet the conclusion is correct. The reason the side condition looks only at premises and open assumptions is that these are the only lines taken without proof, so they are the only lines that can single out what names; every other available line is derived from them. Lines 2 and 3 were derived from a premise that does not mention ; they hold whatever names. So the argument in the box really is about an arbitrary object, and follows. The stronger condition would reject this derivation, although renaming the box’s flag to a new letter (lines 4–5 becoming and ) gives a derivation that meets it and has the same last line. A condition that rejects a correct derivation for the spelling of a name forbids more than safety needs.(c) Yes.
may copy into the box any line available there, and line 3 lies in no box, so it is available at every later line. With line 5 justified “ 3” (and line 4 deleted), the box is a single line , and the side condition at the line is checked exactly as in (a): nothing in it looks at where the box’s last line came from. The derivation is legal, and it is correct for the reason in (b): line 3 was derived from a premise that says nothing about .
Marking scheme. (10 points) - 2: the
left conjunct by two
A student offers this proof.
Claim. For every real number
, . Proof. (1) Let
be a real number. (2) At : . (3) At : . (4) At : . (5) So , and since was arbitrary, the claim holds for every real .
- (a) Is the claim true?
- (b) Does the argument prove it? Name the step that fails and the rule it misuses.
- (c) Show that the
step can lead to a false conclusion: give a polynomial
for which the same checks at succeed and fails for some real . - (d) Point to a correct proof.
Solution (Hint 1). Write lines (2)–(4) as formulas. Which terms do they mention?
Solution (Hint 2). Write the
student’s proof as a derivation: open a box flagged
Solution.
(a) Yes. For every real
, , since a square is never negative.(b) No. Lines (2)–(4) are true, and line (1) opens a flagged box, “let
be arbitrary”. The error is in line (5). With the formula , lines (2)–(4) establish , and : statements about the constants , , . None of them is for the flag. Inside the box, nothing about the arbitrary was ever proved. The first sentence of (5), “so ”, has the right form: it is , with the student’s as the flag. But nothing the student wrote yields it: lines (2)–(4) are the only lines it rests on, and no rule takes , and to . So the closing “since was arbitrary” applies to a box whose last line was never derived: lines (2)–(4) are all instances at constants, not the instance at the flag. Line (1) was idle: the argument never used the it introduced.(c) Take
. The same checks succeed: , , . But , so “ for every real ” is false. So the pattern of (5), concluding “for every ” from checks at a few constants, can lead from true checks to a false conclusion. It is not an instance of , as (b) showed. (A legal step never leads from true premises to a false conclusion; Section 7.2 states this.) The claim in (a) is true for a different reason, one that the argument never gave.(d) The derivation under “A first flagged box” in this section: inside the box flagged
, applies “squares are not negative” at , an arith line rewrites it as , and that line is , so applies.
Marking scheme. (10 points) - 2: (a)
the claim is true, with a reason (it is a square). - 3:
(b) names step (5) and