# Is every such family induced by an associative operation?

Suppose we're given an associative operation $\star : X \times X \rightarrow X$. Then for each $n \in \mathbb{N}_{>0}$, there's a function $f_n : X^n \rightarrow X$ given as follows:

$$f_n(x_0,\ldots,x_{n-1}) = x_0 \star \cdots \star x_{n-1}$$

Taken as a whole, the family $f_*$ has:

• the left extension property:

$$f_a(\tilde{x}) = f_b(\tilde{y}) \rightarrow f_{a+1}(z,\tilde{x}) = f_{b+1}(z,\tilde{y})$$

• and the right extension property

$$f_a(\tilde{x}) = f_b(\tilde{y}) \rightarrow f_{a+1}(\tilde{x},z) = f_{b+1}(\tilde{y},z)$$

which hold for all $a,b \in \mathbb{N}_{>0}$ and all $\tilde{x} \in X^a$ and $\tilde{y} \in Y^b$.

If we weaken these conditions so that they're only required to hold when $a=b$, then its easy to find examples of families $f_*$ that aren't induced by an associative operation. For example, the "averaging" family $$f_n(x_0,\ldots,x_{n-1}) = \frac{x_0+\cdots+x_{n-1}}{n}$$ satisfies the "weak" version of each extension property.

Question. Is every family $f_*$ satisfying both left and right extension properties induced by an associative operation?

Let $X=\mathbb{N}$ and define $f_n:X^n\to X$ by $f_n(\tilde{x})=n$ for all $\tilde{x}$. Then this trivially satisfies your extension properties, but cannot come from an associative operation.
On the other hand, if you require $f_1$ to be the identity map, then every such family does come from an associative operation. Indeed, for any $x,y,z\in X$, we have $f_2(x,y)=f_1(f_2(x,y))$ and so by right extension $f_3(x,y,z)=f_2(f_2(x,y),z)$. Similarly, $f_3(x,y,z)=f_2(x,f_2(y,z))$. This says $f_2$ is associative and $f_3$ is the induced ternary operation, and similar arguments show $f_n$ is the induced $n$-ary operation for each $n$.