Translate the following inference to logic notation: If Barbara were an astronaut, then James is a lawyer. Barbara is an astronaut or James is not a lawyer. Therefore James is a lawyer if and only if Barbara is an astronaut.
p -> q. p or ~q. Therefore q <-> p.