Translate the following inference to logic notation: If James were a server, then Michael is working. If David cooks, then James is a server. Michael is not working. If Michael works, then David is cooking. Therefore David is not cooking.
p -> q. r -> p. ~q. q -> r. Therefore ~r.