I'm having trouble proving the following proposition, which is "left to the reader".
Let $f:[a,b]\to \mathbb{R}$ be a bounded function. Let us define $$s(f) := \left\{\int \phi : \phi \text{ is simple, } \phi \leq f\right\}$$ $$S(f) := \left\{\int \phi : \phi \text{ is simple, } \phi \geq f\right\}$$ and $$\underline\int f := \sup s(f)$$ $$\overline\int f := \inf S(f).$$ Show that $f$ is Lebesgue measurable iff $\underline\int f = \overline\int f$.
Supposing that $f$ is Lebesgue measurable, I thought of approximating $f$ using two sequences of simple functions converging "from above" and "from below" to $f$, and evaluate the error in the approximation, but I couldn't develop this idea any further.
If we assume $$\underline\int f = \overline\int f, $$ or $\inf S(f) = \sup s(f)$ we can find simple functions $\phi_k \in S(f)$ and $\psi_k\in s(f)$ such that $\phi_k - \psi_k \to 0$ as $k \to \infty$. As, by definitions, $$ \psi_k \leq f \leq \phi_k$$ for all $k$, we have a sequence $\{ \phi_k \}_k$ of simple (and hence measurable) functions converging to $f$ pointwise. That a pointwise limit of Lebesgue measurable functions is also Lebesgue measurable is a well-known result.