Translate the following inference to logic notation: It is sunny. John is a writer if and only if Joseph is poor. John is not a writer. Therefore Joseph is not poor and it is sunny.
p. q <-> r. ~q. Therefore ~r and p.