Translate the following inference to logic notation: David is not playing squash. David is playing squash if and only if Richard is making tea. Robert is a carpenter if and only if Richard is making tea. Therefore Robert is not a carpenter.
~p. p <-> q. r <-> q. Therefore ~r.