Let $(X,\Sigma_X,\mu)$, $(Y,\Sigma_Y,\nu)$ be $\sigma$-finite measure spaces. Let $(X \times Y,\Sigma_X \otimes \Sigma_Y,\mu \times \nu)$ be their product space, and let $f:X \times Y \to \Bbb R$ be a $\mu \times \nu$ measurable function in that product space.
Assume that:
- For almost every $x \in X$, the function $y \mapsto f(x,y)$ is constant.
- For almost every $y \in Y$, the function $x \mapsto f(x,y)$ is constant.
Prove that there exists a constant $c \in \Bbb R$ such that $f=c$, almost everywhere with respect to $\mu \times \nu$.
I have written down two solutions, but I'm not sure that they are air tight. I would be grateful for any comment or advice to either confirm the validity of my proofs or to point out why they are wrong.
By assumption:
$\exists N_x \subset X, c_x \in \Bbb R$ s.t $N_x$ is $\mu$-negligible and $\forall x \notin N_x, y \in Y$ $f(x,y)=c_x$.
$\exists N_y \subset Y, c_y \in \Bbb R$ s.t $N_y$ is $\nu$-negligible and $\forall x \in X, y \notin N_y$ $f(x,y)=c_y$.
Now, $N_x, N_y$ are $\mu,\nu$ measurable respectively, therefore $N_x \times N_y$ is $\mu \times \nu$ measurable.
Here are my solution attempts:
Method (1):
We have that $f(x,y)=\begin{cases} c_x, & \text{$(x,y) \in N_x^\complement \times Y$} \\ c_y, & \text{$(x,y) \in X \times N_y^\complement$} \\ unknown, & \text{$(x,y) \notin N_x^\complement \times N_y^\complement$} \\ \end{cases}$
Furthermore, $N_x^\complement \times N_y^\complement \subset X \times N_y^\complement$ and $N_x^\complement \times N_y^\complement \subset N_x^\complement \times Y$. Hence, $\forall (x,y) \in N_x^\complement \times N_y^\complement$ $c_x=f(x,y)=c_y$, and that is what we wanted to prove.
Method (2):
Define $g(x,y):=|f(x,y)-c_x|$. $g$ is $\mu \times \nu$ measurable, and non-negative, so we can use Tunelli's theorem to get:
$\int_{X \times Y}g(x,y) = \int_{X} \int_{Y}g(x,y) = \int_{N_x} \int_{Y}g(x,y) + \int_{N_x^\complement} \int_{Y}|f(x,y)-c_x| \leq \mu(N_x) \max_{Y} g(x,y) + \int_{N_x^\complement} \int_{Y}|c_x-c_x| \leq 0$.
Therefore $g(x,y)=0$ a.e with respect to $\mu \times \nu$, which means $f(x,y)=c_x$ a.e as requested.