Translate the following inference to logic notation: If David were a carpenter, then David is not cooking. Robert is writing a letter or it is snowing. David is cooking or it is not snowing. If Robert writes a letter, then David is cooking. Therefore David is not a carpenter.
p -> ~q. r or s. q or ~s. r -> q. Therefore ~p.