Suppose I have forgotten how to calculate $g(a,b)=a+b$.
But I have a black-box function $f(a,b,c)=a+b+c$, which I can calculate.
Presumably, $f(a,b,c)=g(a,g(b,c))=g(g(a,b),c)$ uniquely specifies $g$ (does it?).
Naturally, $g(a,b)\equiv f(a,b/2,b/2)\equiv f(a,b,0)$, but I only know this because I understand the operation "+". What if I didn't?
Question Given a function f(a,b,c)
How can we determine if this function can be written as $f(a,b,c)=a\circ b\circ c$, where $\circ$ is a binary associative operation?
I am in particular interested in knowing if $f(a,b,c)=\frac{ab+bc}{2}$ can be decomposed in this way (where the multiplications $ab$ and $bc$ are not necessarily commutative but division by two behaves as expected, i.e. $a,b,c$ are real matrices).
Edit: partial answer: the function $f:\mathbb{R}^3\rightarrow \mathbb{R}: f(a,b,c)=\frac{ab+bc}{2}$ cannot be decomposed like this, at least not assuming $g$ is differentiable. $$g(g(a,b),c)=\frac{ab+bc}{2}$$ The derivative w.r.t. $a$ is $$\frac{d}{da}g(g(a,b),c)=\frac{a}{2}=g_1(g(a,b),c)g_1(a,b)$$ The derivative w.r.t. $b$ is $$\frac{d}{db}g(g(a,b),c)=\frac{a+c}{2}=g_1(g(a,b),c)g_2(a,b)$$ ($g_1,g_2$ are the derivative of $g$ with respect to the first resp. the second parameter). So $$\frac{g_1(g(a,b),c)g_1(a,b)}{g_1(g(a,b),c)g_2(a,b)}=\frac{a}{a+c}$$ $$\frac{g_1(a,b)}{g_2(a,b)}=\frac{a}{a+c}$$ The rhs. depends on $c$ but the lhs. does not, so this $g$ does not exist.