I've looked at this question and I'm trying to understand and prove why the following technique works. For any $f: [a,b] \rightarrow \mathbb{R}$ continuous (which implies it is regulated) the following sequence of step functions $(\phi_n)_{n\geq 1}$ with partition $P_n$ can be constructed s.t. $\phi_n \rightarrow f$ uniformly.
Partition the interval $[a,b]$ as:
$P_n = \big\{a, a + \frac{b-a}{n}, a + 2\frac{b-a}{n}, \ldots, a + i\frac{b-a}{n}, \ldots,a + (n-1)\frac{b-a}{n}, b\big\} = \{p_i\}_{i=0}^n$, $\hspace{2mm} p_i = a + i\frac{b-a}{n}$
And define the sequence of step functions $(\phi_n)_{n \geq 1}$ in the following way. First define $I_i = (p_{i-1}, p_i)$, then $\phi_n \big|_{I_i} := \inf\limits_{x \in I_i}f(x)$
Intuitively it sort of makes sense, $\phi_n$ underestimates $f$ over slices of width $\frac{b-a}{n}$ and as the partition becomes infinitely fine the slices become points of $f$.
Here is my attempt at a proof, I am having trouble making it rigorous: $$\phi_n \rightarrow f \hspace{2mm}\text{uniformly}\iff \lim_{n \rightarrow \infty}\|f - \phi_n\|_{\infty} = 0$$
Note that $f - \phi_n$ is maximised at a maximum for $f$, since $\frac{d}{dx} \phi_n(x) \equiv 0$, ignoring the points of discontinuity. Denote argmax $f(x)$ as $x^*$ which must belong to some interval $I_i$, then $\|f - \phi_n\|_\infty = f(x^*) - \inf\limits_{x \in I_i}f(x)$. As $n \rightarrow \infty$ the interval $I_i$ containing $x^*$ shrinks and approaches $x^*$ itself, giving $$\lim_{n \rightarrow \infty}\|f - \phi_n\|_{\infty} = f(x^*) - \lim_{n \rightarrow \infty}\inf\limits_{x \in I_i}f(x) = f(x^*) - f(x^*) = 0$$
I am also wondering if this technique still works for constructing a uniformly convergent sequence of over estimates as $\phi_n \big|_{I_i} := \sup\limits_{x \in I_i}f(x)$, with the proof being $f - \phi_n$ is maximal at a minimum of $f$.