[Math] Can contrapositive proved using truth table

logic

"If P => Q is true, then contrapositive of P => Q is also true". Can this be proved using truth table ?

Truth table of P => Q is

P Q P=>Q
T T T
T F F
F T T
F F T

Will this match with the truth table of contrapositive of P => Q

Converse of P => Q is Q => P, and its truth table is

Q P Q=>P

T T T
T F F
F T T
F F T

Contrapositive of P => Q is inverse of (converse of P => Q)

so inverse of above truth table is
~Q ~P ~Q=>~P
F F F
F T T
T F F
T T F

The truth table 1 (P=>Q) is not matching with truth table 3 (~Q=>~P)

Best Answer

You want the prove that ~Q => ~P with a truth table. Just write that truth table down, and you'll get:

~Q ~P ~Q => ~P
T T T
T F F
F T T
F F T

Now check in which cases P => Q is true, and make sure that in the same case ~Q => ~P is also true.

Example: in P=>Q, when both of them are T, the claim is T, as for the contrapositive, it means that both ~P and ~Q are F, and according to the trush table, F F means T, so it's ok. Just do it for the rest.