Translate the following inference to logic notation: If Thomas plays a game, then Susan is a carpenter. Susan is a carpenter if and only if Thomas is listening to a song. Thomas is playing a game or Richard is a writer. Thomas is not listening to a song. Therefore Richard is a writer.
p -> q. q <-> r. p or s. ~r. Therefore s.