Translate the following inference to logic notation: If Barbara were sad, then James is not an electrician. David is fast if and only if Barbara is sad. James is an electrician. David is fast if and only if Thomas is happy. Therefore Thomas is not happy.
p -> ~q. r <-> p. q. r <-> s. Therefore ~s.