Translate the following inference to logic notation: If James were a carpenter, then David is climbing a mountain. If James were a carpenter, then Joseph is making tea. If Joseph makes tea, then David is climbing a mountain. If David climbs a mountain, then James is a carpenter. Therefore Joseph is making tea if and only if James is a carpenter.
p -> q. p -> r. r -> q. q -> p. Therefore r <-> p.