Why is $U_f \leq 0$ and $L_f\geq 0$? 

Could someone please explain me if my thinking is correct?
Since $U_f= \text{inf}\{\int_a^b: \psi \in S[a,b] \text{ and } \psi(x) \geq f(x) \forall x \in [a,b]\}$ then 
$U_f=\text{inf}\{2^{-N}\}=0$
Now, I'm not quite sure how to interpret how they get $L_f$
What my thinking is $L_f= \text{sup}\{\int^b_a\psi=2^{-N}\}=1$
But they get $L_f=0$. I am not sure why exactly. For $U_f$ they use step functions $\psi(x)$ which are bigger than $f(x) \forall x \in [a,b]$ so this means all the values of the step function would have to be equal to $\geq 1$. (I know this is not correct thinking, so please tell what i'm doing wrong here). And for $L_f$ they use step function $\psi(x)$ which takes values which are all smaller than those of $f(x)$. So this means $L_f$ should be $0$. I'm confused at this point, so if anyone could tell me what i'm doing incorrect, that would be great.
 A: See, $U_f = \inf\{\int_a^b \psi : \psi \in S[a,b] , \psi \geq f\}$, and similarly $L_f = \sup\{\int_a^b \phi : \phi \in S[a,b], \phi \leq f\}$. Let us call :
$$
T = \left\{\int_a^b \psi : \psi \in S[a,b] , \psi \geq f\right\}
 \\R = \left\{\int_a^b \phi : \phi \in S[a,b], \phi \leq f\right\}
$$
so that $U_f = \inf T$ and $L_f = \sup R$.
See, $\psi(x) \geq f(x)$ is a pointwise statement. So we are looking for step functions $\psi$, such that at each point, we have $\psi \geq f$. So for example, $\psi(0.25) > f(0.25)$ and so on. However, this does not mean that every value of $\psi$ must be bigger than $1$ : for example, $f(0.7) = 0$, so it is enough if $\psi(0.7) \geq 0$. However, it is true that $f(1) = 1$ so $\psi(1) \geq 1$, for example.
You can easily see that the given $\varphi_n$ satisfy these conditions, because $f(x) \leq 1$ for all $x$, so it satisfies the condition on $[0,2^{-N}]$, and is equal to $f$ after that, so it anyway satisfies the condition.
From the functions $\psi_n = \varphi_n$ described in the text, we know that $2^{-N} \in T$ for every $N$, therefore, $\inf T$ must be smaller than all these, hence must be at most zero. Therefore, $U_f \leq 0$.
Your thinking of $L_f$ is wrong, because the functions $\varphi_n$ don't belong to those described in $R$! So those numbers $2^{-N}$ don't belong in $R$, hence your thinking goes wrong. You need something to belong in $R$, to make a conclusion about $L_f$.
However, note that taking the $0$ step function, we know that $\int_a^b 0 = 0 \in R$. Therefore, $L_f$, which is $\sup R$, must be at least $0$.
Lastly, we know that $U_f \geq L_f$, because for every $\psi$ described in $T$ and every $\phi$ described in $R$, we have $\psi \geq f \geq \phi$, so in particular $\int_a^b \psi \geq \int_a^b \phi$. Thus, every element of $T$ is bigger than every element of $R$, so every element of $T$ is an upper bound of $R$, so $\inf T$ is also an upper bound of $R$, the same as saying $\inf T \geq \sup R$ or $U_f \geq L_f$.
Finally, we have $0 \geq U_f \geq L_f \geq 0$. This can happen only if all these are equal i.e. $0 = U_f = L_f$, in which case the function is integrable and has integral zero.
