0% found this document useful (0 votes)
18 views40 pages

Proof - Strategies - Post - Lecture Oct2

The document discusses proof strategies in discrete mathematics, focusing on the use of theorems, hypotheses, and counterexamples. It explains how to prove the validity of statements through direct proof and the contrapositive method, providing examples and logical forms for clarity. Additionally, it introduces shorthand notations for simplifying complex proofs.

Uploaded by

box.office1306
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views40 pages

Proof - Strategies - Post - Lecture Oct2

The document discusses proof strategies in discrete mathematics, focusing on the use of theorems, hypotheses, and counterexamples. It explains how to prove the validity of statements through direct proof and the contrapositive method, providing examples and logical forms for clarity. Additionally, it introduces shorthand notations for simplifying complex proofs.

Uploaded by

box.office1306
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

CSC/MAT A67 – Discrete Mathematics

M. Molloy and A. Tafliovich1

1
based on How To Prove It, by D. Velleman, and Discrete Mathematics, by
K. H. Rosen
Proof Strategies
• Mathematicians use theorems to state answers to
mathematical questions.
• A theorem often states that if certain assumptions, called
hypotheses, are true, then some conclusion must also be true.
• Often hypotheses or conclusion contain free variables: we
mean the variable can stand for any element of the universe of
discourse.
• An assignment of values to these variables produces an
instance of the theorem.
• To prove a theorem, we must prove it for every instance.
• If there is even one instance for which the hypothesis is true,
but the conclusion is false, then the statement is incorrect.
• This instance is a counterexample.
Proof Strategies: Counterexample
Example. Suppose a real number x > 3. Then x 2 > 10.
• universe of discourse: R
• hypothesis: x > 3
• conclusion: x 2 > 10
• logical form: ∀x, (x > 3) → (x 2 > 10)
• example instance: x = 4, hypothesis is true, conclusion is true
• example instance: x = 3.1, hypothesis is true, conclusion is
false (3.12 = 9.61 < 10)
• correct or incorrect? true or false? Incorrect. False.
• how do we prove it is false? We just did, by finding a
counterexample.
Proof Strategies: Counterexample
Example. Suppose a real number x > 3. Then x 2 > 10.
• how do we prove it is false? We just did, by finding a
counterexample. Formally:

(1) Take c = 3.1


(2) (c > 3) ∧ ¬(c 2 > 10) 1 math
(3) ¬((c > 3) → (c 2 > 10)) 2 conditional, deMorgan
2
(4) ∃x, ¬((x > 3) → (x > 10)) 3 exist. generalisation
(5) ¬(∀x, (x > 3) → (x 2 > 10)) 4 quantifier negation

4
Proof Strategies: Counterexample
In general, to prove that ∀x, P(x) → Q(x) is false, we can
provide a counterexample P(c) ∧ ¬Q(c) for c in the universe of
discourse.
Take c = . . . in the universe of discourse.
[Proof of P(c) ∧ ¬Q(c) goes here.]
Therefore ¬(∀x, P(x) → Q(x)).
Why does this work?

(1) Take c = . . .
(2) P(c) ∧ ¬Q(c)
(3) ¬(P(c) → Q(c)) 2 conditional, deMorgan
(4) ∃x, ¬(P(x) → Q(x)) 3 exist. generalisation
(5) ¬(∀x, P(x) → Q(x)) 4 quantifier negation

5
Proof Strategies: Counterexample
Example. Suppose a real number x > 3. Then x 2 > 10.
• how do we prove it is false? By finding a counterexample. A
shorter version of the same proof:

(1) Take c = 3.1


(2) (c > 3) ∧ ¬(c 2 > 10) 1 math
(3) ¬(∀x, (x > 3) → (x 2 > 10)) 2 counterexample

6
Shorthand notations and conventions
• As our proofs get more complex, we will gradually introduce
shorthand notations.
• It is important to understand that these are not new concepts,
just shorter ways of writing the same thing.

First batch of shorthand notations:


• ∀x, y , z . . . stands for ∀x∀y ∀z . . .
• ∃x, y , z . . . stands for ∃x∃y ∃z . . .
• “Take arbitrary x, y . . . ” stands for two lines:
• “Take arbitrary x . . . ”
• “Take arbitrary y . . . ”
Shorthand notations and conventions
• So far, we always chose a different variable (e.g., c) as an
instance, when using Existential or Universal Generalisation.
• In mathematical proofs, we often use the same variable (e.g.,
x instead of c), understanding that the choice of variable does
not matter, since x is bounded in ∀x, . . . and ∃x, . . .:

(1) Take x = 3.1


(2) (x > 3) ∧ ¬(x 2 > 10) 1 math
(3) ¬(∀x, (x > 3) → (x 2 > 10)) 2 counterexample

8
Proof Strategies: Direct Proof
Example. Suppose x > 3 and y < 2 (real numbers). Then
x 2 − 2y > 5.
• universe of discourse: R
• hypotheses: x > 3 and y < 2
• conclusion: x 2 − 2y > 5
• logical form: ∀x∀y , ((x > 3) ∧ (y < 2)) → (x 2 − 2y > 5)
• example instance: x = 4 and y = 1, hypotheses are true,
conclusion is true
• example instance: x = 2 and y = 1, one hypothesis is false,
conclusion is false
• correct or incorrect? true or false? Correct. True.
• how do we prove it?
Proof Strategies: Direct Proof
Example. Suppose x > 3 and y < 2 (real numbers). Then
x 2 − 2y > 5.
Ideas / scratch work:

Givens: Goal:
x >3 x 2 − 2y > 5
y <2

• Since x > 3, then x is positive, and so x ∗ x > 3 ∗ x, and so


x 2 > 3x.
• Since x > 3, then 3 ∗ x > 3 ∗ 3, and so 3x > 9.
• Thus, x 2 > 3x > 9.

• Since y < 2, then −2 ∗ y > −2 ∗ 2, and so −2y > −4.

• Then x 2 − 2y > 9 − 4, and so x 2 − 2y > 5.


Proof Strategies: Direct Proof
To prove a goal of the form P → Q:
Suppose P.
[Proof of Q goes here.]
Therefore P → Q.

Why does this work? It is impossible for P to be true and Q to be


false. Thus, P → Q.

Rule of Inference Name


Suppose P
Q Implication
∴ P→Q

11
Proof Strategies: Direct Proof
Example: If a, b, c ∈ R, a > b, and c > 0, then ac > bc.
Logical form: ((a > b) ∧ (c > 0)) → (ac > bc)

(1) Suppose (a > b) ∧ (c > 0)


(2) a>b 1 simplification
(3) c >0 1 simplification
(4) ac > bc 2,3
(5) ((a > b) ∧ (c > 0)) → (ac > bc) 1,4 implication

12
Proof Strategies: Direct Proof
Example: If a, b, c ∈ R, a > b, and c > 0, then ac > bc.
Equivalent Logical form: (a > b) → ((c > 0) → (ac > bc))
(Prove it!)

(1) Suppose a > b


(2) Suppose c > 0
(3) ac > bc 1,2
(4) (c > 0) → (ac > bc) 2,3 implication
(5) (a > b) → ((c > 0) → (ac > bc)) 1,4 implication

13
Proof Strategies: Direct Proof
To prove a goal of the form (P1 ∧ . . . ∧ Pn ) → Q:
Suppose P1 .
...
Suppose Pn .
[Proof of Q goes here.]
Therefore (P1 ∧ . . . ∧ Pn ) → Q.

Example: ((a > b) ∧ (c > 0)) → (ac > bc)

(1) Suppose a > b


(2) Suppose c > 0
(3) ac > bc 1,2
(4) ((a > b) ∧ (c > 0)) → (ac > bc) 1,2,3 implication
Proof Strategies: Direct Proof
Example. Suppose x > 3 and y < 2 (real numbers). Then
x 2 − 2y > 5.
Logical form: ∀x, y , ((x > 3) ∧ (y < 2)) → (x 2 − 2y > 5)

(1) Take arbitrary x, y


(2) Suppose x > 3
(3) Suppose y < 2
(4) x2 = x · x > 3 · x > 3 · 3 = 9 2: mult. by pos.
(5) − 2y > −4 3: multiply by neg.
2
(6) x − 2y > 9 − 4 = 5 4,5: add
(7) ((x > 3) ∧ (y < 2)) → (x 2 − 2y > 5) 2,3,6 impl.
2
(8) ∀x∀y , (x > 3) ∧ (y < 2) → x − 2y > 5 1,7 univ.gen.
Proof Strategies: Direct Proof
• Definition: an even integer is an integer that can be written
as 2k for some integer k.
• n is even: ∃k, n = 2k
• Definition: an odd integer is a integer that can be written as
2k + 1 for some integer k.
• n is odd: ∃k, n = 2k + 1
Exercise: Use inference rules to prove each of the following
universally quantified statements.
1. The square of an odd integer is odd.
• For any integer n, if n is odd, then n2 is odd.
• ∀n, (∃k, n = 2k + 1) → (∃k, n2 = 2k + 1)
2. The sum of two odd integers is even.
• For any integers n and m, if n and m are odd, then n + m is
even.
• ∀n∀m, (∃k, n = 2k + 1) ∧ (∃k, m = 2k + 1) → (∃k, n + m = 2k)

16
Proof Strategies: Direct Proof
Solutions: ∀n, (∃k, n = 2k + 1) → (∃k, n2 = 2k + 1)

(1) Take arbitrary integer n


(2) Suppose ∃k, n = 2k + 1
(3) n = 2j + 1 for some integer j 2 exist. inst.
2 2
(4) n = 2(2j + 2j) + 1 3
(5) 2j 2 + 2j is an integer j is an integer
2
(6) ∃k, n = 2k + 1 4,5 exist. gen.
(7) (∃k, n = 2k + 1) → (∃k, n2 = 2k + 1) 2,6 implication
2
(8) ∀n, (∃k, n = 2k + 1) → (∃k, n = 2k + 1) 1,7 univ. gen.

17
Proof Strategies: Direct Proof
Solutions:
∀n, m, (∃k, n = 2k + 1) ∧ (∃k, m = 2k + 1) → (∃k, n + m = 2k)

(1)Take arbitrary integers n, m


(2) Suppose ∃k, n = 2k + 1
(3) Suppose ∃k, m = 2k + 1
(4) n = 2i + 1 for some integer i 2 exist. inst.
(5) m = 2j + 1 for some integer j 3 exist. inst.
(6) n + m = 2(i + j + 1) 4,5
(7) i + j + 1 is an integer 4,5: i, j integers
(8) ∃k, n + m = 2k 6,7 exist. gen.
(9) (∃k, n = 2k + 1) ∧ (∃k, m = 2k + 1) → (∃k, n + m = 2k) 2,3,8 impl.
(10)∀n∀m, (∃k, n = 2k + 1) ∧ (∃k, m = 2k + 1) → (∃k, n + m = 2k) 1,9 u.g.

18
Proof Strategies: Contrapositive
Contrapositive Law:

P → Q is equivalent to ¬Q → ¬P

To prove a goal of the form P → Q:


Suppose Q is false.
[Proof of ¬P goes here.]
Therefore P → Q.

Rule of Inference Name


Suppose ¬Q
¬P Contrapositive
∴ P→Q

19
Proof Strategies: Contrapositive
Example. Suppose a, b, and c are real numbers and a > b. Prove
that if ac ≤ bc, then c ≤ 0.
Ideas / scratch work:

Givens: Goal:
a, b, c are real ac ≤ bc → c ≤ 0
a>b

Notice an easier way: prove the contrapositive:

Givens: Goal:
a, b, c are real c > 0 → ac > bc
a>b

20
Proof Strategies: Contrapositive
Solutions: ∀a, b, c, (a > b) → ((ac ≤ bc) → (c ≤ 0))

(1) Take arbitrary a, b, c


(2) Suppose a > b
(3) Suppose c > 0
(4) ac > bc 2,3
(5) (c > 0) → (ac > bc) 3,4 implication
(6) (ac ≤ bc) → (c ≤ 0) 5 contrapositive
(7) (a > b) → ((ac ≤ bc) → (c ≤ 0)) 2,5 implication
(8) ∀a, b, c, (a > b) → ((ac ≤ bc) → (c ≤ 0)) 1,7 univ.gen.

21
Proof Strategies: Contrapositive

Example: If n = ab, where a, b are positive integers, then a ≤ n

or b ≤ n.
√ √
Logical form: ∀a, b, n, (n = ab) → ((a ≤ n) ∨ (b ≤ n))
universe of discourse is positive integers
Contrapositive:
√ √
¬((a ≤ n) ∨ (b ≤ n)) → ¬(n = ab)
√ √
eqv (a > n) ∧ (b > n) → (n ̸= ab) de Morgan

22
Proof Strategies: Contrapositive
√ √
Solutions: ∀a, b, n, (n = ab) → ((a ≤ n) ∨ (b ≤ n)) universe of
discourse is positive integers

(1) Take arbitrary a, b, n



(2) Suppose a > n

(3) Suppose b > n
√ √
(4) ab > ( n)( n) = n 2,3 all positive
(5) ab ≠ n 4
√ √
(6) (a > n) ∧ (b > n) → (n ̸= ab) 2,3,5 implication
√ √
(7) (n = ab) → ((a ≤ n) ∨ (b ≤ n)) 6 contrapositive
√ √
(8) ∀a, b, n, (n = ab) → ((a ≤ n) ∨ (b ≤ n)) 1,7 univ.gen

23
Proof Strategies: Biconditional
Biconditional Law:

P ↔ Q is equivalent to (P → Q) ∧ (Q → P)

To prove a goal of the form P ↔ Q:


Prove P → Q.
Prove Q → P.
Therefore P ↔ Q.

Rule of Inference Name


Suppose P
Q
Suppose Q Biconditional
P
∴ P↔Q

24
Proof Strategies: Biconditional
Example: Prove x is even iff x 2 is even, for x ∈ Z.

(1) Take arbitrary integer x


(2) Suppose x is even
(3) ∃k, x = 2k 2 def. of even
(4) x = 2i for some integer i 3 exist. inst.
2 2 2
(5) x = (2i) = 2(2i ) 4
(6) 2i 2 is an integer
(7) ∃k, x 2 = 2k 5,6 exist. gen.
2
(8) x is even 7 def. of even
2
(9) x is even → x is even 2,8 implication
Proof Strategies: Biconditional
[continuing]

(10) Suppose x is odd


(11) ∃k, x = 2k + 1 10 def. of odd
(12) x = 2j + 1 for some integer j 11 exist.inst.
2 2 2
(13) x = (2j + 1) = 2(2j + 2j) + 1 12
2
(14) 2j + 2j is an integer
(15) ∃k, x 2 = 2k + 1 13,14 exist. gen.
2
(16) x is odd 15 def. of odd
(17) x is odd → x 2 is odd 10,16 implication
2
(18) x is even → x is even 17 contrapositive
(19) x is even ↔ x 2 is even 9,18 biconditional

Question: What assumption did we make?


26
Proof Strategies: Exhaustive Proof / Proof by Cases
To prove a goal of the form (P1 ∨ . . . ∨ Pn ) → Q:
Prove P1 → Q.
...
Prove Pn → Q.
Therefore (P1 ∨ . . . ∨ Pn ) → Q.

Why does this work?


((P1 ∨ . . . ∨ Pn ) → Q) ↔ ((P1 → Q) ∧ . . . (Pn → Q))

Rule of Inference Name


Suppose P
Q
Suppose R Cases
Q
∴ (P ∨ R) → Q

27
Proof Strategies: Exhaustive Proof / Proof by Cases
Sometimes P1 ∨ . . . ∨ Pn is a tautology: it describes all possible
situations in the universe of discourse.
Prove P1 → Q.
...
Prove Pn → Q.
Therefore Q.

Why does this work?


((a tautology) → Q) ↔ Q
Rule of Inference Name
Suppose P
Q
Suppose ¬P Cases
Q
∴ Q
28
Proof Strategies: Exhaustive Proof / Proof by Cases
Example: If n is an integer, then n2 ≥ n.

(1) Take arbitrary integer n


(2) Suppose n ≥ 1 Case #1
2
(3) n =n·n ≥n·1=n 2 mult. by positive
(4) Suppose n = 0 Case #2
2
(5) n =0=n≥n 4
(6) Suppose n ≤ −1 Case #1
2
(7) n ≥ 0 > −1 ≥ n square is ≥ 0
2
(8) n ≥n 2-7 cases
2
(9) ∀n, n ≥ n 1,8 univ.gen.

What is the tautology we used? (n ≥ 1) ∨ (n = 0) ∨ (n ≤ −1)


29
Proof Strategies
Example: If p ∈ Z and 2p − 1 is prime, then so is p.
Definition: An integer p is prime if p > 1 and it is not a product of
two smaller positive integers.
Contrapositive: If p is not prime, then 2p − 1 is not prime.
An integer p is not prime when:
(p ≤ 1) ∨ (∃a, b, (0 < a < p) ∧ (0 < b < p) ∧ (p = ab))
Looks like we need a proof by cases.
First part of the proof:
(1) Take arbitrary p
(2) Suppose p is not prime
(3) (p ≤ 1) ∨ (∃a, b, (0 < a < p) ∧ (0 < b < p) ∧ (p = ab)) def.
(4) Suppose p ≤ 1 case #1
p
(5) 2 −1≤1 4
(6) 2p − 1 is not prime def.
30
Proof Strategies
(7) Suppose ∃a, b, (0 < a < p) ∧ (0 < b < p) ∧ (p = ab) case #2
(8) (0 < a < p) ∧ (0 < b < p) ∧ (p = ab) some a, b 7 exist.gen
(9) 0<a<p 8 simplification
(10) 0<b<p 8 simplification
(11) p = ab 8 simplification
(12) Take x = 2b − 1, y = 1 + 2b + 22b + · · · + 2(a−1)b
(13) xy = 2p − 1 * next page
(14) x = 2b − 1 < 2p − 1 10
(15) b>1 8,10 a < p = ab
(16) x = 2b − 1 > 21 − 1 = 1 12,15
p
(17) 0 < y < xy = 2 − 1 16,12 x > 1
p p p
(18) (0 < x < 2 − 1) ∧ (0 < y < 2 − 1) ∧ (xy = 2 − 1)
(19) ∃x, y , (0 < x < 2p − 1) ∧ (0 < y < 2p − 1) ∧ (xy = 2p − 1)
(20) 2p − 1 is not prime
31
Proof Strategies
[continuing]
(21) 2p − 1 is not prime 4,6,7,20 cases
p
(22) p is not prime → 2 − 1 is not prime 2,21 implication
p
(23) 2 − 1 is prime → p is prime 22 contrapositive
p
(24) ∀p, 2 − 1 is prime → p is prime 23 univ.gen.
(*) Details from previous page:
x · y =(2b − 1) · (1 + 2b + 22b + · · · + 2(a−1)b )
=2b · (1 + 2b + 22b + · · · + 2(a−1)b ) − (1 + 2b + 22b + · · · + 2(a−1)b )
=(2b + 22b + · · · + 2ab ) − (1 + 2b + 22b + · · · + 2(a−1)b )
=2ab − 1
=2p − 1
What strategies did we use? Contrapositive, Proof by Cases,
Implication.
32
Proof Strategies
What would this proof look like in a typical math textbook?
Take arbitrary integer p, and suppose p is not prime. Then, by definition
of a prime number, either p ≤ 1 or it is a product of two smaller positive
integers. If p ≤ 1, then 2p − 1 ≤ 1, and so 2p − 1 is not prime. If p is a
product of two smaller positive integers a and b, we have 0 < a < p,
0 < b < p, and p = ab. Take x = 2b − 1 and
y = 1 + 2b + 22b + · · · + 2(a−1)b . Then (Insert proof that xy = 2p − 1
from previous slide). Since b < p, we have x = 2b − 1 < 2p − 1. Since
p = ab and a < p, we have a < ab, and so b > 1, and so
x = 2b − 1 > 1. Since x > 1 and xy = 2p − 1, we have y < 2p − 1. Also
y > 0, since y = 1 + 2b + · · · + 2(a−1)b . Thus, we have 2p − 1 is a
product of two smaller positive integers x and y , and so it is not prime.
Math textbooks take a long time to read! We need to carefully
examine the overall stucture, as well as each step, of each proof.
Proof Strategies: Contradiction
Adam: Charlie entered the warehouse yesterday.
• Betty thinks Adam is lying.
Betty: There is only one way in: the front door. Then Charlie
entered through the front door.
Betty: It was sunny, so Charlie was easy to see.
Betty: There is a 24hr recording of the front door, so it recorded
Charlie entering.
• Betty plays the video that does not have Charlie entering.
• Conclusion: Adam was lying.

Is this “good reasoning”? Why or why not?


Proof Strategies: Contradiction
To prove a goal of the form P:
Suppose ¬P.
(a contradiction)
Therefore P.

Why does this work?


(P → (a contradiction)) ↔ ¬P

Rule of Inference Name


Suppose ¬P
(a contradiction) Contradiction
∴ P

35
Proof Strategies: Contradiction
Example: If a is a natural number, and a2 is even, then a is even.
• universe of discourse: natural numbers
• hypothesis: a2 is even
• conclusion: a is even
• definitions: n is even: ∃k, n = 2k. n is odd: ∃k, n = 2k + 1.
• logical form: ∀a, (a2 is even) → (a is even)
• fact: (a is even) ↔ ¬(a is odd)
Proof plan:

Suppose a2 is even
Suppose a is odd for contr.
...
a contradiction

36
Proof Strategies: Contradiction
Solutions: ∀a, (a2 is even) → (a is even)
(1) Take arbitrary a
(2) Suppose a2 is even
(3) Suppose a is odd for contr.
(4) ∃k, a = 2k + 1 3 def.
(5) a = 2i + 1 4 exist.inst.
(6) a2 = (2i + 1)2 = 2(2i 2 + 2i) + 1 5
2
(7) 2i + 2i is an integer
(8) ∃k, a2 = 2k + 1 6,7 exist.gen.
2
(9) a is odd 8 def.
(10) a contradiction 2,9
(11) a is even 3,10 contradiction
2
(12) (a is even) → (a is even) 2,11 implication
2
(13) ∀a, (a is even) → (a is even) 1,12 univ.gen.
37
Proof Strategies
Anther useful short form:
Rule of Inference Name
∀x, P(x) → Q(x)
P(c) Universal Modus Ponens
∴ Q(c)

Why does this work?

(1) ∀x, P(x) → Q(x)


(2) P(c)
(3) P(c) → Q(c) universal instantiation
(4) Q(c) Modus Ponens

38
Proof Strategies: Contradiction

Example: 2 is irrational.
• Definition: x is rational iff there are integers a, b such that
x = ba .
• We say ba is “in lowest terms” if a and b have no factors in
common (other than 1).

Proof plan:

Suppose 2 is rational for contr.
√ a
∃a, b ∈ N, 2 = in lowest terms
b
...
a contradiction

39
Proof Strategies: Contradiction
Result from our previous proof: ∀a, (a2 is even) → (a is even) (*)
Universe of discourse: natural numbers.

(1) Suppose 2 is rational for contr.
√ a
(2) ∃a, b, ( 2 = ) ∧ (a, b have no common factors ̸= 1) 1 def.
b
√ x
(3) ( 2 = ) ∧ (x, y have no common factors ̸= 1) 2 exist.inst.
y
2 2
(4) x = 2y 3 simpl., mult. by pos.
2
(5) y is an integer
2
(6) ∃k, x = 2k 4,5 exist.gen.
2
(7) x is even 6 def.
(8) x is even (*),7 univ. modus ponens
(9) x = 2i 8 def., exist.inst.
2 2 2 2
(10) y = x /2 = (2i) /2 = 2i 4,9
2 2
(11) y is even 10, i ∈ Z, exist.gen., def.
(12) y is even (*),11 univ. modus ponens
(13) y = 2j 12 def., exist.inst.
(14) 2 is a common factor of x, y 9,13
(15) x, y have no common factors ̸= 1 3 simpl.
(16) a contradiction 14,15

(17) 2 is irrational 1,16 contradiction

40

You might also like