Translate the following inference to logic notation: Robert is not writing a letter. Robert is writing a letter and Jessica is sleeping. For all x, x is an electrician. Therefore Mary is playing a game and Joseph is an electrician.
~p. p and q. forall x: P(x). Therefore r and P(a).