basic proof methods

48
1 Basic Proof Methods Rosen 6 Rosen 6 th th ed., §1.5-1.7 ed., §1.5-1.7

Upload: alexa-ratliff

Post on 03-Jan-2016

38 views

Category:

Documents


4 download

DESCRIPTION

Basic Proof Methods. Rosen 6 th ed., §1.5-1.7. Nature & Importance of Proofs. In mathematics, a proof is: A sequence of statements that form an argument. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Basic Proof Methods

1

Basic Proof Methods

Rosen 6Rosen 6thth ed., §1.5-1.7 ed., §1.5-1.7

Page 2: Basic Proof Methods

2

Nature & Importance of Proofs

• In mathematics, a In mathematics, a proofproof is: is:– A sequence of statements that form an argument.A sequence of statements that form an argument.

– Must be Must be correctcorrect (well-reasoned, logically valid) and (well-reasoned, logically valid) and completecomplete (clear, detailed) that rigorously & undeniably (clear, detailed) that rigorously & undeniably establishes the truth of a mathematical statement.establishes the truth of a mathematical statement.

• Why must the argument be correct & complete?Why must the argument be correct & complete?– CorrectnessCorrectness prevents us from fooling ourselves. prevents us from fooling ourselves.

– CompletenessCompleteness allows anyone to verify the result. allows anyone to verify the result.

Page 3: Basic Proof Methods

3

Rules of Inference

• Rules of inference are patterns of logically Rules of inference are patterns of logically valid deductions from hypotheses to valid deductions from hypotheses to conclusions.conclusions.

• We will review “inference rules” (i.e., We will review “inference rules” (i.e., correctcorrect & & fallacious)fallacious), and “proof methods”., and “proof methods”.

Page 4: Basic Proof Methods

4

Visualization of Proofs

Various TheoremsVarious TheoremsThe AxiomsThe Axiomsof the Theoryof the Theory

A Particular TheoryA Particular Theory

A proofA proof

Rules Rules Of Of

InferenceInference

Page 5: Basic Proof Methods

5

Inference Rules - General Form

• Inference RuleInference Rule – – – Pattern establishing that if we know that a set of Pattern establishing that if we know that a set of

hypotheseshypotheses are all true, then a certain related are all true, then a certain related conclusion conclusion statement is true. statement is true.

Hypothesis 1Hypothesis 1 Hypothesis 2 … Hypothesis 2 … conclusion conclusion ““” means “therefore”” means “therefore”

Page 6: Basic Proof Methods

6

Inference Rules & Implications

• Each logical inference rule corresponds to Each logical inference rule corresponds to an implication that is a tautology.an implication that is a tautology.

• Hypothesis 1 Hypothesis 1 Inference ruleInference rule Hypothesis 2 … Hypothesis 2 … conclusionconclusion

• Corresponding tautology: Corresponding tautology: ((((Hypoth. 1Hypoth. 1) ) ( (Hypoth. 2Hypoth. 2) ) …) …) conclusionconclusion

Page 7: Basic Proof Methods

7

Some Inference Rules

• pp Rule of AdditionRule of Addition ppq q “It is below freezing now. Therefore, it is either “It is below freezing now. Therefore, it is either

below freezing or raining now.”below freezing or raining now.”

• ppqq Rule of SimplificationRule of Simplification pp “It is below freezing and raining now. “It is below freezing and raining now.

Therefore, it is below freezing now.Therefore, it is below freezing now.

Page 8: Basic Proof Methods

8

Some Inference Rules

pp

qq

ppq q Rule of ConjunctionRule of Conjunction

•““It is below freezing.It is below freezing.

•It is raining now. It is raining now.

•Therefore, it is below freezing and it is raining now.Therefore, it is below freezing and it is raining now.

Page 9: Basic Proof Methods

9

Modus Ponens & Tollens

• pp Rule of Rule of modus ponensmodus ponensppqq (a.k.a. (a.k.a. law of detachmentlaw of detachment))qq “If it is snows today, then we will go skiing” “If it is snows today, then we will go skiing” andand

““It is snowing today” It is snowing today” implyimply “We will go skiing”“We will go skiing”

• qqppqq Rule of Rule of modus tollensmodus tollens pp

“the mode of affirming”

“the mode of denying”

Page 10: Basic Proof Methods

10

Syllogism Inference Rules

• ppqq Rule of hypotheticalRule of hypothetical qqrr syllogismsyllogismpprr

• p p qq Rule of disjunctiveRule of disjunctive pp syllogismsyllogism qq

Page 11: Basic Proof Methods

11

Formal Proofs

• A formal proof of a conclusion A formal proof of a conclusion CC, given , given premises premises pp11, , pp22,…,…,,ppnn consists of a consists of a sequence sequence

of of stepssteps, each of which applies some , each of which applies some inference rule to premises or to previously-inference rule to premises or to previously-proven statements (as hypotheses) to yield a proven statements (as hypotheses) to yield a new true statement (the conclusion).new true statement (the conclusion).

• A proof demonstrates that A proof demonstrates that ifif the premises the premises are true, are true, thenthen the conclusion is true (i.e., the conclusion is true (i.e., valid argumentvalid argument).).

Page 12: Basic Proof Methods

12

Formal Proof - Example

• Suppose we have the following premises:Suppose we have the following premises:“It is not sunny and it is cold.”“It is not sunny and it is cold.”“if it is not sunny, we will not swim”“if it is not sunny, we will not swim”“If we do not swim, then we will canoe.”“If we do not swim, then we will canoe.”“If we canoe, then we will be home early.”“If we canoe, then we will be home early.”

• Given these premises, prove the theoremGiven these premises, prove the theorem“We will be home early”“We will be home early” using inference rules. using inference rules.

Page 13: Basic Proof Methods

13

Proof Example cont.

• Let us adopt the following abbreviations:Let us adopt the following abbreviations: sunny sunny = = “It is sunny”“It is sunny”; ; cold cold = = “It is cold”“It is cold”; ;

swim swim = = “We will swim”“We will swim”; ; canoe canoe = = “We will “We will canoe”canoe”; ; early early = = “We will be home early”“We will be home early”..

• Then, the premises can be written as:Then, the premises can be written as:(1) (1) sunnysunny coldcold (2) (2) sunnysunny swimswim(3) (3) swim swim canoecanoe (4) (4) canoe canoe earlyearly

Page 14: Basic Proof Methods

14

Proof Example cont.

StepStep Proved byProved by1. 1. sunnysunny coldcold Premise #1.Premise #1.2. 2. sunnysunny Simplification of 1.Simplification of 1.3. 3. sunnysunny swimswim Premise #2.Premise #2.4. 4. swimswim Modus tollens on 2,3.Modus tollens on 2,3.5. 5. swimswimcanoecanoe Premise #3.Premise #3.6. 6. canoecanoe Modus ponens on 4,5.Modus ponens on 4,5.7. 7. canoecanoeearlyearly Premise #4.Premise #4.8. 8. earlyearly Modus ponens on 6,7.Modus ponens on 6,7.

Page 15: Basic Proof Methods

15

Common Fallacies

• A A fallacyfallacy is an inference rule or other proof is an inference rule or other proof method that is not logically valid.method that is not logically valid.– May yield a false conclusion!May yield a false conclusion!

• Fallacy of Fallacy of affirming the conclusionaffirming the conclusion::– ““ppqq is true, and is true, and qq is true, so is true, so pp must be true.” must be true.”

(No, because (No, because FFTT is true.) is true.)

• Fallacy of Fallacy of denying the hypothesisdenying the hypothesis::– ““ppqq is true, and is true, and pp is false, so is false, so qq must be false.” must be false.”

(No, again because (No, again because FFTT is true.) is true.)

Page 16: Basic Proof Methods

16

Common Fallacies - Examples

“ “If you do every problem in this book, then you If you do every problem in this book, then you will learn discrete mathematics. You learned will learn discrete mathematics. You learned discrete mathematics.”discrete mathematics.”

p: “You did every problem in this book”p: “You did every problem in this book”

q: “You learned discrete mathematics”q: “You learned discrete mathematics”

• Fallacy of Fallacy of affirming the conclusionaffirming the conclusion::ppq and q q and q does not imply does not imply pp

• Fallacy of Fallacy of denying the hypothesisdenying the hypothesis::ppqq and and p p does not imply does not imply qq

Page 17: Basic Proof Methods

17

Inference Rules for Quantifiers

xx PP((xx))PP((oo)) (substitute (substitute anyany object object oo))

• PP((gg)) (for (for gg a a general general element of u.d.)element of u.d.)xx PP((xx))

xx PP((xx))PP((cc)) (substitute a (substitute a newnew constantconstant cc))

• PP((oo) ) (substitute any extant object (substitute any extant object oo) ) xx PP((xx))

Page 18: Basic Proof Methods

18

Example

““Everyone in this discrete math class has taken a course in Everyone in this discrete math class has taken a course in computer sciencecomputer science” ” andand “ “Marla is a student in this classMarla is a student in this class” ” implyimply “ “Marla has taken a course in computer scienceMarla has taken a course in computer science”” D(x): “D(x): “x is in discrete math classx is in discrete math class”” C(x): “C(x): “x has taken a course in computer sciencex has taken a course in computer science””

xx (D(x) (D(x) C(x)) C(x))

D(Marla)D(Marla) C(Marla)C(Marla)

Page 19: Basic Proof Methods

19

Example – cont.

StepStep Proved byProved by1. 1. xx (D(x) (D(x) C(x)) C(x)) Premise #1.Premise #1.2. D(Marla) 2. D(Marla) C(Marla) C(Marla) Univ. instantiation.Univ. instantiation.3. D(Marla)3. D(Marla) Premise #2.Premise #2.4. C(Marla)4. C(Marla) Modus ponens on 2,3.Modus ponens on 2,3.

Page 20: Basic Proof Methods

20

Another Example

““A student in this class has not read the bookA student in this class has not read the book” ” andand ““Everyone in this class passed the first examEveryone in this class passed the first exam” ” implyimply ““Someone who passed the first exam has not read the bookSomeone who passed the first exam has not read the book”” C(x): “C(x): “x is in this classx is in this class”” B(x): “B(x): “x has read the bookx has read the book”” P(x): “P(x): “x passed the first examx passed the first exam””

xx(C(x)(C(x) B(x))B(x)) xx (C(x) (C(x) P(x)) P(x)) x(x(P(x)P(x) B(x))B(x))

Page 21: Basic Proof Methods

21

Another Example – cont.

StepStep Proved byProved by1. 1. xx(C(x)(C(x) B(x))B(x)) Premise #1.Premise #1.2. C(a) 2. C(a) B(a) B(a) Exist. instantiation.Exist. instantiation.3. C(a)3. C(a) Simplification on 2.Simplification on 2.4. 4. xx (C(x) (C(x) P(x)) P(x)) Premise #2.Premise #2.5. C(a) 5. C(a) P(a) P(a) Univ. instantiation.Univ. instantiation.

6. P(a)6. P(a) Modus ponens on 3,5Modus ponens on 3,5

7. 7. B(a) B(a) Simplification on 2

8. P(a) B(a) B(a) Conjunction on 6,7Conjunction on 6,7

9. 9. x(x(P(x)P(x) B(x))B(x)) Exist. generalizationExist. generalization

Page 22: Basic Proof Methods

22

More Examples...

• Is this argument correct or incorrect?Is this argument correct or incorrect?– ““All TAs compose easy quizzes. Ramesh is a TA. All TAs compose easy quizzes. Ramesh is a TA.

Therefore, Ramesh composes easy quizzes.”Therefore, Ramesh composes easy quizzes.”

• First, separate the premises from conclusions:First, separate the premises from conclusions:– Premise #1: All TAs compose easy quizzes.Premise #1: All TAs compose easy quizzes.

– Premise #2: Ramesh is a TA.Premise #2: Ramesh is a TA.

– Conclusion: Ramesh composes easy quizzes.Conclusion: Ramesh composes easy quizzes.

Page 23: Basic Proof Methods

23

Answer

Next, re-render the example in logic notation.Next, re-render the example in logic notation.

• Premise #1: All TAs compose easy quizzes.Premise #1: All TAs compose easy quizzes.– Let U.D. = all peopleLet U.D. = all people– Let Let TT((xx) :≡ “) :≡ “xx is a TA” is a TA”– Let Let EE((xx) :≡ “) :≡ “xx composes easy quizzes” composes easy quizzes”– Then Premise #1 says: Then Premise #1 says: xx, , TT((xx)→)→EE((xx))

Page 24: Basic Proof Methods

24

Answer cont…

• Premise #2: Ramesh is a TA.Premise #2: Ramesh is a TA.– Let R :≡ RameshLet R :≡ Ramesh– Then Premise #2 says: Then Premise #2 says: TT(R)(R)

• Conclusion says: Conclusion says: EE(R)(R)

• The argument is correct, because it can be The argument is correct, because it can be reduced to a sequence of applications of reduced to a sequence of applications of valid inference rules, as follows:valid inference rules, as follows:

Page 25: Basic Proof Methods

25

The Proof in Detail

• StatementStatement How obtainedHow obtained

1.1. xx, , TT((xx) → ) → EE((xx)) (Premise #1)(Premise #1)

2.2. TT(Ramesh) → (Ramesh) → EE(Ramesh) (Ramesh) (Universal (Universal instantiation) instantiation)

3.3. TT(Ramesh)(Ramesh) (Premise #2)(Premise #2)

4.4. EE(Ramesh)(Ramesh) ((Modus PonensModus Ponens from from statements #2 and #3)statements #2 and #3)

Page 26: Basic Proof Methods

26

Another example

• Correct or incorrect?Correct or incorrect? At least one of the 280 At least one of the 280 students in the class is intelligent. Y is a student students in the class is intelligent. Y is a student of this class. Therefore, Y is intelligent.of this class. Therefore, Y is intelligent.

• First: Separate premises/conclusion,First: Separate premises/conclusion,& translate to logic:& translate to logic:– Premises: (1) Premises: (1) xx InClass( InClass(xx) ) Intelligent( Intelligent(xx))

(2) InClass(Y) (2) InClass(Y)

– Conclusion: Intelligent(Y)Conclusion: Intelligent(Y)

Page 27: Basic Proof Methods

27

Answer

• No, the argument is invalid; we can disprove it No, the argument is invalid; we can disprove it with a counter-example, as follows:with a counter-example, as follows:

• Consider a case where there is only one intelligent Consider a case where there is only one intelligent student X in the class, and X≠Y.student X in the class, and X≠Y.– Then the premise Then the premise xx InClass( InClass(xx) ) Intelligent( Intelligent(xx)) is true, is true,

by existential generalization of by existential generalization of InClass(X) InClass(X) Intelligent(X) Intelligent(X)

– But the conclusion But the conclusion Intelligent(Y)Intelligent(Y) is false, since X is is false, since X is the only intelligent student in the class, and Y≠X.the only intelligent student in the class, and Y≠X.

• Therefore, the premises Therefore, the premises do notdo not imply the imply the conclusion.conclusion.

Page 28: Basic Proof Methods

28

Proof Methods

• Proving Proving ppqq– DirectDirect proof: Assume proof: Assume pp is true, and prove is true, and prove qq..– IndirectIndirect proof: Assume proof: Assume qq, and prove , and prove pp..– TrivialTrivial proof: Prove proof: Prove qq true. true.– VacuousVacuous proof: Prove proof: Prove pp is true. is true.

• Proving Proving pp– Proof by Proof by contradiction: contradiction: Prove Prove pp (r (r r)r) ((r r rr is a contradiction); therefore is a contradiction); therefore p p must be false.must be false.

• Prove (Prove (aa bb) ) pp – Proof by cases: prove (Proof by cases: prove (aa pp) and () and (bb pp).).

• More …More …

Page 29: Basic Proof Methods

29

Direct Proof Example

• Definition:Definition: An integer An integer nn is called is called oddodd iff iff nn=2=2kk+1 +1 for some integer for some integer kk; ; nn is is eveneven iff iff nn=2=2kk for some for some kk..

• Axiom:Axiom: Every integer is either odd or even. Every integer is either odd or even.• Theorem:Theorem: (For all numbers (For all numbers nn) If ) If nn is an odd is an odd

integer, then integer, then nn22 is an odd integer. is an odd integer.• Proof:Proof: If If nn is odd, then is odd, then nn = 2 = 2kk+1 for some integer +1 for some integer

kk. Thus, . Thus, nn22 = (2 = (2kk+1)+1)22 = 4 = 4kk22 + 4 + 4kk + 1 = 2(2 + 1 = 2(2kk22 + 2 + 2kk) ) + 1. Therefore + 1. Therefore nn22 is of the form 2 is of the form 2jj + 1 (with + 1 (with jj the the integer 2integer 2kk22 + 2 + 2kk), thus ), thus nn22 is odd. □ is odd. □

Page 30: Basic Proof Methods

30

Another Example

• Definition:Definition: A real number A real number rr is is rational rational if there if there exist integers exist integers p p and and q q ≠≠ 0, 0, with no common factors with no common factors other than 1 (i.e., gcd(other than 1 (i.e., gcd(pp,,qq)=1), such that )=1), such that r=p/q.r=p/q. A A real number that is not rational is called real number that is not rational is called irrational.irrational.

• Theorem:Theorem: Prove that the sum of two rational Prove that the sum of two rational numbers is rational.numbers is rational.

Page 31: Basic Proof Methods

31

Indirect Proof

• Proving Proving ppqq– IndirectIndirect proof: Assume proof: Assume qq, and prove , and prove pp..

Page 32: Basic Proof Methods

32

Indirect Proof Example

• Theorem:Theorem: (For all integers (For all integers nn) ) If 3If 3nn+2 is odd, then +2 is odd, then nn is odd. is odd.

• Proof:Proof: Suppose that the conclusion is false, Suppose that the conclusion is false, i.e.i.e., , that that nn is even. Then is even. Then nn=2=2kk for some integer for some integer kk. . Then 3Then 3nn+2 = 3(2+2 = 3(2kk)+2 = 6)+2 = 6kk+2 = 2(3+2 = 2(3kk+1). Thus +1). Thus 33nn+2 is even, because it equals 2+2 is even, because it equals 2jj for integer for integer jj = = 33kk+1. So 3+1. So 3nn+2 is not odd. We have shown that +2 is not odd. We have shown that ¬(¬(nn is odd)→¬(3 is odd)→¬(3nn+2 is odd), thus its contra-+2 is odd), thus its contra-positive (3positive (3nn+2 is odd) → (+2 is odd) → (nn is odd) is also true. □ is odd) is also true. □

Page 33: Basic Proof Methods

33

Another Example

• Theorem:Theorem: Prove that if Prove that if n n is an integer and is an integer and nn2 2 is odd, then is odd, then n n is odd.is odd.

Page 34: Basic Proof Methods

34

Trivial Proof

• Proving Proving ppqq– TrivialTrivial proof: Prove proof: Prove qq true. true.

Page 35: Basic Proof Methods

35

Trivial Proof Example

• Theorem:Theorem: (For integers (For integers nn) If ) If nn is the sum is the sum of two prime numbers, then either of two prime numbers, then either nn is odd is odd or or nn is even. is even.

• Proof:Proof: AnyAny integer integer nn is either odd or even. is either odd or even. So the conclusion of the implication is true So the conclusion of the implication is true regardless of the truth of the hypothesis. regardless of the truth of the hypothesis. Thus the implication is true trivially. □Thus the implication is true trivially. □

Page 36: Basic Proof Methods

36

Vacuous Proof

• Proving Proving ppqq– VacuousVacuous proof: Prove proof: Prove pp is true. is true.

Page 37: Basic Proof Methods

37

Vacuous Proof Example

• Theorem:Theorem: (For all (For all nn) If ) If nn is both odd and is both odd and even, then even, then nn22 = = nn + + nn..

• Proof: Proof: The statement “The statement “nn is both odd and is both odd and even” is necessarily false, since no number even” is necessarily false, since no number can be both odd and even. So, the theorem can be both odd and even. So, the theorem is vacuously true. □is vacuously true. □

Page 38: Basic Proof Methods

38

Proof by Contradiction

• Proving Proving pp– Assume Assume pp, and prove that , and prove that pp ( (rr rr))– ((rr rr) is a trivial contradiction, equal to ) is a trivial contradiction, equal to FF– Thus Thus ppFF is true only if is true only if pp==FF

Page 39: Basic Proof Methods

39

Proof by Cases

To proveTo prove

we need to provewe need to prove

ExampleExample: Show that : Show that |xy|=|x| |y|, |xy|=|x| |y|, where where x,yx,y are real are real numbers.numbers.

1 2( ... )np p p q∨ ∨ ∨ →

1 2( ) ( ) ... ( )np q p q p q→ ∧ → ∧ ∧ →

Page 40: Basic Proof Methods

40

Proof of Equivalences

( )p q↔

To proveTo prove

we need to provewe need to prove

ExampleExample: Prove that : Prove that n n is odd iff is odd iff nn2 2 is odd.is odd.

p q↔

( ) ( )p q q p→ ∧ →

Page 41: Basic Proof Methods

41

Equivalence of a group of propositions

To proveTo prove

we need to provewe need to prove

1 2[ ... ]np p p↔ ↔ ↔

1 2 2 3 1[( ) ( ) ...( )]np p p p p p→ ∧ → ∧ →

Page 42: Basic Proof Methods

42

Example

• Show that the statements below are Show that the statements below are equivalent:equivalent: pp11: : n is evenn is even

pp22: : n-1 is oddn-1 is odd

pp33: : nn22 is even is even

Page 43: Basic Proof Methods

43

Counterexamples

• When we are presented with a statement of When we are presented with a statement of the form the form xP(x)xP(x) and we believe that it is and we believe that it is false, then we look for a counterexample.false, then we look for a counterexample.

• ExampleExample– Is it true that “every positive integer is the sum Is it true that “every positive integer is the sum

of the squares of three integers?”of the squares of three integers?”

Page 44: Basic Proof Methods

44

Proving Existentials

• A proof of a statement of the form A proof of a statement of the form xx PP((xx) ) is called an is called an existence proofexistence proof..

• If the proof demonstrates how to actually If the proof demonstrates how to actually find or construct a specific element find or construct a specific element aa such such that that PP((aa) is true, then it is called a ) is true, then it is called a constructiveconstructive proof. proof.

• Otherwise, it is called a Otherwise, it is called a non-constructive non-constructive proof.proof.

Page 45: Basic Proof Methods

45

Constructive Existence Proof

• Theorem:Theorem: There exists a positive integer There exists a positive integer nn that is the sum of two perfect cubes in two that is the sum of two perfect cubes in two different ways:different ways:– equal to equal to jj33 + + kk33 and and ll33 + + mm33 where where jj, , kk, , ll, , mm are are

positive integers, and {positive integers, and {jj,,kk} ≠ {} ≠ {ll,,mm}}

• Proof:Proof: Consider Consider nn = 1729, = 1729, jj = 9, = 9, kk = 10, = 10, ll = 1, = 1, mm = 12. Now just check that the = 12. Now just check that the equalities hold.equalities hold.

Page 46: Basic Proof Methods

46

Non-constructive Existence Proof

• Example 11: Page 91 of the textExample 11: Page 91 of the text

Page 47: Basic Proof Methods

47

Limits on Proofs

• Some very simple statements of number Some very simple statements of number theory haven’t been proved or disproved!theory haven’t been proved or disproved!– E.g. Goldbach’s conjectureE.g. Goldbach’s conjecture: Every integer : Every integer nn≥2 ≥2

is exactly the average of some two primes.is exactly the average of some two primes. n≥n≥2 2 primes primes pp,,qq: : nn=(=(pp++qq)/2.)/2.

• There are true statements of number theory There are true statements of number theory (or any sufficiently powerful system) that (or any sufficiently powerful system) that can can nevernever be proved (or disproved) (Gödel). be proved (or disproved) (Gödel).

Page 48: Basic Proof Methods

48

Circular Reasoning

• The fallacy of (explicitly or implicitly) assuming The fallacy of (explicitly or implicitly) assuming the very statement you are trying to prove in the the very statement you are trying to prove in the course of its proof. Example:course of its proof. Example:

• Prove that an integer Prove that an integer nn is even, if is even, if nn22 is even. is even.• Attempted proof: “Assume Attempted proof: “Assume nn22 is even. Then is even. Then

nn22=2=2kk for some integer for some integer kk. Dividing both sides by . Dividing both sides by nn gives gives n n = (2= (2kk)/)/n n = 2(= 2(kk//nn). So there is an integer ). So there is an integer jj (namely (namely kk//nn) such that ) such that nn=2=2jj. Therefore . Therefore nn is even.” is even.”

Begs the question: How doyou show that j=k/n=n/2 is an integer,

without first assuming n is even?