Translate the following inference to logic notation: If it is overcast, then John is fast. If John were fast, then it is overcast. If it is overcast, then David is not cooking. David is cooking. Therefore John is not fast.
p -> q. q -> p. p -> ~r. r. Therefore ~q.