# About integrals w.r.t. the counting measure

Consider the measure space $(\mathbb{Z},\mathcal{P}(\mathbb{Z}),\#)$, where $\#$ is the counting measure on $\mathbb{Z}$ and $\mathcal{P}(\mathbb{Z})$ is its power set.

I would like to show that for any measurable function we have $\int f(n)d\#(n)=\sum_{n}f(n)$.

This is what I have done: Let $x\in\mathbb{Z}$ and consider the indicator function $1_{\{x\}}$. Then $$\int_\mathbb{Z} fd\#=\int_\mathbb{Z} 1_{\{x\}}d\#=\#\{x\}=1,$$ for $f=1_{\{x\}}$. Next, for a step function $f=\sum_{k=-n}^na_k1_{\{x_k\}}$ (where $x_k\in\mathbb{Z}$ and $a_k$ are real rumbers for all $k$) we have $$\int_\mathbb{Z} fd\#=\sum_{k=-n}^na_k\int_\mathbb{Z}1_{\{x\}}d\#=\sum_{k=-n}^na_k.$$

How do I finish this proof? I still need to prove the statement for an arbitrarily measurable function.

-
How did you define the Lebesgue integral? –  Michael Greinecker Dec 5 '12 at 9:40
And how did you define infinite sums over $\mathbb{Z}$? –  Michael Greinecker Dec 5 '12 at 9:45

I think the statement holds only for positive measurable functions. If you take $f(n) = \frac{(-1)^n}{n}$ then $\sum_n f(n) < \infty$ but $$\int_\mathbb{Z} f^+ d\# = \int_\mathbb{Z} f^- d\# = \infty$$ So you end up with $\infty-\infty$
Hint: Let $f$ be a measurable function, $f \geq 0$. Then there exists a sequence $(f_n)_n$ of step functions such that $f = \sup_n f_n$. Now apply monotone convergence and use the formula for the step functions (which you already proved).
If $f$ is an arbritary measurable function you can write $f$ as $f=f^+-f^-$ where $f^+$, $f^- \geq 0$ are measurable functions.