5.3 Using “For Every”: Instantiation
Section 5.2 made the language exact and defined the
operation
5.3.1. Applying a statement about everything
Every application of a general fact to a particular case is one step of logic, and so far that step has been taken on trust. Three earlier places took it.
- Section 1.3 used the theorem “if an integer is
divisible by
and by , then it is divisible by ” at , taking the step from “every integer” to the one integer on trust. - In Example (A number below every positive number)
(Section 2.5) the hypothesis was “
for every ”, and the proof applied it to the one number . - Section 5.1 opened with the argument “every positive
real has a square root;
is positive; so has a square root”, which a truth table calls invalid because it sees only three unrelated atoms.
The same step happens in each: a statement about
every object is applied to
one object, named by a term. In the
language of Section 5.2, the first premise of the
square-root argument is
5.3.2. The rule
A universal statement may be applied to any term: remove the quantifier and put the term in for the variable.
Here
In words: if a line says that
- Schema: the block above: one cited line, no box.
- Reading: drop the
, put one term in for every free , and check that no letter of the term gets caught by a quantifier inside. - Example: from
, “ 1” at the term writes .
Read the definition clause by clause; exercises cite the clauses by number.
- The cited line’s main symbol is
, with all of as its scope: is an implication; a buried inside another connective must first be taken out by that connective’s rule, when it can be ( takes out of ), and a in the hypothesis of an implication cannot be instantiated at all. - Any term: a constant, a variable
(
itself included) or a compound term. Nothing about it needs to be established first, since every term names an object of the domain. - Every free occurrence, by the same
term: the new line is
; we do not choose which occurrences change. - Free for
(Definition 5.2.6): no letter of is caught by a quantifier of . This is the rule’s only restriction. - Line
is available (the scope rule of Definition 1.4.2), as for every rule.
When the universal statement has a bound,
Quick check. Line 1 is
Solution. The first two, at the
terms
Second readingA quantifier that binds nothing
If
One line, many uses. The cited line stays where it is, available as before. A derivation may instantiate the same universal line as often as it likes, at different terms or the same one. Worked derivation (d) below uses one premise twice.
Why this rule. It says no more than the word
“every”. If every object in the domain satisfies
Why “free for”. The instance must say about
Quick check. Line 1 of a derivation
is
Solution. The only free occurrence
of
A long “and”, taken apart. In world
W of Section 5.1,
5.3.3. Four derivations
The worked derivations below use
Give a derivation of each sequent.
- (a)
. - (b)
. - (c)
. - (d)
.
Solution.
- (a) Idea.
The goal
has no connective or quantifier, so no introduction rule produces it, and the search turns to the premises. The premise cannot be taken apart. The premise begins with , so it can be used only by . At which term? The goal mentions the term , so instantiate at . That gives an implication whose hypothesis is a premise and whose conclusion is the goal.123 14 3, 2Line 3 is
; the constant has no variables, so it is free for . Read as , as “ is positive”, and as “ has a square root” (Section 5.1 wrote for this predicate), and the derivation is the square-root argument of Section 5.1, in the four lines promised there. The argument that truth tables rejected is derivable once the rules can see inside its sentences. - (b) Idea.
The premise has two quantifiers, and
removes one at a time, the outermost first: the main symbol of the premise is , and only after it is gone is the main symbol. The goal shows the term for both.12 13 2Line 2 is
: the quantifier is on a variable other than , so the substitution passes through it (Definition 5.2.5). Line 3 instantiates at as well. Nothing forbids putting the same term in for two different variables; “for all and ” includes the case . - (c) Idea.
Work backwards from the goal
. The only line that can produce it is the first premise, through an instance of its inside, , followed by . Which instance has conclusion ? Matching with gives and . Then the hypothesis of that instance is , which is the second premise. So the terms are read off the goal: for first (the outer quantifier), then for .123 14 35 4, 2A reader who matches the goal
against the hypothesis instead of the conclusion puts for and for , and gets . That is a legal line, but its hypothesis is the goal itself, so cannot fire. Match the goal against the conclusion of the implication, since that is the part delivers. - (d) Idea,
forwards. The premise
is the hypothesis of the instance of the first premise at , so instantiating at and firing gives . Now is the hypothesis of the instance at , so the same premise, instantiated again, fires again and gives , the goal.
Idea, backwards. The goal
Line 5 cites line 1 again: a universal line can be
instantiated as often as needed. Its term
An arithmetic reading: over
In each derivation, the Idea chose the term of every
5.3.4. Checking a line of instantiation
Choosing the term can take thought; checking a line
never does. For a line justified “
- Is line
available here (Definition 1.4.2)? - Is the main symbol of line
a universal quantifier? If so, read off its variable and its scope . - Is this line
for some term ? Find by comparing the two lines at a free occurrence of in ; then check that every free occurrence of became that same , and that nothing else changed. - Is
free for in ?
Run on line 5 of (d): line 1 is available, since no
box contains it; its main symbol is
5.3.5. How this rule looks in a mathematical proof
Let
Since
for every real , applying this to gives , that is, .
The first half of the sentence is one
| Line | Sentence |
|---|---|
| 1 | “Since |
| 2 | “… applying this to |
| 3 | “… that is, |
A line justified “arith” records a fact of school
arithmetic or algebra, used on the lines it cites; here
the fact is that
Second readingWhat an arith line stands for
Written out in full, an arith line is a universally
quantified arithmetic statement, here
Section 5.4 will turn this three-line derivation into
a proof of
5.3.6. Common errors
Three mistakes are worth seeing written out, each with a reading in which the premise is true and the offending line false.
Capture. The premise
Line 2 says that some number differs from itself,
which is false. The step breaks the side condition: the
free occurrence of
Warning.
A buried quantifier. From the line
Replacing only some occurrences.
Over
Each error has a reading, a small one, in which the premise is true and the faulty line false.
Three tiny worlds. In each, the premise is true
and the faulty line false. Capture:
Quick check. Which numbered clause
of
Solution. Capture breaks clause 4
(
5.3.7. A stall
Try the sequent
So with
Counter-readings. Each error above was shown wrong by a reading, a domain with a meaning for every symbol and a value for each free variable, in which the premises are true and the line is false. Call such a reading a counter-reading: it makes the whole counterexample set of the claim (Section 1.1), its premises and the negation of its line, true at once. A counter-reading shows that a step is unsafe. It is also how this book shows that a sequent has no derivation at all: a search that stalls proves nothing, since a cleverer derivation might exist. Sections 7.1 and 7.2 make readings exact and state that a counter-reading rules out every derivation. Until then, when this chapter says that something does not follow, it gives a counter-reading, and it never treats a stalled search as a proof.
5.3.8. The rule card
| the instance |
||
|---|---|---|
In each row every free
Not an instance. From
Quick check. Line 1 is
Solution. No, clause 3: every free
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) |
Written mathematics has many forms of the phrase: “in
particular, for h is the universal
statement and t the term; applying
h to t gives the instance,
just as applying an implication to a proof of its
hypothesis gave its conclusion in Section 1.3. In Lean a
universal statement behaves like a function that takes a
term and returns a proof of the instance.
Warning (Not allowed:
- From
, write : clause 1 (the main symbol is ; the governs only ). - From
, write : clause 3 (one term in every free occurrence). - From
, write : clause 4 (the term is captured). - From
, write at once: clause 3 (the new line is the whole scope with put in; the main symbol is , so clause 1 holds). The formula is , so gives , and needs .
5.3.9. The search method: one more step
The search method of Section 3.1 had a goal-directed step and a premise-directed step for each connective. Instantiation adds a premise-directed step.
- A resource
. Do not instantiate blindly. Instantiate at the term that the goal, or another resource, asks for: match the shape of the goal (or of a hypothesis still needed) against , and read off the term. If the term is not free for in , rename the bound variables of first.
In the Givens/Goal table,
Instantiating is always safe, in the sense of Section 3.1: the new line is added and nothing is lost, since the universal line stays available. What can go wrong is only that the derivation fills with instances nobody needs, as a forward search filled with useless lines in Section 1.3.
5.3.10. Exercises
A. Check your understanding
(a) Write the schema of
and its side condition from memory.(b) For each pair, decide whether line 2 follows from line 1 by one application of
. If not, name the clause of Definition 5.3.1 that fails.- (i) Line 1:
; line 2: .
- (i) Line 1:
- (ii) Line 1:
; line 2: .
- (ii) Line 1:
- (iii) Line 1:
; line 2: .
- (iii) Line 1:
- (iv) Line 1:
; line 2: .
- (iv) Line 1:
(c) True or false, with a reason: from
, one application of gives .(d) Why does
not need a line saying that the term names an element of the domain?
Solution.
(a) From line
: , line may be , justified “ ”, for any term that is free for in , with line available at line .- (b)
- (i) Not legal: the
term
is not free for in , since the free lies in the scope of (clause 4, capture). Over , line 1 is true and line 2 is false.
- (i) Not legal: the
term
(ii) Not legal: only the first
was replaced, so line 2 is not for any (clause 3). The instance at is . Line 2 still has free, and over it is false when names .(iii) Not legal: the main symbol of line 1 is
, not (clause 1); the governs only . Over with read as , as , and as : line 1 says “if every natural number is at least , then ”, true because its hypothesis is false; line 2 says “if , then ”, which is false.(iv) Legal: it is
with , both occurrences of replaced by , and has no variables, so it is free for (clause 2: any term, compound ones included).(v) False. The main symbol is
, so one application removes and gives for some term . The line would need the inner quantifier removed while the outer one stays, and the rule cannot reach inside the outer quantifier. (The sequent is derivable, but it needs the rule of Section 5.4.)(vi) Every term names an element of the domain: once the symbols are interpreted, a constant names one, and a compound term names the value of a function at elements. And the domain is never empty (Section 5.1). So “every element satisfies
” applies to whatever names, with nothing further to check. (Bounded quantifiers are different: to use at one also needs , and Section 6.1 builds that into a rule.)
Each part takes a line or two. The parts run from single steps, through a missing premise, a justification column and a judgement on one step, to whole derivations.
- (a) Line 1 is
. Write its instance at . - (b) Line 1 is
. What is its instance at ? - (c) Line 1 is
. What does one at give? - (d) Line 4 is
, justified “ 1”. Give two different formulas that line 1 can be. - (e) Justify each
line after the premises: 1
, premise; 2 , premise; 3 ; 4 ; 5 . - (f) Line 1 is
. May cite it? If not, which clause does it break? - (g) Line 1 is
. Is an instance? If not, which clause does it break? - (h) Line 1 is
. Is at the term legal? If not, which clause does it break? - (i) Same line: is
at legal, and what does it give? - (j) Derive
. - (k) Derive
. - (l) Derive
.
Solution.
(a)
.(b)
.(c)
: the outer quantifier only.(d) Any two of
(at ), (at ), (at ), (at ); also the degenerate , with no free .(e) 3
1 (at ); 4 3, 2; 5 4, 2.(f) No, clause 1: its main connective is
; first gives .(g) No, clause 3: every free
gets the same term, so the instances are .(h) No, clause 4:
would be captured by . Rename first, and get .(i) Yes:
. The only quantifier inside is on , which is not in , so clause 4 holds.(j) 2
, 1; 3 , 2.(k) 3
, 1; 4 , 2; 5 , 3, 4.(l) 2
, 1; 3 , 2; 4 , 1; 5 , 4; 6 , 3, 5.
B. Practice
Give a derivation of
Solution. The goal
Read
Solution. The goal is a
conjunction, so its last line is
The premise is instantiated twice, along two
different paths: once at
Let
Solution. The goal is a conjunction
of two instances of the premise, at the compound terms
Lines 1–4 are the first derivation. For the second
goal only line 3 is needed:
A search for
Solution. The move is
instantiate at the term you need: the goal
names
For each claim, either derive it with the rules of
Chapters 1–2 and
- (a)
. - (b)
. - (c)
. - (d)
. - (e)
. - (f)
. - (g)
. - (h)
.
Solution.
- (a) Derive.
Instantiate at
, then take the disjunction apart by cases.123 14 asm, for5 4, 26 57 asm, for8 3, 4–6, 7–7 (b) Break. The domain
, naming , true of nothing, true of . The first premise holds (its hypothesis is false at ), holds, and fails. (The form affirms the consequent of an instance.)(c) Derive. Two instances of the one premise, at
and at .12 13 14 2, 3(d) Break. The domain
, naming , and , true of the pairs and only. The premise holds: is , and is . The conclusion is , which is false.(e) Break. The domain
, naming , exchanging and , true of only. The first premise holds: at , holds and does not; at , the hypothesis is false. holds, and is , which is false.(f) Derive. The instance at
gives the right conjunct at once; the instance at refutes inside a box.123 14 3, 25 16 asm, for7 5, 68 2, 79 6–810 9, 4(g) Break. The domain
, true of and only (“differs from”). Every element has a partner, and no element is its own.(h) Derive, in one step: the only quantifier inside is on
, and contains no .
- (e) and (f) are
look-alikes: the premise about
is used at the wrong term in (e), at the right one in (f). (g) is the capture look-alike of (h): instantiating at the bound letter would write . (b) is the converse look-alike of the square-root step of Example (Instantiation at work) (a). Each break is a counter-reading of the kind in the figure of “Common errors”.
Marking scheme. (10 points) - 1 for
each of the eight verdicts with its derivation or
counter-reading. A counter-reading must give the domain,
every symbol’s meaning and the value of
C. Going deeper
A relation
Solution (Hint 1). The goal
Solution (Hint 2). The match gives
Solution. The search. The
goal
The terms. Lines 7 and 9 put
The hypothesis “related to something” is needed. In a
symmetric and transitive relation an element related to
nothing need not be related to itself: on
Marking scheme. (10 points) - 2:
identifies transitivity as the source of the goal and
instantiates it with
- (a) Show that
, by a derivation whose one line you check against every clause of Definition 5.3.1. - (b) The reverse
step, from a line
to , is an instance of no rule so far. Show that it must not be allowed without restriction: give a reading over , with naming one particular integer, in which is true and is false.
Solution.
- (a)
12
1Clause 1: the main symbol of line 1 is
, with scope . Clause 2: the term is the variable itself, and any term is allowed. Clause 3: , so every free occurrence was replaced, by . Clause 4: is free for in every formula (Section 5.2: a free occurrence of never lies in the scope of a quantifier on ). Clause 5: line 1 is a premise and lies in no box, so it is available at line 2. So line 2 is legal. Its is now free: line 2 says “ holds of whatever names”, which is true whatever names, since line 1 says that holds of everything. - (b) Read
as “ is even” and let name . Then is true, and , “every integer is even”, is false, since is odd. A rule allowing the step from to in general would lead from a true line to a false one.
Marking scheme. (10 points) - 6: (a)
the derivation, with each of the five numbered clauses
checked (main symbol