I want to prove that a closed subset $F$ of a normed linear space $X$ is convex if and only if $\frac{1}{2}(x+y)\in F$ for all $x,y\in F$.
The necessary part of it is straightforward. But I got stuck at the sufficient part. I have realized that I need to use the fact that $F$ contains all the limit points, but am not in a position to implement my ideas. Please suggest something.
Fix $x,y\in F$. By repeated iteration of $x,y\in F\implies\frac{x+y}{2}\in F$, you obtain that $\lambda x+(1-\lambda)y\in F$ whenever $\lambda=\frac{m}{2^n}$ for $n\in\mathbb N$ and $m\in\{0,1,\ldots,2^n\}$ (these are sometimes called dyadic rationals). Since rationals of this form are dense in $[0,1]$, and $F$ is closed, you are done.