indirect proofs - stanford university...p → q means “any time p is true, q is true.” the only...

231
Indirect Proofs

Upload: others

Post on 25-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Indirect Proofs

Page 2: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Announcements

● Problem Set 1 out.● Checkpoint due Monday, April 9.

● Graded on a “did you turn it in?” basis.● We will get feedback back to you with comments on

your proof technique and style.● The more an effort you put in, the more you'll get

out.

● Remaining problems due Friday, April 13.● Feel free to email us with questions!

Page 3: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Submitting Assignments

● You can submit assignments by● handing them in at the start of class,● dropping it off in the filing cabinet near Keith's office

(details on the assignment handouts), or● emailing

[email protected] and attaching your solution as a PDF.

● SCPD: Please use the email list if at all possible; this is the easiest way for us to get your submissions.

Page 4: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Office Hours

Page 5: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Office Hours

Page 6: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Office Hours

Page 7: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Office Hours

Page 8: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Office Hours

Page 9: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Office hours start tomorrow.

Schedule available on the course website.

Page 10: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Friday Four Square

● Good snacks!● Good company!● Good game!● Good fun!● Today at 4:15 in

front of Gates.

Don't be this guy!

Page 11: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Outline for Today

● Logical Implication● What does “If P, then Q” mean?

● Proof by Contradiction● The basic method.● Contradictions and implication.● Contradictions and quantifiers.

● Proof by Contrapositive● The basic method.● An interesting application.

Page 12: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Logical Implication

Page 13: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Implications

● An implication is a statement of the form

If P, then Q.● Notation: We write “If P, then Q” as P → Q.

● Read: “P implies Q.”

● When P → Q, we call P the antecedent and Q the consequent.

Page 14: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

What does Implication Mean?

● The statement P → Q means exactly the following:

Whenever P is true,Q must be true as well.

● For example:● n is even → n2 is even.● x ∈ S → x ∈ T.

Page 15: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

What does Implication Not Mean?

● P → Q does not mean that whenever Q is true, P is true.● “If you are a Stanford student, you wear cardinal” does not mean that if you

wear cardinal, you are a Stanford student.

● (That would overcrowd the dorms)

● P → Q does not say anything about what happens if P is false.● “If you hit another skier, you're gonna have a bad time” doesn't mean that if

you don't hit other skiers, you're gonna to have a good time.

● (You might ski into a tree.)

● Vacuous truth: If P is never true, then P → Q is always true.

● P → Q does not say anything about causality.● “If I will it to be true, 2 + 2 = 4” is true because any time that I want it to be

true, 2 + 2 = 4 already was true.

● “If I will it to be false, 2 + 2 = 4” is also true, since whenever I don't want 2 + 2 = 4 to be true, 2 + 2 = 4 is true.

Page 16: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Implication, Diagrammatically

Set of where Q is true

Set of where P is true

Page 17: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Implication, Diagrammatically

Set of where Q is true

Set of where P is true

Any time P is true, Q is

true as well.

Page 18: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Implication, Diagrammatically

Set of where Q is true

Set of where P is true

Any time P is true, Q is

true as well.

Any time P isn't true, Q may or may not be true.

Page 19: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Alternative Forms of Implication

● All of the following are different ways of saying P → Q:

If P, then Q.

P implies Q.

P only if Q.

Q whenever P.

P is sufficient for Q.

Q is necessary for P.● Why?

Page 20: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

When P does not imply Q

● What would it mean for P → Q to be false?● Answer: There must be some way for P to be

true and Q to be false.● Why?

● P → Q means “any time P is true, Q is true.”● The only way to disprove this is to show that there

is some way for P to be true and Q to be false.

● To prove that P → Q is false, find an example of where P is true and Q is false.

Page 21: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

When P does not imply Q

● What would it mean for P → Q to be false?● Answer: There must be some way for P to be

true and Q to be false.● Why?

● P → Q means “any time P is true, Q is true.”● The only way to disprove this is to show that there

is some way for P to be true and Q to be false.

● To prove that P → Q is false, find an example of where P is true and Q is false.

Page 22: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

When P does not imply Q

● What would it mean for P → Q to be false?● Answer: There must be some way for P to be

true and Q to be false.● Why?

● P → Q means “any time P is true, Q is true.”● The only way to disprove this is to show that there

is some way for P to be true and Q to be false.

● To prove that P → Q is false, find an example of where P is true and Q is false.

Page 23: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

When P does not imply Q

● What would it mean for P → Q to be false?● Answer: There must be some way for P to be

true and Q to be false.● Why?

● P → Q means “any time P is true, Q is true.”● The only way to disprove this is to show that there

is some way for P to be true and Q to be false.

● To prove that P → Q is false, find an example of where P is true and Q is false.

Page 24: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

P → Q is false

Set of where Q is true

Set of where P is true

Page 25: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

P → Q is false

Set of where Q is true

Set of where P is true

P can be true without Q being

true as well

Page 26: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Common Mistake

● To show that P → Q is false, it is not sufficient to find a case where P is false and Q is false.

Page 27: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Common Mistake

● To show that P → Q is false, it is not sufficient to find a case where P is false and Q is false.

Set of where Q is true

Set of where P is true

Page 28: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Common Mistake

● To show that P → Q is false, it is not sufficient to find a case where P is false and Q is false.

Set of where Q is true

Set of where P is true

Both P and Q are

false

Page 29: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Proof by Contradiction

Page 30: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“When you have eliminated all which is impossible, then whatever remains, however

improbable, must be the truth.”

- Sir Arthur Conan Doyle, The Adventure of the Blanched Soldier

Page 31: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Proof by Contradiction

● A proof by contradiction is a proof that works as follows:● To prove that P is true, assume that P is not true.● Based on the assumption that P is not true,

conclude something impossible.● Assuming the logic is sound, the only option is that

the assumption that P is not true is incorrect.● Conclude, therefore, that P is true.

Page 32: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Contradictions and Implications

● Suppose we want to prove that P → Q is true by contradiction.

● The proof will look something like this:● Assume that P → Q is false.● Using this assumption, derive a contradiction.● Conclude that P → Q must be true.

Page 33: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Contradictions and Implications

● Suppose we want to prove that P → Q is true by contradiction.

● The proof will look something like this:● Assume that P → Q is false.● Using this assumption, derive a contradiction.● Conclude that P → Q must be true.

What does this mean?

Page 34: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Contradictions and Implications

● Suppose we want to prove that P → Q is true by contradiction.

● The proof will look something like this:● Assume that P is true and Q is false.● Using this assumption, derive a contradiction.● Conclude that P → Q must be true.

Page 35: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is even. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 36: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is even. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

????

Page 37: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is even. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 38: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is even. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 39: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is even. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 40: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is even. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 41: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is even. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 42: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is odd. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 43: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is odd. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 44: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is odd. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 45: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is odd. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

Page 46: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Simple Proof by Contradiction

Theorem: If n2 is even, then n is even.Proof: By contradiction; assume n2 is even but n is odd.

Since n is odd, n = 2k + 1 for some integer k.

Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Now, let m = 2k2 + 2k. Then n2 = 2m + 1, so by definition n2 is odd. But this is clearly impossible, since n2 is even.

We have reached a contradiction, so our assumption was false. Thus if n2 is even, n is even as well. ■

The three key pieces:

1. State that the proof is by contradiction.2. State what the negation of the original statement is.3. State you have reached a contradiction and what the contradiction entails.

You must include all three of these steps in your proofs!

The three key pieces:

1. State that the proof is by contradiction.2. State what the negation of the original statement is.3. State you have reached a contradiction and what the contradiction entails.

You must include all three of these steps in your proofs!

Page 47: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Biconditionals

● Combined with what we saw on Wednesday, we have proven

If n is even, n2 is even.

If n2 is even, n is even.

● We sometimes write this as

n is even if and only if n2 is even.

● This is often abbreviated

n is even iff n2 is even.

or as

n is even ↔ n2 is even

● This is called a biconditional.

Page 48: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

P ↔ Q

Page 49: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

P ↔ Q

Set where P is true

Page 50: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

P ↔ Q

Set where P is true

Set where Q is true

Page 51: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Proving Biconditionals

● To prove P iff Q, you need to prove that● P → Q, and● Q → P.

● You may use any proof techniques you'd like when doing so.● In our case, we used a direct proof and a proof by

contradiction.

● Just make sure to prove both directions of implication!

Page 52: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Difference Between if and iff

Page 53: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Difference Between if and iff

Page 54: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Difference Between if and iff

Suppose that I rudely cut you off.

If you listen to this bumper sticker, can you

honk at me?

Suppose that I rudely cut you off.

If you listen to this bumper sticker, can you

honk at me?

Page 55: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Difference Between if and iff

Page 56: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Difference Between if and iff

Suppose that I rudely cut you off.

If you listen to this bumper sticker, can you

honk at me?

Suppose that I rudely cut you off.

If you listen to this bumper sticker, can you

honk at me?

Page 57: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Rational and Irrational Numbers

● A rational number is a number r that can be written as

where● p and q are integers,● q ≠ 0, and● p and q have no common divisors other than ±1.

● A number that is not rational is called irrational.

r=pq

Page 58: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Rational and Irrational Numbers

● A rational number is a number r that can be written as

where● p and q are integers,● q ≠ 0, and● p and q have no common divisors other than ±1.

● A number that is not rational is called irrational.

r=pq

Page 59: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

Page 60: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

Page 61: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2?????

Page 62: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2√2

Page 63: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2√2

Page 64: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 65: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 66: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 67: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 68: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 69: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 70: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 71: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 72: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 73: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 74: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 75: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 76: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 77: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2√2

Page 78: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2

√2√2

Page 79: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■

√2

√2 √2

√2

√2√2

Page 80: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor. This contradicts our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■√2

Page 81: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Famous and Beautiful ProofTheorem: √2 is irrational. Proof: By contradiction; assume √2 is rational. Then there exists integers p and q such that q ≠ 0, p / q = √2, and p and q have no common divisors other than 1 and -1.

Since p / q = √2 and q ≠ 0, p = √2q, so p2 = 2q2.

Since q2 is an integer, p2 is even. By our earlier result, since p2 is even, p is even. Thus there is an integer k such that p = 2k.

Therefore, 2q2 = p2 = (2k)2 = 4k2, so q2 = 2k2.

Since k2 is an integer, q2 is even. By our earlier result, since q2 is even, q is even. But this means that both p and q have 2 as a common divisor, contradicting our earlier assertion that their only common divisors are 1 and -1.

We have reached a contradiction, so our assumption was incorrect. Consequently, √2 is irrational. ■√2

The three key pieces:

1. State that the proof is by contradiction.2. State what the negation of the original statement is.3. State you have reached a contradiction and what the contradiction entails.

You must include all three of these steps in your proofs!

The three key pieces:

1. State that the proof is by contradiction.2. State what the negation of the original statement is.3. State you have reached a contradiction and what the contradiction entails.

You must include all three of these steps in your proofs!

Page 82: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Word of Warning

● To attempt a proof by contradiction, make sure that what you're assuming actually is the opposite of what you want to prove!

● Otherwise, your entire proof is invalid.

Page 83: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any natural number n, the sum of all natural numbers less than n is not equal to n.

Proof: By contradiction; assume that for any natural number n, the sum of all smaller positive integers is equal to n. But this is clearly false, because 5 ≠ 1 + 2 + 3 + 4 = 10. We have reached a contradiction, so our assumption was false and the theorem must be true. ■

Page 84: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any natural number n, the sum of all natural numbers less than n is not equal to n.

Proof: By contradiction; assume that for any natural number n, the sum of all smaller positive integers is equal to n. But this is clearly false, because 5 ≠ 1 + 2 + 3 + 4 = 10. We have reached a contradiction, so our assumption was false and the theorem must be true. ■

Page 85: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any natural number n, the sum of all natural numbers less than n is not equal to n.

Proof: By contradiction; assume that for any natural number n, the sum of all smaller positive integers is equal to n. But this is clearly false, because 5 ≠ 1 + 2 + 3 + 4 = 10. We have reached a contradiction, so our assumption was false and the theorem must be true. ■

Page 86: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any natural number n, the sum of all natural numbers less than n is not equal to n.

Proof: By contradiction; assume that for any natural number n, the sum of all smaller positive integers is equal to n. But this is clearly false, because 5 ≠ 1 + 2 + 3 + 4 = 10. We have reached a contradiction, so our assumption was false and the theorem must be true. ■

Is this really the opposite of the

original statement?

Is this really the opposite of the

original statement?

Page 87: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The contradiction of the universal statement

For all x, P(x) is true.

is not

For all x, P(x) is false.

Page 88: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“All My Friends Are Taller Than Me”

Page 89: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“All My Friends Are Taller Than Me”

Page 90: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“All My Friends Are Taller Than Me”

Me

Page 91: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“All My Friends Are Taller Than Me”

Me

Page 92: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“All My Friends Are Taller Than Me”

MeMy Friends

Page 93: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“All My Friends Are Taller Than Me”

MeMy Friends

Page 94: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“All My Friends Are Taller Than Me”

MeMy Friends

Page 95: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The contradiction of the universal statement

For all x, P(x) is true.

is the existential statement

There exists an x such that P(x) is false.

Page 96: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The contradiction of the universal statement

For all x, P(x) is true.

is the existential statement

There exists an x such that P(x) is false.

Page 97: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

For all natural numbers n,the sum of all natural numberssmaller than n is not equal to n.

There exists a natural number n such that“the sum of all natural numberssmaller than n is not equal to n”

is false.

Page 98: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

For all natural numbers n,the sum of all natural numberssmaller than n is not equal to n.

There exists a natural number n such that“the sum of all natural numberssmaller than n is not equal to n”

is false.

Page 99: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

For all natural numbers n,the sum of all natural numberssmaller than n is not equal to n.

becomes

There exists a natural number n such that“the sum of all natural numberssmaller than n is not equal to n”

is false.

Page 100: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

For all natural numbers n,the sum of all natural numberssmaller than n is not equal to n.

becomes

There exists a natural number n such that“the sum of all natural numberssmaller than n is not equal to n”

is false.

Page 101: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

For all natural numbers n,the sum of all natural numberssmaller than n is not equal to n.

becomes

There exists a natural number n such thatthe sum of all natural numbers

smaller than n is equal to n

Page 102: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any natural number n, the sum of all natural numbers less than n is not equal to n.

Proof: By contradiction; assume that for any natural number n, the sum of all smaller positive integers is equal to n. But this is clearly false, because 5 ≠ 1 + 2 + 3 + 4 = 10. We have reached a contradiction, so our assumption was false and the theorem must be true. ■

Page 103: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any natural number n, the sum of all natural numbers less than n is not equal to n.

Proof: By contradiction; assume that for any natural number n, the sum of all smaller positive integers is equal to n. But this is clearly false, because 5 ≠ 1 + 2 + 3 + 4 = 10. We have reached a contradiction, so our assumption was false and the theorem must be true. ■

Page 104: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any natural number n, the sum of all natural numbers less than n is not equal to n.

Proof: By contradiction; assume that for any natural number n, the sum of all smaller positive integers is equal to n. But this is clearly false, because 5 ≠ 1 + 2 + 3 + 4 = 10. We have reached a contradiction, so our assumption was false and the theorem must be true. ■

Page 105: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The contradiction of the existential statement

There exists an x such that P(x) is true.

is not

There exists an x such that P(x) is false.

Page 106: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“Some Friend Is Shorter Than Me”

Page 107: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“Some Friend Is Shorter Than Me”

Page 108: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“Some Friend Is Shorter Than Me”

Me

Page 109: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“Some Friend Is Shorter Than Me”

Me

Page 110: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“Some Friend Is Shorter Than Me”

MeMy Friends

Page 111: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“Some Friend Is Shorter Than Me”

MeMy Friends

Page 112: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

“Some Friend Is Shorter Than Me”

MeMy Friends

Page 113: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The contradiction of the existential statement

There exists an x such that P(x) is true.

is the universal statement

For all x, P(x) is false.

Page 114: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The contradiction of the existential statement

There exists an x such that P(x) is true.

is the universal statement

For all x, P(x) is false.

Page 115: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Terribly Flawed ProofTheorem: There exists an integer n such that for every integer m, m ≤ n.

Proof: By contradiction; assume that there exists an integer n such that for every integer m, m > n.

Since for any m, we have that m > n is true, we know in particular that n – 1 > n. But we also know that n – 1 < n.

We have reached a contradiction, so our assumption was incorrect. Thus there exists an integer n such that for every integer m, m ≤ n. ■

Page 116: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Terribly Flawed ProofTheorem: There exists an integer n such that for every integer m, m ≤ n.

Proof: By contradiction; assume that there exists an integer n such that for every integer m, m > n.

Since for any m, we have that m > n is true, we know in particular that n – 1 > n. But we also know that n – 1 < n.

We have reached a contradiction, so our assumption was incorrect. Thus there exists an integer n such that for every integer m, m ≤ n. ■

Page 117: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such that“m ≤ n” is false.

Page 118: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such that“m ≤ n” is false.

Page 119: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such that“m ≤ n” is false.

Page 120: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such that“m ≤ n” is false.

This statement is itself a universal statement! So let's use our existing techniques to

find its negation.

This statement is itself a universal statement! So let's use our existing techniques to

find its negation.

Page 121: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such that“m ≤ n” is false.

Page 122: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomesbecomes

There exists an integer m such that“m ≤ n” is false.

Page 123: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such that“m ≤ n” is false.

Page 124: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such that“m ≤ n” is false.

Page 125: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such thatm > n

Page 126: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such thatm > n

Page 127: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,“for every integer m, m ≤ n” is false.

For every integer m,m ≤ n

becomes

There exists an integer m such thatm > n

Now that we have the negation, let's

go replace it.

Now that we have the negation, let's

go replace it.

Page 128: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

There exists an integer n such thatfor every integer m, m ≤ n.

becomes

For every integer n,There exists an integer m such that

m > n

For every integer m,m ≤ n

becomes

There exists an integer m such thatm > n

Page 129: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Terribly Flawed ProofTheorem: There exists an integer n such that for every integer m, m ≤ n.

Proof: By contradiction; assume that there exists an integer n such that for every integer m, m > n.

Since for any m, we have that m > n is true, we know in particular that n – 1 > n. But we also know that n – 1 < n.

We have reached a contradiction, so our assumption was incorrect. Thus there exists an integer n such that for every integer m, m ≤ n. ■

Page 130: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Terribly Flawed ProofTheorem: There exists an integer n such that for every integer m, m ≤ n.

Proof: By contradiction; assume that there exists an integer n such that for every integer m, m > n.

Since for any m, we have that m > n is true, we know in particular that n – 1 > n. But we also know that n – 1 < n.

We have reached a contradiction, so our assumption was incorrect. Thus there exists an integer n such that for every integer m, m ≤ n. ■

Page 131: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Terribly Flawed ProofTheorem: There exists an integer n such that for every integer m, m ≤ n.

Proof: By contradiction; assume that there exists an integer n such that for every integer m, m > n.

Since for any m, we have that m > n is true, we know in particular that n – 1 > n. But we also know that n – 1 < n.

We have reached a contradiction, so our assumption was incorrect. Thus there exists an integer n such that for every integer m, m ≤ n. ■

For every integer n,There exists an integer m such that

m > n

For every integer n,There exists an integer m such that

m > n

Page 132: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

A Terribly Flawed ProofTheorem: There exists an integer n such that for every integer m, m ≤ n.

Proof: By contradiction; assume that there exists an integer n such that for every integer m, m > n.

Since for any m, we have that m > n is true, we know in particular that n – 1 > n. But we also know that n – 1 < n.

We have reached a contradiction, so our assumption was incorrect. Thus there exists an integer n such that for every integer m, m ≤ n. ■

For every integer n,There exists an integer m such that

m > n

For every integer n,There exists an integer m such that

m > n

Page 133: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Story So Far

Page 134: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Proof by Contrapositive

Page 135: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Honk if You Love Formal Logic

Page 136: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Honk if You Love Formal Logic

Suppose that you're driving this car and you don't get honked at.

What can you say about the people driving

behind you?

Suppose that you're driving this car and you don't get honked at.

What can you say about the people driving

behind you?

Page 137: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Contrapositive

● The contrapositive of “If P, then Q” is “If not Q, then not P.”

● Example:● “If I'd raptor-proofed my house, then I would have

survived the dinosaur attack.”● Contrapositive: “If I didn't survive the dinosaur attack,

then I didn't raptor-proof my house.”

● Another example:● “If I had been a good test subject, then I would have

received cake.”● Contrapositive: “If I didn't receive cake, then I wasn't a

good test subject.”

Page 138: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Notation

● Recall that we can write “If P, then Q” as P → Q.

● Notation: We write “not P” as ¬P.● Examples:

● “If P is false, then Q is true:” ¬P → Q● “Q is false whenever P is false:” ¬P → ¬Q

● The contrapositive of P → Q is ¬Q → ¬P.

Page 139: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and Q is false. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 140: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and Q is false. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

This is a very different style of proof from before; we're proving a result about logic!

This is a very different style of proof from before; we're proving a result about logic!

Page 141: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and Q is false. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 142: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and Q is false. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

????

Page 143: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and Q is false. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 144: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and Q is false. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 145: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and Q is false. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 146: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and ¬Q is true. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 147: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and ¬Q is true. Since ¬Q is true, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 148: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and ¬Q is true. Since ¬Q is true and ¬Q → ¬P, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 149: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and ¬Q is true. Since ¬Q is true and ¬Q → ¬P, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q.

An Important Result

Page 150: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If ¬Q → ¬P, then P → Q.Proof: By contradiction. Assume that ¬Q → ¬P, but that P → Q is false. Since P → Q is false, it must be true that P is true and ¬Q is true. Since ¬Q is true and ¬Q → ¬P, ¬P is true. But this means that we have shown P and ¬P, which is impossible. We have reached a contradiction, so if ¬Q → ¬P, then P → Q. ■

An Important Result

Page 151: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

To show that P → Q, you may instead show that ¬Q → ¬P.

This is called a proof by contrapositive.

An Important Proof Strategy

Page 152: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; We prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 153: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; We prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 154: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; We prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 155: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; We prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

?????

Page 156: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

n2 is even

then

n is even

If

n is odd

then

n2 is odd

Page 157: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

n2 is even

then

n is even

If

n is odd

then

n2 is odd

Page 158: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

n2 is even

then

n is even

If

n is odd

then

n2 is odd

Page 159: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

n2 is even

then

n is even

If

n is odd

then

n2 is odd

Page 160: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

n2 is even

then

n is even

If

n is odd

then

n2 is odd

Page 161: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; We prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

?????

Page 162: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 163: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 164: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 165: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 166: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 167: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 168: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Page 169: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If n2 is even, then n is even.

Proof: By contrapositive; we prove that if n is odd, then n2 is odd.

Since n is odd, n = 2k + 1 for some integer k. Then n2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.

Since (2k2 + 2k) is an integer, n2 is odd. ■

Notice the structure of the proof. We begin by

announcing that it's a proof by contrapositive, then state the contrapositive, and finally

prove it.

Notice the structure of the proof. We begin by

announcing that it's a proof by contrapositive, then state the contrapositive, and finally

prove it.

Page 170: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If x + y = 16, then x ≥ 8 or y ≥ 8.

Proof: By contrapositive. We prove that if both x < 8 and y < 8, then x + y ≠ 16. Since both x < 8 and y < 8, then x + y < 16, so x + y ≠ 16. ■

Page 171: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If x + y = 16, then x ≥ 8 or y ≥ 8.

Proof: By contrapositive. We prove that if both x < 8 and y < 8, then x + y ≠ 16. Since both x < 8 and y < 8, then x + y < 16, so x + y ≠ 16. ■

????

Page 172: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

x + y = 16

then

x ≥ 8 or y ≥ 8

If

both x < 8 and y < 8

then

x + y ≠ 16

Page 173: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

x + y = 16

then

x ≥ 8 or y ≥ 8

If

both x < 8 and y < 8

then

x + y ≠ 16

Page 174: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

x + y = 16

then

x ≥ 8 or y ≥ 8

If

both x < 8 and y < 8

then

x + y ≠ 16

Page 175: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

x + y = 16

then

x ≥ 8 or y ≥ 8

If

both x < 8 and y < 8

then

x + y ≠ 16

Pro tip: The opposite of “A or B” is “not A and not B”

Page 176: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

x + y = 16

then

x ≥ 8 or y ≥ 8

If

both x < 8 and y < 8

then

x + y ≠ 16

Page 177: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

x + y = 16

then

x ≥ 8 or y ≥ 8

If

both x < 8 and y < 8

then

x + y ≠ 16

Page 178: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

x + y = 16

then

x ≥ 8 or y ≥ 8

If

both x < 8 and y < 8

then

x + y ≠ 16

Page 179: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If x + y = 16, then x ≥ 8 or y ≥ 8.

Proof: By contrapositive. We prove that if both x < 8and y < 8, then x + y ≠ 16. Since both x < 8 andy < 8, then x + y < 8 + y < 8 + 8 = 16,so x + y ≠ 16. ■

Page 180: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If x + y = 16, then x ≥ 8 or y ≥ 8.

Proof: By contrapositive. We prove that if both x < 8and y < 8, then x + y ≠ 16. Since both x < 8 andy < 8, then x + y < 8 + y < 8 + 8 = 16,so x + y ≠ 16. ■

Page 181: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: If x + y = 16, then x ≥ 8 or y ≥ 8.

Proof: By contrapositive. We prove that if both x < 8and y < 8, then x + y ≠ 16. Since both x < 8 andy < 8, then x + y < 8 + y < 8 + 8 = 16,so x + y ≠ 16. ■

Page 182: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any sets A and B,if x ∉ A ∩ B, then x ∉ A.

Proof: By contrapositive; we show that if x ∈ A ∩ B,then x ∈ A.

Since x ∈ A ∩ B, x ∈ A and x ∈ B.Consequently, x ∈ A as required. ■

Page 183: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any sets A and B,if x ∉ A ∩ B, then x ∉ A.

Proof: By contrapositive; we show thatif x ∈ A ∩ B, then x ∈ A.

Since x ∈ A ∩ B, x ∈ A and x ∈ B.Consequently, x ∈ A as required. ■

Page 184: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any sets A and B,if x ∉ A ∩ B, then x ∉ A.

Proof: By contrapositive; we show thatif x ∈ A ∩ B, then x ∈ A.

Since x ∈ A ∩ B, x ∈ A and x ∈ B.Consequently, x ∈ A as required. ■

Page 185: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

An Incorrect Proof

Theorem: For any sets A and B,if x ∉ A ∩ B, then x ∉ A.

Proof: By contrapositive; we show thatif x ∈ A ∩ B, then x ∈ A.

Since x ∈ A ∩ B, x ∈ A and x ∈ B.Consequently, x ∈ A as required. ■

Page 186: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Common Pitfalls

To prove P → Q by contrapositive, show that

¬Q → ¬P

Do not show that

¬P → ¬Q

(Showing ¬P → ¬Q proves that Q → P, not the other way around!)

Page 187: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Common Pitfalls

To prove P → Q by contrapositive, show that

¬Q → ¬P

Do not show that

¬P → ¬Q

(Showing ¬P → ¬Q proves that Q → P, not the other way around!)

Page 188: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Pigeonhole Principle

Page 189: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Pigeonhole Principle

● Suppose that you have n pigeonholes.● Suppose that you have m > n pigeons.● If you put the pigeons into the pigeonholes,

some pigeonhole will have more than one pigeon in it.

Page 190: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Pigeonhole Principle

● Suppose that you have n pigeonholes.● Suppose that you have m > n pigeons.● If you put the pigeons into the pigeonholes,

some pigeonhole will have more than one pigeon in it.

Page 191: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Pigeonhole Principle

● Suppose that you have n pigeonholes.● Suppose that you have m > n pigeons.● If you put the pigeons into the pigeonholes,

some pigeonhole will have more than one pigeon in it.

Page 192: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

The Pigeonhole Principle

● Suppose that you have n pigeonholes.● Suppose that you have m > n pigeons.● If you put the pigeons into the pigeonholes,

some pigeonhole will have more than one pigeon in it.

Page 193: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

Page 194: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

Page 195: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

?????

Page 196: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

Page 197: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

Page 198: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

If

“there is some bin containing at least two objects” is false

then

m ≤ n

Page 199: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

If

“there is some bin containing at least two objects” is false

then

m ≤ n

Page 200: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

If

every bin does not contain at least two objects

then

m ≤ n

Page 201: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

If

every bin contains at most one object

then

m ≤ n

Page 202: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

If

every bin contains at most one object

then

m ≤ n

Page 203: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

If

m > n

then

there is some bin containing at least two objects

If

every bin contains at most one object

then

m ≤ n

Page 204: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

Page 205: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

Page 206: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

m=∑i=1

n

x i

m = ∑i=1

n

x i ≤ ∑i=1

n

1 = n

Page 207: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

m=∑i=1

n

x i

m = ∑i=1

n

x i ≤ ∑i=1

n

1 = n

Page 208: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

m=∑i=1

n

x i

m = ∑i=1

n

x i ≤ ∑i=1

n

1 = n

Page 209: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

m=∑i=1

n

x i

m = ∑i=1

n

x i ≤ ∑i=1

n

1 = n

Page 210: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

m=∑i=1

n

x i

m = ∑i=1

n

x i ≤ ∑i=1

n

1 = n

Page 211: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

m=∑i=1

n

x i

m = ∑i=1

n

x i ≤ ∑i=1

n

1 = n

Page 212: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Let m objects be distributed into n bins. If m > n, then some bin contains at least two objects.

Proof: By contrapositive; we prove that if every bin contains at most one object, then m ≤ n. Let x

i be the

number of objects in bin i. Since m is the number of total objects, we have that

Since every bin has at most one object, xi ≤ 1 for all i.

Thus

as required. ■

m=∑i=1

n

x i

m = ∑i=1

n

x i ≤ ∑i=1

n

1 = n

Page 213: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Using the Pigeonhole Principle

● The pigeonhole principle is an enormously useful lemma in many proofs.● If we have time, we'll spend a full lecture on it in a

few weeks.

● General structure of a pigeonhole proof:● Find m objects to distribute into n buckets, with

m > n.● Using the pigeonhole principle, conclude that some

bucket has at least two objects in it.● Use this conclusion to show the desired result.

Page 214: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Some Simple Applications

● Any group of 367 people must have a pair of people that share a birthday.● 366 possible birthdays (pigeonholes)● 367 people (pigeons)

● Two people in San Francisco have the exact same number of hairs on their head.● Maximum number of hairs ever found on a human

head is no greater than 500,000.● There are over 800,000 people in San Francisco.

Page 215: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Page 216: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Thought: There are two colors here, so if we start picking points, we'll be dropping them into one of two buckets (red or blue).

How many points do we need to pick to guarantee that we get two of the same

color?

Thought: There are two colors here, so if we start picking points, we'll be dropping them into one of two buckets (red or blue).

How many points do we need to pick to guarantee that we get two of the same

color?

Page 217: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Page 218: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d d

Page 219: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d d

Page 220: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d d

Page 221: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d d

Page 222: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d d

Page 223: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d d

What if we could force these two points to be

distance d from one another?

What if we could force these two points to be

distance d from one another?

Page 224: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d

d

d

Page 225: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

d

d

d

Any pair of these points is at distance d from one another. Since two must be the same color, there is a pair of points of the same color at distance d!

Any pair of these points is at distance d from one another. Since two must be the same color, there is a pair of points of the same color at distance d!

Page 226: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Page 227: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Page 228: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Page 229: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Page 230: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Theorem: Suppose that every point in the real plane is colored either red or blue. Then for any distance d > 0, there are two points exactly distance d from one another that are the same color.

Proof: Consider any equilateral triangle whose side lengths are d. Put this triangle anywhere in the plane. By the pigeonhole principle, because there are three vertices, two of the vertices must have the same color. These vertices are at distance d from each other, as required. ■

A More Complex Application

Page 231: Indirect Proofs - Stanford University...P → Q means “any time P is true, Q is true.” The only way to disprove this is to show that there is some way for P to be true and Q to

Next Time

● Proof by Induction● The most epically awesome proof technique ever!