Translate the following inference to logic notation: Richard is a sailor or James is not cooking. James is cooking or Richard is writing a letter. Richard is a sailor or Richard is not writing a letter. Therefore Richard is a sailor.
p or ~q. q or r. p or ~r. Therefore p.