Understanding the proof of: Every convex function is continuous I am trying to understand the following proof:

Theorem 2.10. If $f$ is a convex function defined on an open interval $(a, b)$ then $f$ is continuous on $(a, b)$
Proof. Suppose $f$ is convex on $(a, b),$ and let $[c, d] \subseteq(a, b) .$ Choose $c_{1}$ and $d_{1}$ such that
$$
a<c_{1}<c<d<d_{1}<b.
$$
If $x, y \in[c, d]$ with $x<y,$ we have from Lemma 2.9 (see Figure 4$)$ that
$$
\frac{f(y)-f(x)}{y-x} \leq \frac{f(d)-f(y)}{d-y} \leq \frac{f\left(d_{1}\right)-f(d)}{d_{1}-d}
$$
and
$$
\frac{f(y)-f(x)}{y-x} \geq \frac{f(x)-f(c)}{x-c} \geq \frac{f(c)-f\left(c_{1}\right)}{c-c_{1}},
$$
showing the set
$$
\left\{\left|\frac{f(y)-f(x)}{y-x}\right|: c \leq x<y \leq d\right\}
$$
is bounded by $M>0 .$ It follows $|f(y)-f(x)| \leq M|y-x|,$ and therefore $f$ is uniformly continuous on $[c, d] .$ Recalling that uniform continuity implies continuity, we have shown that $f$ is continuous on $[c, d] .$ since the interval $[c, d]$ was arbitrary, $f$ is continuous on $(a, b)$. ${}^2$ $\square$

(transcribed from this screenshot)
My questions:

*

*Where did the modulus values in the expression $\left\{\left|\dfrac{f(y)-f(x)}{y-x}\right|\right\}$ come from?

*What about $M=0$? I think that case should also be addressed, although it is trivial. I think the idea is that if $M=0$, then $f$ is constant and hence continuous. But, how can we show that rigorously?


*

*In this proof we use something equivalent to uniform continuity on a bounded set, namely Lipschitz continuity, and that is also where this expression comes from. One would have to prove that Lipschitz continuity implies uniform continuity but that is often left out, as it is seen as elementary.

*I do not see why $M=0$ would have to be addressed separately, as any function that satisfies the inequality with $M=0$ would satisfy the inequality for any positive $M$.

