Associativity of logical connectives
Solution 1:
Some logical operators are associative: both $\wedge$ and $\vee$ are associative, as a simple check of truth tables verifies. Likewise, the biconditional $\leftrightarrow$ is associative.
However, the implication $\rightarrow$ is not associative. Compare $(p\rightarrow q)\rightarrow r$ and $p\rightarrow(q\rightarrow r)$. If all of $p$, $q$, and $r$ are false, then $p\rightarrow (q\rightarrow r)$ is true, because the antecedent is false; but $(p\rightarrow q\rightarrow r$ is false, because $r$ is false, but $p\rightarrow q$ is true. They also disagree with $p$ and $r$ are false but $q$ is true: then $p\rightarrow(q\rightarrow r)$ is true because the antecedent is false, but $(p\rightarrow q)$ is true, $r$ false, so $(p\rightarrow q)\rightarrow r$ is false.
Since they take different values at some truth assignments, the two propositions are not equivalent, so $\to$ is not associative.
Solution 2:
When you enter $p \Rightarrow q \Rightarrow r$ in Mathematica (with p \[Implies] q \[Implies] r
), it displays $p \Rightarrow (q \Rightarrow r)$.
That makes it plausible that the $\rightarrow$ operator is generally accepted as right-associative.
Solution 3:
Counter example: Suppose p, q, r are all false. Then (p=>q)=>r is false, and p=>(q=>r) is true.
Solution 4:
I think $(p \rightarrow q) \land (q \rightarrow r)$ is the most useful interpretation of $p \rightarrow q \rightarrow r$. It corresponds to natural language when we say something like "A implies B, which implies C".
A related convention is $x \lt y \lt z$ meaning $x \lt y \land y \lt z$. The same three cases arise when $\lt$ is treated as a function yielding a boolean integer like in many programming languages.
Solution 5:
The proposition $p \rightarrow q \rightarrow r$ can be defined in multiple ways that make sense:
- $(p \rightarrow q) \rightarrow r$ (left associativity)
- $p \rightarrow (q \rightarrow r)$ (right associativity)
- $(p \rightarrow q) \land (q \rightarrow r)$
Which one of these definitions is used?
In the absence of parentheses, a logician would read $$p \rightarrow q \rightarrow r$$ as $$p \rightarrow (q \rightarrow r);$$ however, in informal logic (including mathematics), $$p \Rightarrow q \Rightarrow r$$ is commonly read as $$(p \Rightarrow q) \;\text{ and }\; (q \Rightarrow r),$$ which isn't logically equivalent to $$p \Rightarrow (q \Rightarrow r).$$
Similarly, $$p \Leftrightarrow q \Leftrightarrow r$$ is commonly read as $$(p \Leftrightarrow q) \;\text{ and }\; (q \Leftrightarrow r),$$ although a logician would read $$p \leftrightarrow q \leftrightarrow r$$ as $$p \leftrightarrow (q \leftrightarrow r),$$ which isn't logically equivalent to $$(p \leftrightarrow q) \;\text{ and }\; (q \leftrightarrow r).$$
Here's a clear illustration: $$(p \Leftrightarrow q) \;\text{ and }\; (q \Leftrightarrow r)$$ asserts that $p,q,r$ all have the same truth value; however, both $$p \Leftrightarrow ( q \Leftrightarrow r)$$ and $$(p \Leftrightarrow q) \Leftrightarrow r $$ admit this truth assignment: $(p,q,r)=$ (false, false, true).