If $S(f,P)$ is any Riemann sum of \begin{align}f:[a,b]\to \Bbb{R},\end{align} then show that there exists a step function \begin{align}\varphi:[a,b]\to \Bbb{R}\end{align} such that \begin{align}\int^{b}_{a}\varphi(x)dx=S(f,P)\end{align}
CURRENT PROOF
The pdf I'm studying gave the following proof.
Let $S(f,P)=\sum^{n}_{i=1}f(t_i)(x_i-x_{i-1}).$ Define \begin{align}\varphi:[a,b]\to \Bbb{R}\end{align} \begin{align}x\mapsto \varphi(x)=f(t_i),\;\text{for}\;x\in[x_i,x_{i-1}],\;1\leq i\leq n\end{align} Then, $\varphi$ is a step function and so, $\varphi\in\mathcal{R}[a,b].$ Thus, \begin{align}\int^{b}_{a}\varphi(x)dx&=\sum^{n}_{i=1}\int^{x_i}_{x_{i-1}}\varphi(x)dx\\&=\sum^{n}_{i=1}\int^{x_i}_{x_{i-1}}f(t_i)dx\\&=\sum^{n}_{i=1}f(t_i)(x_i-x_{i-1})\\&=S(f,P)\end{align}
Here:
$\varphi\in\mathcal{R}[a,b]$ means that $\varphi\in\mathcal{R}[a,b]$ is Riemann integrable over $[a,b]$
I clearly understand others but I don't understand this line "Then, $\varphi$ is a step function and so, $\varphi\in\mathcal{R}[a,b].$" Please, can anyone show me how it is a step function and how $\varphi\in\mathcal{R}[a,b]$"? Would be glad for your answer!
Actually, there should be the semi-open intervals $[x_{i-1},x_i[$ in the definition, rather than those empty closed intervals, otherwise it doesn't even make sense. $\varphi$ is a step function "because I said so": not necessarily in a bossy sense, but in the sense that someone gave the definition somewhere and $\varphi$ is basically written like that definition says.
As for Riemann integrability, if $\varphi$ is a step function and $\phi_1$ is a step function such that $\phi_1\le\varphi$, then the Riemann sum of $\phi_1$ is smaller or equal to the Riemann sum of $\varphi$. Likewise, if $\phi_2$ is a step function such that $\phi_2\ge\varphi$, then the Riemann sum of $\phi_2$ is greater or equal to the Riemann sum of $\varphi$. Therefore, the Riemann sum of $\varphi$ is both the highest lower Riemann sum of $\varphi$ and the least upper Riemann sum of $\varphi$. Thus $\varphi\in \mathcal R[a,b]$.