Translate the following inference to logic notation: If William were a carpenter, then Elisabeth is drinking water. If Elisabeth drinks water, then William is sleeping. Elisabeth is drinking water. If David makes tea, then William is sleeping. If William sleeps, then William is a carpenter. Therefore William is sleeping.
p -> q. q -> r. q. s -> r. r -> p. Therefore r.