Function with some partition such that $\underline{S}(f,P) = \overline{S}(f,P)$ implies that $f$ is constant

27 Views Asked by At

This posts begins with a question for a homework I had, and that question is rather simple:

If $f:[0,1] \rightarrow \mathbb{R}$ is a function and there exists some partition of $[0,1]$ such that $\underline{S}(f,P) = \overline{S}(f,P)$, then $f$ is constant.

I thought that if we define $f$ like this: $$f(x) =\begin{cases} 0 & 0 \leq x\leq \frac{1}{2} \\ 1 & \frac{1}{2} < x \leq 1 \end{cases} $$ And take the partition $P = \{0, \frac{1}{2},1\}$ then we have our counter example, however someone else pointed out that with this partition $\underline{S}(f,P) \neq \overline{S}(f,P)$, because $inf\{f(x)|x \in [\frac{1}{2}, 1]\}= 0 \neq 1 = sup\{f(x)|x \in [\frac{1}{2}, 1]\}$

This person also said that the proposition is true, because if such partition exists then for every subinterval induced by this partition P we would have that $inf\{f(x)|x \in [x_{i -1}, x_i]\}= sup\{f(x)|x \in [x_{i -1}, x_i]\}$, and that would imply that the function is indeed, constant.

So, is that reasoning correct?