Is a "diagonal-like" set always a null set? For this question, let $\mu$ be the Lebesgue measure on $[0,1]$ and $\mu^2$ the product measure on $[0,1]^2$.
Suppose I have a measurable function $f\colon [0,1]^2\to \mathbb{R}$. For all $r\in \mathbb{R}$, let $$Z(r) = \{(x,y)\mid f(x,y) = r\} = f^{-1}[\{r\}],$$ and suppose that $\mu^2(Z(r)) = 0$. Now given $x\in [0,1]$, let $$Z(r)_x = \{y\in [0,1] \mid f(x,y) = r\}$$ be the fiber above $x$, and let $$N(r) = \{x\mid \mu(Z(r)_x) > 0\}.$$ This is the set of all $x$ such that $Z(r)$ has positive measure in the fiber above $x$. 


*

*By Fubini, $N(r)$ is a null set: it is the preimage of $(0,\infty]$ under the measurable function $g(x) = \int_y 1_{Z(r)}(x,y)\, d\mu$, and since $\int_x g(x)\,d\mu = \mu^2(1_{Z(r)}) = 0$, $g$ is $0$ almost everywhere. 

*For all $x\in [0,1]$, $\{r\in \mathbb{R}\mid x\in N(r)\}$ is countable, since the fiber above $x$ can contain at most countably many disjoint positive measure sets.


Let $D = \bigcup_{r\in \mathbb{R}} N(r)^2$, where $N(r)^2 = \{(x,x')\mid x,x'\in N(r)\}$. I'd like to show that $\mu^2(D) = 0$.

Intuitive gloss: I need two pieces of information, $x$ and $y$, to specify a real $f(x,y)$. If I pick $x$ and $y$ randomly, any particular real appears with probability $0$. But given partial information $x$, I might know that a real $r$ appears with positive probability when I pick $y$ at random (i.e. $x\in N(r)$). In this case we'll say $r$ is likely given $x$. We know that at most countably many reals are likely given $x$, and the probability that $x$ makes any particular real likely is $0$. Now if I pick two partial pieces of information $x$ and $x'$ independently, I want to show that almost surely there is no real $r$ that is likely given $x$ and likely given $x'$. To me, this seems intuitively correct.

Two remarks: 


*

*If $D$ is measurable, it's an easy consequence of Fubini's theorem that $\mu^2(D) = 0$. Indeed, the fiber above every $x$ consists of a union of countably many null sets. The problem is showing that $D$ is measurable...

*We can view this as a generalization of the fact that the diagonal has measure $0$ in $[0,1]^2$ (taking $f(x,y) = x$), and a similar proof (to the non-Fubini proof of this fact) might work. Hence the title.

 A: Let us first show that it is enough to check this for every Borel map $f$. Given $f$ measurable, using Lusin's theorem on restricted continuity, we can choose a Borel map $g$ such that $f, g$ agree a.e. Let $W = \{x: \{y : f(x, y) \neq g(x, y)\}$ is not $\mu$-null$\}$. Then $W$ is $\mu$-null. Suppose $(x, x') \in D_f \setminus D_g$. Then for some $r$, we have $x, x' \in N_f(r) \setminus N_g(r)$. So one of the sets $\{y : f(x, y) \neq g(x, y)\}$, $\{y : f(x', y) \neq g(x', y)\}$ is not $\mu$-null. So $(x, x') \in W \times [0, 1] \cup [0, 1] \times W$. Hence $D_f \setminus D_g$ is null. So we can assume that $f$ is Borel.
Now $(x, x') \in D = D_f$ iff $(\exists r)((f^{-1}[\{r\}])_x \wedge (f^{-1}[\{r\}])_{x'}$ are $\mu$-positive). It would therefore suffice to check that $\{(r, x, x') : ((f^{-1}[\{r\}])_x \wedge (f^{-1}[\{r\}])_{x'}$ are $\mu$-positive)$\}$ is Borel since then $D$ would be analytic and hence measurable. For this it is enough to check that $T = \{(r, x) : ((f^{-1}[\{r\}])_x$ is $\mu$-positive$)\}$ is Borel. Let $B = \{(r, x, y): f(x, y) = r\}$ be the Borel graph of $f$. Then $T = \{(r, x): B_{(r, x)} = \{y: (r, x, y) \in B\}$ is $\mu$-positive$\}$. Hence we can apply Exercise 22.25 in Kechris' book.
