If for each $x,y \in A$ , $\frac{x}{2} + \frac{y}{2} \in A$ and $A$ is closed set then $A$ is convex. If for each $x,y \in A$ ,   $\frac{x}{2} + \frac{y}{2} \in A$ and $A$ is closed set then $A$ is convex. How to prove? 
For a example of non convex set which is not closed and holds the condition is the set of rational numbers of $[0,1]$ segment.

Proof sketch: You want to show that $\lambda x +(1-\lambda)y\in A$ for all $x,y\in A$ and $0\le \lambda \le 1$. The condition gives that to you for $\lambda = 1/2$. By repeatedly applying the case $\lambda = 1/2$ you get that the convexity condition holds for certain diadic $\lambda$. From that you get the general convexity condition by continuity (which is where you will utilize the fact that $A$ is closed). 
