# syntactic vs. semantic algebraic laws

I see a difference between the algebraic law $$a+b=b+a$$ and other laws such as $$a(b+c)=ab+ac$$ in that the first seems to be about the notation, the syntax, whereas the second seems to be about the meanings, the semantics. What I mean is this: consider the original meaning of addition; it means that you have two disjoint sets for which you know the size, and you want to determine the size of the union of the two sets. You have five jugs of Eskar's beer and three jugs of Mushen's beer, so you have eight jugs of beer (One of the first applications of arithmetic seems to have been for commerce in beer in ancient Sumer). In this scenario, there is no order to the operation that you are trying to perform. The bottles are mixed up together, and the set union is not going to change just because you name one before the other. The set union is just the combination of tall the bottles. However, notation is linear (or at least 2-dimensional). There is no way to write down an unordered pair; there is always some sort of order, so you have to write down $$5+3$$ or $$3+5$$, there is no way to write the operation unordered.

So the commutative law can be seen as just a correction to the syntax: "I don't intend to imply any order when I write $$5+3$$ so it means the same as $$3+5$$". Instead of having a commutative law, you could have a notation that is implicitly unordered and just write addition in that notation. For example, you could write operators in prefix form OP{arguments} for an unordered operation and as OP[arguments] for an ordered operation. So $$+\lbrace a,b\rbrace$$ is correct and $$-[a,b]$$ is correct. Then there would be no need for the commutative law (and if you extended the notation in the obvious way there would be no need for the associative law either).

This is just something that I encountered while thinking about the origins and foundations of arithmetic and I was wonder if any mathematicians have remarked on it, or even come up with notations like the the one I described above.

One additional note: I anticipate people saying "But you need to indicate somewhere that the order of the notation is not significant for a given operation, and that's all the commutative law is doing." but this still means that the commutative law is about the notation instead of about the numbers.

I suppose I don’t know what you mean exactly by “notation.” Addition of ordinary numbers is commutative. That is simply true. What does it mean for something to be true about the notation versus about the numbers? The structure itself is all of it together.

And furthermore, it is nice to not have to decide a priori whether an operation is commutative or not. With your notation, we must already know when ordering matters and doesn’t. With many problems that arise, determining what elements commute with what others is a key step.

• The point is that for addition there was no need to decide that it was commutative, when you think about what it means, it's obvious that there is no order involved. Aug 12, 2023 at 7:21
• Yes but not everything is like that. And even with addition, can you prove it? It’s nice to have properties we can talk about without having to a priori know anything at all. Aug 12, 2023 at 7:23
• Yes, I agree that there are operators where combativity is not immediately apparent from meaning. Multiplication is an example. It isn't immediately obvious that three sets of five is the same as five sets of three. Aug 12, 2023 at 7:35
• So why would we use your notation, instead of having this general thing which applies broadly? And really, your “syntactic/semantic” distinction is terrible. Math is the syntax. Aug 13, 2023 at 0:41
• The question isn't about the notation. That's just a way of illustrating my point. Aug 13, 2023 at 0:44

The properties of binary operations (such as commutativity and associativity) have less to do with notation and more to do with what the sum/product/etc actually represents. For example, consider the binary operation of addition on $$\mathbb{Z}$$. We can forgo the "$$+$$" notation by writing it as a map $$f:\mathbb{Z} \times \mathbb{Z} \to \mathbb{Z}$$ defined as $$f(a,b) = a+b$$. Here, commutativity can be described as the fact that $$f(a,b) = f(b,a)$$. Similarly, associativity can be described as the fact that $$f(f(a,b),c) = f(a,f(b,c))$$.

You may feel that we just avoided the question by using a different notation but this is precisely the point. No matter what notation we use, addition of integers (for example) is always commutative and associative. These are properties of the function that defines the binary operation, not properties of the notation used to represent the function.

• I was not saying that the reason addition is commutative is because of the notation; I was saying that the reason we feel the need to point out that it is commutative is because the notation seems to imply that the order of the arguments matter. It's similar to a<b <=> b>a. You can view this as an axiom, or you can view it simply as a definition of b>a. It makes sense as a definition because the equivalence is based on meaning. Similarly, I claim that a+b=b+a is based on meaning, you could view it as a definition. Aug 13, 2023 at 6:49
• @DavidGudeman I sort of see what you are saying but the example you give about orders is precisely an artifact of notation, this is true for every order we could hope to define. Can you say more about what you mean by "$a+b = b+a$ is based on meaning"? Aug 13, 2023 at 20:01