I have a question regarding proving "if p is true then q is true".
One way, is to show p $\implies$ q is a true statement, so then if p is true, then q is true.
The other way is to prove it by contrapositive, which is to say $\neg$q $\implies$ $\neg$p is true. This can be shown from the truth table of $\neg$q $\implies$ $\neg$p and p $\implies$ q, which proves they are logically equivalent.
| p | q | (p $\implies$ q) | ($\neg$q $\implies$ $\neg$p) |
|---|---|---|---|
| F | F | T | T |
| F | T | T | T |
| T | F | F | F |
| T | T | T | T |
However, if p is true there are more logically equivalent statements on restriction of the case p = T . For example, let's look at $\neg$(p $\implies$$\neg$q).
| p | q | ~(p $\implies$ ~q) |
|---|---|---|
| F | F | F |
| F | T | F |
| T | F | F |
| T | T | T |
If you restrict $\neg$(p $\implies$ $\neg$q) truth table to the case that p=T (as we only aim to show if p=T then q = T) , it is equivalent to p $\implies$ q truth table when p=T.
So why can't we just say if we want to prove "if p is true then q is true", we first show (p $\implies$ $\neg$q) is false, which means $\neg$(p $\implies$ $\neg$q) is true. and now if p=T it's truth table is the same as p $\implies$ q, so it means q is true.
So can use this approach alongside direct proof (p -> q) and prove by contrapositive ($\neg$q $\implies$ $\neg$p) when you only need to show if p is true the q is true?
I really appreciate any help with this confusion. Thank you.
The problem with the approach of showing $\neg (p \to \neg q)$ as opposed to $\neg q \to \neg p$ is that you cannot always prove the former when the implication $p \to q$ is true, while you can always prove the latter.
Ultimately, a proof of the former requires that $p$ be true, which doesn’t always have to be the case. For example, if you want to prove
$\forall x \in \mathbb R. \exists y \in \mathbb R. (x \not =0 \to x= \frac {1}{y})$
you do not want to prove
$\forall x \in \mathbb R. \exists y \in \mathbb R. \neg (x \not =0 \to x \not = \frac {1}{y})$
since it is equivalent to
$\forall x \in \mathbb R. \exists y \in \mathbb R. (x \not =0 \land x= \frac {1}{y})$
which is clearly false.