Let $S$ be the set of the first $n$ positive integers. Suppose we have a binary operation @ that takes $a, b \in S$ to some $a @ b \in S$.
Given that:
- 1 @ x = x @ 1 = x
- x @ (y @ z) = (x @ y) @ (x @ z)
Prove or disprove: @ is associative
I can't find a way to prove this but I also cannot come up with a counterexample. Can anyone help?
We have $x=x@1=x@(1@1)=(x@1)@(x@1)=x@x$.
Moreover, $x@y=x@(y@1)=(x@y)@(x@1)=(x@y)@x$ and similarly $x@y=x@(1@y)=x@(x@y)$.
(By the way, we also have $x@(y@x)=(x@y)@(x@x)=(x@y)@x=x@y$.)
Finally, $$x@(y@z) =(x@y)@(x@z)=( (x@y)@x)\, @\, ((x@y)@z) = (x@y)\,@\,((x@y)@z) = (x@y)@z\,. $$