Say that a function $f$ defined on $\mathbb{Q}^n$ is midpoint convex if $f((x+y)/2) \le (f(x) + f(y))/2$. Say that it is rationally convex if, for $\lambda \in \mathbb{Q} \cap [0,1]$ and $\bar \lambda = 1-\lambda$, we have $f(\lambda x + \bar\lambda y) \le \lambda f(x) + \bar\lambda f(y)$.

Clearly every rationally-convex function is midpoint-convex.

Question: Is a midpoint-convex function on $\mathbb{Q}^n$ necessarily rationally-convex?

Background: I'm looking for sufficient conditions for a function on $\mathbb{Q}^n$ to extend to a continuous function on $\mathbb{R}^n$. The following results are known and/or easy:

  • Rationally-convex functions on $\mathbb{Q}^n$ are continuous; similarly real-convex functions on $\mathbb{R}^n$ are continuous. (I'm sticking to "proper" functions, with real values, for convenience.)

  • Using the axiom of choice, there are rationally-convex functions on $\mathbb{R}$. (Take a $\mathbb{Q}$-basis of $\mathbb{R}^n$ and go from there.)

  • Every rationally-convex function $f$ on $\mathbb{Q}^n$ extends continuously to a real-convex function. (Define the extension to be the $\liminf$ of the nearby rational values, and check the result is convex.) As a result, every rationally-convex function on $\mathbb{Q}^n$ extends to a continuous function on $\mathbb{R}^n$.

  • Every measurable, midpoint-convex function on $\mathbb{R}^n$ is continuous. (Attributed by Wikipedia to Sierpinski, I have not read the reference. There are many prior questions on MathOverflow that are answered by this theorem.)

These all seem like it should be implying midpoint-convex implies rationally-convex, but I couldn't quite close the loop.

In the case I'm actually interested in, this is a side issue, since my function $f$ is additionally (rationally)-homogeneous, and homogeneous and midpoint-convex implies rationally-convex. But I was curious and could not find it in the literature.

  • 1
    $\begingroup$ Midpoint convexity implies the convexity condition for dyadic $\lambda$. Why is it not possible to use the same kind of liminf-extension directly from dyadic numbers to $\mathbb{R}^n$ without the intermediate step of $\mathbb{Q}^n$? After all, dyadic numbers are also dense in $\mathbb{R}$ just like $\mathbb{Q}$ is. $\endgroup$ Dec 3, 2019 at 0:19
  • $\begingroup$ @JohannesHahn I was not able to prove continuity (on the dyadics) with midpoint (aka dyadic) convexity. Thus I don't know how to show liminf-extension is an extension. $\endgroup$ Dec 3, 2019 at 1:16

1 Answer 1


Assume that $g$ defined on $\mathbb{Q}^n$ is midpoint convex. First we show that we can extend the midpoint inequality to arbitrary means:

$g((x_1+\dots+x_m)/m)\leq (g(x_1)+\dots+g(x_m))/m$ for any $m\in\mathbb{Z}_{\geq1}$

We can easily prove this for $m=2^k$ by using midpoint convexity $k$ times.

For general $m\leq 2^{i}$ you take $x_1,\dots,x_m$ plus $2^i-m$ copies of $x'=(x_1+\dots+x_m)/m$

This gives $$g(x')=g\left(\frac{(2^i-m)x'+x_1+\cdots+x_m}{2^i}\right) \le\frac{(2^i-m)g(x')+g(x_1)+\dots+g(x_m)}{2^i},$$ which implies $g(x')=g((x_1+\dots+x_m)/m) \leq (g(x_1)+\dots+g(x_m))/m$ for any $m\in\mathbb{Z}_{\geq1}$.

Finally, taking $a$ copies of $x$ and $b$ copies of $y$ we obtain $$g(\frac{ax+by}{a+b})\leq \frac{ag(x)+bg(y)}{a+b}=\left[\frac{a}{a+b}\right]g(x)+\left[\frac{b}{a+b}\right]g(y)$$ for $a,b\in \mathbb{Z}_\geq0$ not both zero and hence that $g$ is rationally convex.

  • 1
    $\begingroup$ Ivan's proof feels like a classic! $\endgroup$
    – Wlod AA
    Dec 3, 2019 at 7:32
  • $\begingroup$ @WlodAA Thank you! The underlying idea though is not mine - I learnt it from a striking proof of the AM-GM inequality which uses exactly the same substitution to go back from powers of 2. The AM-GM inequality can be proved from Jensen's inequality for convex functions hence the connection I guess. $\endgroup$
    – Ivan Meir
    Dec 3, 2019 at 12:30
  • $\begingroup$ Beautiful, thank you! I'm curious to see that AM-GM proof. I guess you prove AM-GM for just 2 variables first and then go from there? $\endgroup$ Dec 3, 2019 at 15:27
  • $\begingroup$ Ivan, I had an association with the old Cauchy's proof of am-gm. You played this theme very nicely, I have enjoyed your clean and simple proof. $\endgroup$
    – Wlod AA
    Dec 3, 2019 at 15:46
  • 2
    $\begingroup$ @DylanThurston Yes, basically you just need the 2 variable case and it works out the same from there. I think I read it in "Inequalities" by Hardy, Littlewood and Polya. (I just checked it's there on p 17 of the 2nd edition!) $\endgroup$
    – Ivan Meir
    Dec 3, 2019 at 16:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.