I was hoping that someone would be able to help me solve this problem regarding simple functions and their measure. This problem is coming straight from Introduction to Measure Theory by Terrence Tao. A link to the free version is attached at the end of this post.
Show that an unsigned function $f: \mathbb{R}^d \to [0, +\infty]$ is a simple function if and only if it is measurable and takes on at most finitely many values.
The definitions that I am working with are as follows:
An unsigned simple function $f: \mathbb{R}^d \to [0, +\infty]$ is a finite linear combination $f= c_11_{E_1}+ \ldots + c_k1_{E_k}$ of indicator functions $1_{E_i}$ of Lebesgue measurable sets $E_i \subset \mathbb{R}^d$ for $i=1, \ldots , k,$ where $k \geq 0$.
An unsigned function $f:\mathbb{R}^d \to [0, +\infty]$ is unsigned Lebesgue measurable, or measurable for short, if it is the point-wise limit of unsigned simple functions, i.e., if there exists a sequence $f_1,f_2,f_3, \ldots : \mathbb{R}^d \to [0, +\infty]$ of unsigned simple functions such that $f_n(x) \to f(x)$ for every $x \in \mathbb{R}^d$.
My attempt at the solution is this:
If $f:\mathbb{R}^d \to [0, +\infty]$ is simple, then $f$ is a linear combination $f=c_11_{E_1}+ \ldots + c_n1_{E_n}$ of indicator functions $1_{E_i}$ of Lebesgue measurable sets $E_i \subset \mathbb{R}^d$ for $i =1, \ldots, n$, where $n \in \mathbb{N}$ and $c_1, \ldots, c_n \in [0, +\infty]$. We wish to show that this implies that $f$ is measurable and takes on at most finitely many values. To say that it is measurable would mean that $\exists f_1, f_2, \ldots$ each unsigned simple such that $\forall x \in \mathbb{R}^d, f(x) = \displaystyle \lim_{n \to \infty} f_n(x)$. If we cut up $[0, +\infty]$ into finitely many boxes $B$, each small enough that $\forall x, y \in B, |f(x)-f(y)| < \frac{1}{n}$, or $f(x), f(y) \in [0, +\infty].$ $f_n(x) = \inf(f(B))$ if $x \in$ box $B$. $f_n(x)=0$ for $x \notin [0, +\infty]$.
Then $\forall x \in \mathbb{R}^d$, $f_n(x) \to f(x)$ and $f_n = \displaystyle \sum_{\text{boxes $B$}}\inf(f(B))1_B$ is simple.
To prove the backwards direction, if $f$ is measurable, then $\exists f_1,f_2 \ldots$ each unsigned simple such that $\forall x\in \mathbb{R}^d, f(x)=\displaystyle \lim_{n=\infty}f_n(x)$. Since $f$ is composed of simple functions converging point-wise, the result follows by definition.
Note: In this proof, I am imitating an approach we used in class to show that if a function is continuous, then it is measurable. I am not sure if it still applies in this case, which is why I would really appreciate some feedback in order to help me solve this problem.
Thank you very much in advance.
Link to the textbook: http://terrytao.files.wordpress.com/2011/01/measure-book1.pdf
A few comments on your solution:
1) On your proof of "$f$ simple $\implies$ $f$ measurable with finitely many values".
You start by writing $f=c_11_{E_1}+\cdots+c_k1_{E_n}$ with $c_i\geq0$ and $E_i$ Lebesgue measurable, good.
I see that you acknowledge that you must prove that $f$ only takes finitely many values, but I see no argument to that effect. This may seem to you like a trivial statement, but I think that you should still go through the argument. For instance, if I was grading students on this particular question, I would not be 100% satisfied with a solution unless the students addressed every possible output of $f$ (for instance, you could be surprised by how many people would claim that the possible values are $\{0,c_1,\ldots,c_n\}$ when it is never assumed that the $E_n$ are disjoint).
Without reading your solution that $f$ is measurable, I can already tell you that you maybe worked a little too hard (I didn't check it or correctness). According to your definition of measurability, all you need to do is find a sequence $(f_n)_n$ of unsigned simple functions that converge to $f$ pointwise. What happens if you define $f_n=f$ for all $n$?
2) On your proof of " $f$ measurable with finitely many values $\implies$ $f$ simple".
I am not convinced by what you have written in your post. You know that the function takes finitely many values, say $0\leq c_1<c_2<\cdots<c_n\leq+\infty$, so you can write it as $f=c_11_{A_1}+\cdots+c_n1_{A_n}$, where $A_i=\{x\in\mathbb R^d:f(x)=c_i\}$. I'm not satisfied with your explanation that the fact that simple $f_n$ converges pointwise to $f$ implies by definition that the $A_i$ are measurable (which is what you need to prove). I'm not sure which definition is being referenced here.
Here's a hint: while it is true that Unsigned Lebesgue Measurable functions are defined as you have written in Tao's book, I advise you keep Lemma 1.3.9 (the numbers in my post reference the free version you have linked) in mind, as the equivalent characterizations of measurability contained in that Lemma are often times easier to work with than the one you use. I'm thinking in particular of item (xii) in Lemma 1.3.9 in this case (recall that singletons are closed).