Equivalent definition of a convex function Let $H\subset \mathbb{R}^p$ be convex. We say that the function $f:H\to\mathbb{R}$ is convex on the set $H$ if for every $x,y\in H$, the single-variable function $t\mapsto f(x+t(y-x))$ is convex on the interval $[0,1]$.
The author also says $f$ is convex on $H$ if $f((1-t)x+ty)\le(1-t)f(x)+tf(y)$ for every $x,y\in H$ and $t\in[0,1]$.
Are the two definitions equivalent? Especially I am not sure how to prove the second one implies the first one.
 A: Observe that
\begin{align}
f~\textrm{is convex} &\iff (\forall x \in H)(\forall y \in H)(\forall \alpha \in \,]0,1[) ~~ f(\alpha x + (1 - \alpha)y) \leq \alpha f (x) + (1 - \alpha) f(y) \\
&\iff (\forall x \in H)(\forall y \in H)(\forall \alpha \in \,]0,1[) ~~ f(\alpha ( x - y ) + y) \leq \alpha f (x) + (1 - \alpha) f(y) \\
&\iff (\forall x \in H)(\forall y \in H)(\forall \alpha \in \,]0,1[) ~~ f(\alpha ( x - y ) + y) \leq \alpha ( f (x) - f(y) ) + f(y) \\
&\iff (\forall (x,y) \in H^2)(\forall \alpha \in \,]0,1[)(\forall (\alpha_1,\alpha_2) \in [0,1]^2) \\
&~~~~~~~~~~ f([\alpha (\alpha_1 - \alpha_2) + \alpha_2] ( x - y ) + y) \leq \alpha ( f (\alpha_1 (x - y) + y) - f(\alpha_2 (x - y) + y) ) \\ 
& ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ f(\alpha_2 (x - y) + y) \\
&\iff (\forall x \in H)(\forall y \in H) ~~ F : \alpha \mapsto f (\alpha(x - y) + y) ~~ \textrm{is convex on}~\,]0,1[.
\end{align}
Note a few things in the above:

*

*$\alpha_1 (x - y) + y$ is an element of the "line" $[x,y]$ for $\alpha_1 \in [0,1].$ Hence, any $x \in H$ can be written as such (the same goes for any $y \in H$).

*$\alpha (\alpha_1 - \alpha_2) + \alpha_2$ is an element of the "line" $]\alpha_1,\alpha_2[$ for $\alpha \in \, ]0,1[.$ Hence, if $\alpha_1$ and $\alpha_2$ are in $[0,1],$ $]\alpha_1,\alpha_2[$ is in $]0,1[.$
