Translate the following inference to logic notation: If James were a mechanic, then it is raining. If it rains, then James is a mechanic. It is raining or James is not a mechanic. Therefore James is a mechanic if and only if it is raining.
p -> q. q -> p. q or ~p. Therefore p <-> q.