[Math] Logically determining the validity of a statement

discrete mathematicslogicpropositional-calculus

I'm having some trouble determining if the following statement may be considered valid.

if the apples are on sale, I will buy the apples.

the apples are not on sale.

∴ I will not buy the apples.

At first I was pretty sure this was a valid statement, but when I broke it down to

p: the apples are on sale.
q: i will buy the apples.

the first statement is p–>q,

however, the conclusion is saying ~p —> ~q, but in logic (p–>q) ≡ (~p–>~q) is not true, right? an implication only implies that if p is true then q will be true, and a false hypothesis implies any conclusion. so ~p does not mean ~q.

therefore this statement would be invalid? or perhaps i'm attacking this from the wrong angle? Sorry, i'm still new to this stuff!

Best Answer

For any two logical propositions $p$ and $q$, if the statement "if $p$ then $q$" is true, then so is the statement "if not $q$ then not $p$", i.e. a conditional is logically equivalent to its contrapositive. In this case, you have (as you noted) "if not $p$ then not $q$", which is not the contrapositive but rather the inverse of the statement. The truth of the inverse of a statement is not determinable from the statement itself, so you are correct in asserting that the statement is not valid.

In terms of truth tables;

$$\begin{array}{c|c|c|c|c|c|c} p & q & \lnot p & \lnot q & (p \rightarrow q) & (\lnot p \rightarrow \lnot q) & (\lnot q \rightarrow \lnot p) \\ \hline F & F & T & T & T & T & T \\ \hline F & T & T & F & T & F & T \\ \hline T & F & F & T & F & T & F \\ \hline T & T & F & F & T & T & T \\ \end{array} $$

Note how $(p\rightarrow q)$ and $(\lnot q \rightarrow \lnot p)$ are true in exactly the same contexts, whereas the truth values of $(p \rightarrow q)$ and $(\lnot p \rightarrow \lnot q)$ do not coincide. Two statements are logically equivalent if the truth of one implies the truth of the other and vice versa, which is not true with the conditional and the inverse, but is with the conditional and contrapositive.