If ¬ has a higher precedence than ∨, could one affirm "¬ (p ∨ r) ∨ r" <=> "¬ ((p ∨ r) ∨ r)"?

34 Views Asked by At

I'm currently in a disagreement with a colleague over how one should intrepret the precedence of the ¬ operator in boolean algebra, and I hope someone here may enlighten me.

We both agree that the ¬ operator has a higher precedence than the ∨ operator (just like it is usually considered that ∧ has a higher precedence than ∨), but we disagree when it comes to interpreting this fact.

Considering the fact stated above and the formula "¬ (p ∨ r) ∨ r", if we wanted to be fully explicit by putting parentheses everywhere we can, should we say that:

a) "¬ (p ∨ r) ∨ r" <=> "¬ ((p ∨ r) ∨ r)"

or

b) "¬ (p ∨ r) ∨ r" <=> "(¬ (p ∨ r)) ∨ r"

I'm on the b) side, while my colleague is on the a) side. Does someone know if one interpretation is right and not the other, or if there's a lack of consensus about the question? No matter the answer, a clear explanation would be greatly appreciated.

Thanks a lot!

1

There are 1 best solutions below

0
On BEST ANSWER

You are correct: the higher precedence of $\neg$ means precisely that it in $\neg(p\lor q)\lor r$ it binds to the $(p\lor q)$ before the final $\lor$ is performed. Thus, the expression is equivalent to $(\neg(p\lor q))\lor r$.