What is the difference between the negation and inverse of a statement ?(Logic) I got this question wrong on a test! The question was 

In words and symbols write the negation of the following statement:
   The sun is not shining if it is raining.

$p:$ It is raining. 
$n:$ The sun is shining.
 My answer was $p \to \sim s$ (The sun is shining if it is not raining).
 This answer was marked incorrect explaining that this is the inverse no the negation. 
1. What is the correct negation of "the sun is not shinning if it is raining"?
2. What is the difference between negation and inverse?
 A: The negation of a statement $A \implies B$ is $\lnot (A \implies B)$ which is also $A \text{ and not } B$.  A statement and its negation are always opposites.
The converse of an implication $A \implies B$ is $B \implies A$.  A statement and its converse are not always equivalent and not always opposite.
The contrapositive of an implication $A \implies B$ is $\lnot B \implies \lnot A$.  A statement and its contrapositive are always equivalent.

For your exam question, first, choose reasonable variable names to make things easier to think about.  $S$ for Sun and $R$ for Raining.

The sun is not shining if it is raining.

You might think this is $\text{not } S \implies R$, but look carefully it is actually $R \implies \text{not } S$.
The negation is $\text{not }(R \implies \text{not }S) = \text{not }(\text{not }R \text{ or } \text{not }S) = R \text{ and } S$, that is, "it is raining and the sun is shining".
A: An easy way to see that "the sun is shining if it is not raining" is not the negation of "the sun is not shining if it is raining" is that both can be true at once. (But they don't need to be).
To take the negation with as little thought as possible, do it algebraically. "The sun is not shining if it is raining" translates to:
$$
\begin{aligned}
p \implies \neg s\\
\end{aligned}
$$
so its negation is
$$
\begin{aligned}
&\neg(p \implies \neg s)\\
&\neg(\neg p \vee \neg s)\\
&(\neg \neg p) \wedge (\neg \neg s)\\
&(p \wedge s)\\
\end{aligned}
$$
which is "it is raining and the sun is shining".
Or you could do it in words and not symbols -- ask yourself "what scenario would violate this claim?"
A: Let $p$ be the  "it is raining" and $q$ be "the sun shining". Then
the given statement is $ p \implies (\sim q)$.


*

*The negation is $( p \wedge\sim (\sim q))$, and could be read as "It is raining and the sun shining".

*The inverse is $\sim p \implies \sim(\sim q)$ and could be read "If it is not raining, then the sun is shining." 

*(Bonus) The converse is $(\sim q) \implies p$ which can be read "if the sun is not shining, then it is raining."
