How do we know that the contrapositive, ¬q → ¬p, of a conditional statement p → q always has the same truth value as p → q

discrete mathematicslogicproof-explanation

enter image description here

I am having a bit of trouble understanding the pasted excerpt. I think I might be missing something basic. As I understand it, the contrapositive of a conditional statement is where we take a conditional statement and both 1) flip the hypothesis and conclusion and 2) negate the q and p so we have ¬q -> ¬p

Looking at the truth table of the original p -> q I can convert each possibility to the contrapositive ¬q -> ¬p . So, for example, when p is True and q is False, the p -> q is false. I can now turn this case into the contrapositive by taking the q and negating it which is True and then take the p and negating it which is False.

What does this mean though that the contrapositive has the same truth value as p -> q? Like, the truth of table of p -> q was just a fact that was given to me. How do I know what the truth value for each possibility of ¬q -> ¬p is though? Is it simply that we can always convert the contrapositive back to the p -> q statement by "un-negating" the q and p in ¬q -> ¬p and then know the truth value based on original truth table for p -> q where we know it's only False when p is True and q is False?

Just generally confused. I hope my rambling question makes some sense.

Thanks in advance.

Best Answer

Well, you can easily verify that the two statements are equivalent using a truth table, as you have done.

You might also use the definition $$p\rightarrow q \equiv \sim p \cup q$$ to show that both are equivalent.

If you want to gain some intuitive sense, $p\rightarrow q$ means "if $p$, then $q$". This means that the truth of $p$ indicates the truth of $q$. Whereas the second statement means "if not $q$, then not $p$". The two are clearly equivalent. To see this take, as an example, $p\equiv$ "it is cloudy" and $q\equiv$ "it is raining".