# Are there non-trivial systems of arithmetic in which the order of precedence of the operators does not change the output?

Suppose we have an arbitrary expression with the four operators $(+,-,\div,\times)$, changing the order of precedence does change the output of the operation. Are there non-trivial systems of arithmetic $[1]$ in which an arbitrary order of precedence does not change the outputs?

$[1]$ - I'm not sure about how the name of the thing should be, but I guess that it would be something like system of arithmetic or perhaps an algebra.

• You might want to specify non-trivial. :P Jun 27 '14 at 20:19
• @Thoth19 Thanks for the heads up! Jun 27 '14 at 20:24
• I suppose one approach would be to start with a single associative operation, but calling it several different operation symbols. You can then make the algebra less trivial by accounting for an extra "dimension" of your data values that is a shifted addition on that dimension of the operands, with the shift varying from one operation to another (to make them distinct in more than name only). Jun 27 '14 at 20:48

It depends on what you expect from the operations. If you want, for example, that there exists a $0$ such that $x+0=x$ and $x\times 0=0$ for each $x$, and if you moreover want that there exists an $x\neq 0$, then $$(x+0)\times 0$$ is something else than $$x+(0\times 0).$$

There are systems in which you define (+,-,*,/) such that they are reflexive. We can simply define an operator "+" to be a trivial operator, e.g. a+b=0 for all a,b. By doing this continuously, you can define all of the operations in ways that work nicely. In fact, you could even make all operations map to 0 (or some other element).

You could also deal with something like boolean algebras, though they don't have a subtraction/division operation(s).

Here's a construction that is simpler than the one I outlined in my Comment.

Let $G$ be a group, and let $a,s,m,d$ be arbitrary group elements.

Define a binary operation on $G$ by $g \circ_a h = gah$, and similarly for $\circ_s,\circ_m,\circ_d$. We claim that an order of precedence on these operations has no effect on the final value of an expression built solely from these four.

Consider a particular expression and how it evaluates:

$$g_1 \circ_a g_2 \circ_s g_3 \circ_m g_4 \circ_d g_5 = g_1 a g_2 s g_3 m g_4 d g_5$$

This final value does not depend on an order of precedence, knowing that group multiplication is associative. The succession of operators could be extended, and by making certain of them identical, the general proposition of their indifference to order of precedence established.

Moreover these binary operations are distinct when $a,s,m,d$ are, and they are not commutative when the center of $G$ excludes $a,s,m,d$. Yet they possess some nice properties: associativity, and existence of identities and two-sided inverses.

$$g \circ_a a^{-1} = g = a^{-1} \circ_a g$$ $$g \circ_a (a^{-1} g^{-1} a^{-1}) = a^{-1} = (a^{-1} g^{-1} a^{-1}) \circ_a g$$