Translate the following inference to logic notation: It is late. If John were happy, then it is not late. If John were a poet, then John is happy. If John were happy, then John is a poet. Therefore John is not a poet.
p. q -> ~p. r -> q. q -> r. Therefore ~r.