Translate the following inference to logic notation: If Sarah were bored, then it is late. If it is late, then Sarah is bored. If William were a writer, then it is late. Therefore if William were a writer, then Sarah is bored.
p -> q. q -> p. r -> q. Therefore r -> p.