TITLE: Possible mistake in Folland real analysis?
QUESTION [5 upvotes]: I am working on some exercises in Folland's real analysis. In number 2.48, they ask you to prove the following question: 

Let $X = Y = \mathbb N$, $M = N = P(\mathbb N)$ and $\mu = \nu$ be counting measure on $\mathbb N$. Define $f(m,n) = 1$ if $m=n$, $f(m,n) = -1$ if $m = n+1$, and $f(m,n) = 0$ otherwise. Then, $\iint f\ \mathsf d\mu \mathsf d\nu$ and $\iint f\ \mathsf d\nu\mathsf d\mu$ exist and are unequal. 

It seems to me that \begin{align}\iint f\ \mathsf d\mu\mathsf d\nu &= \sum_n\sum_m f(m,n)\\ &= \sum_n f(n,n) + f(n+1,n)\\ &= \sum_n 1-1\\ &= \sum_n 0 = 0\end{align} and \begin{align}\iint f\ \mathsf d\nu\mathsf d\mu &= \sum_m\sum_n f(m,n)\\ &= \sum_m f(m,m) + f(m,m-1)\\ &= \sum_m 1-1\\ &= \sum_m 0 =0.\end{align} So the two integrals are equal. 
What am I doing wrong? Thanks!

REPLY [10 votes]: Represent the array as 
$$\begin{array}{r|rrrr}
m\backslash n &1&2&3&\cdots\\\hline
1&1&0&0&\dots\\
2&-1&1&0&\dots\\
3&0&-1&1&\ddots\\
4&0&0&-1&\ddots\\
\vdots&\vdots&\vdots&\ddots&\ddots
\end{array}$$
When you first sum with respect to $m$, we get $0$, but when we begin by $n$, the sum of the first row is $1$, and $0$ for the other. 
So, careful with the order of integration when the function is not non-negative and not integrable.