Translate the following inference to logic notation: If William were a police officer, then it is cloudy. It is not cloudy. If it is cloudy, then William is a police officer. If William were not a police officer, then David is bored. Therefore David is bored.
p -> q. ~q. q -> p. ~p -> r. Therefore r.