Translate the following inference to logic notation: It is sunny if and only if David is a mechanic. If it is sunny, then it is late. If it is late, then it is sunny. It is not late. If David were a mechanic, then it is sunny. Therefore David is not a mechanic.
p <-> q. p -> r. r -> p. ~r. q -> p. Therefore ~q.