Translate the following inference to logic notation: Thomas is poor if and only if Richard is writing a letter. If Richard writes a letter, then Richard is not driving a car. Richard is driving a car. If James were an astronaut, then Thomas is poor. Therefore James is not an astronaut.
p <-> q. q -> ~r. r. s -> p. Therefore ~s.