I am currently reading Measure, Integration & Real Analysis by Sheldon Axler, and am working through the practice problems. In particular, I am on this problem right now:
Suppose $f:[a,b]\to\mathbb{R}$ is a bounded function, such that $L(f,P,[a,b])=U(f,P,[a,b])$, for some partition $P$ of $[a,b]$. Prove that $f$ is a constant function on $[a,b]$.
My intuition tells me that for the Riemann sums to be same, over every subinterval $[x_{j-1},x_j]$, $\inf_{[x_{j-1},x_j]} f=\sup_{[x_{j-1},x_j]}f$. Therefore, the function is constant over every subinterval. But there is nothing to say this has to be the same constant. Consider the function $f:[0,2]\to\mathbb{R}$, defined by:
$f(x)=\left\{\begin{array}{ll}1&\text{if }x\ge1,\\0&\text{if }x<1\end{array}\right.$
In this case, both the lower and upper Riemann sum will always be equal. But the function is not constant. I assume I am missing something here, but I don't know what. I already read this thread: If $U(f,P) = L(f,P)$, show that $f$ is constant., but it did not bring me much clarity, as the argument presentend was the same one I'd already made.