I'm trying to show that given $C$, a closed set:
C is convex $\Leftrightarrow \forall \{x,y\} \subseteq C: \frac{1}{2}x + \frac{1}{2}y \in C$
But i'm stuck at the $\leftarrow$ part. I'm trying to prove by contradiction:
$C$ is closed, $\forall \{x,y\} \subseteq C: \frac{1}{2}x + \frac{1}{2}y \in C$ and $C$ is not convex.
If $C$ is not convex, $\exists \lambda \in [0,1], x,y \in C: \lambda x+(1-\lambda)y \notin C$
But can't see how to proceed. An alternative approach that i thought was saying that if i take the average point between $x$ and $y$, infinitely(since $\forall \{x,y\} \subseteq C: \frac{1}{2}x + \frac{1}{2}y \in C$) then the whole segment between $x$ and $y$ belongs to $C$, hence $C$ is convex. But i'm not sure this is true(i think that maybe there are gaps between $x$ and $y$).
What's the best approach? Thanks in advance.