Translate the following inference to logic notation: If it is cloudy, then Thomas is working. It is not cloudy. If Thomas works, then it is cloudy. Therefore Thomas is not working.
p -> q. ~p. q -> p. Therefore ~q.