say I have a function $$f(x, y) : bool$$ of two variables x and y - whose type can be anything - returning either true or false. I would like to create two functions of one variable each $g(x)$, $h(y)$ so that $$f(x, y) = g(x)\ AND\ h(y)$$
In other words I would like to retrieve two functions of one variable which ANDed together give the same result as the original function. I realize there doesn't always exist such functions, for example when part of the original function is expressed in terms of both variables (i.e. $f(x,y)=x>y$). In other cases instead they exist, the straightforward case being $f(x,y)=x\ AND\ y$ where $g(x)=x$ and $h(y)=y$.
How do I get those two functions?
Thanks