5.3  Using “For Every”: Instantiation

Section 5.2 made the language exact and defined the operation φ[t/x], “put the term t in for the variable x”, with its one hazard, capture. We can now give the first quantifier rule. It is the rule for using a universal statement: whatever holds for every object holds for the object named by any term we care to write. The rule is called ∀E. It is the rule behind every “by the theorem, applied to x=2”. With it alone, universal statements can be used but not proved, and the section meets exactly that gap (“A stall” below), which Section 5.4 fills.

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 2 and by 3, then it is divisible by 6” at n=42, taking the step from “every integer” to the one integer 42 on trust.
  • In Example (A number below every positive number) (Section 2.5) the hypothesis was “x≤ε for every ε>0”, and the proof applied it to the one number ε=x/2.
  • Section 5.1 opened with the argument “every positive real has a square root; 2 is positive; so 2 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 ∀x(P(x)→S(x)), and applying it to 2 gives (P(x)→S(x))[2/x] = P(2)→S(2), which is part (a) of Example (Four substitutions). From there →E finishes. All that is missing is a rule that licenses the first step.

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.

Definition 5.3.1 (Universal Elimination)
i∀xφ
kφ[t/x]∀E i

Here φ is a formula, x a variable, and t any term, subject to one side condition: t is free for x in φ (Definition 5.2.6). Line i must be available at line k (the scope rule of Definition 1.4.2). This rule is called ∀E (universal elimination, or instantiation), and φ[t/x] is an instance of ∀xφ.

In words: if a line says that φ holds for every x, then any later line, where that line is still available, may write what φ says about t. The rule cites one line and no box.

  • Schema: the block above: one cited line, no box.
  • Reading: drop the ∀x, put one term in for every free x, and check that no letter of the term gets caught by a quantifier inside.
  • Example: from ∀x(P(x)→S(x)), “∀E 1” at the term 2 writes P(2)→S(2).

Read the definition clause by clause; exercises cite the clauses by number.

  1. The cited line’s main symbol is ∀x, with all of φ as its scope: ∀xP(x)→Q(c) is an implication; a ∀ buried inside another connective must first be taken out by that connective’s rule, when it can be (∧E takes ∀xP(x) out of ∀xP(x)∧Q(c)), and a ∀ in the hypothesis of an implication cannot be instantiated at all.
  2. Any term: a constant, a variable (x itself included) or a compound term. Nothing about it needs to be established first, since every term names an object of the domain.
  3. Every free occurrence, by the same term: the new line is φ[t/x]; we do not choose which occurrences change.
  4. Free for x (Definition 5.2.6): no letter of t is caught by a quantifier of φ. This is the rule’s only restriction.
  5. Line i is available (the scope rule of Definition 1.4.2), as for every rule.

When the universal statement has a bound, ∀x∈Aφ, using it at t also needs the line t∈A.

Quick check. Line 1 is ∀x(x+0=x). Which of 3+0=3, y+0=y, 3+0=x may line 2 be, by ∀E?

Solution. The first two, at the terms 3 and y; y is free for x, since the formula has no quantifier. The third is not an instance: φ[t/x] puts the same term in for every free x, and 3+0=x replaced one x and left the other.

Second readingA quantifier that binds nothing

If x is not free in φ, then φ[t/x]=φ for every term t (the claim proved in Section 5.2), and ∀E simply removes a quantifier that bound nothing: from ∀xP(c) it writes P(c). Legal, and dull.

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 φ, then so does the object that t names, whichever object that is. A term always names something, since the domain is never empty (Section 5.1), so the instance always has something to be about.

Why “free for”. The instance must say about t what φ says about x. Section 5.2 showed that when a variable of t is captured, φ[t/x] can say something quite different. The condition rules capture out, and the subsection on common errors below shows the rule going wrong without it.

Quick check. Line 1 of a derivation is ∀x∃z(z>x+y). For which terms t may ∀E write (∃z(z>x+y))[t/x] on line 2? Is t=y allowed? Is t=z+1?

Solution. The only free occurrence of x in ∃z(z>x+y) lies in the scope of ∃z, and that is the only quantifier above it. So t is free for x exactly when z is not a variable of t: any term not containing z is allowed. The term y is allowed, and gives ∃z(z>y+y); the variable y already occurs free in the line, and that does no harm. The term z+1 is not allowed: it would give ∃z(z>z+1+y), where the z of the term has been captured. Nor is z itself. To instantiate at z, rename the bound z first (Section 5.2), say to w: from ∀x∃w(w>x+y), ∀E at z gives ∃w(w>z+y).

A long “and”, taken apart. In world W of Section 5.1, ∀xφ says φ[a/x]∧φ[b/x]∧φ[c/x]∧φ[d/x], and ∀E at b does what ∧E does: it takes out one conjunct. Over N the conjunction cannot be written; ∀E takes out any conjunct, at any term, without writing the rest.

5.3.3. Four derivations

The worked derivations below use ∀E and the rules of Chapter 1. Each has an Idea that says why each rule was chosen, continuing the search method of Section 3.1: a goal-directed step looks at the goal’s main symbol, a premise-directed step at a resource’s. The new question is the one that ∀E raises every time: at which term?

Example (Instantiation at work)

Give a derivation of each sequent.

  • (a) ∀x(P(x)→Q(x)), P(c)⊢Q(c).
  • (b) ∀x∀yR(x,y)⊢R(c,c).
  • (c) ∀x∀y(R(x,y)→R(y,x)), R(a,b)⊢R(b,a).
  • (d) ∀x(P(x)→P(f(x))), P(c)⊢P(f(f(c))).

Solution.

  • (a) Idea. The goal Q(c) has no connective or quantifier, so no introduction rule produces it, and the search turns to the premises. The premise P(c) cannot be taken apart. The premise ∀x(…) begins with ∀, so it can be used only by ∀E. At which term? The goal mentions the term c, so instantiate at c. That gives an implication whose hypothesis is a premise and whose conclusion is the goal.
    1∀x(P(x)→Q(x))
    2P(c)
    3P(c)→Q(c)∀E 1
    4Q(c)→E 3, 2

    Line 3 is (P(x)→Q(x))[c/x]; the constant c has no variables, so it is free for x. Read c as 2, P(x) as “x is positive”, and Q(x) as “x has a square root” (Section 5.1 wrote S 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 ∀E removes one at a time, the outermost first: the main symbol of the premise is ∀x, and only after it is gone is ∀y the main symbol. The goal R(c,c) shows the term for both.
    1∀x∀yR(x,y)
    2∀yR(c,y)∀E 1
    3R(c,c)∀E 2

    Line 2 is (∀yR(x,y))[c/x]: the quantifier ∀y is on a variable other than x, so the substitution passes through it (Definition 5.2.5). Line 3 instantiates y at c as well. Nothing forbids putting the same term in for two different variables; “for all x and y” includes the case x=y.

  • (c) Idea. Work backwards from the goal R(b,a). The only line that can produce it is the first premise, through an instance of its inside, R(x,y)→R(y,x), followed by →E. Which instance has conclusion R(b,a)? Matching R(y,x) with R(b,a) gives y:=b and x:=a. Then the hypothesis of that instance is R(a,b), which is the second premise. So the terms are read off the goal: a for x first (the outer quantifier), then b for y.
    1∀x∀y(R(x,y)→R(y,x))
    2R(a,b)
    3∀y(R(a,y)→R(y,a))∀E 1
    4R(a,b)→R(b,a)∀E 3
    5R(b,a)→E 4, 2

    A reader who matches the goal R(b,a) against the hypothesis R(x,y) instead of the conclusion R(y,x) puts b for x and a for y, and gets R(b,a)→R(a,b). That is a legal line, but its hypothesis is the goal itself, so →E cannot fire. Match the goal against the conclusion of the implication, since that is the part →E delivers.

  • (d) Idea, forwards. The premise P(c) is the hypothesis of the instance of the first premise at c, so instantiating at c and firing gives P(f(c)). Now P(f(c)) is the hypothesis of the instance at f(c), so the same premise, instantiated again, fires again and gives P(f(f(c))), the goal.

Idea, backwards. The goal P(f(f(c))) has the shape P(f(x)), the conclusion of the inside of the first premise, with x:=f(c). So the last ∀E must be at the compound term f(c), and its hypothesis P(f(c)) becomes the new goal. That has the shape P(f(x)) with x:=c, and its hypothesis is the premise P(c).

1∀x(P(x)→P(f(x)))
2P(c)
3P(c)→P(f(c))∀E 1
4P(f(c))→E 3, 2
5P(f(c))→P(f(f(c)))∀E 1
6P(f(f(c)))→E 5, 4

Line 5 cites line 1 again: a universal line can be instantiated as often as needed. Its term f(c) contains no variable, so it is free for x, and (P(x)→P(f(x)))[f(c)/x] is P(f(c))→P(f(f(c))): every x is replaced by the whole term f(c), including the one inside f(x).

An arithmetic reading: over N, let f(n) be n+2, let P(n) say “n is even”, and let c be 0. The first premise says that adding 2 to an even number gives an even number, the second that 0 is even, and the derivation concludes that f(f(0))=4 is even. Each further step up the even numbers would cost two more lines. Reaching “every n of the form f(⋯f(0)⋯)” at once is a job for induction, not for this rule.

In each derivation, the Idea chose the term of every ∀E by matching: the goal, or a hypothesis still needed, has a definite shape, and the instance is chosen to have that shape. Instantiating at a term that nothing asks for is legal, and it fills a derivation with lines that lead nowhere.

5.3.4. Checking a line of instantiation

Choosing the term can take thought; checking a line never does. For a line justified “∀E i”, ask four questions.

  1. Is line i available here (Definition 1.4.2)?
  2. Is the main symbol of line i a universal quantifier? If so, read off its variable x and its scope φ.
  3. Is this line φ[t/x] for some term t? Find t by comparing the two lines at a free occurrence of x in φ; then check that every free occurrence of x became that same t, and that nothing else changed.
  4. Is t free for x in φ?

Run on line 5 of (d): line 1 is available, since no box contains it; its main symbol is ∀x, with scope P(x)→P(f(x)); comparing gives t=f(c), and both occurrences of x became f(c); and f(c) has no variables, so it is free for x. The line passes.

5.3.5. How this rule looks in a mathematical proof

Let a be a real number. A proof might say:

Since y2≥0 for every real y, applying this to a−1 gives (a−1)2≥0, that is, a2−2a+1≥0.

The first half of the sentence is one ∀E, at the compound term a−1. The second half rewrites (a−1)2 by school algebra. In a derivation such a step is written as one line justified “arith”, for arithmetic:

1∀y(y2≥0)
2(a−1)2≥0∀E 1
3a2−2⋅a+1≥0arith 2
Line Sentence
1 “Since y2≥0 for every real y, …” (the general fact)
2 “… applying this to a−1 gives (a−1)2≥0, …” (∀E at a−1)
3 “… that is, a2−2a+1≥0.” (arith)

A line justified “arith” records a fact of school arithmetic or algebra, used on the lines it cites; here the fact is that (u−1)2 and u2−2u+1 are the same number for every real u. It is not a new rule, and the facts of school algebra are used as facts.

Second readingWhat an arith line stands for

Written out in full, an arith line is a universally quantified arithmetic statement, here ∀u((u−1)2≥0→u2−2⋅u+1≥0), taken as one more premise, instantiated by ∀E at the term on the line (here a) and applied by →E to the cited line. That is exactly the pattern of (a) above. The book writes it as one line because spelling it out every time would bury the logic under algebra; its bound variables are letters that appear nowhere else in the derivation, and that keeps every term free for them.

Section 5.4 will turn this three-line derivation into a proof of x2−2x+1≥0 for every real x. That needs a rule this section does not have.

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 ∀x∃y(y≠x) says, over N, that for every number there is a different one; it is true, since x+1≠x. Instantiating “at y” without looking writes this:

1∀x∃y(y≠x)
2∃y(y≠y)∀E 1

Line 2 says that some number differs from itself, which is false. The step breaks the side condition: the free occurrence of x in ∃y(y≠x) lies in the scope of ∃y, and y is a variable of the term y, so y is not free for x. This is the capture example of Section 5.2, now inside a derivation. The repair is to rename first: ∀x∃z(z≠x) is the same premise up to renaming, and ∀E at y gives ∃z(z≠y), “some number differs from y”, which is what was meant.

Warning. ∀E at a term that is not free for x can turn a true premise into a false line, and the definition of φ[t/x] gives no signal: it returns a formula either way. Over N, from the true ∀x∃y(y≠x), the “instance at y” is ∃y(y≠y), which is false. Before instantiating at a term with variables, look for quantifiers on those variables inside φ.

A buried quantifier. From the line ∀xP(x)→Q(c) one may not write P(c)→Q(c). The main symbol of the line is →, and the ∀x governs only the hypothesis ∀xP(x). The line says “if every x has P, then Q(c)”; the false step reads it as “if c has P, then Q(c)”, which is far stronger. Over N, read P(x) as x≥1, Q(x) as x=0, and c as 1. The line is true, because its hypothesis “every natural number is at least 1” is false (0 is not). The false step’s result, “if 1≥1, then 1=0”, is false.

Replacing only some occurrences. Over R, ∀x(x≤x2∨x<1) is true: a real x≥1 has x2=x⋅x≥x, and every other real has x<1. Writing 2≤x2∨x<1 from it replaces the first x and leaves the others. That is not φ[2/x], which is 2≤22∨2<1: the substitution replaces every free occurrence. The half-replaced line still has x free, and when x names 1 it reads 2≤1∨1<1, which is false.

Each error has a reading, a small one, in which the premise is true and the faulty line false.

Diagram. Labels: small differ, textit Capture, textit A buried quantifier, textit Some occurrences only

Three tiny worlds. In each, the premise is true and the faulty line false. Capture: ∀x∃y(y≠x) is true, since each dot has the other; line 2, ∃y(y≠y), is false, since no dot differs from itself. A buried quantifier: ∀xP(x)→Q(c) is true, since ∀xP(x) fails at 0; P(c)→Q(c) is false, since 1 has P and not Q. Some occurrences only: ∀x(P(x)∨¬P(x)) is true, since at each dot one side holds; the half-replaced P(c)∨¬P(x), which put c in for the first x only, is false, since a lacks P and x names b, which has it. The instance P(c)∨¬P(c) is true, as every instance must be.

Quick check. Which numbered clause of ∀E does each faulty step of the figure break?

Solution. Capture breaks clause 4 (y is not free for x); the buried quantifier breaks clause 1 (the main symbol is →); replacing some occurrences only breaks clause 3 (the line is not φ[c/x]).

5.3.7. A stall

Try the sequent ∀x(P(x)∧Q(x))⊢∀xP(x). It is plainly correct: if every x has both properties, then every x has the first. Search for a derivation. The goal begins with ∀, and no rule so far is made for proving a ∀. Apart from ⊥E (Definition 2.1.1) and RAA (Definition 2.5.1), which reach a line only by way of a contradiction, a line beginning with ∀ can only be taken out of a line or box that already contains it. So the goal-directed step has nothing to offer, and we turn to the premise. ∀E at c gives P(c)∧Q(c), and ∧E gives P(c). The same works at d, at f(c), at any term we name. But each line is an instance. No finite list of instances is the statement ∀xP(x), which speaks about every object at once, including all the objects that none of our terms happen to name.

So with ∀E alone, a universal statement can be used but not proved. Leaving aside a detour through a contradiction, a derivation can write ∀xψ only by taking it out of a line or box that already contains it, as line 2 of (b) took ∀yR(c,y) out of the premise. Section 1.3 was in the same position with implications, and Section 1.4 filled the gap with a box. Section 5.4 does the same for ∀: it proves P of one name about which nothing is known, and that box finishes this derivation in four lines.

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

Example (Instances of ∀E)
φ t the instance φ[t/x]
P(x)→Q(f(x)) f(f(c)) P(f(f(c)))→Q(f(f(f(c))))
∃δ(δ>0∧∀y(|y−x|<δ→|g(y)−g(x)|<1)) a+1 ∃δ(δ>0∧∀y(|y−(a+1)|<δ→|g(y)−g(a+1)|<1))
x2≥0 ε/2 (ε/2)2≥0

In each row every free x gets the same term, and no letter of the term is caught (in the second row the quantifiers are on δ and y, and a+1 contains neither).

Not an instance. From ∀x∃y(x<y) at the term y+1, the line ∃y(y+1<y) is not written by ∀E: the y of y+1 is caught by ∃y (clause 4). Rename first; the instance is ∃z(y+1<z), which says what was meant.

Quick check. Line 1 is ∀x(x<f(x)∨f(x)=x⋅x). Is 2<f(2)∨f(x)=x⋅x an instance of it? Which clause decides?

Solution. No, clause 3: every free x gets the same term, so the instance at 2 is 2<f(2)∨f(2)=2⋅2.

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
∀E ∀xφ ⟹ φ[t/x] t free for x in φ “In particular, for x=t, …”; “applying the hypothesis to t, …” h t (or specialize h t)

Written mathematics has many forms of the phrase: “in particular, for x=3, …”; “applying the hypothesis to x0−1, …”; “by the theorem with ε/2 in place of ε, …”. In the Lean column, 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: ∀E). Each step below is wrong; the tag names the numbered clause of Definition 5.3.1 that it breaks.

  • From ∀x(x>0)→Q(c), write 2>0→Q(c): clause 1 (the main symbol is →; the ∀ governs only x>0).
  • From ∀xR(x,f(x)), write R(c,f(d)): clause 3 (one term in every free occurrence).
  • From ∀x∃z(z≠x), write ∃z(z≠z): clause 4 (the term z is captured).
  • From ∀x∈Aφ, write φ[t/x] at once: clause 3 (the new line is the whole scope with t put in; the main symbol is ∀x, so clause 1 holds). The formula is ∀x(x∈A→φ), so ∀E gives t∈A→φ[t/x], and →E needs t∈A.

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 ∀xφ. 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 x in φ, rename the bound variables of φ first.

In the Givens/Goal table, ∀E adds an instance φ[t/x] to the Givens, with t read off the goal.

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

Exercise (A1)
  • (a) Write the schema of ∀E and its side condition from memory.

  • (b) For each pair, decide whether line 2 follows from line 1 by one application of ∀E. If not, name the clause of Definition 5.3.1 that fails.

      • (i) Line 1: ∀x∃y(y>x); line 2: ∃y(y>y).
      • (ii) Line 1: ∀x(x⋅x≥0); line 2: 3⋅x≥0.
      • (iii) Line 1: ∀xP(x)→P(c); line 2: P(a)→P(c).
      • (iv) Line 1: ∀x(P(x)→P(f(x))); line 2: P(f(c))→P(f(f(c))).
  • (c) True or false, with a reason: from ∀x∀yR(x,y), one application of ∀E gives ∀xR(x,c).

  • (d) Why does ∀E not need a line saying that the term t names an element of the domain?

Solution.

  • (a) From line i: ∀xφ, line k may be φ[t/x], justified “∀E i”, for any term t that is free for x in φ, with line i available at line k.

  • (b)
    • (i) Not legal: the term y is not free for x in ∃y(y>x), since the free x lies in the scope of ∃y (clause 4, capture). Over Z, line 1 is true and line 2 is false.
  • (ii) Not legal: only the first x was replaced, so line 2 is not φ[t/x] for any t (clause 3). The instance at 3 is 3⋅3≥0. Line 2 still has x free, and over R it is false when x names −1.

  • (iii) Not legal: the main symbol of line 1 is →, not ∀ (clause 1); the ∀x governs only P(x). Over N with P(x) read as x≥1, c as 0, and a as 1: line 1 says “if every natural number is at least 1, then 0≥1”, true because its hypothesis is false; line 2 says “if 1≥1, then 0≥1”, which is false.

  • (iv) Legal: it is φ[f(c)/x] with φ=P(x)→P(f(x)), both occurrences of x replaced by f(c), and f(c) has no variables, so it is free for x (clause 2: any term, compound ones included).

  • (v) False. The main symbol is ∀x, so one application removes ∀x and gives ∀yR(t,y) for some term t. The line ∀xR(x,c) would need the inner quantifier removed while the outer one stays, and the rule cannot reach inside the outer quantifier. (The sequent ∀x∀yR(x,y)⊢∀xR(x,c) 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 t names, with nothing further to check. (Bounded quantifiers are different: to use ∀x∈Aφ at t one also needs t∈A, and Section 6.1 builds that into a rule.)

Exercise (A2: Drill)

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 ∀x(x2≥0). Write its instance at a+1.
  • (b) Line 1 is ∀x(P(x)→Q(f(x))). What is its instance at f(c)?
  • (c) Line 1 is ∀x∀y(x+y=y+x). What does one ∀E at 2 give?
  • (d) Line 4 is P(g(c))→Q(c), justified “∀E 1”. Give two different formulas that line 1 can be.
  • (e) Justify each line after the premises: 1 ∀x(P(x)→R(x,f(x))), premise; 2 P(c), premise; 3 P(c)→R(c,f(c)); 4 R(c,f(c)); 5 R(c,f(c))∧P(c).
  • (f) Line 1 is ∀xP(x)∧Q(c). May ∀E cite it? If not, which clause does it break?
  • (g) Line 1 is ∀xR(x,x). Is R(c,d) an instance? If not, which clause does it break?
  • (h) Line 1 is ∀x∃y(y>x). Is ∀E at the term y legal? If not, which clause does it break?
  • (i) Same line: is ∀E at x+1 legal, and what does it give?
  • (j) Derive ∀x(P(x)∧Q(x))⊢Q(a).
  • (k) Derive ∀x(P(x)→Q(x)), ∀xP(x)⊢Q(c).
  • (l) Derive ∀x∀yR(x,y)⊢R(a,b)∧R(b,a).

Solution.

  • (a) (a+1)2≥0.

  • (b) P(f(c))→Q(f(f(c))).

  • (c) ∀y(2+y=y+2): the outer quantifier only.

  • (d) Any two of ∀x(P(g(x))→Q(x)) (at c), ∀x(P(x)→Q(c)) (at g(c)), ∀x(P(g(x))→Q(c)) (at c), ∀x(P(g(c))→Q(x)) (at c); also the degenerate ∀x(P(g(c))→Q(c)), with no free x.

  • (e) 3 ∀E 1 (at c); 4 →E 3, 2; 5 ∧I 4, 2.

  • (f) No, clause 1: its main connective is ∧; ∧E first gives ∀xP(x).

  • (g) No, clause 3: every free x gets the same term, so the instances are R(t,t).

  • (h) No, clause 4: y would be captured by ∃y. Rename first, and get ∃z(z>y).

  • (i) Yes: ∃y(y>x+1). The only quantifier inside is on y, which is not in x+1, so clause 4 holds.

  • (j) 2 P(a)∧Q(a), ∀E 1; 3 Q(a), ∧E 2.

  • (k) 3 P(c)→Q(c), ∀E 1; 4 P(c), ∀E 2; 5 Q(c), →E 3, 4.

  • (l) 2 ∀yR(a,y), ∀E 1; 3 R(a,b), ∀E 2; 4 ∀yR(b,y), ∀E 1; 5 R(b,a), ∀E 4; 6 R(a,b)∧R(b,a), ∧I 3, 5.

B. Practice

Exercise (B1: Two links)

Give a derivation of ∀x(P(x)→Q(x)), ∀x(Q(x)→R(x)), P(a)⊢R(a), and say, for each ∀E line, which line of the search asked for its term.

Solution. The goal R(a) is the conclusion of the instance of the second premise at a, so it suffices to reach Q(a); that is the conclusion of the instance of the first premise at a, so it suffices to reach P(a), a premise. Both terms come from the goal: the second ∀E (line 6) from R(a), the first (line 4) from the subgoal Q(a).

1∀x(P(x)→Q(x))
2∀x(Q(x)→R(x))
3P(a)
4P(a)→Q(a)∀E 1
5Q(a)→E 4, 3
6Q(a)→R(a)∀E 2
7R(a)→E 6, 5
Exercise (B2: An increasing function)

Read f as a function from R to R and a,b,c as real numbers. Give a derivation of ∀x∀y(x≤y→f(x)≤f(y)), a≤b, b≤c ⊢ f(a)≤f(b)∧f(b)≤f(c), and then write the argument as one sentence of prose.

Solution. The goal is a conjunction, so its last line is ∧I, with subgoals f(a)≤f(b) and f(b)≤f(c). Each is the conclusion of an instance of the first premise: matching f(x)≤f(y) with f(a)≤f(b) gives x:=a, y:=b, and with f(b)≤f(c) gives x:=b, y:=c. The hypotheses of the two instances are the other two premises.

1∀x∀y(x≤y→f(x)≤f(y))
2a≤b
3b≤c
4∀y(a≤y→f(a)≤f(y))∀E 1
5a≤b→f(a)≤f(b)∀E 4
6f(a)≤f(b)→E 5, 2
7∀y(b≤y→f(b)≤f(y))∀E 1
8b≤c→f(b)≤f(c)∀E 7
9f(b)≤f(c)→E 8, 3
10f(a)≤f(b)∧f(b)≤f(c)∧I 6, 9

The premise is instantiated twice, along two different paths: once at a and b, once at b and c. In prose: Since f is increasing and a≤b, we have f(a)≤f(b), and likewise b≤c gives f(b)≤f(c). The word “increasing” carries the first premise, and the two applications of it are the two pairs of ∀E lines.

Exercise (B3: Squares are not negative)

Let a and b be real numbers. Give a derivation of ∀x(x2≥0)⊢(a+b)2≥0∧(a−b)2≥0. Then extend it by one line justified “arith” to a derivation of a2+b2≥2ab from the same premise, and say which earlier line the arith line uses.

Solution. The goal is a conjunction of two instances of the premise, at the compound terms a+b and a−b. Both terms are free for x in x2≥0, which has no quantifier.

1∀x(x2≥0)
2(a+b)2≥0∀E 1
3(a−b)2≥0∀E 1
4(a+b)2≥0∧(a−b)2≥0∧I 2, 3
5a2+b2≥2⋅a⋅barith 3

Lines 1–4 are the first derivation. For the second goal only line 3 is needed: (a−b)2=a2−2ab+b2, so (a−b)2≥0 says a2−2ab+b2≥0, and adding 2ab to both sides gives a2+b2≥2ab. That algebra is the arith line 5. (Lines 2 and 4 are then unused, which is allowed, and deleting them leaves a three-line derivation of a2+b2≥2ab. Line 2 would give a2+b2≥−2ab in the same way.)

Exercise (B4: Read the terms off the goal)

A search for ∀x(P(x)→Q(x)), ∀x(Q(x)→R(x)), ∀xP(x)⊢R(c)∧Q(c) has reached the stage below. Name the move, then complete it.

1∀x(P(x)→Q(x))
2∀x(Q(x)→R(x))
3∀xP(x)
⋮
9R(c)∧Q(c)?

Solution. The move is instantiate at the term you need: the goal names c, so every ∀E is at c. ∧I splits the goal into R(c) and Q(c), and each is the end of a chain of →E.

1∀x(P(x)→Q(x))
2∀x(Q(x)→R(x))
3∀xP(x)
4P(c)∀E 3
5P(c)→Q(c)∀E 1
6Q(c)→E 5, 4
7Q(c)→R(c)∀E 2
8R(c)→E 7, 6
9R(c)∧Q(c)∧I 8, 6
Exercise (B5: Derive or break)

For each claim, either derive it with the rules of Chapters 1–2 and ∀E, or break it with a counter-reading: a domain, a meaning for each symbol, and a value for each constant, that make its counterexample set true. Then pair each of the breaks (e) and (g) with the derivable claim in the list that it imitates, and say what separates them.

  • (a) ∀x(P(x)∨Q(x)), ¬P(c)⊢Q(c).
  • (b) ∀x(P(x)→Q(x)), Q(c)⊢P(c).
  • (c) ∀xR(x,f(x))⊢R(c,f(c))∧R(f(c),f(f(c))).
  • (d) ∀xR(x,f(x))⊢R(f(c),c).
  • (e) ∀x(P(x)→¬P(f(x))), P(c)⊢¬P(f(f(c))).
  • (f) ∀x(P(x)→¬P(f(x))), P(f(c))⊢¬P(c)∧¬P(f(f(c))).
  • (g) ∀x∃yR(x,y)⊢∃yR(y,y).
  • (h) ∀x∃yR(x,y)⊢∃yR(c,y).

Solution.

  • (a) Derive. Instantiate at c, then take the disjunction apart by cases.
    1∀x(P(x)∨Q(x))
    2¬P(c)
    3P(c)∨Q(c)∀E 1
    4P(c)asm, for ∨E
    5⊥¬E 4, 2
    6Q(c)⊥E 5
    7Q(c)asm, for ∨E
    8Q(c)∨E 3, 4–6, 7–7
  • (b) Break. The domain {0}, c naming 0, P true of nothing, Q true of 0. The first premise holds (its hypothesis is false at 0), Q(c) holds, and P(c) fails. (The form affirms the consequent of an instance.)

  • (c) Derive. Two instances of the one premise, at c and at f(c).

    1∀xR(x,f(x))
    2R(c,f(c))∀E 1
    3R(f(c),f(f(c)))∀E 1
    4R(c,f(c))∧R(f(c),f(f(c)))∧I 2, 3
  • (d) Break. The domain {0,1}, c naming 0, f(0)=1 and f(1)=1, R true of the pairs (0,1) and (1,1) only. The premise holds: R(0,f(0)) is R(0,1), and R(1,f(1)) is R(1,1). The conclusion R(f(c),c) is R(1,0), which is false.

  • (e) Break. The domain {0,1}, c naming 0, f exchanging 0 and 1, P true of 0 only. The first premise holds: at 0, P(0) holds and P(1) does not; at 1, the hypothesis P(1) is false. P(c) holds, and ¬P(f(f(c))) is ¬P(0), which is false.

  • (f) Derive. The instance at f(c) gives the right conjunct at once; the instance at c refutes P(c) inside a ¬I box.

    1∀x(P(x)→¬P(f(x)))
    2P(f(c))
    3P(f(c))→¬P(f(f(c)))∀E 1
    4¬P(f(f(c)))→E 3, 2
    5P(c)→¬P(f(c))∀E 1
    6P(c)asm, for ¬I
    7¬P(f(c))→E 5, 6
    8⊥¬E 2, 7
    9¬P(c)¬I 6–8
    10¬P(c)∧¬P(f(f(c)))∧I 9, 4
  • (g) Break. The domain {0,1}, R true of (0,1) and (1,0) 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 y, and c contains no y.

1∀x∃yR(x,y)
2∃yR(c,y)∀E 1
  • (e) and (f) are look-alikes: the premise about f 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 y would write ∃yR(y,y). (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, and check each premise and the conclusion. - 2: the closing pairing, (e) with (f) and (g) with (h), with the reason. Fatal errors (0 for the claim): a “break” by a reading in which a premise is false; a ∀E at a term that is not free for its variable.

C. Going deeper

Exercise (C1: A partner makes a loop)

A relation R is symmetric if R(x,y) gives R(y,x), and transitive if R(x,y) and R(y,z) give R(x,z). Show that in a symmetric and transitive relation, every element that is related to something is related to itself, by giving a derivation of ∀x∀y(R(x,y)→R(y,x)),∀x∀y∀z((R(x,y)∧R(y,z))→R(x,z)), R(a,b) ⊢ R(a,a). Explain how each term of each ∀E was chosen.

Solution (Hint 1). The goal R(a,a) can only come from the transitivity premise. Match its conclusion R(x,z) with the goal.

Solution (Hint 2). The match gives x:=a and z:=a, and leaves y open. Which y makes the hypothesis R(a,y)∧R(y,a) reachable from the premises?

Solution. The search. The goal R(a,a) is atomic, so it must be the conclusion of an instance of a premise. Symmetry ends in R(y,x), and its instance at a,a is R(a,a)→R(a,a), whose hypothesis is the goal itself: a dead end. Transitivity ends in R(x,z). Matching gives x:=a and z:=a. The variable y does not occur in the conclusion, so the goal says nothing about it; the hypothesis R(a,y)∧R(y,a) must decide. The premise R(a,b) offers R(a,y) with y:=b. Then the second conjunct is R(b,a), which symmetry gives from R(a,b): the instance of the symmetry premise at x:=a, y:=b (read off its needed conclusion R(b,a), as in Example (Instantiation at work) (c)).

1∀x∀y(R(x,y)→R(y,x))
2∀x∀y∀z((R(x,y)∧R(y,z))→R(x,z))
3R(a,b)
4∀y(R(a,y)→R(y,a))∀E 1
5R(a,b)→R(b,a)∀E 4
6R(b,a)→E 5, 3
7∀y∀z((R(a,y)∧R(y,z))→R(a,z))∀E 2
8∀z((R(a,b)∧R(b,z))→R(a,z))∀E 7
9(R(a,b)∧R(b,a))→R(a,a)∀E 8
10R(a,b)∧R(b,a)∧I 3, 6
11R(a,a)→E 9, 10

The terms. Lines 7 and 9 put a in for x and for z: both read off the goal. Line 8 puts b in for y: read off the premise R(a,b), the only available fact of the form R(a,⋅). Lines 4 and 5 put in a and b: read off the needed line R(b,a). All terms are constants, so every one is free for its variable.

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 {0,1}, the relation that holds only between 0 and 0 is symmetric and transitive, and R(1,1) fails. Without a premise like R(a,b) the search has no term for y that makes the hypothesis of line 9 reachable.

Marking scheme. (10 points) - 2: identifies transitivity as the source of the goal and instantiates it with a for x and z. - 2: chooses b for y, with the reason (the premise R(a,b)). - 2: obtains R(b,a) from symmetry at a, b, with →E. - 2: builds the conjunction in the right order and fires the transitivity instance. - 2: every ∀E removes the outermost quantifier of a cited line and replaces every occurrence of its variable. Fatal errors (0 for the step): removing an inner quantifier before an outer one; instantiating transitivity at a term for y for which neither conjunct of the hypothesis is available.

Exercise (C2: Instantiating at the variable itself)
  • (a) Show that ∀xP(x)⊢P(x), by a derivation whose one ∀E line you check against every clause of Definition 5.3.1.
  • (b) The reverse step, from a line P(x) to ∀xP(x), is an instance of no rule so far. Show that it must not be allowed without restriction: give a reading over Z, with x naming one particular integer, in which P(x) is true and ∀xP(x) is false.

Solution.

  • (a)
    1∀xP(x)
    2P(x)∀E 1

    Clause 1: the main symbol of line 1 is ∀x, with scope P(x). Clause 2: the term is the variable x itself, and any term is allowed. Clause 3: P(x)[x/x]=P(x), so every free occurrence was replaced, by x. Clause 4: x is free for x in every formula (Section 5.2: a free occurrence of x never lies in the scope of a quantifier on x). 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 x is now free: line 2 says “P holds of whatever x names”, which is true whatever x names, since line 1 says that P holds of everything.

  • (b) Read P(x) as “x is even” and let x name 2. Then P(x) is true, and ∀xP(x), “every integer is even”, is false, since 1 is odd. A rule allowing the step from P(x) to ∀xP(x) 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 ∀x; any term; every free occurrence by the same term; free for x; availability), including that x is free for x. - 4: (b) a reading with P(x) true and ∀xP(x) false, with the value of x stated. Fatal error (0 for the step): in (b), a reading in which P(x) is false or x has no value.