Calculate $\iint{f d\mu dv}$ and $\iint{f dv d\mu}$ The purpose of this problem is to show that in Fubini-Tonelli theorem, the condition $f \in L^{+}(X \times Y)$ or $f \in L^1$ is necessary. Here is the problem:


Let $X = Y = \mathbb{N}$, $\mathcal{M} = \mathcal{N} = \mathcal{P}(\mathbb{N})$, $\mu = v =$ counting measure. Define $f(m, n) = 1$ if $m = n$, $f(m, n) = -1$ if $m = n + 1$ and $f(m, n) = 0$ otherwise. Then $\int{|f|}d(\mu \times v) = \infty$ and $\iint{fd\mu dv}$ and $\iint{fdvd\mu}$ exist but are not equal.


I can prove that $\int{|f|}d(\mu \times v) = \infty$, but I don't know how to calculate $\iint{fd\mu dv}$ and $\iint{fdvd\mu}$. Anyone can help me. I really appreciate.

We have that $\iint{fd\mu dv}=\int\left(\int f d\mu\right) dv$. And for each fixed $n$, $f(m,n)$ has only two nonzero values which are of equal measure. Thus for each fixed $n\in Y$: 
$$\int_{m\in X} f(m,n) d\mu=f(n,n)+f(n+1,n)+0=1-1=0.$$
So we get $\iint{fd\mu dv}=0$. And for each fixed $m\in X$ for $m\neq 1$:
$$\int_{n\in Y} f(m,n) dv=f(m,m)+f(m,m-1)+0=1-1=0.$$
Thus 
$$\iint{f dvd\mu}=\int_{n\in Y}f(1,n)dv+\int_{m\in X,m\neq1}\left(\int_{n\in Y}f dv \right)d\mu =1+0.$$
So we get that $0=\iint{fd\mu dv}\neq\iint{f dvd\mu}=1$ and the iterated integrals are not equal.
