Translate the following inference to logic notation: If David listens to a song, then Karen is writing a letter. For all x, if x_10 writes a letter, then x_10 is an astronaut. If Karen were an astronaut, then David is listening to a song. Therefore Karen is an astronaut if and only if David is listening to a song.
p -> P(a). forall x: P(x) -> Q(x). Q(a) -> p. Therefore Q(a) <-> p.