Existence of approximating simple function 
Let $(X,\mathcal F,\mu)$ be measurable space with $\mu(X)<\infty$. $\mathcal F$ is $\sigma$-algebra on X and $\mathcal F$ is generated by algebra $\mathcal F_0$. Prove that for every measurable function $f$ defined on $X$ and $\epsilon>0$, there exists a simple function $f_{\epsilon}=\sum_{k=1}^nc_k 1_{A_k}$ with $A_k\in \mathcal F_0$ such that $\mu\{x: |f(x)-f_{\epsilon}(x)|\geq \epsilon\}<\epsilon$, $c_k$ is constant.

I have no idea to proceed the proof. Please give me some hints. Thanks
 A: Hints:


*

*Since $\mathcal{F}_0$ is an algebra, we have $X \in \mathcal{F}_0$. Define $$\mathcal{D} := \{F \in \mathcal{F}; 1_F \, \text{satisfies the claim}\}.$$

*Show that $X \in \mathcal{D}$ and $$F \in \mathcal{D} \implies X \backslash F \in \mathcal{D}.$$

*Let $(F_j)_{j \in \mathbb{N}} \subseteq \mathcal{D}$ be pairwise disjoint and fix $\epsilon>0$.  Set $F := \bigcup_{j \geq 1} F_j$ and $f(x) := 1_F(x)$. Since $F_j \in \mathcal{D}$ there exists $$f_{\epsilon}^j := \sum_{k=1}^{n_j} c_k^j 1_{A_k^j}$$ such that $\mu(|1_{F_j}-f_{\epsilon}^j| \geq \epsilon 2^{-(j+1)}) <\epsilon 2^{-(j+1)}$. Choose $N \in \mathbb{N}$ sufficiently large such that $$\mu \left( F \backslash \bigcup_{j=1}^N F_j \right) \leq \frac{\epsilon}{2}$$ and set $$f_{\epsilon} := \sum_{j =1}^N f_{\epsilon}^j.$$ Conclude from $$\begin{align*}\mu(|f-f_{\epsilon}| \geq \epsilon) &\leq \mu \left( \left| 1_F - 1_{\bigcup_{j=1}^N F_j} \right| \geq \frac{\epsilon}{2} \right) + \mu \left( \left|1_{\bigcup_{j=1}^N F_j}-f_{\epsilon}\right| \geq \frac{\epsilon}{2} \right) \\ &\leq \mu \left( F \backslash \bigcup_{j=1}^N F_j \right)+ \sum_{j =1}^N \mu(|1_{F_j}-f_{\epsilon}^j| \geq \epsilon 2^{-(j+1)})\end{align*}$$ that $F \in \mathcal{D}$.

*Step 2&3 show that $\mathcal{D}$ is a Dynkin system. As $\mathcal{F}_0 \subseteq \mathcal{D}$ is $\cap$-stable and $\sigma(\mathcal{F}_0)=\mathcal{F}$, we get $$\mathcal{F}=\sigma(\mathcal{F}_0) = \delta(\mathcal{F}_0) \subseteq \delta(\mathcal{D}) = \mathcal{D}.$$

*Now let $f \geq 0$ be a measurable function and fix $\epsilon>0$. Define $$B_j := \left\{ j \frac{\epsilon}{4} \leq f < (j+1) \frac{\epsilon}{4} \right\} \in \mathcal{F}, \qquad j \geq 0,$$ and set $$g(x) := \sum_{j \geq 0}  j \frac{\epsilon}{4} \cdot 1_{B_j}(x).$$ By construction, $$\mu(|f-g| \geq \epsilon/2)=0.$$ Using step 4 and a very similar argumentation as in step 3, we find a simple function $$f_{\epsilon} = \sum_{k=1}^n c_k 1_{A_k}$$ such that $$\mu(|g - f_{\epsilon}| \geq \epsilon/2) < \frac{\epsilon}{2}.$$ Conclude from the triangle inequality that $\mu(|f-f_{\epsilon}| \geq \epsilon)<\epsilon$.

*For arbitrary $f$ measurable write $f= f^+-f^-$ where $f^+$ and $f^-$ denote the positive part and negative part of $f$, respectively.

