Associative, non-commutative, nontrivial operation on the real numbers
Solution 1:
Ok, Batominovski's got an answer in the comments. I will type up the checking:
Our candidate is $x\circ y=|x|y$. Then:
- Associative? We have $(x\circ y)\circ z=(|x|y)\circ z=||x|y|z=|xy|z.$ On the other hand, $x\circ(y\circ z)=x\circ(|y|z)=|x||y|z=|xy|z.$
- Non-commutative? $x\circ y=|x|y\not=|y|x=y\circ x$.
- Nontrivial? Well, it is not a function of $x$ or $y$ only.
- Continuous or continuous almost everywhere? $f(x)=x$ and $g(x)=|x|$ are both continuous everywhere, hence their product is.
So this solution of Batominovski's fits the bill.
Solution 2:
If you want (1)-(3), and (4'), but not (4), then you can take $$x*y:=\lfloor x\rfloor+y$$ for all $x,y\in\mathbb{R}$. Then, $*$ is continuous almost everywhere, except on the set $\mathbb{Z}\times\mathbb{R}$ which is a subset of measure $0$ of $\mathbb{R}\times\mathbb{R}$. Also, for any $y\in\mathbb{R}$, the function $\_*y$ is continuous on $\mathbb{R}\setminus\mathbb{Z}$, whereas $x*\_$ is continuous on the whole $\mathbb{R}$ for any $x\in\mathbb{R}$.
It would be interesting to add the condition (4'') which demands that the binary operation be an everywhere differentiable (or even smooth) map from $\mathbb{R}\times\mathbb{R}$ to $\mathbb{R}$. The only examples we have so far do not satisfy (1)-(3) and (4''), although they satisfy a weaker condition, which demands that the binary operation be an almost everywhere smooth map.