Translate the following inference to logic notation: If Sarah were bored, then Michael is not a carpenter. Michael is a carpenter. If David takes a plane, then Sarah is bored. Therefore David is not taking a plane.
p -> ~q. q. r -> p. Therefore ~r.