Translate the following inference to logic notation: David is cooking or Patricia is not working. John is not a soldier. If David cooks, then Patricia is working. Patricia is working if and only if John is a soldier. Therefore David is not cooking.
p or ~q. ~r. p -> q. q <-> r. Therefore ~p.