Solution (source code)

= Solution
{c}

The <extreme value theorem> gives finite <real numbers>
$$
\alpha=\min_{x\in[a,b]}f(x),\qquad\beta=\max_{x\in[a,b]}f(x),\qquad\alpha\leq\beta.
$$
Since these values are attained, the <set> of strict <upper bounds> in the definition of $M$ is precisely $(\beta,\infty)$, and the <set> of strict <lower bounds> in the definition of $m$ is precisely $(-\infty,\alpha)$. They are nonempty and bounded on the required sides. By the definitions of <infimum> and <supremum>,
$$
\boxed{M=\inf(\beta,\infty)=\beta,\qquad m=\sup(-\infty,\alpha)=\alpha,\qquad m\leq M.}
$$