Translate the following inference to logic notation: If it snows, then it is sunny. If it is sunny, then it is cloudy. If it is cloudy, then Thomas is cooking. Thomas is not cooking. Therefore it is not snowing.
p -> q. q -> r. r -> s. ~s. Therefore ~p.