Translate the following inference to logic notation: If John were bored, then Barbara is an astronaut. Susan is excited if and only if Barbara is an astronaut. If Susan were excited, then John is bored. Therefore John is bored if and only if Susan is excited.
p -> q. r <-> q. r -> p. Therefore p <-> r.