Tonelli’s theorem

Theorem (Tonelli).

Suppose (X,M,μ) and (Y,N,ν) are σ-finite (http://planetmath.org/SigmaFinite)
measure spaces. If f∈L+⁢(X×Y), then the functionsx↦∫Yf⁢(x,y)⁢𝑑ν⁢(y) and
y↦∫Xf⁢(x,y)⁢𝑑μ⁢(x) are in L+⁢(X) and L+⁢(Y) respectively, and furthermore if we denote by μ×ν the product measure, then

Basically this says that you can switch the of integrals, or integrate over the product space as long as everything is positive and the spaces are σ-finite. Do note that we allow the functions to take on the value of
infinity with the standard conventions used in Lebesgue integration. That is, 0⋅∞=0, so that if a function is infinite on a set of measure 0, then this does not contribute anything to the value of the integral.
See the entry on extended real numbers for further discussion.

Theorem (Tonelli for sums).

Suppose that fi⁢j≥0 for all i,j∈N, then

∑i,j∈ℕfi⁢j=∑i=1∞∑j=1∞fi⁢j=∑j=1∞∑i=1∞fi⁢j.

In the above theorem we have used ℕ as our set for simplicity and familiarity of notation.
If you would have an uncountable number of non-zero elementsfi⁢j then
all the sums would be infinite and the result would be trivial.
So the theorem for arbitrary
sets just reduces to the above case.