Is it an increasing sequence? Let $x\in\mathbb{R}_+$ fixed. I am looking for a proof that formally shows $\forall n\in\mathbb{N},n\geqslant 1, g_{n}(x)\leqslant g_{n+1}(x)$ where $g_n : x\mapsto \sum_{i=0}^{n2^n-1} \frac{i}{2^n}\mathbf 1_{\big\{\tfrac{i}{2^n}\leqslant x < \tfrac{i+1}{2^n}\big\}}+n\mathbf 1_{\{x\geqslant n\}}$. 
This result is an important step to build Lebesgue integral.
Thank you in advance,
 A: If I understand correctly here, you are trying to show that there exists a sequence of simple functions that increases monotonically to the function $g(x)=x$. But it isn't really any harder to do this for an arbitrary nonnegative measurable function $g$. For each $n\geqslant 1$ and $i=0,\ldots, n2^n-1$ define $E_n^i = g^{-1}([\frac i{2^n}, \frac{i+1}{2^n})$ and $F_n=g^{-1}([n,\infty)$. Then define the sequence $g_n$ by
$$g_n = \sum_{i=0}^{n2^n-1}\frac i{2^n}\mathbf 1_{E_n^i} + n\mathbf 1_{F_n}. $$
(This is the same as your $g_n$ if you take $g(x)=x$.) To show that $g_n\leqslant g_{n+1}$, we need to consider three cases:
If $g(x)\geqslant n+1$, then $g_n(x)=n<n+1=g_{n+1}(x)$.
If $n\leqslant g(x)< n+1$, then $g_n(x)=n$. Further, $\frac{n2^{n+1}}{2^{n+1}}\leqslant g(x)< \frac{(n+1)2^{n+1}}{2^{n+1}}$, so $x\in E_{n+1}^i$ for some $n2^{n+1}\leqslant i \leqslant (n+1)2^{n+1}-1$. Hence $$\frac{n2^{n+1}}{2^{n+1}}\leqslant g_{n+1}(x)\leqslant \frac{(n+1)2^{n+1}-1}{2^{n+1}},$$
so that $g_{n+1}(x)\geqslant n=g_n(x)$.
If $g(x)<n$, then $x\in E_n^i$ for some $0\leqslant i\leqslant n2^n-1$, so $g_n(x)=\frac i{2^n}$. It follows then that
$$\frac{2i}{2^{n+1}}\leqslant g(x) < \frac{2(i+1)}{2^{n+1}}, $$
so that $g_{n+1}(x)\geqslant \frac{2i}{2^{n+1}}=\frac i{2^n}=g_n(x)$.
