Translate the following inference to logic notation: John is playing tennis or John is not a writer. If John plays tennis, then John is a writer. John is a writer if and only if Sarah is working. John is not playing tennis. Therefore Sarah is not working.
p or ~q. p -> q. q <-> r. ~p. Therefore ~r.