Translate the following inference to logic notation: It is sunny if and only if John is listening to a song. If William were rich, then John is listening to a song. William is not rich. If John listens to a song, then William is rich. Therefore it is not sunny.
p <-> q. r -> q. ~r. q -> r. Therefore ~p.