Translate the following inference to logic notation: Richard is sleeping if and only if Mary is a lawyer. David is a writer. For all x, x_16 will not sleep. Therefore David is a writer.
P(a) <-> p. q. forall x: ~P(x). Therefore q.