TITLE: Function of $(x_1,x_2,x_3,x_4)$ that factors in two ways as $\phi_1 (x_1 ,x_2 )\phi_2(x_3 ,x_4 )=\psi_1 (x_1,x_3)\psi_2(x_2,x_4)$
QUESTION [26 upvotes]: Suppose we have a function $f(x_1 ,x_2 ,x_3 ,x_4).$ We know that we can factor it in two ways as $f(x_1 ,x_2 ,x_3 ,x_4)=\phi_1 (x_1 ,x_2 )\phi_2(x_3 ,x_4 )=\psi_1 (x_1,x_3)\psi_2(x_2,x_4)$
Show that we can completely factor the function as: $f(x_1 ,x_2 ,x_3 ,x_4)=\varphi_1(x_1)\varphi_2(x_2)\varphi_3(x_3)\varphi_4(x_4).$
I stumbled a little bit on this elementary problem as the proof is not as immediate as I think. But eventually I can prove this.
Here the overlap of partition {{1,2} {3,4}} and {{1,3},{2,4}} is {{1},{2},{3},{4}} and indeed satisfying the first two partition implies that we can factor by the overlap of both partitions.
I wonder if there is a general statement/theory of this.

REPLY [6 votes]: Your problem can be recast into the language of factor graphs as follows: you have two factor graphs $G_1$, $G_2$ for the same function that are both comprised of two isolated edges, with vertex sets the partitions you indicate. These two factor graphs must have a common refinement, i.e., there must be a common factor graph $G_{12}$ and graph morphisms $g_j : G_{12} \rightarrow G_j$.
In your example, the only way that can happen is if the vertex set of $G_{12}$ is $\{1,2,3,4\}$, i.e., if $f$ factorizes completely.