1 sections 1.5 & 3.1 methods of proof / proof strategy

51
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

Upload: lewis-blair

Post on 02-Jan-2016

237 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

1

Sections 1.5 & 3.1

Methods of Proof / Proof Strategy

Page 2: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

2

Definitions

• Theorem: a statement that can be shown to be true

• Proof: demonstration of truth of theorem– consists of series of arguments called axioms or

postulates– these are statements of underlying assumptions

about mathematical structures, hypotheses of theorem to be proved, and previously proved theorems

Page 3: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

3

More Definitions

• Lemma: simple theorem used in proof of other theorems

• Corollary: proposition that can be established directly from a proved theorem

• Conjecture: statement whose truth value is unknown

Page 4: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

4

Rules of Inference

• Means to draw conclusions from other assertions

• Rules of inference provide justification of steps used to show that a conclusion follows from a set of hypotheses

• The next several slides illustrate specific rules of inference

Page 5: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

5

Addition

A true hypothesis implies that the disjunctionof that hypothesis and another are true

p---------- p q

or p (p q)

Page 6: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

6

Simplification

If the conjunction of 2 propositions is true,then each proposition is true

p q---------- p

or (p q) p

Page 7: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

7

Conjunction

If p is true and q is true, then p q is true

p q---------- p q

or ((p) (q)) p q

Page 8: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

8

Modus Ponens

If a hypothesis and implication are both true,then the conclusion is true

p p q----------- q

or (p (p q)) q

Page 9: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

9

Modus Tollens

If a conclusion is false and its implicationis true, then the hypothesis must be false

q p q-----------p

or [q (p q)] p

Page 10: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

10

Hypothetical Syllogism

If an implication is true, and the implicationformed using its conclusion as the hypothesis isalso true, then the implication formed using theoriginal hypothesis and the new conclusion isalso true

p q q r----------- p r

or [(p q) (q r)] (p r)

Page 11: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

11

Disjunctive Syllogism

If a proposition is false, and the disjunction of itand another proposition is true, the second proposition is true

p qp--------- q

or, [(p q) p] q

Page 12: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

12

Using rules of inference

• We can use the rules of inference to form the basis for arguments

• A valid argument is an implication in which, when all hypotheses are true, the conclusion is true: (p1 p2 … pn) q

• When several premises are involved, several rules of inference my be needed to show that an argument is valid

Page 13: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

13

Example

Let p = “It is Monday” and p q = “If it is Monday, I have Discrete Math today”Since these statements are both true, then by Modus Ponens:

(p (p q)) qwe can conclude “I have Discrete Math today” (q)

Page 14: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

14

Another Example

Let q = “I don’t have Discrete Math today” andp q = “If it is Monday, I have Discrete Math today”If both of the above are true, then by Modus Tollens:

[q (p q)] pwe can conclude “It is not Monday” (p)

Page 15: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

15

Yet Another Example

Let p q = “If I am taking this class, I passed the test” andq r = “If I passed the test, I’m a happy camper”If both of the above are true, then by hypothetical syllogism:

[(p q) (q r)] (p r)we can conclude “If I am taking this class, I’m a happy camper” (p r)

Page 16: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

16

A More Complicated Example

• Randy works hard

• If Randy works hard, then he is a dull boy

• If Randy is a dull boy, then he will not get the job

Construct an argument using rules for inferenceto show that the hypotheses:

Imply the conclusion:Randy will not get the job

Page 17: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

17

Example Continued

Let p = Randy works hard, q = He is a dull boy, r = He will get the job

So we want to prove: (p (p q) (q r)) r

1.Applying modus ponens to the first part: p p q-----------q

2. We now have: (q (q r)) r

3. Applying modus ponensagain, substituting q for pand r for q:

q q r -----------r

4. We have a valid argument!

Page 18: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

18

Fallacies

• A fallacy is an argument based on contingencies rather than tautologies; some examples:– Fallacy of affirming the conclusion:

[(p q) q] p

This is not a tautology because it’s false when p is false and q is true

– Fallacy of denying the hypothesis:

[(p q) p] q

Like the previous fallacy, this is not a tautology because it is false when p is false and q is true

Page 19: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

19

Rules of Inference for Quantified Statements

• Universal instantiation:xP(x)

----------

P(c) if c U

• Universal generalization:P(c) for arbitrary c U

-----------------------------

xP(x) Note: c must be arbitrary

Page 20: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

20

Rules of Inference for Quantified Statements

• Existential instantiation:xP(x)---------- P(c) for some c UNote that value of c is not known; we only know it

exists• Existential generalization:

P(c) for some c U------------------------ xP(x)

Page 21: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

21

Example

Let P(x) = “A man is mortal”; then xP(x) = “All men are mortal”

Assuming p = “Socrates is a man” is true, show thatq = “Socrates is mortal” is implied

This is an example of universal instantiation:P(Socrates) = “Socrates is mortal”;

Since xP(x) ---------

P(c)

Also, by modus ponens: (p (p q)) q

Page 22: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

22

Methods of Proof

• Many theorems are implications

• Recall that an implication (p q) is true when both p and q are true, or when p is false; it is only false if q is false

• To prove an implication, we need only prove that q is true if p is true (it is not common to prove q itself)

Page 23: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

23

Direct Proof

• Show that if p is true, q must also be true (so that the combination of p true, q false never occurs)– Assume p is true– Use rules of inference and theorems to show q

must also be true

Page 24: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

24

Example of Direct Proof

• Prove “if n is odd, n2 must be odd”– Let p = “n is odd”– Let q = “n2 is odd”

• Assume n is odd; then n = 2k + 1 for some integer k (by definition of an odd number)

• This means n2 = (2k + 1)2 = 2(2k2 + 2k) + 1

• Thus, by definition, n2 is odd

Page 25: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

25

Indirect Proof

• Uses the fact that an implication (p q) and its contrapositive q p have the same truth value

• Therefore proving the contrapositive proves the implication

Page 26: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

26

Indirect Proof Example

• Prove “if 3n + 2 is odd, then n is odd”– Let p = “3n + 2 is odd”– Let q = “n is odd”

• To prove q p , begin by assuming q is true– So n is even, and n = 2k for some integer k (by

definition of even numbers)– Then 3n + 2 = 3(2k) +2 = 6k + 2 = 2(3k + 1)

• Thus, 3n + 2 is even, q p and p q

Page 27: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

27

Vacuous Proof

• Suppose p is false - if so, then p q is true

• Thus, if p can be proven false, the implication is proven true

• This technique is often used to establish special cases of theorems that state an implication is true for all positive integers

Page 28: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

28

Vacuous Proof Example

• Show that P(0) is true where P(n) is:– “if n > 1, then n2 > n”– Let p = n>1 and q = n2 > n

• Since P(n) = P(0) and 0>1 is false, p is false• Since the premise is false, p q is true for

P(0)• Note that it doesn’t matter that the conclusion

(02 > 0 ) is false for P(0) - since the premise is false, the implication is true

Page 29: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

29

Trivial Proof

• If q can be proven true, then p q is true for all possible p’s, since:– T T and– F T are both true

Page 30: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

30

Example of Trivial Proof

• Let P(n) = “if a >= b then an >= bn” where a and b are positive integers; show that P(0) is true– so p = a >=b and– q = a0 >= b0

• Since a0 = b0, q is true for P(0)• Since q is true, p q is true• Note that this proof didn’t require examining

the hypothesis

Page 31: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

31

Proof by Contradiction

• Suppose q is false and p q is true

• This is possible only if p is true

• If q is a contradiction (e.g. r r), can prove p via p (r r)

Page 32: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

32

Example of proof by contradiction

• Prove 2 is irrational

• Suppose p is true - then 2 is rational

• If 2 is rational, then 2 = a/b for some numbers a and b with no common factors

• So (2 )2 = (a/b)2 or 2 = a2/b2

• If 2 = a2/b2 then 2b2 = a2

• So a2 must be even, and a must be even

Page 33: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

33

Example of proof by contradiction

• If a is even, then a = 2c and a2 = 4c2

• Thus 2b2 = 4c2 and b2 = 2c2 - which means b2 is even, and b must be even

• If a and b are both even, they have a common factor (2)

• This is a contradiction of the original premise, which states that a and b have no common factors

Page 34: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

34

Example of proof by contradiction

• So p (r r)– where p = 2 is rational, r = a & b have no

common factors, and r = a & b have a common factor

– r r is a contradiction– so p must be false– thus p is true and 2 is irrational

Page 35: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

35

Proof by contradiction and indirect proof

• Can write an indirect proof as a proof by contradiction

• Prove p q by proving q p

• Suppose p and q are both true

• Go through direct proof of q p to show p is also true

• Now we have a contradiction: p p is true

Page 36: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

36

Proof by Cases

• To prove (p1 p2 … pn) q, can use the tautology:((p1 p2 … pn) q) ((p1 q) (p2 q) … (pn q)) as a

rule for inference

• In other words, show that pi q for all values of i from 1 through n

Page 37: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

37

Proof by Cases

• To prove an equivalence (p q), can use the tautology:(p q) ((p q) (q p))

• If a theorem states that several propositions are equivalent (p1 p2 … pn), can use the tautology:(p1 p2 … pn) ((p1 p2) (p2 p3) … (pn p1))

Page 38: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

38

Theorems & Quantifiers

• Existence proof: proof of a theorem asserting that objects of a particular type exist, aka propositions of the form xP(x)

• Proof by counter-example: proof of a theorem of the form xP(x)

Page 39: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

39

Types of Existence Proofs

• Constructive: find an element a such that P(a) is true

• Non-constructive: prove xP(x) without finding a specific element - often uses proof by contradiction to show xP(x) implies a contradiction

Page 40: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

40

Constructive Existence Proof Example

• For every positive integer n, there is an integer divisible by >n primes

• Stated formally, this is: nx(x:x is divisible by >n primes)

• Assume we know the prime numbers and can list them: p1, p2, …

• If so, the number p1 * p2 * … * pn+1 is divisible by >n primes

Page 41: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

41

Non-constructive Existence Proof Example

• Show that for every positive integer n there is a prime greater than n

• This is xQ(x) where Q(x) is the proposition x is prime and x > n– Let n be a positive integer; to show there is a prime > n,

consider n! + 1– Every integer has a prime factor, so n! + 1 has at least one

prime factor– When n! + 1 is divided by an integer <= n, remainder is 1– Thus, any prime factor of this integer must be > n

• Proof is non-constructive because we never have to actually produce a prime (or n)

Page 42: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

42

Proof by Counter-example

• To prove xP(x) is false, need find only one element e such that P(e) is false

• Example: Prove or disprove that every positive integer can be written as the sum of 2 squares– We need to show xP(x) is true– Many examples exist - 3, 6 and 7 are all

candidates

Page 43: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

43

Choosing a method of proof

• When confronted with a statement to prove:– Replace terms by their definitions– Analyze what hypotheses & conclusion mean

• If statement is an implication, try direct proof;– If that fails, try indirect proof– If neither of the above works, try proof by

contradiction

Page 44: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

44

Forward reasoning

• Start with the hypothesis• Together with axioms and known theorems,

construct a proof using a sequence of steps that leads to the conclusion

• With indirect reasoning, can start with negation of conclusion, work through a similar sequence to reach negation of hypothesis

Page 45: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

45

Backward reasoning

• To reason backward to prove a statement q, we find a statement p that we can prove with the property p q

• The next slide provides an example of this type of reasoning

Page 46: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

46

Backward reasoning - exampleProve that the square of every odd integer has the form 8k + 1 for some integer k:

1. Begin with some odd integer n, which by definition has the form n = 2i + 1 for some integer i. • Then n2 = (2i + 1)2 = 4i2 + 4i + 1• We need to show that n2 has the form 8k + 1• Reasoning backwards, this follows if 4i2 + 4i can be written as 8k

2. But 4i2 + 4i = 4i(i + 1)• i(i+ 1) is the product of 2 consecutive integers• Since every other integer is even, either i or i+1 is even• This means their product is even, and can be written 2k for some integer k

3. Therefore, 4i2 + 4i = 4i(i + 1) = 4(2k) = 8k; it follows that, since n2 = 4i2 + 4i + 1 and 4i2 + 4i = 8k, that n2 = 8k + 1

Page 47: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

47

The Halting Problem

• The halting problem is a famous theorem in computer science:– Is there a procedure that can take as input a computer

program and its input and determine whether the program will stop with the given input?

– The short answer is no. You can’t just run a program and observe to determine if it will terminate:

• you’d know if it does halt, but not if it doesn’t

• some algorithms would outlast your ability to observe them

Page 48: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

48

Proof

• Suppose such a procedure (H) exists, and can be called with H(P,I) where P is a program and I is the input to P

• H prints “halt” if the P halts and “loops forever” if not

• Since a program’s source code can be used as input to itself, we could call H with H(P,P)

Page 49: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

49

Proof

• To show that no H exists, construct procedure K(P), which takes the result of H(P,P) as input– if output of H(P,P) is “loops forever”, K(P)

halts– if output of H(P,P) is “halts”, K(P) loops

forever

Page 50: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

50

Proof

• Suppose we provide K as input to K:– then if H(K,K) produces “loops forever”, K halts– and if H(K,K) produces “halts”, K loops forever

• This is a violation of what H says - so we have a contradiction

• H can’t always provide correct answers - so there is no procedure that solves the halting problem

Page 51: 1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy

51

Section 3.1

Methods of Proof

- ends -