You are on page 1of 43

Basic Techniques of

Proofs
[Proof by Contraposition – Proof by Contradiction –
Exhaustive Proofs – Proof by Cases]
Aamir Shahzad Hashmi
Exercises
• Sum of two rational numbers is a rational number.
Exercises
•  Sum of two rational numbers is a rational number.
Proof:
Let we have two rational numbers:
and , where are integers, .
The sum of two rational numbers will be

So it is again a ratio of 2 integers. Hence sum is a rational number.


Exercises

•  Proof:
Let be an even number. , where is some integer.
Then additive inverse of is .

It is multiple of 2, hence it is also an even number.


Exercises

•  Proof:
Let be a rational number.
, where are integers, .
Then
Again, it is ratio of 2 integers, so it is a rational number.
Exercises

• Proof:
 
Let be an odd integer. , where is any integer.

this is problem of completing squares. We need to add (subtract) the missing


term.

This is difference of two squares.


Exercises

•  We need to prove 3 implications..


• Proof:
Let , an even number.

Problem … ??? Because we are going to have a ratio, about which we cannot
say whether it is intger or not.
Exercises

•  We need to prove 3 implications..


• Proof:
Let , an odd number.

Multiple of 2, hence is an even number.


If is even then is even. , an even number.
Exercises

•  We need to prove 3 implications..


• Proof:
is even, is even. Let
,
It is multiple of 2, hence an even number.
Exercises

•  We need to prove 2 implications..


• Proof:
is even, is even, is even. Let

It is an ODD number.
Exercises – Counterexample
Exercises
• First
  part:

is a counter example.
Exercises
• 2nd
  part:

Can we say that

It does not hold for negative


numbers.
Exercises
• 2nd
  part:

Let’s take

It does not hold for negative multiplier.


How to check a number is Prime or not?
• We need to check, whether a number is Prime or not.
(Let’s write code for this)
How to check a number is Prime or not?

• We need to check, whether a number is


Prime or not.
(Let’s write code for this)
How to check a number is Prime or not?

• We need to check, whether a number is


Prime or not.
(Let’s write code for this)
Proof by Contraposition:

If we can not prove by , we try (Contraposition)

If a number is prime, then it is not divisible by any number.

Contraposition: If a number is divisible by any


other number, then it is not prime.
How to check a number is Prime or not?
•  We need to check, whether a number is Prime or not.

• To prove that it is sufficient to check till


Proof by Contraposition: Example

If we can not prove by , we try (Contraposition)

e.g.
Show that if is odd, then is odd. ( is an integer)
Proof by Contraposition: Example
• Show
  that if is odd, then is odd. ( is an integer)
• Proof:
Try Direct Proof
Let , an odd number.

About a ratio of integers, we can not say, it is odd or even.


So we get STUCK???
Proof by Contraposition: Example
•  Show that if is odd, then is odd. ( is an integer)
• Proof:
Try InDirect Proof – by Contraposition

If is NOT odd (even), then is NOT odd (even).


If is EVEN, then is EVEN.
Let then
It is multiple of 2, hence even number. Hence proved by Contraposition.
Proof by Contraposition: Example

Show that if is odd, then is odd. ( is an integer)


Proof by Contraposition: Example
•  Show that if is odd, then is odd. ( is an integer)
Proof:
Try Direct Proof
Let , an odd number.

What to do next???
So we get STUCK???
Proof by Contraposition: Example
• Show
  that if is odd, then is odd. ( is an integer)
Proof:
Try In Direct Proof – by Contraposition

If is NOT odd (even), then is NOT odd (even).


If is EVEN, then is EVEN.
Let then
It is multiple of 2, hence even number. Hence proved by Contraposition.
Proof by Contraposition: Example

If , where are positive integers, then and b .


Proof by Contraposition: Example
•If ,  where are positive integers, then and b .
Proof:
Contraposition: If OR , then
Hypothesis is true when i) , ii) iii)
i) If , minimum possible value of .
Then
.
Proof by Cases – Exhaustive Proofs
•  

𝑝→𝑞≡(𝑝1∧𝑝2∧…∧𝑝𝑛)→𝑞≡(𝑝1→𝑞)∧(𝑝2→𝑞)∧…(𝑝𝑛→𝑞)
  -
Proof by Cases – Examples

0 1 1 = (True)
0 1 1 = (True)
1 > (True)
1 > (True)
2 > (True)
2 > (True)
3 > (True)
3 > (True)
4 > (True)
45 > (True)
< (False)
5 < (False)
Proof by Cases – Examples
• Only consecutive integers which are perfect powers less than 100 are 8 and 9.

• We can check one by one all perfect powers less than 100.

1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100


Proof by Cases – Examples
•irrational
  numbers and such that is rational.
Proof: (Proof of existence)
Proof by Cases – Examples
•  irrational numbers and such that is rational.
Proof: (Proof of existence)
We may start from some irrational number, let’s say .
Let’s take another irrational number .
Now,
It is rational or irrational? We don’t know.
We have 2 possible cases: it will be RATIONAL, it will be IRRATIONAL.
Proof by Cases – Examples
•  irrational numbers and such that is rational.
Proof: (Proof of existence)

We have 2 possible cases:


I) it will be RATIONAL,
That’s what we needed to show. So we are done.
II) it will be IRRATIONAL,
is irrational. We take raised to power by an irrational number, let’s say by .
Proof by Cases – Examples
•  irrational numbers and such that is rational.
Proof: (Proof of existence)

II) it will be IRRATIONAL.


is irrational. We take raised to power by an irrational number, let’s say
by .

We know 2 is a rational number.


Proof by Cases – Examples
•  If is an integer, then

• We have 3 cases:

I. .
Proof by Cases – Examples
• If
  is an integer, then

• Proof
• We have 3 cases:
I. , is positive.
II.
III. . is negative. (because is negative number.)
Proof by Cases – Examples (Do it by yourself)
•  no solutions in integers and for equation .
Example: no solutions in integers and for equation .
Equal to 8 or not
0 0 0 Less than 8
00 1
1 33 Less
Less than
than 88
00 2
2 12
12 Exceeds
Exceeds 88
11 0
0 11 Less
Less than
than 88
11 1
1 44 Less
Less than
than 88
1 2 13 Exceeds 8
1 2 13 Exceeds 8
2 0 4 Less than 8
2 0 4 Less than 8
2 1 7 Less than 8
2 1 7 Less than 8
2 2 16 Exceeds 8
2 2 16 Exceeds 8
3 0 9 Exceeds 8
3 0 9 Exceeds 8
Proof by Cases – Examples (Do it by yourself)
• Square of an integer ends with 0, 1, 4, 5, 6, or 9
Direct Proof: Example
•  Show that there is no prime number between the range
(factorial of )
Direct Proof: Example
•  Show that there is no prime number between the range
(factorial of )

What can we say about – is it a prime number or not?

You might also like