Consider the following fragment from Folland's "Real analysis" on p64:
I don't understand why $\pi(E)$ is well-defined, i.e. assume that $$E = \bigcup_i A_i \times B_i= \bigcup_j C_j \times D_j$$ where the unions are disjoint. Then why is it true that $$\sum_i \mu(A_i)\nu(B_i) = \sum_j \mu(C_j)\nu(D_j)?$$
Folland talks about a common refinement, but I don't see how that works.







Note that we can write $E=\bigcup_{i,j}(A_i\times B_i)\cap(C_j\times D_j)=\bigcup_{i,j}(A_i\cap C_j)\times(B_i\cap D_j)$.
So: $A_i\times B_i=\bigcup_{j}(A_i\cap C_j)\times(B_i\cap D_j)$, $C_j\times D_j=\bigcup_{i}(A_i\cap C_j)\times(B_i\cap D_j)$.
So we have: $\mu(E)=\mu(\bigcup_i A_i\times B_i)=\mu(\bigcup_{i,j}(A_i\cap C_j)\times(B_i\cap D_j))=\sum_{i,j}\mu_1(A_i\cap C_j)\mu_2(B_i\cap D_j)$
Now:
$\sum_{i}\mu_1(A_i)\mu_2(B_i)=\sum_{i,j}\mu_1(A_i\cap C_j)\mu_2(B_i\cap D_j)=\sum_j\mu_1(C_j)\mu_2(D_j)$, where the last step is true because I can change order of summation (everything is non-negative).