Translate the following inference to logic notation: If Karen cooks, then Mary is playing a game. Karen is cooking. If William were a police officer, then Mary is playing a game. If David drives a car, then William is a police officer. Therefore Mary is playing a game.
p -> q. p. r -> q. s -> r. Therefore q.