# Parenthesis/Examples

## Examples of Parenthesis

### Example 1

Consider the following this formula of propositional logic:

- $p \land q \lor r$

This can mean either:

- the conjunction of $p$ with $q \lor r$

or:

- the disjunction of $p \land q$ with $r$.

Using parenthesis, the ambiguity is removed by presenting what is required either as:

- $p \land \paren {q \lor r}$

or:

- $\paren {p \land q} \lor r$

### Example 2

Consider the following this formula of propositional logic:

- $p \lor q \implies \neg \, r \implies p \land q$

This can be interpreted in several different ways:

*If either $p$ or $q$ is true, then it is not the case that the truth of $r$ implies the truth of both $p$ and $q$.**Either $p$ is true, or if $q$ is true, then it is not the case that the truth of $r$ implies the truth of both $p$ and $q$.*- and so on.

So we need a way, for such a formula, to determine which of these interpretations is the one intended.

In the example above, the two different interpretations will be written in the style we have chosen as:

- $\paren {p \lor q} \implies \paren {\neg \paren {r \implies \paren {p \land q} } }$

- $p \lor \paren {q \implies \paren {\neg \paren {r \implies \paren {p \land q} } } }$

In these expressions, $\paren {p \lor q}$ and $\paren {\neg \paren {r \implies \paren {p \land q} } }$ are examples of formulas **in parenthesis**.

Note that while the latter expressions may in fact be WFFs of propositional logic, the ambiguous expression they were derived from is not.