CS0441 lecture notes (review of 1.6, continuation of 1.7)

 

Direct proof refresher example

Given

  • If I work all night on this homework, then I can answer all the exercises.
  • If I answer all the exercise, I will understand the material.

Prove

  • If I work all night on the homework, then I will understand the material

 

Let

  • P = I work all night on this homework
  • ?

 

 

Proposition

Justification

Applied to

1

P

Assume

 

?

 

 

 

 

Indirect proof refresher example

Redo example above

Indirect Proof and Proof by cases

This proof uses a special technique, called proof by cases, which decomposes a proposition of the form AVB into cases A and B, and proves the same conclusion in both cases, then recombines them. 

 

Example: Given

·        If I ate spicy food, I will have strange dreams

·        If it thunders while I sleep, I will have strange dreams

Prove

·        If I do not have strange dreams, then I didn’t eat spicy food and it didn’t thunder last night.

Let

·        P=I ate spicy food

·        R=it thundered last night

·       Q=?

 

 

Proposition

Justification

Applied to

1

~(~P^~R)

Assumed

 

2

P vR

Demorgans & double negation

 

3

P

First case

2

4

P->Q

Given

 

5

Q

Modeus ponens

3,4

6

R

Second case

2

7

?

?

 

8

?

?

?

9

Q

Proof by cases

2, 5, 8

 

Existence proofs: Constructive

If the proposition to be proved has an existential quantifier in it, then its proof is called an existence proof.  One way to prove such a proposition is to construct a constant that satisfies the proposition when it is substituted for the existentially quantified variable. 

 

Example: Prove “For every n, there is an integer divisible by more than n different prime numbers.”  That is, For all n, there exists k such that k is divisible by more than n different prime numbers

 

 

Proposition

Justification

Applied to

1

Let {3, 5, 7, …, pn+1) be the first n+1 prime numbers.

There are infinitely many prime numbers

 

2

Let k = 3*5*…*pn+1

You can multiply any number of numbers together

1

3

k is divisible by pi for all i between 1 and n+1

Because pi is a factor of k

2

4

k is divisible by n+1 different prime numbers

counting

3

Existence proofs: Non-constructive

If an existence proof does not actually construct the constant that makes the proposition true, then the proof is called a non-constructive existence proof.