Translate the following inference to logic notation: If David were a mechanic, then it is not cloudy. It is raining. If it rains, then it is cloudy. Therefore David is not a mechanic.
p -> ~q. r. r -> q. Therefore ~p.