Translate the following inference to logic notation: Charles is a carpenter if and only if Robert is climbing a mountain. Thomas is a lawyer. If Robert climbs a mountain, then Charles is a carpenter. If Robert climbs a mountain, then Thomas is not a lawyer. Therefore Charles is not a carpenter.
p <-> q. r. q -> p. q -> ~r. Therefore ~p.