Measurable non-negative function is infinite linear combination of $\chi$-functions Let $(X,\mathfrak{M},\mu)$ is measure space. Suppose that $f\geqslant 0$ is measurable function on $X$. We know that exists the increasing sequence of measurable simple functions $\{s_n\}$ such that $s_n(x)\to f(x)$ as $n\to \infty$ for $x\in X$. Let $t_n(x)=s_n(x)-s_{n-1}(x)$ with $s_0=0$ then $$f(x)=\sum \limits_{n=1}^{\infty}t_n(x).$$ It's easy to see that $t_n$ is linear combination of characteristic functions.
How to prove rigorously that there are measurable sets $E_i$ (not necessarily disjoint) and constants $c_i>0$ such that $$f(x)=\sum \limits_{i=1}^{\infty}c_i1_{E_i}(x)$$
Would be very grateful for answer.
EDIT: This assumption is taken from Rudin's RCA book during the proof of Vitali-Caratheodory Theorem.
 A: Every $t \in [0,\infty)$ can be written uniquely as $n +\alpha$, where
$n \in \mathbb{N}$ and $\alpha \in [0,1)$. Apply this to $f(x)$ as follows:
Let $s_0(x) = \lfloor f(x) \rfloor$ and note that we can write
$s_0(x) = \sum_{k=1}^\infty k \cdot 1_{f^{-1} ([k,k+1))}(x)$. Since
$f$ is measurable, the sets $f^{-1} ([k,k+1))$ are measurable and hence
$s_0$ is measurable. It is clear that $s_0$ has the desired form.
To finish, we need to write $f(x)-s_0(x)$ in a similar manner; one straightforward
way is to use a binary expansion.
Let $s_n(x) = \lfloor 2^n (f(x)-s_0(x)) \rfloor \text{ mod } 2 = \lfloor 2^n f(x) \rfloor \text{ mod } 2$, for $n=1,...$. Note that $s_n(x) \in \{0,1\}$
for all $n$, and
$s_n(x) = 1$ iff $2^nf(x) \in \cup_{k=0}^\infty [2k+1, 2k+2)$, from which
it follows that $s_n$ is measurable. If we let $T_n = f^{-1}({1 \over 2^n}\cup_{k=0}^\infty [2k+1, 2k+2) $, then we can write $s_n = 1_{T_n}$).
Now note that $|f(x)-s_0(x) - \sum_{k=1}^n {1 \over 2^k} s_k(x)| \le {1 \over 2^n}$, from which we get 
 that $f(x) = s_0(x) + \sum_{n=1}^\infty {1 \over 2^n} s_n(x)$,
or
$f(x) = \sum_{k=1}^\infty k \cdot 1_{f^{-1} ([k,k+1))}(x)+ \sum_{n=1}^\infty {1 \over 2^n} 1_{T_n}(x)$, which is the desired form.
