Translate the following inference to logic notation: If James were a scientist, then John is a police officer. James is a nurse if and only if John is a police officer. If James were a nurse, then James is a scientist. Therefore John is a police officer if and only if James is a nurse.
p -> q. r <-> q. r -> p. Therefore q <-> r.