Translate the following inference to logic notation: If Barbara works, then David is driving a car. If David drives a car, then Barbara is working. David is driving a car or Barbara is not working. Therefore David is driving a car if and only if Barbara is working.
p -> q. q -> p. q or ~p. Therefore q <-> p.