In: Computer Science
Proof of If and Only if (IFF) and Contrapositive
Let x,y be integers. Prove that the product xy is odd if and only if x and y are both odd integers.
Proof by Contradiction
Use proof by contradiction to show that the difference of any irrational number and any rational number is irrational. In other words, prove that if a is irrational and b is a rational numbers, then a−b is irrational.
Direct Proof
Using a direct proof, prove that:
The sum of two consecutive perfect squares is odd.
***Consider the set of integer numbers.***
***A perfect square is a number that can be expressed as the product of two equal integers.***
1)Proof of If and Only if (IFF) and Contrapositive
Let x,y be integers. Prove that the product xy is odd if and only if x and y are both odd integers.
Proof:
Use Proof by Contrapositive ,
Suppose x and y are both not odd integers.That is,they are even integers
If x=2a and y=2b for some integers a and b
Thus x.y=(2a).(2b)=4ab=2(2ab) for some integer 2ab
Therefore xy is even
That is xy is not odd.
By contrapositive,We proved that product xy is odd if and only if x and y are both odd integers
by proving product xy is even if and only if x and y are both even integers
2)Proof by Contradiction
Use proof by contradiction to show that the difference of any irrational number and any rational number is irrational. In other words, prove that if a is irrational and b is a rational numbers, then a−b is irrational.
Proof:Use Proof by contradiction.
Suppose the statement is false.
That is, suppose there is a rational number b and an irrational number a such that ,a-b, is rational.
By the definition of rational numbers, we have b = x/y and a-b = p/q for some integers x,y,p,q, where y≠0 and q≠0. That is, a-x/y= p/q.
Then, by basic algebra a=(py+qx)/qy . Because the set of all integers are closed under addition, subtraction, and multiplication, and x,y,p,q are integers, py+qx and qy are also integers. Furthermore, because y≠0 and q≠0, qy≠0. Therefore, by the definition of rational numbers, a is a rational number. On the other hand, in the supposition at the beginning, we supposed a is an irrational number.
Thus, a is a irrational number and b is an rational number, which is a contradiction. So, the supposition cannot be true.
That is, the original statement is true.
3) Direct Proof
Using a direct proof, prove that:
The sum of two consecutive perfect squares is odd.
Proof:Since n and m are consecutive squares ,then n=a2 and m=b2 for some integers a,b by a definition of square
Then n+m=a2+b2
=2k+1,where k∈Z+
For Example, 25=52 and 36=62
25+36=61=2(30)+1
Therefore, The given statement "The sum of two consecutive perfect squares is odd" is true