Given that,

  1. \(\neg\) binds most tightly,
  2. \(\land\) and \(\lor\) bind more tightly than \(\rightarrow\), and their binding power is the same,
  3. Outermost parentheses are eliminable,
  4. \(\land\) and \(\lor\) are both associative.

Restore the full parentheses in the following formulas:

  1. \[\neg p \lor q \rightarrow r\]
  2. \[p \rightarrow q \land r\]
  3. \[p \land q \land r\]
  4. \[p \land q \lor r\]
  5. \[p \rightarrow q \rightarrow p\]

Eliminate the parentheses as much as possible in the following formulas:

  1. \[(p\rightarrow q) \lor r\]
  2. \[(p \lor (q \lor r)) \rightarrow (p \land \neg (r \lor q))\]
  3. \[((p \land q) \lor r)\]
  4. \[\neg (p \lor r \lor q)\]
  5. \[((p \land q) \lor r) \lor p))\]

Updated: