Could we always locally represent a continuous function $F(x,y,z)$ in the form of $g\left(f(x,y),z\right)$ for suitable continuous functions $f$, $g$ of two variables? I am aware of Vladimir Arnold's [work](https://link.springer.com/chapter/10.1007/978-3-642-01742-1_6) on this problem, but it seems that in that context $F(x,y,z)$ is written as a sum of several expressions of this form. Can one reduce it to just a single superposition $g\left(f(x,y),z\right)$; or does anyone know a counter example? 


For related posts see:


[Is there any continuous ternary function which can not be represented by composition of continuous binary functions?](https://mathoverflow.net/q/325502/121665)


[Kolmogorov superposition for smooth functions](https://mathoverflow.net/q/140859/121665)


[Kolmogorov-Arnold theorem for (just-)functions](https://mathoverflow.net/q/278868/121665)



Continuous functions of three variables as superpositions of two variable functions

> 
> **Proposition.** The function $F(x,y,z)=x(1-z)+yz$ cannot be represented as $F(x,y,z)=g(f(x,y),z)$, where $f,g:\mathbb{R}^2\to\mathbb{R}$ are continuous.
> 
> 
> 


**Proof.** Suppose to the contrary that we have such a representation. Let $g\_1(t)=g(t,0)$. Then 
$$
g\_1(f(x,y))=g(f(x,y),0)=F(x,y,0)=x.
$$ 
Let $g\_2(t)=g(t,1)$. Then 
$$
g\_2(f(x,y))=g(f(x,y),1)=F(x,y,1)=y.
$$
Let $h=(g\_1,g\_2):\mathbb{R}\to\mathbb{R}^2$, $h(t)=(g\_1(t),g\_2(t))$. Then
$$
(h\circ f)(x,y)=(g\_1(f(x,y)),g\_2(f(x,y)))=(x,y).
$$
In particular, it implies that $f:\mathbb{R}^2\to\mathbb{R}$ is one-to-one. 


It remains to show there there are no one-to-one continuous functions from $\mathbb{R}^2$ to $\mathbb{R}$. Suppose to the contrary that such a function $f$ exists. Let $\mathbb{S}^1\subset\mathbb{R}^2$ be the unit circle. Then
$$
f|\_{\mathbb{S}^1}:\mathbb{S}^1\to\mathbb{R}
$$
is continuous and one-to-one. Since $\mathbb{S}^1$ is compact, $f|\_{\mathbb{S}^1}$ is a homeomorphism of $\mathbb{S}^1$ onto $f(\mathbb{S}^1)$.


Since $\mathbb{S}^1$ is connected and compact $f(\mathbb{S}^1)\subset\mathbb{R}$ is connected and compact. Therefore it is a closed interval, $f(\mathbb{S}^1)=[a,b]$ and we arrive to a contradiction, because $[a,b]$ is not homeomorphic to $\mathbb{S}^1$ (to see this observe that removing an interior point from $[a,b]$ makes the space disconnected while if we remove a point form $\mathbb{S}^1$, the space will remain connected). 


**Remark.** For a statement and a proof of the Kolmogorov theorem, see for example:


**G. G. Lorentz**, *Approximation of functions,* 1966.


**Edit.** I modified my original answer that was not fully correct. A mistake was pointed out by Aleksei Kulikov in his comment. The correction is related to the arguments in the comments of KhashF and user44191.


