Question:
Let $f:\Omega \rightarrow [-\infty,\infty]$ be a measurable function. For any $\epsilon > 0$, there are a sequence of extended real numbers $(a_k)_{k=1}^{\infty}$ and a sequence $(E_k)_{k=1}^{\infty}$ of pairwise disjoint measurable sets such that $\cup_{i=1}^{\infty} E_k = \Omega$ and that $a_k \leq f(\omega) \leq a_k + \epsilon$ if $\omega \in E_k$.
Is the above statement true? Prove it if it is the case or give a counterexample.
Problem:
I have a hunch that the above statement is not true. I suppose Dirichlet function should serve as a good counterexample?
Yes. One could take $a_n = n\epsilon$ for $n\in \mathbb{Z}$ and $E_n = f^{-1}( [ n \epsilon, (n+1) \epsilon) )$.
If you want, label $\mathbb{Z}$ bijectively with elements of the set $\{1,2,3,\ldots\}$.