Hint for solving this problem about constant function on $\mathbb{R^2}$ Can anyone give me some hints to solve this problem?
Assume Lebesgue measure on $\mathbb{R}^2$ and $\mathbb{R}$. Suppose that $f: \mathbb{R}^2 \rightarrow \mathbb{R}$ is a measurable function such that for almost all $x_1 \in \mathbb{R}$ the function $t \rightarrow f(x_1,t)$ is constant and also for almost all $x_2 \in \mathbb{R}$ the function $s \rightarrow f(s,x_2)$ is constant. Show that the function $f$ is constant almost everywhere .
 A: Hint:
Consider the sets where the function is not equal to the certain constants from the two described functions. What is it’s measure?
Now consider the subset of $\mathbb{R}^2$ which is not equal to either constants. What is that measure? ($f$ does not need to equal both of the constants at the same time, you can create counter examples)
A: Let $E=\{x\in\mathbb{R}: t\mapsto f(x,t)\text{ is constant}\}$ and $F=\{y\in\mathbb{R}: t\mapsto f(t,y)\text{ is constant}\}$. Then $E,F$ are conull sets, i.e. $m(\mathbb{R}\setminus E)=m(\mathbb{R}\setminus F)=0$. Now take the cartesian product $E\times F$. Note that
$$\mathbb{R}^2\setminus (E\times F)=(\mathbb{R}\setminus E)\times(\mathbb{R}\setminus F)\cup E\times(\mathbb{R}\setminus F)\cup(\mathbb{R}\setminus E)\times F $$
and this is a disjoint union. From this we conclude that $m_2(\mathbb{R}^2\setminus (E\times F))=0$ (because when taking product measures we make the convention $0\cdot\infty=0$) so It suffices to show that $f$ is constant when restricted to $E\times F$.
Let $(x,y)$ and $(x',y')$ be points in $E\times F$. Therefore we have that $f(x,y)=f(x,t)$ for all $t\in\mathbb{R}$, so $f(x,y)=f(x,y')$. But $f(x,y')=f(t,y')$ for all $t\in\mathbb{R}$, so $f(x,y')=f(x',y')$, so we have that $f(x,y)=f(x',y')$.
