
Measurable functions.
Let (X, \mathcal{A}) be a measurable space and let f : X \rightarrow [0, +\infty] be a measurable function. Find a set sequence \{A_n\}, A_n \in \mathcal{A}, such that f = \sum{n=1}^{\infty} \frac{1}{n} I_{A_n}, where I_A is a characteristic function.
I guess something's wrong with LaTeX, so I didn't use it.
At first I thought of a sequence A_n = \{ x \in X : f(x) = \frac{1}{n} \}, but it's wrong. Does anyone have any idea? It may be connected to a proof of Theorem 4.4.10 from "An introduction to the Theory of Real Functions" (author: Stanislaw Lojasiewicz), but I can't find out how.

I think we can try to define the sets $\displaystyle A_n$ by induction. Put A_1:=\left\{x\in X\mbox{ such that }f(x)\geq 1\right\} andA_n := \left\{x\in X\mbox{ such that }f(x)  \sum_{j=1}^{n1}\frac 1j\mathbf{1}_{A_j}(x)\geq \frac 1n\right\}.

I don't know about Ljasiewicz's book but this is a pretty standard construction which can be found in, amongst others, Royden.

Thank you for your help. You said it's standard construction  I've read some polish books about measure theory (I'm from Poland) and found nothing about this. Could you give me the exact title of any book about it?