I would like to take a given trivariate function $f(x,y,z)$ and decompose it into two bivariate functions $g$ and $h$ like so:
$$f(x,y,z) = g(x, h(y,z))$$
Is there a known theory regarding when this is possible, given certain conditions, for example, all values are real, and $f$ is a polynomial (or rational, or analytic etc.) function, and g and h are (polynomial, rational, analytic etc.) I am especially interested in the case where $f$ is symmetric in $y$ and $z$. That is, $f(x,y_0,z_0) = f(x, z_0, y_0)$
I can randomly perform such decompositions by trial and error, but I am seeking a methodical understanding.
Assuming that the domain of all the variables is the same (e.g. all of them are reals), in theory this is always possible if this domain is infinite. This is because for any infinite set $X$, there always exists a bijection from $X \to X \times X$. Let $h$ be such a bijection, and define $$g(x, k) = f(x, h^{-1}(k))$$ We have in essence taken $y, z \in X$ and "condensed" them into one value $k \in X$, without losing any information.
With a similar counting argument, you can reason that it cannot always be possible if the domain is finite. If $f$ can be decomposed as $g(x, h(y, z))$, with $g: X^2 \to X$ and $h: X^2 \to X$, then we will know that $f$ can only take at maximum $|X|^2$ distinct values.
A couple remarks:
Unfortunately, this bijection won't always be nice (e.g. there does not exist a continuous bijection from $\mathbb{R}^2 \to \mathbb{R}$). Thus, your hopes of making $g$ and $h$ polynomials will require $f$ to have further qualifications. No sufficient criterion for $f$ come to mind at the moment for me, though.
You can use this same argument to reason about the case where the domains/ranges are not all the same set, e.g. $f: \mathbb{R} \times \mathbb{Q} \times \mathbb{Q} \to \mathbb{R}$.