TITLE: a question of theorem 3.13 in Real and Complex Analysis, Rudin
QUESTION [6 upvotes]: Here is the Theorem 3.13 in rudin's real and complex analysis book，

Theorem 3.13 Let $S$ be the class of all complex,measureable,simple
  functions on $X$ such that \begin{equation} \mu(\{x:s(x)\neq
 0\})<\infty  \tag{1} \end{equation} If $1\leq p<\infty$,then $S$ is
  dense in $L^{p}(\mu)$. 
Proof: First,it is clear that $S\subset
L^{p}(\mu)$.Suppose $f\geq 0,f\in L^{p}(\mu)$,and let $\{s_{n}\}$ be
  as in Theorem 1.17.Since $0\leq s_{n}\le f$, we have $s_{n}\in
 L^{p}(\mu)$, hence $s_{n}\in S$,Since $|f-s_{n}|^{p}\leq f^{p}$,the
   dominated convergence theorem show that $\|f-s_n\|_{p}\to 0$ as $n\to
 \infty$.Thus $f$ is in the $L^{p}$-closure of $S$.The general case ($f$
   complex) follows from this.

Here I have a question: Why we have $s_{n}\in L^{p}(\mu)$? in the proof of rudin,he claim that $s_{n}$ is defined as Theorem 1.17.but in Theorem 1.17,he first put $\delta_{n}=2^{-n}$.then to each positive integer $n$ and each real number $t$ corresponds a unique integer $k=k_{n}(t)$ that satisfie $k\delta_n\leq t<(k+1)\delta_{n}$.Define
$$\varphi_{n}(t)=\left\{
  \begin{array}{ll}
    k_{n}(t)\delta_{n}, & \hbox{if $0\leq t<n$;} \\
    n, & \hbox{if $n\leq t\leq \infty$.}
  \end{array}
\right.$$
then define $s_{n}=\varphi\circ f$. but I can't see this definitition can show that $s_{n}\in S$.in fact we need to show that
\begin{equation}
\mu(\{x:s_{n}(x)\neq 0\})<\infty  
\end{equation}
and I can't figure it out.Can anyone who have read this book help me? Thank you in advance.

REPLY [6 votes]: Fix $n\in\mathbb N$, and let $A=\{x|f(x)\geq\delta_n\}$. Then, $$\mu(A)=\int_A\,d\mu=\frac{1}{\delta_n^p}\int_A\delta_n^p\,d\mu\leq\frac{1}{\delta_n^p}\int_Af^p<\infty.$$ But, for $x\notin A$, $f(x)<\delta_n$, therefore the definition of $s_n$ shows that $s_n(x)=0$. Hence, $$\{x|s_n(x)\neq 0\}\subseteq A,$$ therefore $\mu\left(\{x|s_n(x)\neq 0\}\right)<\infty$.