Let $f_{\ell}'\leq f_r'$ in $(a,b)$ and $\forall x_1 < x_2$ in $(a,b)$ it holds that $f_r'(x_1)\leq f_{\ell}'(x_2)$. Then it follows that $f$ convex in $(a,b)$.
$f_{\ell}', f_r'$ are the one-sided derivatives.
I found a hint in the notes for the proof of this statement:
Generalize Rolle's Theorem and then IVT as follows:
Let $f$ be continuous on $[a,b]$ and the one-sided derivatives exist for each $x\in (a,b)$.
Then
(i) If $f(a)=f(b)$ then there is a $\xi\in (a,b)$ such that $f_{\ell}'(\xi)f_r'(\xi)\leq 0$
(ii) $\exists \xi\in (a,b)$ : $\lambda_1(a,b)$ is between $f_{\ell}'(\xi)$ and $f_r'(\xi)$.
Then apply the following proposition:
If $f$is defined in an interval $I$, then $(a)\iff (b)\iff (c)$:
(a) $f$ is convex
(b) $\lambda_1$ is increasing as for $x_1$ and $x_2$
(c) $\lambda_2\geq 0$
It holds that $$\lambda_2=\frac{\frac{f(x_1)-f(x_3)}{x_1-x_3}-\frac{f(x_3)-f(x_2)}{x_3-x_2}}{x_1-x_2}$$
$$$$
Could you explain to me how we could use that? I haven't really understood that.
Nothing is said about the existence of a second derivative. So, our argument can't rely on that.
First, it follows that $f$ is continuous on $(a,b)$. Can you see why?
Next, we need a version of the mean value theorem which applies to functions with one-sided derivatives. Let $f$ be continuous on the interval $[p,q]$ and have one-sided derivatives in the interior $(p,q)$. Then there exists a number $r\in(p,q)$ such that $\frac{f(q)-f(p)}{q-p}$ lies between $f'_-(r)$ and $f'_+(r)$. (I'm using $f'_-$ and $f'_+$ instead of $f'_\ell$ and $f'_r$.) The proof is similar to that of the standard mean value theorem. Define $$F(x)=f(x)-\frac{f(q)-f(p)}{q-p}x $$ $F$ is continuous on $[p,q]$ and it has one-sided derivatives $$F'_\pm(x)=f'_\pm(x)-\frac{f(q)-f(p)}{q-p} $$ and $F(p)=F(q)$. Now apply a generalization of Rolle's theorem to conclude.
Suppose $x_1<x_2<x_3$ are in the interval $(a,b)$. Using the theorem above, it follows that there exist $c\in(x_1,x_2)$ and $d\in(x_2,x_3)$ such that $\frac{f(x_2)-f(x_1)}{x_2-x_1}$ lies between $f'_-(c)$ and $f'_+(c)$, and $\frac{f(x_3)-f(x_2)}{x_3-x_2}$ lies between $f'_-(d)$ and $f'_+(d)$. Using the given hypotheses (note $c<d\,$), it follows that $$f'_-(c)\leq \frac{f(x_2)-f(x_1)}{x_2-x_1}\leq f'_+(c)\leq f'_-(d)\leq \frac{f(x_3)-f(x_2)}{x_3-x_2} \leq f'_+(d) \\ \Rightarrow \frac{f(x_2)-f(x_1)}{x_2-x_1}\leq \frac{f(x_3)-f(x_2)}{x_3-x_2}$$ The last inequality is an equivalent definition of convexity in an interval (see here, for instance).