TITLE: Rudin theorem 1.17, understanding the monotonicity of the function sequences defined.
QUESTION [5 upvotes]: I'm going through the proof of theorem 1.17 of Rudin's Real and Complex Analysis.

Theorem 1.17. Let $f: X \to [0,\infty]$ be measurable. There exist simple measurable functions $s_n$ on $X$ such that

$0 \leq s_1 \leq s_2 \leq \dots \leq f$,
$s_n(x) \to f(x)$ as $n \to \infty$, for every $x \in X$.


The proof starts by defining $\delta_n = 2^{-n}$, for each $n$ and each real number $t$ there's an integer $k_n(t)$ such that
$$
k_n(t)\delta_n \leq t < (k_n(t)+1)\delta_n,
$$
this point is easily proved considering that the equation
$$t = \mu \delta_n$$
has solution and taking $k_n(t) = \left\lfloor \mu \right\rfloor$ proves the statement above. Later the sequence 
$$\varphi_n(t) = \left\{ \begin{array}{lr} k_n(t)\delta_n & 0 \leq t < n \\ n & n \leq t \leq \infty \end{array} \right.$$
is defined. For each $n \;\;\varphi_n$ is a Borel function on $[0,\infty]$, but why? Is that because for each $n$ we have $\varphi_n$ is a simple function?
Then it is stated that
$$
t - \delta_n < \varphi_n(t) \leq t\;\; 0 \leq t \leq n
$$
And this bit it is easy to prove by using the definition of $k_n(t)$. Almost finally it is stated that
$$
0 \leq \varphi_1 \leq \varphi_2 \leq \ldots \leq t
$$
this bit puzzles me since
$$
\begin{multline}
\left\{
\begin{array}{l}
t - \delta_n < \varphi_n(t) \leq t \\
t - \delta_{n-1} < \varphi_{n-1}(t) \leq t
\end{array} \Rightarrow
\right.
\left\{
\begin{array}{l}
t - \delta_n < \varphi_n(t) \leq t \\
- t \leq - \varphi_{n-1}(t) < - t + \delta_{n-1}
\end{array} 
\right. \Rightarrow \\
-\delta_n \leq \varphi_n(t) - \varphi_{n-1}(t) \leq \delta_{n-1}
\end{multline}
$$
and it doesn't tell me anything...
And finally it is just stated that defining $s_n = \varphi_n \circ f$ has the required properties. 
My questions:

Why is the sequence $\varphi_n$ measurable (borel function in this case)?
Why is the sequence $\varphi_n$ monotonic?
Why is the sequence $s_n$ monotonic?

Update: Maybe I figured out 1 and 2, 

Since $\varphi_n$ is monotonic the counter image of any open set should be a Borelian set (union of open sets).
Taking the difference
$$
(\varphi_{n+1} - \varphi_n)(t) = \left\{ \begin{array}{lr}
k_{n+1}(t) \delta_{n+1} - k_n(t) \delta_n & 0 \leq t < n \\
k_{n+1}(t) \delta_{n+1} - n & n \leq t < n + 1 \\
1 & n + 1 \leq t < \infty
\end{array}
\right.
$$

For $0 \leq t < n$ we have
$$
\begin{multline}
k_{n+1}(t) \delta_{n+1} - k_n(t) \delta_n = k_{n+1}(t) \delta_{n+1} - 2 k_n(t) \delta_{n + 1} = (k_{n+1}(t) - 2k_n(t))\delta_{n+1} = 0
\end{multline}
$$
The equality to $0$ follows from the fact that it must be $k_{n+1}(t) = 2k_n(t)$
Given the uniqueness of the integer the multiplied by $\delta_j$ bound $t$.
For $n \leq t < n + 1$ we have
$$
(n\delta^{-1}_n) \delta_n = n \leq t < n + 1 = ((n+1)\delta^{-1}_n) \delta_n \Rightarrow k_{n}(t) = n2^n = n \delta^{-1}_n \Rightarrow k_{n}(t)\delta_n = n \Rightarrow k_{n+1}(t) \delta_{n+1} - n = n + 1 - n = 1
$$
I can then rewrite
$$
(\varphi_{n+1} - \varphi_n)(t) = \left\{ \begin{array}{lr}
0 & 0 \leq t < n \\
1 & n \leq t < \infty
\end{array}
\right. \Rightarrow 0 \leq (\varphi_{n+1} - \varphi_n)(t) \Rightarrow \varphi_n \leq \varphi_{n+1}
$$
I keep trying to figure out why the sequence $s_n$ is monotonic.

REPLY [2 votes]: Answer to the first question.
The functions $\varphi_n$ are measurable because they are all simple functions that take distinct values on intervals, which are measurable.
Note that a function is not measurable merely by virtue of being simple, so the first argument you gave is incorrect.
The second argument you gave is correct: monotone functions are measurable. But, one would still like to see more details regarding why the inverse image of an open set is a union of open sets. 

Answer to the second question.
You argument falls apart in two places. First, in the case $0 \leq t < n$, when you equate $(k_{n+1}(t) - 2k_n(t))\delta_{n+1}$ with $0$. Second, in the case $n \leq t < n+1$, when you equate $k_n(t)$ with $n\delta_n^{-1}$. Both these assertions are false. Try explicitly computing these values for small $n$ to see why.
To see why the $\varphi_n$'s are monotonically increasing, see what the description you gave of $(\varphi_{n+1}-\varphi_n)(t)$ is telling you.
Fix $0 \leq t < n$. Then, $k_{n}(t)\delta_n$ is the largest multiple of $2^{-n}$ that is not greater than $t$. Similarly, $k_{n+1}(t)\delta_{n+1}$ is the largest multiple of $2^{-(n+1)}$ that is not greater than $t$. But, any multiple of $2^{-n}$ is also a multiple of $2^{-(n+1)}$. So, it is clear that $k_{n+1}(t)\delta_{n+1} \geq k_{n}(t)\delta_n$. Hence, $(\varphi_{n+1}-\varphi_n)(t) \geq 0$ for $0 \leq t < n$.
Fix $n \leq t < n+1$. Then, $k_{n+1}(t)\delta_{n+1}$ is the largest multiple of $2^{-(n+1)}$ that is not greater than $t$. Note, however, that every integer is a multiple of $2^{-(n+1)}$. In particular, $k_{n+1}(t)\delta_{n+1} \geq n$ in this case, because $t \geq n$. So, $(\varphi_{n+1}-\varphi_n)(t) \geq 0$ for $n \leq t < n+1$.
And lastly, since $1 > 0$, we have that $(\varphi_{n+1}-\varphi_n)(t) \geq 0$ for $t \geq n+1$, and so $\varphi_{n+1} \geq \varphi_n$ for each $n \in \mathbb{N}$.

Answer to the third question.
Fix $x \in X$. Since $s_n := \varphi_n \circ f$, let us compare $s_{n+1}(x)$ with $s_n(x)$.
$$
s_{n+1}(x) = \varphi_{n+1}(f(x)) \geq \varphi_n(f(x)) = s_n(x).
$$
Thus, the monotonicity of the $\varphi_n$'s gives us the monotonicity of the $s_n$'s.