46
1 Methods of Proof Methods of Proof

1 Methods of Proof. 2 Consider (p (p→q)) → q pqp→q p (p→q)) (p (p→q)) → q TTTTT TFFFT FTTFT FFTFT

Embed Size (px)

Citation preview

Page 1: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

11

Methods of ProofMethods of Proof

Page 2: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

22

Consider (p Consider (p (p→q)) → q (p→q)) → q

pp qq p→qp→q pp(p→q))(p→q)) (p(p(p→q)) → q(p→q)) → q

TT TT TT TT TT

TT FF FF FF TT

FF TT TT FF TT

FF FF TT FF TT

q

qp

p

Page 3: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

33

ExampleExample

Assume you are given the following two Assume you are given the following two statements:statements: ““you are in this class”you are in this class” ““if you are in this class, you will get a grade”if you are in this class, you will get a grade”

Let p = “you are in this class”Let p = “you are in this class”Let q = “you will get a grade”Let q = “you will get a grade”

you can conclude that you will get a gradeyou can conclude that you will get a grade

q

qp

p

Page 4: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

44

Assume that we know: Assume that we know: ¬¬q and p q and p →→ q q Recall that p Recall that p →→ q q ¬¬q q →→ ¬¬pp

Thus, we know Thus, we know ¬¬q and q and ¬¬q q →→ ¬¬pp

We can conclude We can conclude ¬¬pp

p

qp

q

Page 5: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

55

Assume you are given the following two Assume you are given the following two statements:statements: ““you will not get a grade”you will not get a grade” ““if you are in this class, you will get a grade”if you are in this class, you will get a grade”

Let p = “you are in this class”Let p = “you are in this class”Let q = “you will get a grade”Let q = “you will get a grade”

you can conclude that you are not in this classyou can conclude that you are not in this class

p

qp

q

Page 6: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

66

Addition & SimplificationAddition & Simplification

Addition: If you know Addition: If you know that p is true, then p that p is true, then p q q will ALWAYS be truewill ALWAYS be true

Simplification: If p Simplification: If p q is q is true, then p will true, then p will ALWAYS be trueALWAYS be true

qp

p

p

qp

Page 7: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

Example of proofExample of proof

We have the hypotheses:We have the hypotheses:

““It isIt is not not sunny this afternoonsunny this afternoon and and it it is colder than yesterdayis colder than yesterday””

““We will go swimmingWe will go swimming only if only if it is it is sunnysunny””

““If If we dowe do not not go swimminggo swimming, then , then we we will take a tripwill take a trip””

““If If we take a tripwe take a trip, then , then we will be we will be home by sunsethome by sunset””

Does this imply that “Does this imply that “we will be we will be home by sunsethome by sunset”?”?

77

¬p q

r → p

¬r → s

s → t

t

p

q

r

s

t

Page 8: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

88

Example of proofExample of proof

1.1. ¬p ¬p q q 11stst hypothesis hypothesis

2.2. ¬p¬p Simplification using step 1Simplification using step 1

3.3. r → pr → p 22ndnd hypothesis hypothesis

4.4. ¬r¬r using steps 2 & 3using steps 2 & 3

5.5. ¬r → s¬r → s 33rdrd hypothesis hypothesis

6.6. ss using steps 4 & 5using steps 4 & 5

7.7. s → t s → t 44thth hypothesis hypothesis

8.8. tt using steps 6 & 7using steps 6 & 7

p

qp

q

qp

p

p

qp

q

Page 9: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

99

So what did we show?So what did we show?

We showed that:We showed that: [(¬p [(¬p q) q) (r → p) (r → p) (¬r → s) (¬r → s) (s → t)] → t (s → t)] → t That when the 4 hypotheses are true, then the That when the 4 hypotheses are true, then the

implication is trueimplication is true In other words, we showed the above is a tautology!In other words, we showed the above is a tautology!

To show this, enter the following into the truth To show this, enter the following into the truth table generatortable generator

Page 10: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1010

More rules of inferenceMore rules of inference

Conjunction: if p and q are true Conjunction: if p and q are true separately, then pseparately, then pq is trueq is true

Disjunctive syllogism: If pDisjunctive syllogism: If pq is q is true, and p is false, then q must true, and p is false, then q must be truebe true

Resolution: If pResolution: If pq is true, and ¬pq is true, and ¬pr r is true, then qis true, then qr must be truer must be true

Hypothetical syllogism: If p→q is Hypothetical syllogism: If p→q is true, and q→r is true, then p→r true, and q→r is true, then p→r must be truemust be true

qp

q

p

q

p

qp

rq

rp

qp

rp

rq

qp

Page 11: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1111

ExampleExample

Assume you are given the following two Assume you are given the following two statements:statements: ““you will get a grade”you will get a grade” ““if you are in this class, you will get a grade”if you are in this class, you will get a grade”

Let p = “you are in this class”Let p = “you are in this class”

Let q = “you will get a grade”Let q = “you will get a grade”

You CANNOT conclude that you are in this classYou CANNOT conclude that you are in this class You could be getting a grade for another classYou could be getting a grade for another class

Page 12: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1212

ExampleExample

Assume you are given the following two Assume you are given the following two statements:statements: ““you are not in this class”you are not in this class” ““if you are in this class, you will get a grade”if you are in this class, you will get a grade”

Let p = “you are in this class”Let p = “you are in this class”Let q = “you will get a grade”Let q = “you will get a grade”

You CANNOT conclude that you will not get a You CANNOT conclude that you will not get a gradegrade You could be getting a grade for another classYou could be getting a grade for another class

q

qp

p

Page 13: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1313

Rules of inference for the Rules of inference for the universal quantifieruniversal quantifier

Assume that we know that Assume that we know that x P(x) is truex P(x) is true Then we can conclude that P(c) is trueThen we can conclude that P(c) is true

Here c stands for some specific constantHere c stands for some specific constant This is called “universal instantiation”This is called “universal instantiation”

Assume that we know that P(c) is true for Assume that we know that P(c) is true for any value of cany value of c Then we can conclude that Then we can conclude that x P(x) is truex P(x) is true This is called “universal generalization”This is called “universal generalization”

Page 14: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1414

Rules of inference for the Rules of inference for the existential quantifierexistential quantifier

Assume that we know that Assume that we know that x P(x) is truex P(x) is true Then we can conclude that P(c) is true for Then we can conclude that P(c) is true for

some value of csome value of c This is called “existential instantiation”This is called “existential instantiation”

Assume that we know that P(c) is true for Assume that we know that P(c) is true for some value of csome value of c Then we can conclude that Then we can conclude that x P(x) is truex P(x) is true This is called “existential generalization”This is called “existential generalization”

Page 15: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1515

Example of proofExample of proof

Given the hypotheses:Given the hypotheses: ““Sara, a student in this class, owns a Sara, a student in this class, owns a

red convertible.”red convertible.” ““Everybody who owns a red Everybody who owns a red

convertible has gotten at least one convertible has gotten at least one ticket”ticket”

Can you conclude: “Somebody in Can you conclude: “Somebody in this class has gotten a ticket”?this class has gotten a ticket”?

C(Sara)R(Sara)

x (R(x)→T(x))

x (C(x)T(x))

Page 16: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1616

Example of proofExample of proof

1.1. x (R(x)→T(x))x (R(x)→T(x)) 33rdrd hypothesis hypothesis

2.2. R(Sara) → T(Sara)R(Sara) → T(Sara) Universal instantiation using step 1Universal instantiation using step 1

3.3. R(Sara)R(Sara) 22ndnd hypothesis hypothesis

4.4. T(Sara)T(Sara) using steps 2 & 3using steps 2 & 3

5.5. C(Sara)C(Sara) 11stst hypothesis hypothesis

6.6. C(Sara) C(Sara) T(Sara) T(Sara) Conjunction using steps 4 & 5Conjunction using steps 4 & 5

7.7. x (C(x)x (C(x)T(x))T(x)) Existential generalization using Existential generalization using

step 6step 6Thus, we have shown that “Somebody in

this class has gotten a ticket”

Page 17: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1717

Example of proofExample of proof

Given the hypotheses:Given the hypotheses: ““There is someone in this class There is someone in this class

who has been to Jordan”who has been to Jordan” ““Everyone who goes to Jordan Everyone who goes to Jordan

visits the Petra”visits the Petra”

Can you conclude: “Someone Can you conclude: “Someone in this class has visited the in this class has visited the Petra”?Petra”?

x (C(x)F(x))

x (F(x)→L(x))

x (C(x)L(x))

Page 18: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1818

Example of proofExample of proof

1.1. x (C(x)x (C(x)F(x))F(x)) 11stst hypothesis hypothesis

2.2. C(y) C(y) F(y) F(y) Existential instantiation using step 1Existential instantiation using step 1

3.3. F(y)F(y) Simplification using step 2Simplification using step 2

4.4. C(y)C(y) Simplification using step 2Simplification using step 2

5.5. x (F(x)→L(x))x (F(x)→L(x)) 22ndnd hypothesis hypothesis

6.6. F(y) → L(y)F(y) → L(y) Universal instantiation using step 5Universal instantiation using step 5

7.7. L(y)L(y) using steps 3 & 6using steps 3 & 6

8.8. C(y) C(y) L(y) L(y) Conjunction using steps 4 & 7Conjunction using steps 4 & 7

9.9. x (C(x)x (C(x)L(x))L(x)) Existential generalization usingExistential generalization usingstep 8step 8

Thus, we have shown that “Someone in this class has visited the Petra”

Page 19: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

1919

Proof methodsProof methods

We will discuss ten proof methods:We will discuss ten proof methods:1.1. Direct proofsDirect proofs2.2. Indirect proofsIndirect proofs3.3. Vacuous proofsVacuous proofs4.4. Trivial proofsTrivial proofs5.5. Proof by contradictionProof by contradiction6.6. Proof by casesProof by cases7.7. Proofs of equivalenceProofs of equivalence8.8. Existence proofsExistence proofs9.9. Uniqueness proofsUniqueness proofs10.10. CounterexamplesCounterexamples

Page 20: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2020

Direct proofsDirect proofs

Consider an implication: p→qConsider an implication: p→q If p is false, then the implication is always trueIf p is false, then the implication is always true Thus, show that if p is true, then q is trueThus, show that if p is true, then q is true

To perform a direct proof, assume that p is To perform a direct proof, assume that p is true, and show that q must therefore be true, and show that q must therefore be truetrue

Page 21: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2121

Direct proof exampleDirect proof example

Show that the square of an even number is an Show that the square of an even number is an even numbereven number

Rephrased: if n is even, then nRephrased: if n is even, then n22 is even is even

Assume n is evenAssume n is even Thus, n = 2k, for some k (definition of even Thus, n = 2k, for some k (definition of even

numbers)numbers) nn22 = (2k) = (2k)22 = 4k = 4k22 = 2(2k = 2(2k22)) As nAs n22 is 2 times an integer, n is 2 times an integer, n22 is thus even is thus even

Page 22: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2222

Indirect proofsIndirect proofs

Consider an implication: p→qConsider an implication: p→q It’s contrapositive is ¬q→¬pIt’s contrapositive is ¬q→¬p

Is logically equivalent to the original implication!Is logically equivalent to the original implication! If the antecedent (¬q) is false, then the If the antecedent (¬q) is false, then the

contrapositive is always truecontrapositive is always true Thus, show that if ¬q is true, then ¬p is trueThus, show that if ¬q is true, then ¬p is true

To perform an indirect proof, do a direct To perform an indirect proof, do a direct proof on the contrapositiveproof on the contrapositive

Page 23: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2323

Indirect proof exampleIndirect proof example

If nIf n22 is an odd integer then n is an odd integer is an odd integer then n is an odd integer

Prove the contrapositive: If n is an even integer, Prove the contrapositive: If n is an even integer, then nthen n22 is an even integer is an even integer

Proof: n=2k for some integer k (definition of even Proof: n=2k for some integer k (definition of even numbers)numbers)

nn22 = (2k) = (2k)22 = 4k = 4k22 = 2(2k = 2(2k22))

Since nSince n22 is 2 times an integer, it is even is 2 times an integer, it is even

Page 24: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2424

Which to useWhich to use

When do you use a direct proof versus an When do you use a direct proof versus an indirect proof?indirect proof?

If it’s not clear from the problem, try direct If it’s not clear from the problem, try direct first, then indirect secondfirst, then indirect second If indirect fails, try the other proofsIf indirect fails, try the other proofs

Page 25: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2525

Example of which to useExample of which to use Prove that if n is an integer and nProve that if n is an integer and n33+5 is odd, then n is +5 is odd, then n is

eveneven

Via direct proofVia direct proof nn33+5 = 2k+1 for some integer k (definition of odd +5 = 2k+1 for some integer k (definition of odd

numbers)numbers) nn33 = 2k+6 = 2k+6 Umm…Umm…

So direct proof didn’t work out. Next up: indirect So direct proof didn’t work out. Next up: indirect proofproof

3 62 kn

Page 26: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2626

Example of which to useExample of which to use

Prove that if n is an integer and nProve that if n is an integer and n33+5 is odd, then n is +5 is odd, then n is eveneven

Via indirect proofVia indirect proof Contrapositive: If n is odd, then nContrapositive: If n is odd, then n33+5 is even+5 is even Assume n is odd, and show that nAssume n is odd, and show that n33+5 is even+5 is even n=2k+1 for some integer k (definition of odd numbers)n=2k+1 for some integer k (definition of odd numbers) nn33+5 = (2k+1)+5 = (2k+1)33+5 = 8k+5 = 8k33+12k+12k22+6k+6 = 2(4k+6k+6 = 2(4k33+6k+6k22+3k+3)+3k+3) As 2(4kAs 2(4k33+6k+6k22+3k+3) is 2 times an integer, it is even+3k+3) is 2 times an integer, it is even

Page 27: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2727

Proof by contradiction example 1Proof by contradiction example 1

Theorem (by Euclid): There are infinitely many Theorem (by Euclid): There are infinitely many prime numbers. prime numbers.

Proof. Assume there are a finite number of primesProof. Assume there are a finite number of primes

List them as follows: pList them as follows: p11, p, p22 …, p …, pnn..

Consider the number q = pConsider the number q = p11pp22 … p … pnn + 1 + 1 This number is not divisible by any of the listed primesThis number is not divisible by any of the listed primes

If we divided pIf we divided pii into q, there would result a remainder of 1 into q, there would result a remainder of 1 We must conclude that q is a prime number, not among We must conclude that q is a prime number, not among

the primes listed abovethe primes listed aboveThis contradicts our assumption that all primes are in the list This contradicts our assumption that all primes are in the list pp11, p, p22 …, p …, pnn..

Page 28: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2828

Proof by contradiction example 2Proof by contradiction example 2

Prove that if n is an integer and nProve that if n is an integer and n33+5 is odd, then n is even+5 is odd, then n is even Rephrased: If nRephrased: If n33+5 is odd, then n is even+5 is odd, then n is even

Assume p is true and q is falseAssume p is true and q is false Assume that nAssume that n33+5 is odd, and n is odd+5 is odd, and n is odd

n=2k+1 for some integer k (definition of odd numbers)n=2k+1 for some integer k (definition of odd numbers)

nn33+5 = (2k+1)+5 = (2k+1)33+5 = 8k+5 = 8k33+12k+12k22+6k+6 = 2(4k+6k+6 = 2(4k33+6k+6k22+3k+3)+3k+3)

As 2(4kAs 2(4k33+6k+6k22+3k+3) is 2 times an integer, it must be +3k+3) is 2 times an integer, it must be eveneven

Contradiction!Contradiction!

Page 29: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

2929

A note on that problem…A note on that problem… Prove that if n is an integer and nProve that if n is an integer and n33+5 is odd, then n is even+5 is odd, then n is even Here, our implication is: If nHere, our implication is: If n33+5 is odd, then n is even+5 is odd, then n is even

The indirect proof proved the contrapositive: ¬q → ¬pThe indirect proof proved the contrapositive: ¬q → ¬p I.e., If n is odd, then nI.e., If n is odd, then n33+5 is even+5 is even

The proof by contradiction assumed that the implication The proof by contradiction assumed that the implication was false, and showed a contradictionwas false, and showed a contradiction

If we assume p and ¬q, we can show that implies qIf we assume p and ¬q, we can show that implies q The contradiction is q and ¬qThe contradiction is q and ¬q

Note that both used similar steps, but are different Note that both used similar steps, but are different means of proving the implicationmeans of proving the implication

Page 30: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3030

proof by contradictionproof by contradiction

Suppose q is a contradiction (i.e. is always false)Suppose q is a contradiction (i.e. is always false)

Show that ¬p→q is trueShow that ¬p→q is true Since the consequence is false, the antecedent must be Since the consequence is false, the antecedent must be

falsefalse Thus, p must be trueThus, p must be true

Find a contradiction, such as (rFind a contradiction, such as (r¬r), to represent q¬r), to represent q

Thus, you are showing that ¬p→(rThus, you are showing that ¬p→(r¬r)¬r) Or that assuming p is false leads to a contradictionOr that assuming p is false leads to a contradiction

Page 31: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3131

A note on proofs by contradictionA note on proofs by contradiction

You can DISPROVE something by using a proof You can DISPROVE something by using a proof by contradictionby contradiction You are finding an example to show that something is You are finding an example to show that something is

not truenot true

You cannot PROVE something by exampleYou cannot PROVE something by example

Example: prove or disprove that all numbers are Example: prove or disprove that all numbers are eveneven Proof by contradiction: 1 is not evenProof by contradiction: 1 is not even (Invalid) proof by example: 2 is even(Invalid) proof by example: 2 is even

Page 32: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3232

Vacuous proofsVacuous proofs

Consider an implication: p→qConsider an implication: p→q

If it can be shown that p is false, then the If it can be shown that p is false, then the implication is always trueimplication is always true By definition of an implicationBy definition of an implication

Note that you are showing that the Note that you are showing that the antecedent is falseantecedent is false

Page 33: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3333

Vacuous proof exampleVacuous proof example

Consider the statement:Consider the statement: All math. majors in c261are femaleAll math. majors in c261are female Rephrased: If you are a math. major and you Rephrased: If you are a math. major and you

are in c261, then you are femaleare in c261, then you are femaleCould also use quantifiers!Could also use quantifiers!

Since there are no math. majors in this Since there are no math. majors in this class, the antecedent is false, and the class, the antecedent is false, and the implication is trueimplication is true

Page 34: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3434

Trivial proofsTrivial proofs

Consider an implication: p→qConsider an implication: p→q

If it can be shown that q is true, then the If it can be shown that q is true, then the implication is always trueimplication is always true By definition of an implicationBy definition of an implication

Note that you are showing that the Note that you are showing that the conclusion is trueconclusion is true

Page 35: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3535

Trivial proof exampleTrivial proof example

Consider the statement:Consider the statement: If you are tall and are in C261 then you are a If you are tall and are in C261 then you are a

studentstudent

Since all people in C261 are students, the Since all people in C261 are students, the implication is true regardlessimplication is true regardless

Page 36: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3636

Proof by casesProof by cases

Show a statement is true by showing all Show a statement is true by showing all possible cases are truepossible cases are true

Thus, you are showing a statement of the Thus, you are showing a statement of the form:form:

is true by showing that:is true by showing that:

qppp n ...21

qpqpqpqppp nn ...... 2121

Page 37: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3737

Proof by cases exampleProof by cases example

Prove that Prove that Note that b ≠ 0Note that b ≠ 0

Cases:Cases: Case 1: a ≥ 0 and b > 0Case 1: a ≥ 0 and b > 0

Then |a| = a, |b| = b, andThen |a| = a, |b| = b, and Case 2: a ≥ 0 and b < 0Case 2: a ≥ 0 and b < 0

Then |a| = a, |b| = -b, andThen |a| = a, |b| = -b, and Case 3: a < 0 and b > 0Case 3: a < 0 and b > 0

Then |a| = -a, |b| = b, andThen |a| = -a, |b| = b, and Case 4: a < 0 and b < 0Case 4: a < 0 and b < 0

Then |a| = -a, |b| = -b, andThen |a| = -a, |b| = -b, and

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

b

a

Page 38: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3838

The think about proof by casesThe think about proof by cases

Make sure you get ALL the casesMake sure you get ALL the cases The biggest mistake is to leave out some of The biggest mistake is to leave out some of

the casesthe cases

Page 39: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

3939

Proofs of equivalencesProofs of equivalences

This is showing the definition of a bi-This is showing the definition of a bi-conditionalconditional

Given a statement of the form “p if and Given a statement of the form “p if and only if q”only if q” Show it is true by showing (p→q)Show it is true by showing (p→q)(q→p) is (q→p) is

truetrue

Page 40: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

4040

Proofs of equivalence exampleProofs of equivalence example Show that mShow that m22=n=n22 if and only if m=n or m=-n if and only if m=n or m=-n Rephrased: (mRephrased: (m22=n=n22) ↔ [(m=n)) ↔ [(m=n)(m=-n)](m=-n)]

Need to prove two parts:Need to prove two parts: [(m=n)[(m=n)(m=-n)] → (m(m=-n)] → (m22=n=n22))

Proof by cases!Proof by cases!Case 1: (m=n) → (mCase 1: (m=n) → (m22=n=n22))

(m)(m)22 = m = m22, and (n), and (n)22 = n = n22, so this case is proven, so this case is proven

Case 2: (m=-n) → (mCase 2: (m=-n) → (m22=n=n22)) (m)(m)22 = m = m22, and (-n), and (-n)22 = n = n22, so this case is proven, so this case is proven

(m(m22=n=n22) → [(m=n)) → [(m=n)(m=-n)](m=-n)]Subtract nSubtract n22 from both sides to get m from both sides to get m22-n-n22=0=0Factor to get (m+n)(m-n) = 0Factor to get (m+n)(m-n) = 0Since that equals zero, one of the factors must be zeroSince that equals zero, one of the factors must be zeroThus, either m+n=0 (which means m=n)Thus, either m+n=0 (which means m=n)Or m-n=0 (which means m=-n)Or m-n=0 (which means m=-n)

Page 41: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

4141

Existence proofsExistence proofs

Given a statement: Given a statement: x P(x)x P(x)We only have to show that a P(c) exists for We only have to show that a P(c) exists for some value of csome value of c

Two types:Two types: Constructive: Find a specific value of c for Constructive: Find a specific value of c for

which P(c) existswhich P(c) exists Nonconstructive: Show that such a c exists, Nonconstructive: Show that such a c exists,

but don’t actually find itbut don’t actually find itAssume it does not exist, and show a contradictionAssume it does not exist, and show a contradiction

Page 42: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

4242

Constructive existence proof Constructive existence proof exampleexample

Show that a square exists that is the sum Show that a square exists that is the sum of two other squaresof two other squares Proof: 3Proof: 322 + 4 + 422 = 5 = 522

Show that a cube exists that is the sum of Show that a cube exists that is the sum of three other cubesthree other cubes Proof: 3Proof: 333 + 4 + 433 + 5 + 533 = 6 = 633

Page 43: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

4343

Non-constructive existence proof Non-constructive existence proof exampleexample

Prove that either 2*10Prove that either 2*10500500+15 or 2*10+15 or 2*10500500+16 is not a +16 is not a perfect squareperfect square

A perfect square is a square of an integerA perfect square is a square of an integer Rephrased: Show that a non-perfect square exists in the set Rephrased: Show that a non-perfect square exists in the set

{2*10{2*10500500+15, 2*10+15, 2*10500500+16}+16}

Proof: The only two perfect squares that differ by 1 are 0 Proof: The only two perfect squares that differ by 1 are 0 and 1and 1

Thus, any other numbers that differ by 1 cannot both be perfect Thus, any other numbers that differ by 1 cannot both be perfect squaressquares

Thus, a non-perfect square must exist in any set that contains Thus, a non-perfect square must exist in any set that contains two numbers that differ by 1two numbers that differ by 1

Note that we didn’t specify which one it was!Note that we didn’t specify which one it was!

Page 44: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

4444

Uniqueness proofsUniqueness proofs

A theorem may state that only one such A theorem may state that only one such value existsvalue exists

To prove this, you need to show:To prove this, you need to show: Existence: that such a value does indeed Existence: that such a value does indeed

existexistEither via a constructive or non-constructive Either via a constructive or non-constructive existence proofexistence proof

Uniqueness: that there is only one such valueUniqueness: that there is only one such value

Page 45: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

4545

Uniqueness proof exampleUniqueness proof example

If the real number equation 5x+3=a has a If the real number equation 5x+3=a has a solution then it is uniquesolution then it is unique

ExistenceExistence We can manipulate 5x+3=a to yield x=(a-3)/5We can manipulate 5x+3=a to yield x=(a-3)/5 Is this constructive or non-constructive?Is this constructive or non-constructive?

UniquenessUniqueness If there are two such numbers, then they would fulfill If there are two such numbers, then they would fulfill

the following: a = 5x+3 = 5y+3the following: a = 5x+3 = 5y+3 We can manipulate this to yield that x = yWe can manipulate this to yield that x = y

Thus, the one solution is unique!Thus, the one solution is unique!

Page 46: 1 Methods of Proof. 2 Consider (p  (p→q)) → q pqp→q p  (p→q)) (p  (p→q)) → q TTTTT TFFFT FTTFT FFTFT

4646

CounterexamplesCounterexamples

Given a universally quantified statement, find a single Given a universally quantified statement, find a single example which it is not trueexample which it is not true

Note that this is DISPROVING a UNIVERSAL statement Note that this is DISPROVING a UNIVERSAL statement by a counterexampleby a counterexample

x ¬R(x), where R(x) means “x has red hair”x ¬R(x), where R(x) means “x has red hair” Find one person (in the domain) who has red hairFind one person (in the domain) who has red hair

Every positive integer is the square of another integerEvery positive integer is the square of another integer The square root of 5 is 2.236, which is not an integerThe square root of 5 is 2.236, which is not an integer