This question comes from Lemma 2.11 from Bartle's "Elements of Integration". Let $f: X \to \mathbb{R}$ be a nonnegative function. Fix $n \in \mathbb{N}$. For $k = 0, 1, \dots, n2^n-1$, define $E_{kn} = \{ x \in X : k2^{-n} \leq f(x) < (k+1)2^{-n}\} $. For $k = n2^n$, $E_{kn} = \{ x \in X : f(x) \geq n\}$. These are all disjoint sets such that $\bigcup_{k=0}^{n2^n} E_{kn} = X$. Define $\varphi_n(x) = \sum_{k=0}^{n2^n} k2^{-n} \chi_{E_{kn}}$, where $\chi_E$ is the characteristic function for $E$.
It is affirmed in the text that $\varphi_n(x) \leq \varphi_{n+1}(x)$ for each $x \in X$, $n \in \mathbb{N}$ - however, I'm having some trouble proving it. I can't even properly visualize what these functions look like. Can anyone help me?
Fix $x$. Say $x \in E_{kn}$. Then $\phi_n(x) = k2^{-n}$. Since $x \in E_{kn}$, we must have $f(x) \in [k2^{-n}, (k+1)2^{-n}) = [2k2^{-(n+1)}, (2k+1)2^{-(n+1)}) \cup [(2k+1)2^{-(n+1)}, (2k+2)2^{-(n+1)})$. Therefore, either $x \in E_{2k, n+1}$ or $x \in E_{2k+1, n+1}$. In the first case, $\phi_{n+1}(x) = 2k2^{-(n+1)} = \phi_n(x)$. In the second case, $\phi_{n+1}(x) =(2k+1)2^{-(n+1)} > \phi_n(x)$.
Edit: I forgot the case where $x$ lies in the last infinite segment on the right, but reasoning is the same.