2.2  Proving a Negation

The rules of Section 2.1 use a negation: ¬E records a clash, and ⊥E turns a clash into any statement we like. Neither rule can prove a negation unless the lines already clash: ⊥E writes one only from a line ⊥. So we still cannot prove that no rational number has square 2, or even that x2+1 is never 0. This section adds the one rule that proves a negation, ¬I, and uses it for one of the oldest proofs in mathematics.

2.2.1. How to prove that something is not so

To show that no rational number has square 2, we cannot inspect the rational numbers one by one: there are infinitely many. A mathematician instead supposes the opposite and shows that it leads to something impossible: “suppose r is rational and r2=2; …; this is a contradiction; hence r2≠2.”

Try the smaller goal x2+1≠0, for a real number x, with the rules so far. The goal is ¬(x2+1=0), and its main connective is ¬. Chapter 1’s goal-directed move asks for the introduction rule of the main connective, and ¬ has none yet. The rules of Section 2.1 do not help: ⊥E could write the goal, but only from a line ⊥, and nothing available clashes. The statement x2+1=0 is not a line of anything; it is the thing we want to rule out.

The mathematician’s sentence shows the missing rule. “Suppose r2=2” opens a box, exactly like the box of →I in Definition 1.4.1, and “this is a contradiction” is its last line, ⊥. The only new thing is what the box gives when it closes.

To prove “not φ”, assume φ and reach a contradiction.

Definition 2.2.1 (Rules for Negation)
iφasm, for ¬I
⋮
j⊥
k¬φ¬I i–j
iφ
j¬φ
k⊥¬E i, j

The left schema is ¬I (not-introduction): the assumption φ is discharged when the box closes, and the line ⊥ is a line of that box itself, not of a box inside it. The right schema is ¬E, recalled from Definition 2.1.1, so that the rule that proves a negation and the rule that uses one stand together.

This rule has conditions that matter; read each one.

  1. Open a box whose first line is the assumption φ. It is the unnegated statement: the thing we want to refute, not the thing we want to prove. Any statement may be assumed. In a finished derivation this assumption is printed “asm, for ¬I”: the annotation names the rule that will close the box, as “asm, for →I” did in Section 1.4.
  2. Inside the box every rule may be used, and every line available just above the box may be cited, as in any box (Definition 1.4.2).
  3. The last line of the box is exactly ⊥, and it is a line of that box itself, not inside a further box opened within it. This is the same wording as for →I, and every box rule shares it.
  4. Close the box and write ¬φ on the next line, outside it. The justification cites the box as a range, “¬I i–j”. The assumption is discharged: after the box closes, nothing inside it may be cited, and only the negation leaves.
  5. The new line is always a negation. ¬I never writes a statement whose main connective is not ¬.
Second readingEdge cases of not-introduction

The degenerate case is a box of one line, whose assumption is already ⊥. The box 1–1 then ends on ⊥ as soon as it opens, and ¬I gives ¬⊥:

1⊥asm, for ¬I
2¬⊥¬I 1–1

So ⊢¬⊥: “it is not the case that contradiction” is derivable from nothing, as it should be.

A noninstance by one change. Take a box opened by φ whose last line is ¬φ instead of ⊥. It looks as if the assumption has refuted itself, and ¬I still does not apply: the box must end on ⊥. One more line, ⊥ by ¬E citing the assumption and the line ¬φ, repairs it. The same holds if ⊥ is reached only inside a smaller box within the box: it is not then a line of the box itself.

A box that never uses its assumption. A box may reach ⊥ without ever using its assumption. That is legal, but it is a sign: if no line of the box depends on φ, the same lines could have been written just above the box, where ⊥ would then stand, and ⊥E would have written ¬φ, or anything else, directly. The lines available above the box were already contradictory. When your ¬I box never uses its assumption, look for the error above the box, not in it.

Why this rule. The statement ¬φ says that φ fails, and the box shows what would happen if φ held: together with the lines above it, it would lead to ⊥, which never holds. So in any situation where the lines above the box hold, φ cannot hold. That is exactly what ¬φ claims.

The rules for ¬ have the same shapes as rules we already know, with ⊥ in one slot. Put them beside the rules for →, applied to the statement φ→⊥:

To … a negation ¬φ an implication φ→⊥
prove it box from φ to ⊥, then ¬I box from φ to ⊥, then →I
use it, given φ ⊥ by ¬E ⊥ by →E

Remark. Row by row, ¬φ behaves exactly like φ→⊥: “not φ” means “φ leads to contradiction”. Some presentations of logic take this as the definition of ¬. This book keeps ¬ as a connective with its own rules.

Warning. Do not open the box with what you want to prove. To prove ¬φ, the box opens with φ. A box opened by ¬φ and ending in ⊥ gives ¬¬φ by ¬I, the negation of the goal, not the goal. So a box opened with ¬(x>0) and closed by ¬I gives ¬¬(x>0), not x>0; Section 2.5 shows the other kind of “suppose not”. This is the negation’s version of the converse error that Section 1.4 found in Argument B.

In the Givens/Goal table, ¬I moves φ into the Givens and makes ⊥ the goal.

2.2.2. The first example: a number that is never zero

The goal we could not reach at the start of the section comes first.

Example (A negative statement proved by not-introduction)

Let x be a real number. Prove that x2+1≠0, naming the rules.

Idea. The goal x2+1≠0 is ¬(x2+1=0), a negation, so open a box on x2+1=0 and look for a clash. The school fact x2≥0, that is ¬(x2<0), is the negation available; its unnegated half x2<0 is the subgoal, and algebra on the assumption produces it.

Solution. The goal x2+1≠0 is ¬(x2+1=0), so we use ¬I. Suppose x2+1=0 [assumption for ¬I]. Then x2=−1, so x2<0. But x2≥0, that is, ¬(x2<0), so we have a contradiction [¬E]. Hence x2+1≠0 [¬I].

With the school fact as the premise:

1¬(x2<0)
2x2+1=0asm, for ¬I
3x2<0algebra 2
4⊥¬E 3, 1
5¬(x2+1=0)¬I 2–4

Quick check. In this derivation, which box does ¬I cite, and which statement opened it?

Solution. The box 2–4, opened by x2+1=0, the unnegated statement. The conclusion on line 5 is its negation, x2+1≠0.

2.2.3. First derivations with not-introduction

The goal-directed move of this section: a goal ¬φ opens a box with φ, and the new goal is ⊥. From there, Section 2.1’s move takes over: goal ⊥, find a clash, among the available lines or by manufacturing its missing half.

Example (Two negations from one premise)

Show that (a) P⊢¬¬P, and (b) (P∨Q)→¬P⊢¬P.

Idea.

  • (a) The goal ¬¬P is ¬(¬P), a negation of ¬P. So the box opens with what is negated, ¬P, and aims at ⊥. The clash is immediate: the premise P and the assumption ¬P.

    The goal alone (left); then the box opened on ¬P, its goal ⊥ at its foot (right).

    1P
    ⋮
    4¬¬P
    1P
    2¬Pasm, for ¬I
    ⋮
    3⊥
    4¬¬P¬I 2–3
  • (b) The goal ¬P opens a box on P. Inside it the premise is an implication, and the premise-directed move feeds it its hypothesis P∨Q, which ∨I manufactures from P. The premise then hands back ¬P, and that clashes with the box’s own assumption. The assumption is used twice: once to build the hypothesis, once in the clash.

The box opened, its goal ⊥ at its foot (left); then the hypothesis P∨Q manufactured, with line 5 still to reach (right).

1(P∨Q)→¬P
2Pasm, for ¬I
⋮
5⊥
6¬P¬I 2–5
1(P∨Q)→¬P
2Pasm, for ¬I
3P∨Q∨I 2
⋮
5⊥
6¬P¬I 2–5

Solution.

  • (a) Four lines.
    1P
    2¬Pasm, for ¬I
    3⊥¬E 1, 2
    4¬¬P¬I 2–3
  • (b) Six lines.
1(P∨Q)→¬P
2Pasm, for ¬I
3P∨Q∨I 2
4¬P→E 1, 3
5⊥¬E 2, 4
6¬P¬I 2–5

In (b), line 4 already says ¬P, but it lies inside the box of P and depends on that assumption, so it cannot be the conclusion. Line 6 is the same statement outside the box, where it depends on the premise alone.

Derivation (a) adds two negations. The reverse passage, from ¬¬P alone to P, would have to remove two, and no rule so far has a negation as its one given line and the unnegated statement as its new line: ¬E needs a second line and writes only ⊥, and ¬I only adds a ¬. Section 2.5 returns to this.

Quick check. Is ¬(P∨Q)⊢¬P? If so, give a derivation and name its rules. Compare it with Example (Manufacturing the other half of a clash), which has the same premise.

Solution. Yes. The goal ¬P is a negation, so assume P and aim at ⊥; ∨I turns P into P∨Q, which clashes with the premise.

1¬(P∨Q)
2Pasm, for ¬I
3P∨Q∨I 2
4⊥¬E 3, 1
5¬P¬I 2–4

The rules are ∨I, ¬E, and ¬I. The box is the same as in Example (Manufacturing the other half of a clash) up to its line ⊥. There the goal was P→R, so the box had to end on R, written by ⊥E, and closed by →I. Here the goal is ¬P, so the box ends on ⊥ itself and closes by ¬I. In words: if neither P nor Q holds, then in particular P does not.

In the next derivation the clash itself creates a goal that is a negation, and the move of this section is used a second time, one box inside another.

Example (Three negations become one)

Show that ¬¬¬P⊢¬P.

Idea. The goal ¬P opens a box on P, with goal ⊥. Which clash? The only negation available is the premise ¬(¬¬P), so the premise-directed question asks for its unnegated half, ¬¬P: that becomes the subgoal. It is itself a negation, ¬(¬P), so the goal-directed move opens a second ¬I box, on ¬P, with goal ⊥. Inside it, ¬P clashes with the outer assumption P. This is the first derivation in which a ¬I box is opened for a subgoal that a clash created.

The outer box opened, its goal ⊥ at its foot (left); then the clash with the premise chosen, so that ¬¬P becomes the goal of the gap (right).

1¬¬¬P
2Pasm, for ¬I
⋮
6⊥
7¬P¬I 2–6
1¬¬¬P
2Pasm, for ¬I
⋮
5¬¬P
6⊥¬E 5, 1
7¬P¬I 2–6

Solution. Seven lines.

1¬¬¬P
2Pasm, for ¬I
3¬Pasm, for ¬I
4⊥¬E 2, 3
5¬¬P¬I 3–4
6⊥¬E 5, 1
7¬P¬I 2–6

Line 4 may cite line 2, because the only box containing line 2, the box 2–6, also contains line 4 (Definition 1.4.2). The inner box 3–4 ends on ⊥ as a line of its own, and so does the outer box 2–6, at line 6; each ¬I cites its own box. Notice what did not happen: no line removes a pair of negations. Three became one by adding them, twice, and clashing.

2.2.4. How the rule looks in a mathematical proof

The proof that no rational number has square 2 has the shape of ¬I: the claim is negative, so we assume its opposite and look for ⊥. The tool that finds the clash is Theorem 2.1.3, and the school fact it needs is about writing fractions:

(L) Every rational number can be written as p/q with p and q integers, q≠0, and p and q not both even.

This holds because a fraction whose numerator and denominator are both even can be reduced by 2, and the reduction cannot go on for ever, since the denominator shrinks in absolute value each time. Making “cannot go on for ever” precise needs a fact about the natural numbers that this book does not prove; here we take (L) as known.

Theorem 2.2.1 (Irrationality of the Square Root of Two)

There is no rational number whose square is 2. So if a real number 2 with square 2 exists, it is irrational.

Idea. Fix a rational number r and prove the negative statement r2≠2 by ¬I: assume r2=2 and hunt for ⊥. Write r=p/q as in (L), so that the equation becomes p2=2q2. The only available negation is “not both even”, so the clash must come from showing that p and q are both even; Theorem 2.1.3 is the tool for that, used twice. Before reading on: the second use of Theorem 2.1.3 needs the line “q2 is even”. From which two earlier lines of the proof will it come?

Proof. Let r be a rational number, and suppose r2=2 [assumption for ¬I]. By (L), r=p/q for integers p and q with q≠0, not both even. Then p2=r2q2=2q2, so p2 is even. By Theorem 2.1.3, p is even [→E], say p=2m for an integer m. Then 4m2=2q2, so q2=2m2, and q2 is even. By Theorem 2.1.3 again, q is even [→E]. So p and q are both even [∧I], while they were chosen not both even; this is a contradiction [¬E]. Hence r2≠2 [¬I].

Since r was an arbitrary rational number, no rational number has square 2. This proves the theorem.

Quick check. In the proof, which step is ¬E, and which two statements does it cite?

Solution. The step “this is a contradiction”. It cites “p and q are both even”, derived inside the box of r2=2 by ∧I, and “p and q are not both even”, which (L) supplied when p and q were chosen. In the derivation below these are lines 11 and 2, and the step is line 12.

The propositional part of the proof fits in a derivation. Fix r and the integers p, q that (L) supplies. Lines 1 and 2 record what (L) says about them; lines 3 and 4 are Theorem 2.1.3 for n=p and n=q; the lines marked “algebra” are the computations of the proof.

1r=p/q, q≠0
2¬(p even∧q even)
3p2 even→p even
4q2 even→q even
5r2=2asm, for ¬I
6p2=2q2algebra 1, 5
7p2 evendef. of even 6
8p even→E 3, 7
9q2 evenalgebra 6, 8
10q even→E 4, 9
11p even∧q even∧I 8, 10
12⊥¬E 11, 2
13¬(r2=2)¬I 5–12

Line 13 is r2≠2. The box 5–12 is a ¬I box as the schema asks: opened by the unnegated statement r2=2, and ending on ⊥ as a line of its own. Three steps of the proof lie outside the derivation: applying Theorem 2.1.3, a fact about every integer, to p and to q; choosing p, q and m; and passing from the arbitrary r to every rational number. All three are steps about “some” and “every”, used as ordinary reasoning (the note at the start of this chapter).

Notice also what the proof does not need: that 2 exists as a real number. The theorem is a statement about rational numbers only.

And notice which rule closes it. “Suppose r2=2” opens a box whose negation is the goal, so the proof is ¬I, even though it is what everyone calls a proof by contradiction.

2.2.5. The rule card

Before the card, the rule at work on large statements. Each row is one use of ¬I: the box, and the line it writes.

Example (Instances of ¬I)
φ The box New line
P∨¬Q from P∨¬Q (asm) to ⊥ ¬(P∨¬Q)
Q→R from Q→R (asm) to ⊥ ¬(Q→R)
¬(P∧R) from ¬(P∧R) (asm) to ⊥ ¬¬(P∧R)

Not an instance. From the third box, the line “P∧R — ¬I” is not an instance: ¬I puts one ¬ in front of the whole assumption and never takes one away. (The rule that writes P∧R from that box is Section 2.5’s.)

Chapter 1’s seven rules are on the card at the end of Section 1.6; here are this chapter’s so far.

Rule Shape You write Lean
¬E φ, ¬φ ⟹ ⊥ “…, which contradicts …” exact hn hp (goal False)
⊥E ⊥ ⟹ any φ “This case cannot occur.” “So there is nothing to prove.” exfalso
¬I box φ … ⊥ ⟹ ¬φ “Suppose P. … This is a contradiction. Hence not P.” intro hp (goal False)

In Lean, the negation of P is defined to be P → False, with False playing the part of ⊥: the reading of the remark above. So intro performs both →I and ¬I.

Warning (Not allowed: ¬I). Each step below is wrong; the tag names the clause of the rule’s reading that it breaks.

  • Close the box on ¬φ instead of ⊥: clause 3, the last line is ⊥ (one ¬E line repairs it; the fold “Edge cases of not-introduction”).
  • Close it on a ⊥ that stands in a box inside it: clause 3, the last line is a line of the box itself.
  • Write φ after a box opened by ¬φ: clause 4, the new line is the negation of the whole assumption, here ¬¬φ.
  • Write the negation of part of the assumption: clause 4, the whole assumption is negated (the pair below).
  • Cite a line of the box after it has closed: clause 4, only the negation leaves.

The discharge is where the rule bites, so here is one wrong step beside the right one, with the premise ¬(Q∨R). On the left, line 6 negates only P, part of the assumption; on the right, line 6 negates the whole assumption.

1¬(Q∨R)
2P∧Qasm, for ¬I
3Q∧E 2
4Q∨R∨I 3
5⊥¬E 4, 1
6¬P¬I 2–5
1¬(Q∨R)
2P∧Qasm, for ¬I
3Q∧E 2
4Q∨R∨I 3
5⊥¬E 4, 1
6¬(P∧Q)¬I 2–5

The left list would show ¬(Q∨R)⊢¬P, which breaks. Let x be a real number, with P: “x>0”, Q: “x>5”, R: “x<−5”. At x=1 the premise is true and ¬P is false.

Remark (Looking ahead). Sets, Relations, and Cardinality, Chapter 2 proves (L) from a fact about the natural numbers called well-ordering. Analysis on the Real Line, Chapter 1 uses this section’s theorem in exactly the form proved here, as evidence that the rational numbers have a gap where 2 should be.

2.2.6. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Write the schema of ¬I from memory, and say which statement opens its box.
  • (b) Which rule does this sentence use, and which box does it close? “Suppose 0 had a reciprocal y. Then 1=0⋅y=0, which is absurd. So 0 has no reciprocal.”
  • (c) In the proof of Theorem 2.2.1, the sentence “p is even” follows from “p2 is even”. Which result and which rule justify it?
  • (d) Where in the proof of Theorem 2.2.1 is (L) used, and what would go wrong if (L) said only “r=p/q with q≠0”?
  • (e) Run the proof of Theorem 2.2.1 with 4 in place of 2: assume r2=4 and write r=p/q as in (L). Which step can no longer be justified? (The conclusion “no rational number has square 4” is false, so some step must fail.)

Solution.

  • (a) The schema is the left one of Definition 2.2.1: a box opened by the assumption φ, ending on ⊥ as a line of the box itself, then ¬φ outside it, citing the box. The box opens with the unnegated statement φ.

  • (b) ¬I. The conclusion is the negative statement “0 has no reciprocal”; the box opens with “0 has a reciprocal y”, and “which is absurd” is its line ⊥, reached by ¬E from 1=0 and the fact 1≠0.

  • (c) Theorem 2.1.3, for n=p, is the implication “if p2 is even, then p is even”; together with “p2 is even” it gives “p is even” by →E (line 8 of the derivation, citing lines 3 and 7).

  • (d) The fact (L) supplies the line “p and q are not both even” (line 2 of the derivation), which the ¬E of line 12 cites. Without that clause the proof still derives “both even”, but it contradicts nothing (2=4/2 has both even), and no ⊥ is reached.

  • (e) With r2=4 we get p2=4q2=2(2q2), so p2 is even and p is even, p=2k. Then 4k2=4q2, so q2=k2. This is where the proof stalls: nothing says q2 is even, so Theorem 2.1.3 cannot be applied to q. Indeed for r=2=2/1 we have q=1, which is odd. Every step before the stall is correct; the proof simply fails to reach ⊥.

Exercise (A2: Drill)

The parts run from one step, through a missing line, a justification column and steps to judge, to short derivations.

  • (a) Which statement opens the ¬I box for the goal ¬(P∨Q)?

  • (b) A box opens with ¬P and ends with ⊥. What does ¬I write after it?

  • (c) For a real number x, the goal is x≠3. Which statement opens the box?

  • (d) A box runs from line 4, (P→Q)∧¬R, to line 8, ⊥, a line of that box itself. What does “¬I 4–8” write?

  • (e) Line 10 is ¬(Q∨¬P), justified “¬I 6–9”. What are lines 6 and 9?

  • (f) Inside a box opened at line 3 by P, line 5 is ⊥, justified “¬E 4, 2”, and line 2 is ¬(P∨R). What is line 4?

  • (g) Fill in (i)–(iv), and say what the derivation shows, written with ⊢.

    1¬Q
    2P→(Q∧R)
    3Pasm, for ¬I
    4Q∧R(i)
    5Q(ii)
    6⊥(iii)
    7¬P(iv)
  • (h) A box opens with P and its last line is ¬P. May ¬I close it?

  • (i) Line 1 is the premise ¬Q; line 2, Q, opens a box; line 3, ⊥, justified “¬E 2, 1”, is the last line of that box. What may line 4, just after the box, be by ¬I?

  • (j) Find the illegal line, and say why it is illegal.

    1P→Q
    2¬Q
    3Pasm, for ¬I
    4Q→E 1, 3
    5⊥¬E 4, 2
    6¬P¬I 3–5
    7Q→E 1, 3
  • (k) Lines 3–7 form a box opened by P∧Q. Inside it, lines 4–6 form a box opened by R, whose last line, 6, is ⊥; line 7 is ¬R, justified “¬I 4–6”. Is “8. ¬(P∧Q) — ¬I 3–7” correct?

  • (l) “Suppose x2+4=2x for a real x. Then (x−1)2=−3<0, which contradicts (x−1)2≥0.” What may “Hence” write, and by which rule?

  • (m) Derive ¬P⊢¬(P∧Q).

  • (n) Derive P→¬P⊢¬P.

  • (o) Derive P∧¬Q⊢¬(P→Q).

Solution.

  • (a) P∨Q, the statement the goal negates.

  • (b) ¬¬P: one ¬ in front of the whole assumption.

  • (c) x=3, since x≠3 is ¬(x=3).

  • (d) ¬((P→Q)∧¬R), the negation of the whole assumption of line 4.

  • (e) Line 6 is the assumption Q∨¬P, which opens the box; line 9 is ⊥, the last line of that box.

  • (f) P∨R, the unnegated half of line 2; it comes from line 3 by ∨I.

  • (g) Line 3 is the assumption for ¬I; (i) →E 2, 3; (ii) ∧E 4; (iii) ¬E 5, 1; (iv) ¬I 3–6. The derivation shows ¬Q, P→(Q∧R)⊢¬P.

  • (h) No: the last line must be ⊥. First write ⊥ by ¬E, citing the assumption and the line ¬P; then ¬I closes the box.

  • (i) ¬Q, the negation of the box’s assumption; not Q.

  • (j) Line 7: it cites line 3, which lies inside the box 3–5, closed before line 7.

  • (k) No. The box 3–7 ends on ¬R, not on ⊥; the ⊥ at line 6 is a line of the inner box, not of the box 3–7 itself (clause 3). The outer box needs a line ⊥ of its own.

  • (l) x2+4≠2x, by ¬I. The supposition opens the box, and the contradiction is its line ⊥; the step to (x−1)2=−3 is the identity x2+4−2x=(x−1)2+3.

  • (m) 2 P∧Q, assumption, for ¬I; 3 P, ∧E 2; 4 ⊥, ¬E 3, 1; 5 ¬(P∧Q), ¬I 2–4.

  • (n) 2 P, assumption, for ¬I; 3 ¬P, →E 1, 2; 4 ⊥, ¬E 2, 3; 5 ¬P, ¬I 2–4.

  • (o) 2 P→Q, assumption, for ¬I; 3 P, ∧E 1; 4 Q, →E 2, 3; 5 ¬Q, ∧E 1; 6 ⊥, ¬E 4, 5; 7 ¬(P→Q), ¬I 2–6.

B. Practice

Exercise (B1: A box inside a box)

A search for P→¬Q⊢Q→¬P has reached the stage below. Name the move that opens each box, then complete it.

1P→¬Q
⋮
7Q→¬P?

Solution. The goal is an implication, so the outer box opens on Q, with goal ¬P. That goal is a negation, so the inner box opens on P, with goal ⊥. Inside it, the premise fires on P and gives ¬Q, which clashes with the outer assumption Q.

1P→¬Q
2Qasm, for →I
3Pasm, for ¬I
4¬Q→E 1, 3
5⊥¬E 2, 4
6¬P¬I 3–5
7Q→¬P→I 2–6

Line 5 may cite line 2 because the box 2–6 contains line 5. Both boxes were read off the goal: the outer one by Chapter 1’s move for an implication, the inner one by this section’s move for a negation. In words: if P rules out Q, then Q rules out P.

Exercise (B2: A quadratic with no zero)

Let x be a real number. Prove that x2−x+1≠0, naming the rules.

Hint: complete the square.

Solution. The goal is ¬(x2−x+1=0), a negation, so we use the rule ¬I. Suppose that x2−x+1=0, as the assumption for ¬I. Completing the square,

x2−x+1=(x−12)2+34,

so (x−12)2=−34, and therefore (x−12)2<0. But the square of a real number is never negative, that is, ¬((x−12)2<0); this is a contradiction [¬E]. Hence x2−x+1≠0 [¬I].

This is the pattern of Example (A negative statement proved by not-introduction), with the square (x−12)2 in place of x2. The identity can be checked by expanding: (x−12)2=x2−x+14, and 14+34=1.

Exercise (B3: The square root of three, used later)

You may use that every integer can be written as 3k, 3k+1 or 3k+2 with k an integer, in one way only, and that every rational number can be written as p/q with integers p, q, q≠0, and p, q not both divisible by 3.

  • (a) Prove that if n is an integer and n2 is divisible by 3, then n is divisible by 3.
  • (b) Hence prove that no rational number has square 3.

Solution.

  • (a) Suppose n2 is divisible by 3 [assumption for →I], so n2 has the form 3j with j an integer. The integer n has the form 3k, 3k+1 or 3k+2, and we argue by cases [∨E]; a three-way split is two uses of ∨E, one inside a box of the other.

    Case n=3k. Then n is divisible by 3, as required.

    Cases n=3k+1 and n=3k+2. Then

    (3k+1)2=9k2+6k+1=3(3k2+2k)+1,(3k+2)2=9k2+12k+4=3(3k2+4k+1)+1,

    so n2 has the form 3j′+1 as well as the form 3j. An integer has only one of the three forms, so this is a contradiction [¬E], and the case cannot occur. By ⊥E, n is divisible by 3 in this case too.

    All cases give that n is divisible by 3 [∨E], which proves (a) [→I]. The two impossible cases were closed exactly as the odd case in the proof of Theorem 2.1.3.

  • (b) Let r be a rational number and suppose r2=3 [assumption for ¬I]. Write r=p/q with p, q not both divisible by 3. Then p2=3q2, so 3 divides p2, and by (a), p=3m for an integer m. Then 9m2=3q2, so q2=3m2, and by (a) again, 3 divides q. So 3 divides both p and q [∧I]; this contradicts their choice [¬E]. Hence r2≠3 [¬I]. Since r was an arbitrary rational number, no rational number has square 3.

The form of (L) matters: the argument ends at “3 divides p and q”, which clashes only with “not both divisible by 3”. The form “not both even” of the text would give no clash, since p=q=3 are both divisible by 3 and not both even.

Exercise (B4: A premise that turns on itself)

Show that P→Q, Q→¬P⊢¬P. Then say in one sentence what the sequent means.

Solution. The goal ¬P is a negation, so assume P. The two premises, used in turn, turn P into ¬P, and the clash gives ⊥.

1P→Q
2Q→¬P
3Pasm, for ¬I
4Q→E 1, 3
5¬P→E 2, 4
6⊥¬E 3, 5
7¬P¬I 3–6

In words: if P leads to Q, and Q rules P out, then P refutes itself, and so P fails. Line 5 is the moment of self-refutation: the assumption has produced its own negation. Line 6 is still needed, because the box must end on ⊥, not on ¬P.

Exercise (B5: From 2 to p)

Let p be a prime number. You may use two facts.

  • (Lp) Every rational number can be written as a/b with integers a, b, b≠0, and a, b not both divisible by p.
  • (Ep) For every integer n, if p divides n2, then p divides n.
  • (a) Prove that no rational number has square p, naming the rule at each logical step.
  • (b) Where does your proof use (Ep), and where (Lp)?
  • (c) Your proof never used that p is prime, only the two facts. Put 6 and 9 in place of p. (E6) is true (Exercise C1 of Section 2.4 proves it; take it as given here). Does (L6) follow from (L)? Is (E9) true? What does the argument then prove about 6, and why does it prove nothing about 9?

Solution.

  • (a) Let r be a rational number, and suppose r2=p [assumption for ¬I]. By (Lp), r=a/b with b≠0 and a, b not both divisible by p. Then a2=r2b2=pb2, so p divides a2, and by (Ep) p divides a [→E]; write a=pm. Then p2m2=pb2, so b2=pm2, p divides b2, and by (Ep) again p divides b [→E]. So p divides both a and b [∧I], which contradicts their choice [¬E]. Hence r2≠p [¬I]; since r was arbitrary, no rational number has square p.

  • (b) (Ep) twice, once for a and once for b, in the places where Theorem 2.2.1 used Theorem 2.1.3. (Lp) when a and b are chosen, and again at the clash, which cites “not both divisible by p”.

  • (c) For 6: (L6) follows from (L) of the text, since integers a, b that are not both even are not both divisible by 6. With (E6) as given, the argument proves that 6 is irrational; Exercise C1 of this section does it by another route, with (L) and Theorem 2.1.3 in place of (E6). (E6) itself is not proved here: its proof is Exercise C1 of Section 2.4. For 9: (E9) is false, since 9 divides 32 but not 3. The proof breaks at its first use of (E9), as it must, since 9=32 and 3=3/1 is rational: with r=3/1, 9 divides a2=9, but not a=3.

Marking scheme. (10 points)

  • 2: the ¬I frame, a fixed rational r, and a/b from (Lp).
  • 2: a2=pb2 and the first use of (Ep).
  • 2: b2=pm2 and the second use.
  • 1: the clash with (Lp), ¬I, and the passage from r to every rational number.
  • 1: (b).
  • 2: (c), (L6) from (L) with the conclusion about 6 (1), and 9 with a witness against (E9) (1).

Fatal errors (0 for the step): using “p divides n2, so p divides n” for p=9 or p=4; dividing by p before p is known to divide a.

Exercise (B6: Derive or break)

For each claim, either derive it with the rules of Chapter 1 and Sections 2.1–2.2, or break it by statements about a real number x that make its counterexample set true at one value of x.

  • (a) P⊢¬(¬P∧Q).
  • (b) ¬(P∧Q)⊢¬P.
  • (c) (P∧Q)→¬P, Q⊢¬P.
  • (d) P→(Q→R), ¬R⊢¬(P∧Q).
  • (e) ¬Q⊢¬(P→Q).
  • (f) P→Q, P→¬Q⊢¬P.
  • (g) ¬¬(P∧Q)⊢¬¬P.
  • (h) ¬¬P⊢¬¬(P∧Q).

Solution.

  • (a) Derive. The goal is a negation, so the box opens on ¬P∧Q, and its first half clashes with the premise.
    1P
    2¬P∧Qasm, for ¬I
    3¬P∧E 2
    4⊥¬E 1, 3
    5¬(¬P∧Q)¬I 2–4
  • (b) Break. Take P: “x>0”, Q: “x>5”. At x=1, P∧Q is false (1>5 fails), so ¬(P∧Q) is true, and P is true, so ¬¬P is true. The counterexample set ¬(P∧Q), ¬¬P (Definition 1.1.3) is true.

  • (c) Derive. On the assumption P, the premise Q completes the antecedent, and the assumption produces its own negation.

    1(P∧Q)→¬P
    2Q
    3Pasm, for ¬I
    4P∧Q∧I 3, 2
    5¬P→E 1, 4
    6⊥¬E 3, 5
    7¬P¬I 3–6
  • (d) Derive. Inside the box of P∧Q, feed the premise its two hypotheses one at a time; the R it hands back clashes with ¬R.
    1P→(Q→R)
    2¬R
    3P∧Qasm, for ¬I
    4P∧E 3
    5Q→R→E 1, 4
    6Q∧E 3
    7R→E 5, 6
    8⊥¬E 7, 2
    9¬(P∧Q)¬I 3–8
  • (e) Break. Take P: “x>5”, Q: “x>3”. The implication P→Q holds for every x. At x=0, ¬Q is true, and P→Q is true, so ¬¬(P→Q) is true: the counterexample set ¬Q, ¬¬(P→Q) is true.

  • (f) Derive. On the assumption P, the two premises give Q and ¬Q.

    1P→Q
    2P→¬Q
    3Pasm, for ¬I
    4Q→E 1, 3
    5¬Q→E 2, 3
    6⊥¬E 4, 5
    7¬P¬I 3–6
  • (g) Derive. The goal ¬¬P opens a box on ¬P. The only way to use the premise is to clash with it, so ¬(P∧Q) becomes a subgoal, and a second box proves it, as in Example (Three negations become one).
    1¬¬(P∧Q)
    2¬Pasm, for ¬I
    3P∧Qasm, for ¬I
    4P∧E 3
    5⊥¬E 4, 2
    6¬(P∧Q)¬I 3–5
    7⊥¬E 6, 1
    8¬¬P¬I 2–7
  • (h) Break. Take P: “x>0”, Q: “x>5”. At x=1, P is true, so ¬¬P is true; P∧Q is false, so ¬(P∧Q) is true and ¬¬(P∧Q) is false. The counterexample set ¬¬P, ¬¬¬(P∧Q) is true.

  • (i) and (h) are the look-alikes, each moving a negation or a conjunct the wrong way: (b) would refute a conjunct from a refuted conjunction, and (h) would add a conjunct under two negations. (g) keeps both negations because ¬I can only add them, as the warning of this section says. (d) unpacks its nested premise inside the ¬I box, one →E per hypothesis, as the two forms of Proposition 1.4.2 suggest.

Marking scheme. (16 points) For each claim: 1 for the verdict; 1 for a derivation every line of which checks, or for a choice of statements and one value of x at which every member of the counterexample set is true. Fatal errors (0 for the claim): a “break” at which some premise is false; a derivation that uses a rule other than those of Chapter 1 and Sections 2.1–2.2.

C. Going deeper

Exercise (C1: The square root of six)

Prove that no rational number has square 6. Use only the facts (E1)–(E3) of Section 2.1, (L), and Theorem 2.1.3, and name the rule at each logical step.

Solution (Hint 1). Follow the proof of Theorem 2.2.1. After writing p=2m, you will need to show that q is even from 3q2=2m2, where q2 is not yet known to be even.

Solution (Hint 2). You will reach 3q2=2m2, so 3q2 is even. The proof of Theorem 2.1.3 passed from “n2 is even” to “n is even”; imitate its shape for 3q2 and q.

Solution. Let r be a rational number and suppose r2=6 [assumption for ¬I]. By (L), r=p/q with integers p, q, q≠0, not both even. Then p2=6q2=2(3q2) is even, so p is even by Theorem 2.1.3 [→E]; write p=2m. Then 4m2=6q2, that is, 3q2=2m2, so 3q2 is even.

We show that q is even. By (E1), q is even or odd, and we argue by cases [∨E]. Case q even: this is the goal. Case q odd: then q2 is odd by (E3) [→E], say q2=2j+1, and then 3q2=6j+3=2(3j+1)+1 is odd. So 3q2 is both even and odd [∧I]; this contradicts (E2) [¬E], so this case cannot occur, and in it q is even [⊥E]. In both cases q is even [∨E].

So p and q are both even [∧I]; this contradicts (L) [¬E]. Hence r2≠6 [¬I], and since r was arbitrary, no rational number has square 6.

Marking scheme. (10 points) - 2: opens with ¬I: a fixed rational r, the assumption r2=6, and r=p/q with p, q not both even from (L). - 2: derives p even from p2=2(3q2) by Theorem 2.1.3. - 3: derives q even from 3q2=2m2, either by ruling out the odd case (a correct parity computation and (E2)) or by showing q2=2(m2−q2) even and applying Theorem 2.1.3. - 2: reaches ⊥ by clashing “both even” with (L), and concludes r2≠6 by ¬I. - 1: rules named at the logical steps, and the passage from the arbitrary r to every rational number.

Fatal errors (0 for the step): applying Theorem 2.1.3 to q with only 3q2 known to be even; using “if 6 divides n2, then 6 divides n” without proof.

Exercise (C2: A proof that proves too much)

Here is a “proof” that 4 is irrational, modeled on Theorem 2.2.1.

Suppose r is rational and r2=4. Write r=p/q with p, q integers, q≠0, not both divisible by 4. Then p2=4q2, so 4 divides p2. Since n2 divisible by 4 implies n divisible by 4, we get p=4m. Then 16m2=4q2, so q2=4m2, and as before 4 divides q. This contradicts the choice of p and q. Hence no rational number has square 4.

  • (a) Explain why the conclusion must be false.
  • (b) Find the step that fails, and show that it fails with a specific integer.
  • (c) Every other step is a correct use of a rule. Which rule turns the “contradiction” into the conclusion, and why is the argument still wrong?

Solution.

  • (a) 2=2/1 is rational and 22=4.

  • (b) The step “n2 divisible by 4 implies n divisible by 4” is a false lemma: for n=2, n2=4 is divisible by 4, but 2 is not. It fails exactly on the witness of (a): with r=2/1 we have p=2, and the lemma would claim that 4 divides 2.

  • (c) The last step is ¬I, applied to the box opened by “r2=4”. The rule is applied correctly, but the box contains a line that is not justified: the false lemma was used as if it were a premise available everywhere, through →E. A derivation is only as good as its premises. In Theorem 2.2.1 the corresponding lemma is Theorem 2.1.3, which we proved; here nothing proves the lemma, and nothing could. Compare part (e) of A1, where the honest proof stalls without reaching ⊥; here ⊥ is “reached” through a false line.