2

I found some inconsistent descriptions:

http://intrologic.stanford.edu/glossary/operator_precedence.html

$p\Rightarrow q \Leftrightarrow r$ is equivalent to $p\Rightarrow (q\Leftrightarrow r)$

while according to

https://en.wikipedia.org/wiki/Logical_connective#Order_of_precedence

$\Rightarrow$ has higher precedence than $\Leftrightarrow$

Which is true?

  • 1
    Please ask only one question per post. Having multiple questions in the same post is discouraged and such posts may be closed, see meta. – Hume2 May 22 '20 at 17:19
  • 2
    So your question is whether $p\implies q\iff r$ should be interpreted as $p\implies (q\iff r)$ or if it should be interpreted as $(p\implies q)\iff r$? I don't think it is either. I interpret it as the statement $(p\implies q) \wedge (q\iff r)$ – JMoravitz May 22 '20 at 17:22
  • @Hume2 Thanks for your remind. I've modified it into two questions. – kakakali May 22 '20 at 17:27
  • @JMoravitz Well, now we have a new interpretation. – kakakali May 22 '20 at 17:31
  • 2
    Operator precedence is a convention: unfortunately, not a universal one available. – Mauro ALLEGRANZA May 22 '20 at 17:49
  • @MauroALLEGRANZA Got it. Thank you. (I used to think that mathematicians have formulated almost all things to eliminate “dialects”, such as italic or upright differential symbol $d$) – kakakali May 22 '20 at 18:38
  • No, mathematics is still very much done by humans for humans. In an introductory course in maths, one of the aims is to teach you how to think very precisely, so they do tend to use lots of symbols and things (how else are you going to learn the difference between $\forall \exists$ and $\exists \forall$?). However, mathematicians communicating with mathematicians will do so in whatever way most conveniently helps them communicate; and humans being humans, that's usually in a dialect of some sort. – Patrick Stevens May 22 '20 at 18:47
  • Your first link is broken – Daniel Donnelly Nov 20 '23 at 08:07

1 Answers1

4

As Mauro Allegranza said in the comments, operator precedence is a matter of convention, and there is no universally agreed convention. Your first link is to a textbook and sets out the conventions used in that text; you can expect them to have considerable overlap with conventions used elsewhere, but you cannot expect them to be used everywhere in their entirety, and indeed they aren’t. In particular, the convention of associating operators of equal precedence to the right is not universal (and disagrees with the usual convention for arithmetic operators). The article at your second link explicitly notes that there is some disagreement even over the order of precedence of logical operators, never mind over the question of how to handle operators of equal precedence.

In practice a writer has two reasonable choices. One is that adopted at your first link: state your conventions clearly (and then follow them!). The other, which is my preference, is to use parentheses whenever their omission is likely to be confusing. I would never write $p\Rightarrow q \Leftrightarrow r$; I would always write whichever of $(p\Rightarrow q) \Leftrightarrow r$ and $p\Rightarrow (q \Leftrightarrow r)$ I actually intended, and in a symbolic expression I’d avoid the ‘chained’ meaning ($(p\Rightarrow q)\land(q\Leftrightarrow r)$) noted by JMoravitz in the comments, though I might possibly use it in a specific argument laid out schematically, e.g.,

$$\begin{align*} n\text{ is a multiple of }4&\Rightarrow n\text{ is even}\\ &\Leftrightarrow\exists k\in\Bbb Z(n=2k)\\ &\;\;\vdots \end{align*}$$

A reader must hope that the writer took one of these approaches and be prepared if necessary to infer a given writer’s conventions.

Brian M. Scott
  • 616,228