I am reading the proof of the following proposition and got a bit confused about its idea behind the proof:
Proposition$\quad$Suppose that $[a,b]$ is a closed bounded interval and that $p$ satisfies $1\leq p<+\infty$. Then the subspace of $L^p([a,b])$ determined by the step functions on $[a,b]$ is dense in $L^p([a,b])$.
Proof$\quad$ Of course, each step function on $[a,b]$ belongs to $\mathscr{L}^p([a,b])$. Since the Borel measurable simple functions on $[a,b]$ determine a dense subspace of $L^p([a,b])$, it is enough to show that if $f$ is a Borel measurable simple function and if $\epsilon$ is a positive number, then there is a step function function $g$ such that $\|f-p\|_p<\epsilon$; $\dots\dots$
So I want to confirm with you guys that my understanding of it (presented below) is correct.
Denote the set of Borel measurable simple functions on $[a,b]$ by $E$. Denote the set of step functions on $[a,b]$ by $F$. (Note that $F\subseteq\mathscr{L}^p([a,b])$.) We want to prove that $F$ form a dense subspace of $\mathscr{L}^p([a,b])$ and so determines a dense subspace of $L^p([a,b])$.
We know that $E$ form a dense subspace of $\mathscr{L}^p([a,b])$, then for any $f\in\mathscr{L}^p([a,b])$ and for any $\epsilon>0$ there is a $g\in E$ such that $\|f-g\|_p<\frac{\epsilon}{2}$. Now suppose we were able to prove that $F$ form a dense subspace of $E$; that is, suppose we were able to prove that for any $g\in E$ and for any $\epsilon>0$ there is an $h\in F$ such that $\|g-h\|_p<\frac{\epsilon}{2}$. Then we can show that for any $f\in\mathscr{L}^p([a,b])$ and for any $\epsilon>0$ there is an $h\in F$ such that $\|f-h\|_p\leq\|f-g\|_p+\|g-h\|_p<\frac{\epsilon}{2}+\frac{\epsilon}{2} = \epsilon$; that is, we can show that $F$ form a dense subspace of $\mathscr{L}^p([a,b])$ and so determines a dense subspace of $L^p([a,b])$.
Basically, my understanding is that the proof applies the fact if $A$ is dense in $B$ and if $B$ is dense in $C$ then $A$ is dense in $C$.
Is this what the book means?