Translate the following inference to logic notation: If Thomas listens to a song, then Karen is a doctor. If Karen were a doctor, then it is not late. It is late. If Karen were a doctor, then Thomas is listening to a song. Therefore Thomas is not listening to a song.
p -> q. q -> ~r. r. q -> p. Therefore ~p.