Here is the problem:
Let $(X, \mathcal{S}, \mu)$ and $(Y, \mathcal{T}, \lambda)$ be $\sigma$-finite measure spaces. Suppose that $g: X \rightarrow \mathbb{R}$ is a $\mu-$integrable function and that $h: Y \rightarrow \mathbb{R}$ is a $\lambda-$integrable function. Define $f: X \times Y \rightarrow \mathbb{R}$ by $f(x,y) = g(x)h(y).$ Prove that $f$ is $\mu \times \lambda$ integrable and that $$\int_{X\times Y} f d(\mu \times \lambda) = (\int_{X}g d\mu) (\int_{Y} hd\lambda).$$
Here is its solution:
My Question is:
What are the details of calculations of the fourth line "It follows that the result holds for simple functions and thus nonnegative integrable functions", does the case of nonnegative functions follows by Tonelli's theorem (its statement is: {Let $(X, \mathcal{S}, \mu)$ and $(Y, \mathcal{T}, \lambda)$ be $\sigma$-finite measure spaces. And let $f$ be a $\mathcal{S} \times \mathcal{T}$ measurable function on $X \times Y.$
(a) If $0 \leq f \leq \infty$ and $\varphi(x) = \int_{Y}f_{x}d\lambda(y), \psi(y) = \int_{X}f^{y}d\mu(x)$ then $\varphi$ is $\mathcal{S}-$measurable and $\psi$ is $\mathcal{T}-$measurable
and $$\int_{X} \varphi d\mu = \int_{X \times Y} f d(\mu \times \lambda) = \int_{Y} \psi d\lambda.\quad \quad (**)$$ )?
Now for the case of simple functions, Here is my trial:
Let $E_{i} \subset X$ and $F_{j} \subset Y$ where both $E_{i}$ and $F_{j}$ have finit measures for each $i$ and $j$ (I am not sure if this assumption required or it follows directly from that $X$ and $Y$ have $\sigma-$ finite measures) and let $g = \sum^{n} c_{i} \chi_{E_{i} }$ and $h = \sum^{m} d_{j} \chi_{F_{j} }$ then
$\int_{X\times Y} f d(\mu \times \lambda) = \int_{X\times Y} (\sum^{n} c_{i} \chi_{E_{i}} )(\sum^{m} d_{j} \chi_{F_{j}} ) = \int_{X\times Y} \sum^{n} (c_{i} \sum^{m} d_{j} \chi_{F_{j}}. \chi_{E_{i}} ) = \int_{X\times Y} \sum^{n} (c_{i} \sum^{m} d_{j} \chi_{F_{j} \times E_{i}} ) = \int_{X\times Y} (\sum^{n} \sum^{m} c_{i} d_{j} \chi_{F_{j} \times E_{i}} ).$
But then I am unable to complete. could anyone help me in completing this proof, please?
This question is also problem 10 on pg.423 in Royden "real analysis fourth edition" and I prefer an answer depending on this edition of Royden