If $C$ is midpoint-convex and closed then it is a convex set 
Midpoint convexity. A set $C$ is midpoint convex if whenever two points $a, b$ are in $C$, the average or midpoint $(a + b)/2$ is in $C$. Prove that if $C$ is closed and midpoint convex, then $C$ is convex.


Convex set means that $\forall x_1, x_2 \in C, \theta x_1+(1-\theta)x_2 \in C \forall \theta \in[0,1]$
I know
$$
\left(x_1+x_2\right)/2 \in C
\implies \dfrac{x_1+\dfrac{x_1+x_2}{2}}{2}= \dfrac{x_1}{2}+\dfrac{x_1}{4}+\dfrac{x_2}{4} = \dfrac{3}{4}{x_1} +  \dfrac{1}{4}{x_2} \in C
$$
Applying this k times I get the following:
$$
(1-2^{-k})x_1+2^{-k}x_2=(1-\theta_k)x_1+\theta_k x_2 \in C
$$
but I have showed it only for $\theta$ values that takes the form of $2^{-k}$ where $k \in N$
What should I do next?
 A: Let $t \in [0, 1]$.
We can construct a sequence of intervals such that $t$ is the only point in their intersection.


*

*$C_0 = [0, 1]$, $t \in X_0$

*Let $X_{i} = [a, b]$.


*

*If $t \in [a, \frac{a+b}{2}]$, then $X_{i+1} = [a, \frac{a+b}{2}]$

*If $t \in (\frac{a+b}{2}, b]$, then $X_{i+1} = [\frac{a+b}{2}, b]$



Obviously, it is a sequence of nested intervals, with $t$ being the only point in their intersection. Also, the bounds of the limits are constructed only taking midpoints of already constructed points. Taking only upper bound of this intervals, we get a sequence ${x_i}$ converging to $t$, and every element of the sequence is either $1$ or midpoint of some previous element of the sequence (and, probably, $0$).
Now, let $C$ be a closed and midpoint-convex set. Take any $a, b \in C$, $t \in [0,1]$. Our goal is to prove that $a (1 - t) + b t \in C$. Construct the discussed sequence $\{x_i\}$. Since $\{x_i\}$ is constructed taking midpoints, $\forall i \quad a (1 - x_i) + b x_i  \in C$. Since $x_i \to t$, $a (1 - x_i) + b x_i \to a (1-t) + b t$. Since $C$ is closed, it contains limits of sequences of its elements. This proves that $a(1-t)+bt \in C$.
