Let $S$ be an infinite set and $f:S\times S\rightarrow\mathbb R$ be bounded.
Question: Are there simple hypotheses on $f$ such that there is a commutative and associative operation $\cdot$ on $S$ such that $f(x,y)=\phi(x\cdot y)$, for some $\phi$?
Example: if $f(x,y)=f(y,x)$, we can construct a commutative $\cdot$ as follows: since $S$ is infinite, the image of $f$ has cardinality at most $|S|$ and then there is an injective mapping $\Psi:Im(f)\rightarrow S$. Define $x\cdot y=\Psi(f(x,y))$. This is a commutative operation which verifies the required property, but, of course, in general it is not associative. And it is not clear to me how to find a simple enough condition that guarantees associativity.
Thanks in advance for any help,
Valerio