Translate the following inference to logic notation: James is playing tennis if and only if Susan is a bartender. If Mary were a soldier, then James is playing tennis. Susan is not a bartender. Therefore Mary is not a soldier.
p <-> q. r -> p. ~q. Therefore ~r.