Translate the following inference to logic notation: If Barbara were curious, then James is listening to a song. If James listens to a song, then Barbara is curious. If Barbara were curious, then it is late. If it is late, then James is listening to a song. Therefore it is late if and only if Barbara is curious.
p -> q. q -> p. p -> r. r -> q. Therefore r <-> p.