Prove $ \varphi ( x ) = \lambda ( Q_x ) $ is $ \mathcal{X} $-measurable I'm reading Thoerem 8.6, page 163, Chapter 8 from "Real and Complex Analysis (Third Edition)" by Walter Rudin; it seems that Rudin never proves that $\lambda(Q_x)$ (defined below) is a $\mathcal{X}$-measurable function.
Can someone verify, disprove, or improve this proof?
Let $(X, \mathcal{X}, \mu)$ and $(Y, \mathcal{Y}, \lambda)$ be measure spaces, so $ \left(X \times Y, \sigma(\mathcal{X} \times \mathcal{Y}) \right) $ is a measurable space. A measurable rectangle is a set $Q \in \sigma(\mathcal{X} \times \mathcal{Y})$ of the form $Q = A \times B$, with $A \in \mathcal{X}$ and $B \in \mathcal{Y}$. The x-section of a set $Q \in X \times Y$ is $Q_x = \{ y \in Y \colon (x,y) \in Q \}$. I want to prove that
$$
\varphi(x) = \lambda(Q_x)
$$
is a $\mathcal{X}$-measurable function for all $Q \in \sigma(\mathcal{X} \times \mathcal{Y})$ (proof that $Q_x$ is $\mathcal{Y}$-measurable is given in Theorem 8.2 from the book).
First, we can prove that all $Q \in \sigma(\mathcal{X} \times \mathcal{Y})$ can be expressed as the countable union of disjoint measurable rectangles by showing
$$
S = \left\{ Q \in \sigma(\mathcal{X} \times \mathcal{Y}) \mid \exists \{ A_i \} \in X, \{ B_i \right\} \in Y \colon Q = \cup_{i=1}^\infty R_i , R_i = A_i \times B_i, R_i \cap R_j = \emptyset (i \neq j) \}
$$
is a $\sigma$-algebra containing all measurable rectangles, so that $ S = \sigma(\mathcal{X} \times \mathcal{Y}) $. So now we have
$$
\lambda ( Q_x ) = 
\lambda \left( ( \cup_{i=1}^\infty A_i \times B_i )_x \right) = 
\lim_{n \to \infty} \lambda \left( ( \cup_{i=1}^nA_i \times B_i )_x \right) \\ = 
\lim_{n \to \infty} \sum_{i=1}^n \lambda ((A_i \times B_i)_x) = 
\lim_{n \to \infty} \sum_{i=1}^n \lambda(B_i) I_{A_i}(x)
$$
Since $A_i$ is $\mathcal{X}$-measurable, $\lambda(B_i) I_{A_i}(x)$ is a $\mathcal{X}$-measurable (simple) function. The finite sum of measurable functions is measurable, and the limit of measurable functions is measurable, so  $\lambda(Q_x)$ is measurable.
 A: It is not(!) true that any set that is measurable in the product $\sigma$-algebra $\sigma(\mathcal{X} \times \mathcal{Y})$ can be written as a disjoint union of measurable rectangles.
As a counterexample consider the case $\mathcal{X} = \mathcal{Y} = \text{the Borel-}\sigma\text{-Algebra on } \Bbb{R}$. It is then easy to see that $\sigma(\mathcal{X} \times \mathcal{Y})$ is the Borel-$\sigma$-Algebra on $\Bbb{R}^2$.
This means that the closed set $A := \{(x,x) \mid x \in \Bbb{R}\}$ is an element of $\sigma(\mathcal{X} \times \mathcal{Y})$.
Now assume $A = \biguplus_j A_j \times B_j$. Wl..o.g. we can assume that $A_j \neq \emptyset \neq B_j$ for all $j$. This implies that for fixed $x_0 \in A_j$ and arbitrary $y \in B_j$ we have $(x_0,y) \in A$, i.e. $x_0=y$, i.e. $B_j = \{x_0\}$. Using the same argument, conclude $A_j = \{x_0\}$, i.e. $\#(A_j \times B_j) = 1$, so that $A$ is countable, a contradiction.
You can get a correct proof by showing that the set of (finite) disjoint unions of measurable rectangles is an algebra.
Then show that the set of "good" sets,
$$\{Q \in \sigma(\mathcal{X} \times \mathcal{Y}) \mid x \mapsto \lambda(Q_x)\text{ is measurable}\}$$
is a monotone class (cf. http://en.wikipedia.org/wiki/Monotone_class_theorem , Rudin should also state and prove that theorem).
