Translate the following inference to logic notation: If William were excited, then John is a carpenter. John is not playing squash. If John plays squash, then William is excited. For all x, if y were a carpenter, then y is playing squash. Therefore William is not excited.
p -> P(a). ~Q(a). Q(a) -> p. forall x: P(x) -> Q(x). Therefore ~p.