lebesgue integral exercise, it's easy but I still require assistance

Hi guys. I'm just starting to work with Lebesgue integrals, and so even the easy stuff is awkward for me.

Quote:

Let $\displaystyle f$ be a nonnegative measurable function. Show that $\displaystyle \int f=0$ implies $\displaystyle f=0$ almost everywhere (i.e. except on a set of measure zero).

EDIT: Okay, I cracked it. Here's my solution, for reference purposes:

Let $\displaystyle D$ denote the domain of $\displaystyle f$, and put $\displaystyle A_n=\{x:f(x)>1/n\}$ for each positive integer $\displaystyle n$ and $\displaystyle A=\{x:f(x)>0\}$. Then $\displaystyle D-A_n=\{x:f(x)\in[0,1/n]\}$ is measurable, and so by prop. 4.12 of Royden, *Real Analysis* 3rd Ed (p87), $\displaystyle 0\leq mA_n/n\leq \int_{D-A_n}f+\int_{A_n}f=\int f=0$. Thus we have $\displaystyle mA_n=0$ for all $\displaystyle n$, which means $\displaystyle 0\leq mA=m(\bigcup A_n)\leq\sum mA_n=0$ and therefore $\displaystyle mA=0$. The conclusion follows. $\displaystyle \blacksquare$