Translate the following inference to logic notation: Thomas is not a soldier. William is poor if and only if Thomas is not playing squash. If Thomas plays squash, then Thomas is a soldier. Therefore William is poor.
~p. q <-> ~r. r -> p. Therefore q.