simplify ((not p && q) or not (p or q)) and ((p or r) and (p or not r))