Translate the following inference to logic notation: If Joseph doesn't play tennis, then David is sleeping. It is sunny. If Joseph plays tennis, then it is not sunny. Therefore David is sleeping.
~p -> q. r. p -> ~r. Therefore q.