Translate the following inference to logic notation: If David sleeps, then it is raining. It is overcast if and only if it is raining. It is not overcast. Therefore David is not sleeping.
p -> q. r <-> q. ~r. Therefore ~p.