**Introduction :**

The most basic form of logic is propositional logic. Propositions, which have no variables, are the only assertions that are considered. Because there are no variables in propositions, they are either always true or always false .**Example –**

**P :**2 + 4 = 5. (Always False) is a proposition.**Q :**y * 0 = 0. (Always true) is a proposition.

The majority of mathematical conclusions are expressed as implications: P and Q : P â‡’ Q

We know that –

P |
Q |
P â‡’ Q |

T | T | T |

T | F | F |

F | T | T |

F | F | T |

**Types Of Proofs :**

Let’s say we want to prove the implication P â‡’ Q. Here are a few options for you to consider.

**1. Trivial Proof – **

If we know Q is true, then P â‡’ Q is true no matter what P’s truth value is.**Example –**

If there are 1000 employees in a geeksforgeeks organization , then 3^{2} = 9.**Explanation –**

Let P : There are 1000 employees in geeksforgeeks organization & Q : 3^{2} = 9.

We know that Q is always true and in the truth table we can see that whenever Q is true, P â‡’ Q is true, whatever the true value of P is.

**2. Vacuous Proof –**

If P is a conjunction (example : P = A ^ B ^ C)of other hypotheses and we know one or more of these hypotheses is false, then P is false and so P â†’ Q is vacuously true regardless of the truth value of Q.

**Example –**

If 5 ! = 100, then 3 ! = 6.**Explanation –**

Let P : 5 ! = 100, & Q : 3 ! = 6.

We know that P is always false and in the truth table we can see that whenever P is False, P â‡’ Q is true, whatever the truth value of Q is.

**3. Direct Proof – **

Assume P, then prove Q using inference rules, axioms, definitions, and logical equivalences.**Example –**

For all integers p and q, if p and q are odd integers, then p + q is an even integer.

Let P denotes : p and q are odd integers

Q : p + q is an even integer

To Prove : P â‡’ Q**Proof – **

As p & q are odd integers, they can be represented as :

Assume : p = 2m + 1 and q = 2n + 1, where m & n are also some integers.

Then : p + q =

= (2m + 1) + (2n +1) (Substitution Law)

= am + 2n + 2 (associative and commutative law for addition)

= 2(m + n + 1) (distributive law)

= Number divisible by 2 & hence an even number.

**4. Proof By Contradiction – **

We start with the assumption that the hypotheses are correct and the conclusion is incorrect, and we try to find a contradiction.

Proof by contradiction is legitimate because :

Â¬(P âˆ§ Â¬Q) is equivalent to P â‡’ Q

If we can prove that (P âˆ§ Â¬Q) is false, thenÂ¬(P âˆ§ Â¬Q) is true, and the equivalent statement P â‡’ Q is likewise true.

**Example –**

Let x and y be real numbers. If 5a + 25b = 156, then a or b is not an integer.**Proof – **

Let P : 5a + 25b = 156 & Q : ** ** a or b is not an integer

Â¬Q : a or b is an integer

So , we assume that both a and b are integers (Â¬Q) â‡’ 5(a + 5b) = 156 (distributive law)

â‡’ Since a and b are integers, this implies 156 is divisible by 5.

The integer 156 , however, is anyway not divisible by 5. This contradiction gives the result.

It implies that (P âˆ§ Â¬Q) is false as P is false

thenÂ¬(P âˆ§ Â¬Q) is true and the equivalent statement P â‡’ Q is likewise true.

5. **Proof by Contrapositive –**

We can prove P â‡’ Q indirectly by showing that Â¬Q â‡’ Â¬P . Assume Â¬Q, and then prove Â¬P using inference rules, axioms, definitions, and logical equivalences.

Example : For all integers a and b, if a*b is even, then a is even or b is even.

Proof : We prove the contrapositive of the statement:

Let P : a*b is even & Q : a is an even integer or b is an even integer. Then :

Â¬P : a*b is odd

Â¬Q : a and b are odd integers

Say Â¬Q is true, i.e., a and b are both odd integers

a = 2m + 1 and b = 2n + 1 ; where m and n are integers.

Then :

a*b= (2m + 1)(2n + 1) (by substitution)

= 4mn + 2m + 2n + 1 (by associative, commutative & distributive laws)

= 2(2mn + m + n) + 1 (by distributive law)

Since a*b is twice an integer (As : 2mn + m + n is also an integer) plus 1, a*b is odd.

So it shows that Â¬Q â‡’ Â¬P. Hence P â‡’ Q

**Q. Prove that : n can be odd if and only if n ^{2 }is odd.**

**Solution.**

We must prove two implications in order to prove this statement :

- If n is odd, n
^{2}is odd - If n
^{2}is odd, n is odd

**Assume – **

P : n is odd & Q : n2 is odd.

1. P â‡’ Q :

We are using direct proof to prove it.

Assume n is an odd integer.

Then : n= 2p+ 1 ; for some integer p.

Then n^{2}= (2p+ 1)^{2}= 4p^{2}+ 4p+ 1 =2(2p^{2}+ 2a) + 1,; which is 2*(some integer) + 1.

Thus, we can say that n^{2} is odd. Thus P â‡’ Q

2. Q â‡’ P :

We are using contra-positive proof way here.

Â¬Q : n^{2} is even and Â¬P : n is even.

We need to prove : Â¬P â‡’ Â¬Q ( Â¬P â‡’ Â¬Q means that Q â‡’ P)

Assume n is an even integer,

Then n= 2 ; for some integer p.

Then n2= (2p)^{2}= 4p^{2}= 2(2p^{2}), which is an even integer as it is divisible by 2.

From (1.) P â‡’ Q & from (2) Q â‡’ P, n can be odd if and only if n2 is odd.

**2. If a number is divisible by 4, then it is also divisible by 2.****Solution : **

Using Direct Proof :

Assume : x is divisible by 4

Then : x = k * 4 ; where k is some integer ( by definition of division)

So, x = k * (2 * 2)

So, x = (k * 2 )* 2 (Associative property of multiplication)

So, x = P * 2 where P = k * 2 ; is an integer.

Thus, we can say that x is divisible by 2 also.

**3. By using contradiction, prove that : If y + y = y then y = 0.****Solution :**

Let P : y +y = y & Q : y = 0

To prove : (P âˆ§ Â¬Q) is false as (P âˆ§ Â¬Q) is false ,thenÂ¬(P âˆ§ Â¬Q) is true, and the equivalent statement P â‡’ Q is likewise true.

P : y + y= y and Â¬Q : y~= 0.

(P âˆ§ Â¬Q) means : Then 2y =y and as y ~= 0 we can divide both sides by y.

As a result, we get : 2 = 1, which is a contradiction.

So, (P âˆ§ Â¬Q) is false and hence P â‡’ Q is true.