Discrete Structures Lecture 06
Discrete Structures Lecture 06
Lecture - 7
Introduction
to
Proofs
Proof
s
• Proof:
A proof is a valid argument that establishes the
truth of a mathematical statement.
• Proofs are essential in mathematics and
computer science.
• Some applications of proof methods
• Proving mathematical theorems
• Designing algorithms and proving they meet their
specifications
• Verifying computer programs
• Establishing operating systems are secure
• Making inferences in artificial intelligence
• Showing system specifications are consistent
• …
Terminolo
gy
• Theorem: A statement that can be shown true.
Sometimes
called facts.
• Lemma: A less important theorem that is useful to
prove a
theorem.
• Proof: Demonstration that a theorem is true.
then 𝑥 2 > 𝑦 2 .
numbers,
p q p q
T T T
T F F
F T T
F F T
Methods of Proving
Theorems
Vacuous
Proof
• Consider an implication: 𝑝→𝑞
• Proof:
• Vacuous proof:
p q is true when p is false.
Vacuous Proof
• If n is both odd and even then n2 =
Example
n+n
Trivial
• Consider an implication: 𝑝 → 𝑞
Proof
• If it can be shown that q is true, then the
implication is always true
• By definition of an implication
• Proof:
• Trivial proof:
p q is true when q is true.
Trivial Proof
Example
• If n is the sum of two prime numbers,
then either n is odd or n is even.
• Assume p is true.
• Even Number:
n is even if n=2k for some k of type
integer.
Direct
Proof
If n is an odd integer, then 𝑛2 is
• Theorem:
odd.
• Proof:
integer. By definition, ∃
Assume n is an odd
∃ integer b
and t such that n = 𝑠 2
square if
and m = 𝑡 2 . that a= 𝑏2 .
such
nm = 𝑠 2 𝑡 2 = (𝑠𝑡)2
Let k =
st. nm
Direct
Proof
• Prove If n and m are odd integers then n + m
is even.
Exampl
e
• Theorem:
The sum of two rational numbers is
rational.
• Proof:
∃ p,q r =r p/q
q≠0
Assume and s are rational. Definition:
The real
∃ u ≠= (pu+tq) / (qu)
number r is
t,u= sp/q
= t/u
Since q ≠ 0 and u ≠ 0 then qu ≠
r+s + t/u rational if
∃ integers p
0 r=p/q,
that q ≠ 0.
and q
where n ≠ 0.
So, r+s is rational.
Proof
Techniques
• Direct proof leads from the hypothesis of a
theorem to the conclusion.
Condition Its
al contrapositi
stateme ve
nt
• In a proof by contraposition of p q, we take
¬q as a hypothesis and we show that ¬p
must follow.
• Thus, show that if ¬q is true, then ¬p is
true
• Assume ¬q is true.
integers, then b ≤ 𝑛 or a ≤ 𝑛.
If n = ab, where a and b are positive
So, n ≠ ab.
ab > n
𝑛 or a ≤
then b ≤ 𝑛.
By contraposition, if n = ab,
Exampl
e
• Theorem:
∃ integer k
contradiction): Assume
n= 𝑛2 is
𝑛2 =and
odd 4𝑘2n = 2k
is even.
2(2𝑘2) Let m
= 2𝑘2
𝑛2 = 2m
So, 𝑛 is even.
2
Which2 contradicts over assumption that p is “𝑛
2 isby
contradiction.
2 = a/b
• Proof
Assum (proof contradiction):
rational. Definition:
∃
e The real
b≠0
number r
a and
If a , b b have common factor,
is rational if
remove it
∃ integers p
r=p/q,
by it 2 = 𝑎2 / 𝑏2
by dividing a and b
2 𝑏2𝑎= is
𝑎2even and by previous theorem, a is≠even.
2
and q that q
∃k
So, 0.
2k. 2 𝑏2 =
a=
4 𝑘2
𝑏2 = 2 𝑘2
So, 𝑏2 is
even and
by previous
Practice Exercise and Chapter
Reading
• Q – 1,2,3,6,9,10,17,18,19
• Chapter 1, Kenneth H. Rosen, Discrete
Mathematics and Its Applications, Section 1.7