0% found this document useful (0 votes)
28 views27 pages

Ch2 Proof Techniques E28093 2

Uploaded by

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

Ch2 Proof Techniques E28093 2

Uploaded by

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

CS104:Discrete Structures

Cha p te r 2 :

Proof Techniques
Introduction to Proofs
(In Book: Chapter 1-sec 1.8)

2
Introduction to Proofs
3

A proof : is a valid argument that establishes the truth of a mathematical


statement.

There are two types of proofs :


 Formal proof : where all steps are supplied and the rules for each
step in the argument are given
 Informal proof : where more than one rule of inference may be used
in each step, where steps may be skipped, where the axioms being
assumed and rule of inference used are not explicitly stated.
Introduction to Proofs (Cont.)
4
 A theorem is a statement that can be shown to be true.
 Less important theorems sometimes are called propositions.
 (Theorems can also be referred to as facts or results.)
 it may be the universal quantification of a conditional statement with one or
more premises and a conclusion, or it may be another type of logical
 Proof is a valid argument (sequence of statements) that establishes
statements.

the
 Axioms
truth or postulates
of a theorem. (statement
And the assumed
statements toused
to be be in proofs include:
Proven
AxiomsHypothesistheorems
true without proof)
o Ex: If x is positive integer then x+1 is positive integer.

 Hypothesis (premises) of the theorem


Rules of inference
 Previously proven theorems
 Rules of inference used to draw conclusions and
New Theorems
to move from one step to another
Introduction to Proofs (Cont.)
5

 Lemma is a less important theorem that is helpful in the proof of


other
 Aresults
corollary is a theorem that can be established directly from a
theorem
that
A has been proved.
conjuncture
• is a statement that is being proposed to be a true statement, usually
on the basis of some partial evidence.
• When a proof of a conjuncture is found, the conjuncture becomes a
theorem
Introduction to Proofs (Cont.)
6

 Methods of proving theorems:

 Direct proofs
 Proof by Contraposition
 Vacuous Proofs
 Trivial Proofs
 Proofs by Contradiction
 Proof by cases
Methods of proving theorems – Direct
proofs
7

 A direct proof of a conditional statement pq is constructed when


the first step is the assumption that p is true; subsequent steps are
constructed using rules of inference, with the final step showing that q
must also be true.
• A direct proof shows that a conditional statement pq is true by
showing that if p is true then q must also be true.
• In a direct proof, we assume that p is true and use axioms,
definitions, and previously proven theorems, together with rules of
inference, to show that q must also be true.
Methods of proving theorems – Direct
proofs
8

 Definition : The integer n is even if there exists an integer k such that


n = 2k, and n is odd if there exists an integer k such that n = 2k + 1.

 Note that every integer is either even or odd, and no integer is


both even and odd.

 Two integers have the same parity when both are even or both are
odd; they have opposite parity when one is even and the other is odd.
Methods of proving theorems – Direct
proofs
9

 Example Give a direct proof of the theorem :


“If n is an odd integer, then n2 is odd.”
 Proof:
We assume that n is (hypothesis)
odd.n = 2k + 1, where k is some
=> (definition of odd number)
integer.
We can square both sides of the equation n =
2k + 1 to obtain a new equation that expresses
=>
n2 n2 = (2k+1)2 = 4k2 + 4k + 1 = 2(2k2+2k)+1
(By squaring)
Since r = 2k2+2k is an integer(Axiom)

=> n2 = 2r+1 is odd.

 Example :Use a direct proof to show that :


“If n is an even integer, then n2 is even.”
Methods of proving theorems – Direct proofs
10

 Example Give a direct proof of the theorem :


“if m and n are both perfect squares, then nm is also perfect”
 Proof:

We assume that m and n are both perfect


squares :
m = s2 and n = t2
m.n = s2.t2 = (st)2

 Can wem.nuse is also


this perfect to prove theorems of the form ∀x(P(x) →
methodology
Q(x)) ?
Proofs of theorems of this type that are not direct proofs, that is, that do not
start with the premises and end with the conclusion are called indirect proof.
Methods of proving theorems – Proof by
Contraposition
11
 An extremely useful type of indirect proof is known as proof by contraposition
( p → q equivalent to ¬ q → ¬ p )
 Methodology of Proof by Contraposition : It is proving the conditional
statement
p → q by showing
tothat its that
contrapositive, ¬ q →is¬true
p, is true
prove p→q

Begin with ¬ q is true as a premise

using (axioms, definitions


previously proven theorems with
rules of inference)

End with ¬ p must be also true

It is showing the contrapositive ¬ q → ¬ p is true


Methods of proving theorems – Proof by
Contraposition
12

 Example Prove that if n is an integer and 3n + 2 is odd, then n is odd.


 Proof:
We assume that the conclusion of the conditional
statement
“if 3n + 2 is odd, then n is odd” is false .
=> We assume that n is (hypothesis)
even. (definition of even number)
=> n = 2k , where k is some integer.
( Substituting 2k for n in hypthesis : 3n+2 )
=> 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k
(Substituting
+ 1) 2k for n)
Since r = 3k + 1 is an integer
(Axiom)
=> 3n + 2 = 2r is even
(definition
. of even number)

Because the negation of the conclusion of the conditional statement implies


that the hypothesis is false, the original conditional statement is true.
We have proved the theorem “if 3n + 2 is odd, then n is odd”
Methods of proving theorems – Proof by
Contraposition
13

 Example Use an indirect proof to show that “if n2 is odd then n is odd”
 Proof:
The contraposition is “if n is not odd then n2 is not odd ”
=> We Assume that n is not odd i.e., n is (hypothesis)
even
=> n = 2k , where k is some integer.
(definition of even number)
=> n2 = (2k)2 = 4k2 = 2(2k2)
Since r = 2k2 is an integer (Axiom)
=> n2 = 2r (definition of not odd number)
Thus , if n2 is odd then n is odd is true
Methods of proving theorems – Proof by
Contraposition
14
 Example Prove that if n = ab where a and b are positive integers then
a  n or b  n
 Proof: Let p=“an”, q=“bn” and r=“n=ab”

We want to prove that r pq


=> The contraposition is (pq )   r (By definition)
=> p  q   r (De Morgan’s law)
Now, assume that an and bn (p  q)
=> a.b  n.n = n (by multiplying above twos)
=> ab  n
=>  r which contradicts the statement n = ab
Because the negation of the conclusion of the conditional statement implies
that the hypothesis is false, the original conditional statement is true.
Methods of proving theorems – Vacuous Proofs
15
p q pq
 Vacuous Proofs A conditional statement p  q is TRUE if F F T
p is FALSE. If we can show that p is False, then we have a F T T
T F F
proof, called vacuous proof, of the conditional statement p T T T
q.

 Example Show that the proposition P(0) is true, where P(n) is “If n > 1, then n2 >
n”
 and theNote
Proof: domain
thatconsists of 0all>integers.
P(0) is “If 1, then 02 > 0.” We can show P(0) using a
vacuous proof. Indeed, the hypothesis 0 > 1 is false. This tells us that P(0) is
automatically
 true.that if he is alive and he is dead then the sun is ice cold
Example Prove

 Proof: Since the hypothesis is always false the implication is vacuously true.
Methods of proving theorems – Trivial Proofs
16
p q pq
 Trivial Proofs A conditional statement p  q is TRUE if q F F T
is True . If we can show that q is True, then we have a proof, F T T
T F F
called Trivial proof, of the conditional statement p  q . T T T

 Example Let P(n) be “If a and b are positive integers with a ≥ b, then an ≥ bn
where the domain consists of all nonnegative integers. Show that P(0) is true.
 Proof: The proposition P(0) is “If a ≥ b, then a0 ≥ b0.” Because a0 = b0 = 1, the
conclusion
of the conditional statement “If a ≥ b, then a0 ≥ b0” is true. Hence, this conditional

statement,
Example which
Proveisthat
P(0), is true
if x=2 then x2  0 for all real numbers
 Proof: Since x2  0 is true then the implication is trivially true. (we didn’t
use the fact x=2)

 Example Use a trivial proof to show that if n > 1 then n2 ≥ n for all integers
Methods of proving theorems – Proofs by
Contradiction
17
 Proofs by Contradiction
Let p be the statement we want to prove is true, assuming not p (p )and show a
contradiction p q

Definition: The real number r is rational if there exist integers p and q with q  0
such that r = p/q and p and q have no common factors A real number that is not
rational is called irrational

 Example Prove that 2 is irrational by giving a proof by contradiction.


 Proof: Let p is “2 is irrational “
To start a proof by contradiction, we suppose that ¬ p is true , "It is not the case
that is irrational”
Let p is 2 is rational(hypothesis)

2 = a/b for some integers a and b (b0) and a and b have no common
factors We can square both sides of the equation=>
2 2==a/b
a2/b2
Methods of proving theorems – Proofs by
Contradiction
18

=> 2b2 = a2 By the definition of an even integer it follows that a 2 is


even, so we can substituting with a = 2c for some integer
=> 2b2 = (2c)2 = 4c2 (Dividing both sides of this equation by 2)
Þ b2 = 2c2 By the definition of an even integer it follows that b2 is even , i.e. b is
even
We have now shown that the assumption of ¬ p leads to the equation √2 = a/b,
where
 a and b have no common factors,
 but both a and b are even ( that is, 2 divides both a and b)
That is our assumption of ¬ p leads to the contradiction, ¬ p must be false.
That is, the statement p, “ √2 is irrational,” is true. We have proved that √2 is
irrational.
Methods of proving theorems – Proofs by
Contradiction
19

 To prove a conditional statement p  q by contradiction we prove that:


( p  q F is true ) which is equivalent to p  q .
 Example Give a proof by contradiction of the theorem :
“If 3n + 2 is odd, then n is odd.”
 Proof: Suppose that 3n+2 is odd and n is even [p  q]
=> n = (hypothesis q, definition of even numbers)
2r
=>3n = (multiply both sides by 3)
6r=> (add 2 to both sides)
3n+2=2+6r
=>
3n+2=2(1+3r)
=> (Let k=1+3r)
3n+2=2k
=> Thus 3n+2 is even which is false (a contradiction !)
Therefore the implication is true.
Methods of proving theorems – Proofs of Equivalence
20

 Proofs of Equivalence To prove a theorem that is a biconditional


statement, that is, a statement of the form p ↔ q, we show that p → q and
q → p are both true.
 Example Prove the theorem:
“If n is an integer, then n is odd if and only if n2 is odd.”
“if n is odd then n2 is odd” proved in Example 5
“ n2 is odd then n is odd” proved in Example 7
 Therefore, n is even if and only if n2 is even
 Proving equivalence of several propositions:
If we want to prove that p1 p2  p3… pn
 Then it is sufficient to prove p1  p2,, p2  p3 … pn  p1
Methods of proving theorems – Counterexample
21

 Counterexample : To show that a statement of the form ∀xP(x) is false, we need


only find a counterexample, that is, an example x for which P(x) is false.

 E.g. Prove that “For all real numbers x2 > x” is false


X=0.5 is a counterexample since 0.52 > 0.5 is not true

 Example Show that the statement: “Every positive integer is the sum
of the squares of two integers” is false.
 To show that this statement is false, we look for a counterexample which is
3 because we cannot write 3 as the sum of the squares of two integers.
To show this is the case, note that the only perfect squares not exceeding 3
are:
(02 = 0 & 12 = 1), but 3  1+0. Therefore the statement is false
Methods of proving theorems – proof by cases
22

 Proof by cases : A proof by cases must cover all possible cases that

arise in a theorem. Each case may cover an infinite number of


instances
 Example Prove "if n is an integer then n2 ≥ n".
 Proof: We can prove that n2 ≥ n for every integer by considering three cases,
when n = 0, when n ≥ 1, and when n ≤ -1.
Case 1: When n = 0, since 02 = 0, 02 >= 0. So, n2 ≥ n is true.
Case 2: When n ≥ 1, From n ≥ 1, we get n2 ≥ n (by multiplying with n)
Case 3: When n ≤ -1, since n is negative, n2 is positive, so n2 ≥ n.
Hence, if n is an integer then n2 ≥ n.
Methods of proving theorems – proof by cases
23

 Example Use a proof by cases to prove that |xy| = |x||y|, where x and y real
numbers.Hint: Consider all 4 cases: x and y positive or negative

 Proof: using the fact that |a| = a if a 0 and |a| = -a if a 0 , there are four cases
for x and y :
Case 1: x and y both are nonnegative: xy 0 so that |xy| = xy = |x||y|
Case 2 : x is nonnegative and y is negative: xy 0 so that |xy| = - xy = x(-y) = |x||y|
Case 3 : x is negative and y is nonnegative: xy 0 so that |xy| = - xy = (-x)y = |x||y|
Case 4 : x and y both are negative xy 0 so that |xy| = xy = (-x)(-y) = |x||y|
Mistakes in Proofs
24

 There are many common errors made in constructing mathematical and the most
common errors are mistakes in arithmetic and basic algebra.

 Each step of a mathematical proof needs to be correct and the conclusion needs
to
follow logically from the steps that precede it.
Be careful!
Many mistakes result from the introduction of steps
that
do not logically follow from those that precede it
Mistakes in Proofs
25

 Example What is wrong with this famous supposed “proof” that 1 =


The error is that a − b
2 ?  Proof: Suppose a and b are two equal positive integers.equals zero; division of
both sides of an equation
Steps : Reason by the same quantity is
valid as long as this
1. a=b ( Given) quantity is not zero.
2. a2 = ab (Multiply both sides of (1) by a)
3. a2 - b2 = ab - b2 (Subtract b2 from both sides of (2))
4. (a − b)(a + b) = b(a − (Factor both sides of (3))
b) (Divide both sides of (4) by a − b )
5. a+b=b (Replace a by b in (5) because a = b &
6. 2b = b simplify)
 Can
7. you
2 = find
1 the error (Divide both sides of (6) by b)
Every step is valid except for one, step 5 where we divided both sides by
a−b
Mistakes in Proofs
26

 Example What is wrong with this “proof” ?


“Theorem:” If n2 is positive, then n is positive.
 Proof: Suppose that n2 is positive. Because the conditional statement :
“If n is positive, then n2 is positive” is true, we can conclude that n is
positive.
 Solution : Let P(n) be “n is positive” and Q(n) be “n2 is positive.”
Then our hypothesis is Q(n). (1)

This statement “If n is positive, then n2 is positive” is the


statement: because we are not
using a valid rule of
∀n(P (n) → Q(n)). (2)
From the hypothesis (1) and the statement (2): inference.

We cannot conclude P(n)


A counterexample
supplied by n = −1 for
Instead, we can prove that by using counterexample
which n2 = 1 is
positive, but n is
negative.
End of Chapter
2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy