Translate the following inference to logic notation: John is sleeping. If Robert were a lawyer, then it is not late. If John sleeps, then it is late. Therefore Robert is not a lawyer.
p. q -> ~r. p -> r. Therefore ~q.