example proofs; contrapositive

3
Shirleen Stibbe http://www.shirleenstibbe.co.uk Example Proofs: Contrapositive Proofs Workshop Note: the proofs in this handout are not necessarily in the same form as they were presented at the workshop. In particular, any errors you spot here are entirely accidental, not deliberate. Theorem Prove that if a n 1 is prime, then a = 2, where a and n are positive integers, with n 2. Contrapositive Proof The proposition is of the form p q, where p is the statement: a n 1 is prime, q is the statement: a = 2 We prove the logically equivalent statement: if q is false then p is false (¬q ¬p), that is, if a 2, then a n 1 is not prime. Suppose a 2. If a = 1, then a n 1 = 0 is not prime. If a > 2, we use the identity a n 1 = (a ! 1)(1+ a + a 2 + ... + a n!1 ) We have a 1 > 1, since a > 2, and 1 ... 1 1 2 > + + + + n a a a . This shows that a n 1 is the product of two positive integers greater than 1, and so is not prime. So if a 2, a n 1 is not prime. Hence if a n 1 is prime, then a = 2. Theorem Let f: – {–2} be defined by 2 , 2 ) ( + = x x x x f . If x y then f(x) f(y). (In other words, f is injective.) Contrapositive proof: Let p be the statement 'x y' and let q be the statement 'f(x) f(y)'. Then the theorem is in the form of a proposition: p q. We will prove, instead, the equivalent proposition p q ¬ ¬ (not-q not-p), ie the contrapositive, where ¬q is the statement 'f(x) = f(y)', and ¬p is the statement 'x = y'. Suppose f(x) = f(y). Then . 2 2 2 2 ) 2 ( ) 2 ( 2 2 y x y x y xy x xy x y y x y y x x = = + = + + = + + = + Therefore, if x y then f(x) f(y).

Upload: shirleen-stibbe

Post on 17-Mar-2016

217 views

Category:

Documents


1 download

DESCRIPTION

Theorem Prove that if a n − 1 is prime, then a = 2, where a and n are positive integers, with n ≥ 2. 22 yx Suppose a ≠ 2. If a = 1, then a n − 1 = 0 is not prime. If a > 2, we use the identity a n − 1 = (a!1)(1+a+a 2 +...+a n!1 ) Contrapositive proof: Let p be the statement 'x ≠ y' and let q be the statement 'f(x) ≠ f(y)'. Then the theorem is in the form of a proposition: p ⇒ q. yx = ⇒ 2, 2 )( −≠ + = x x = ⇒ Theorem http://www.shirleenstibbe.co.uk Shirleen Stibbe y x

TRANSCRIPT

Page 1: Example proofs; Contrapositive

Shirleen Stibbe http://www.shirleenstibbe.co.uk

Example Proofs: Contrapositive Proofs Workshop Note: the proofs in this handout are not necessarily in the same form as they were presented at the workshop. In particular, any errors you spot here are entirely accidental, not deliberate.

Theorem Prove that if an − 1 is prime, then a = 2, where a and n are positive integers, with n ≥ 2. Contrapositive Proof

The proposition is of the form p ⇒ q, where

p is the statement: an − 1 is prime, q is the statement: a = 2

We prove the logically equivalent statement: if q is false then p is false (¬q ⇒ ¬p), that is, if a ≠ 2, then an − 1 is not prime. Suppose a ≠ 2.

If a = 1, then an − 1 = 0 is not prime. If a > 2, we use the identity

an − 1 = (a!1)(1+ a+ a2 + ... + an!1)

We have a − 1 > 1, since a > 2, and 1...1 12 >++++ −naaa .

This shows that an − 1 is the product of two positive integers greater than 1, and so is not prime. So if a ≠ 2, an − 1 is not prime. Hence if an − 1 is prime, then a = 2.

Theorem

Let f: ℝ – {–2} → ℝ be defined by 2,2

)( −≠+

= xxxxf .

If x ≠ y then f(x) ≠ f(y). (In other words, f is injective.)

Contrapositive proof:

Let p be the statement 'x ≠ y' and let q be the statement 'f(x) ≠ f(y)'. Then the theorem is in the form of a proposition: p ⇒ q.

We will prove, instead, the equivalent proposition pq ¬⇒¬ (not-q ⇒ not-p), ie the contrapositive, where

¬q is the statement 'f(x) = f(y)', and ¬p is the statement 'x = y'.

Suppose f(x) = f(y). Then

.22

22)2()2(

22

yxyx

yxyxxyxyyx

yy

xx

=⇒

=⇒

+=+⇒

+=+⇒

+=

+

Therefore, if x ≠ y then f(x) ≠ f(y).

Page 2: Example proofs; Contrapositive

Shirleen Stibbe http://www.shirleenstibbe.co.uk

Theorem For every integer n, if n2 is odd, then n is odd. Contrapositive Proof

Let p be the statement 'n2 is odd', and q be the statement 'n is odd'. Then the theorem is in the form of a proposition: p ⇒ q.

We will prove instead the equivalent proposition pq ¬⇒¬ (not-q ⇒ not-p), ie the contrapositive, where

¬q is the statement 'n is even', and

¬p is the statement 'n2 is even'.

Suppose n is even then n = 2k for some integer k ⇒ n2 = 4k2 = 2(2k2)

⇒ n2 is even, since 2k2 is an integer

We have shown that if n is even, then n2 is even. Hence, if n2 is odd, then n is odd

Theorem

If 267 − 1 is prime, then 267 + 1 is divisible by 3. Contrapositive proof

The theorem is in the form p ⇒ q, where

p is the proposition "267 − 1 is prime", and q is the proposition "267 + 1 is divisible by 3".

We are going to prove the logically equivalent statement: If 267 + 1 is not divisible by 3, then 267 − 1 is not prime, i.e. ¬q ⇒ ¬p.

Suppose q is false, ie 267 + 1 is not divisible by 3.

The only divisors of 267 are powers of 2, so 267 is also not divisible by 3.

So 267 − 1 must be divisible by 3, since 267 − 1, 267 and 267 + 1 are 3 consecutive integers.

Therefore 267 − 1 is not prime, which is the statement ¬p.

We have shown that if 267 + 1 is not divisible by 3, then 267 − 1 is not prime.

This proves that if 267 − 1 is prime, then 267 + 1 is divisible by 3. Note:

We can generalize this result to: If 2n − 1 is prime, then 2n + 1 is divisible by 3. (Replace 67 by n in the above proof).

In fact, 267 − 1 = 193,707,721 × 761,838,257,287 is not prime, but 267 + 1 is divisible by 3.**

Also, 24 − 1 = 15 is not prime, and 24 + 1 = 17 is not divisible by 3. Neither of these two results invalidates the theorem.

** 267 ≡ 2(mod3), so 267 + 1 ≡ 0(mod3).

Prove the general cases, 22k ≡  1(mod3),  and 22k+1 ≡  2(mod3) by induction.

Page 3: Example proofs; Contrapositive

Shirleen Stibbe http://www.shirleenstibbe.co.uk

Theorem

Let f: ℝ – {–2} → ℝ be defined by 2,2

)( −≠+

= xxxxf .

If x ≠ y then f(x) ≠ f(y). (In other words, f is injective.)

Contrapositive proof:

Let p be the statement 'x ≠ y' and let q be the statement 'f(x) ≠ f(y)'. Then the theorem is in the form of a proposition: p ⇒ q.

We will prove, instead, the equivalent proposition pq ¬⇒¬ (not-q ⇒ not-p), ie the contrapositive, where

¬q is the statement 'f(x) = f(y)', and ¬p is the statement 'x = y'.

Suppose f(x) = f(y). Then

.22

22)2()2(

22

yxyx

yxyxxyxyyx

yy

xx

=⇒

=⇒

+=+⇒

+=+⇒

+=

+

Therefore, if x ≠ y then f(x) ≠ f(y).

. Theorem

If 12 −n is prime, then n is prime for all positive integers n. Contrapositive proof:

Suppose that n is not prime.

Then n may be written as the product of two positive integers, n = rs where both r and s are greater than 1.

We have seen that 11 ... 1 12

−−

=++++ −

aaaaam

m whenever a ≠ 1, for any positive integer m.

Setting ra 2= and m = s we have

1212

1212

121)2()2( ... )2(21 12

−=

−=

−=++++ −

r

n

r

rs

r

srsrrr

Then 2n !1 = (2r !1) 1+ 2r + (2r )2 + ... + (2r )s!1( ) Now 12 −r is a positive integer greater than 1, since r is greater than 1 and

12 )2( ... )2(21 −++++ srrr is a positive integer greater than 1 because both r and s are greater than 1.

It follows from that 12 −n is a product of two positive integers greater than 1 and so is not a prime number.

We have shown that if n is not a prime number, then 12 −n is not a prime number.

Hence if 12 −n is prime then n is prime for all positive integers n.

Another useful example: Theorem: Let a, b be integers. Then ab is even if a + b is odd. We showed them both the direct and the contrapositive proofs of this, to try to convince them that the contrapositive is actually sound – they still didn't believe it! See Example proofs: Direct for details.