Continuous Midpoint-Convex Function is Convex

Theorem
Let $f$ be a real function which is defined on a real interval $I$.

Let $f$ be midpoint-convex and continuous on $I$.

Then $f$ is convex.