Customary operator precedence has addition prior to subtraction. Apart from historical convention and notational consistency, is there a rationale for this?
Operator precedence in addition and subtraction
arithmeticconventionnotation
Related Solutions
It is false that your PEDMSA rule (without the left-to-right rule) suffices to correctly evaluate any arithmetic expression.
$(6/3)/2 \color{red}\ne 6/(3/2)$.
$2^{(1^2)} \color{red}\ne (2^1)^{^2}$.
This shows that you still need the left-to-right rule when processing each arithmetic operation, and need the inside-out rule for exponentiation. It is true that with these rules in place, PEDMSA works. But the justification given by other existing answers is incomplete. To handle arbitrarily long arithmetic expressions, you will need induction. Also take note that exponentiation in some programming languages like Python have right-to-left associativity, so 2**1**2
is interpreted as 2**(1**2)
; this is obviously because there is no superscript in source code.
Here is the proof that PEDMSA+LTR+IO (namely PEDMSA with the left-to-right and inside-out rules) works for all arithmetic expressions involving $+,-,*,/$ and superscript-exponentiation and brackets, but no unary negation.
Take any expression $E$. By induction we can assume that PEDMSA+LTR+IO works for expressions that have fewer operations than $E$. Here parentheses are counted as operations. We shall analyze what happens when we apply PEDMSA+LTR+IO to $E$. We have the following cases:
$E$ has a parenthesis: The inner expression has fewer operations than $E$, and is hence evaluated correctly. After that, the resulting outer expression now has fewer operations than $E$, and hence we get the correct answer.
$E$ has no parentheses but has exponentiation: $E$ is reduced in the same way as conventionally (inside-out for chained exponentiations), so we get the correct answer.
$E$ has division and no higher-precedence operation: Let $p$ be the position of the first $/$ in $E$. By considering the $*$ operations immediately to the left of $p$, if any, it is clear that $E$ is of the form $\cdots [x * \cdots] y / z \,\cdots$, where there is no $*$ or $/$ immediately before $x$, and there is only a chain of $*$ between $x$ and $y$, and here the square-brackets in $[x * \cdots]$ denote that that subexpression is optional (it will not be there if whatever operation immediately to the left of $p$ is not $*$). Then the value of $E$ is $\cdots \Big( \big( [x * \cdots] y \big) / z \Big) \,\cdots = \cdots \Big( [x * \cdots] \big( y / z \big) \Big) \,\cdots$, and so our reduction results in an equal expression with fewer operations, and hence we get the correct answer.
$E$ has multiplication and no higher-precedence operation: $E$ is reduced in the same way as conventionally (leftmost $*$ first), so we get the correct answer.
$E$ has subtraction and no higher-precedence operation: $E$ is of the form $[x + \cdots] y - z \,\cdots$, where there is only a chain of $+$ between $x$ and $y$, or possibly $[x + \cdots]$ is empty (if the first operation is $-$). The value of $E$ is $\Big( \big( [x + \cdots] y \big) - z \Big) \,\cdots = \Big( [x + \cdots] \big( y - z \big) \Big) \,\cdots$, and so our reduction yields an equal expression with fewer operations, and hence we get the correct answer.
$E$ has only addition: Our reduction yields the correct answer because any reduction does.
I shall leave it as an exercise to extend this theorem and proof to cater for unary negation. One must think very carefully about how to amend the evaluation rules to correctly handle expressions like:
$-3/-1*--4--2*---5$
If you do not consider this valid, then you must decide and precisely specify what expressions are valid.
All you can really say is this. Suppose that $m>n$ and we are looking at
$$a^m+a^n.$$ By definition $m=n+k$ so both have a common factor of $a^n$:
$$a^m+a^n=a^{n+k}+a^n=a^{n}(a^k+1).$$
In your example,
$$2^4-2^3=2^3(2-1)=2^3.$$
However to be honest... $2^4=16$ and $2^{3}=8$ --- it is as simple as that.
Or a bit more general but closer to your example: $$a^{m+1}-a^{m}=a^m(a-1).$$
Best Answer
I fully agree with @egreg, so let me elaborate on his comment.
The notation is rational because it is coherent with group theory. Indeed, $(\mathbb{Z}, + , 0)$ is an additive group, but it is interesting to first look at a multiplicative notation. If you write $xy^{-1}z$, where $x$, $y$ and $z$ are elements of a group, there is no ambiguity on the interpretation and nobody would interpret this as $x(yz)^{-1}$. If the group is commutative and comes with an additive notation, you would write $x - y + z$ instead, but again, it should not be interpreted as $x - (y +z)$.