Translate the following inference to logic notation: Joseph is a scientist if and only if John is writing a letter. Thomas is driving a car. John is not writing a letter. Therefore Thomas is driving a car.
p <-> q. r. ~q. Therefore r.