Translate the following inference to logic notation: If Susan sleeps, then Richard is listening to a song. William is a sailor or Richard is not listening to a song. Susan is sleeping or William is not a sailor. Therefore Susan is sleeping if and only if William is a sailor.
p -> q. r or ~q. p or ~r. Therefore p <-> r.