# Joint measurability of a function

Let $f(x,y)$ be a real valued function on $[0,1]\times [0,1]$. My question is that, if $f(x,y)$ is measurable in $x$ when $y$ is fixed, and monotone in $y$ when $x$ is fixed, is it true that $f$ is measurable?

-

Consider $E = \{(x,y): f(x,y) \ge \alpha\}$. Let $A = \{x: f(x,0) \le f(x,1)\}$ and $B = \{x: f(x,0) \ge f(x,1)\}$. Since $f(\cdot,0)$ and $f(\cdot,1)$ are measurable, $A$ and $B$ are measurable sets, and $[0,1] = A \cup B$. For $x \in A$, $f(x,\cdot)$ is nondecreasing. Let $g(x) = \inf \{y \in [0,1]: f(x,y) \ge \alpha\}$. Since $g(x) \le t$ with $0 < t < 1$ iff $f(x,t-1/n) < \alpha \le f(x,t+1/n)$ for all integers $n$ large enough that $0 < t-1/n < t+1/n < 1$. and $f(\cdot, t\pm 1/n)$ are measurable, $g$ is measurable.
EDIT: For $(x,y) \in A \times [0,1]$, $f(x,y) < \alpha$ if $y < g(x)$ and $f(x,y) \ge \alpha$ if $y > g(x)$. As Byron pointed out, we don't know about $f(x,g(x))$. However, the graph $G = \{(x,g(x)): x \in A\}$ has Lebesgue measure $0$. Since the difference between $E \cap(A \times [0,1])$ and $\{(x,y): x \in A, y \ge g(x)\}$ has measure $0$, $E \cap (A \times [0,1])$ is (Lebesgue) measurable.
Similarly $E \cap (B \times [0,1])$ is measurable, and so is their union $E$, so $f$ is measurable.
I think there may be a problem with $E \cap (A \times [0,1]) = \{(x,y): x \in A, y \ge g(x)\}$. From $y\geq g(x)$ we can only deduce $f(x,y+)\geq \alpha$, not $f(x,y)\geq \alpha$. Didier's answer here gives a counterexample: math.stackexchange.com/questions/131900/… –  Byron Schmuland Apr 15 '12 at 13:48
Hmm... you're right. For example, you could have $f(x,y) = 1$ for $x < y$, $f(x,y) = 0$ for $x > y$, and $f(x,x)$ could be an arbitrary function from $[0,1]$ to $[0,1]$. In particular, $f$ doesn't have to be Borel measurable. On the other hand, I think I can still rescue Lebesgue measurable. –  Robert Israel Apr 15 '12 at 15:40