# Weak convexity and continuity

For any open interval $(a, b)\subset {\mathbb R}\,$, define a weakly convex function $f:(a, b) \rightarrow {\mathbb R}$ as one for which

$$f(q\;x_0 + (1 - q)\;x_1) \leq q\;f(x_0) + (1-q)\;f(x_1)$$

for all $x_0, x_1 \in (a, b)$, and all $q \in [0, 1] \cap {\mathbb Q}$.

Does this definition of weak convexity imply continuity (in $(a, b)$)?

My intuition says "yes", because hard as I try, I can't see how a function that satisfies the inequality above for all $x_0, x_1,$ and $q$ could have a single point of discontinuity in $(a, b)$.

My attempt to prove this implication, however, has been slippery business. A pointer to a proof would be welcome (assuming, of course, that my intuition is correct).

The book where I found this definition of weak convexity implies (though does not state outright) that weak convexity does not guarantee continuity. If this is the case, I'd love to see a counterexample.

-

Consider $\mathbb R$ as a vector space over $\mathbb Q$. As any vector space, it has a basis $\{v_\alpha\}$ (once again, by the axiom of choice; see Hamel basis). Pick one basis element $v_{\alpha_0}$ and define a $\mathbb Q$-linear map $f:\mathbb R\to\mathbb R$ so that $f(v_{\alpha_0})=2v_{\alpha_0}$ and $f(v_\alpha)=v_\alpha$ for $\alpha\ne \alpha_0$. Since $f$ is $\mathbb Q$-linear, it satisfies $$f(q\;x_0 + (1 - q)\;x_1) = q\;f(x_0) + (1-q)\;f(x_1)\tag{1}$$ for all $q\in \mathbb Q$ and all $x_0,x_1\in\mathbb R$. Yet, it is discontinuous at every non-zero point because both sets $\{x: f(x)=2x\}$ and $\{x:f(x)=x\}$ are dense in $\mathbb R$.