Translate the following inference to logic notation: If Michael sleeps, then Linda is a carpenter. If William were a politician, then Michael is sleeping. If Linda were a carpenter, then William is a politician. If William were a politician, then Linda is a carpenter. Therefore Michael is sleeping if and only if William is a politician.
p -> q. r -> p. q -> r. r -> q. Therefore p <-> r.