Translate the following inference to logic notation: Sarah is a carpenter if and only if Thomas is a mechanic. David is not cooking. If Thomas were a nurse, then Thomas is a mechanic. If Sarah were a carpenter, then David is cooking. Therefore Thomas is not a nurse.
p <-> q. ~r. s -> q. p -> r. Therefore ~s.