Translate the following inference to logic notation: It is raining if and only if Karen is happy. If Karen were happy, then it is raining. If it rains, then it is cloudy. Karen is not happy. If it is cloudy, then it is raining. Therefore it is not cloudy.
p <-> q. q -> p. p -> r. ~q. r -> p. Therefore ~r.