Translate the following inference to logic notation: If it rains, then William is playing tennis. It is not cloudy. William is playing tennis if and only if it is cloudy. Therefore it is not raining.
p -> q. ~r. q <-> r. Therefore ~p.