# Given these conditions, can a function be defined that is well defined a.e.?

I have two functions, and I want to combine them to define a certain function.

Suppose for every fixed $$e$$ in $$(0, ∞)$$, we have a function $$g_e (x): \mathbb{R} \to [0,\infty]$$ that is well defined a.e. and right continuous, and for every fixed x in R, we have a function $$h_x (e): (0, ∞) \to [0, ∞]$$ that is well defined a.e. and monotone increasing. Further, whenever $$e$$ and $$x$$ are such that they are both defined, $$g_e (x) = h_x (e)$$.

Can we canonically define some $$f: \mathbb{R} \times (0, \infty)\to [0,\infty]$$ such that it is well defined a.e. and $$f(x, e) = g_e (x) = h_x (e)$$ a.e.?

At least assuming the continuum hypothesis, the answer is no. Let $$\prec$$ be a well-order of $$\mathbb R$$ of order type $$\omega_1$$. Define $$g_e(x)=0$$ for $$x\succ e$$ (and $$g_e(x)$$ not defined otherwise) and $$h_x(e)=e$$ if $$e\succ x$$ (and $$h_x(e)$$ not defined otherwise). Observe that both $$g_e,h_x$$ are defined everywhere except at a countable, hence null, set (this is why we need the well-order to have order type $$\omega_1$$).
Then there is no pair $$(x,e)$$ for which both $$g_e(x),h_x(e)$$ are both defined, so the last condition is satisfied vacuously, but there is no function which is equal to both of those numbers simulataneously on any nonempty set.