Compact metric space with "midpoint property" is connected Let $X$ be a compact metric space. Suppose for every $x$ and $y$ in $X$ there is a point $m$ in $X$ with $d(x, m) = (1/2)d(x, y)$ and $d(y, m) = (1/2)d(x, y)$. Show that $X$ is connected.
I'm pretty sure the idea is to suppose disconnected, $X=A\cup B $, disjoint clopen, with $x\in A$, $y\in B$, then construct a cauchy sequence of midpoints starting with $(x,y)$, then argue that the limit point (which exists by compactness) can't be in $A$ or $B$, though can't seem to finish it off.
Edit: the previous part of the problem was to show for closed $F$ there exists a $z\in F$ such that $d(x,F)=d(x,z)$, which may or may not be useful
 A: Given $x,y\in X$, we construct a continuous $\gamma\colon [0,1]\to X$ that maps $0$ to $x$ and $1$ to $y$.  Thus connectedness of $[0,1]$ implies $x,y$ are in the same (path-)connected component and we are done.
So using the midpoint property, you have all dyadic fractions $\frac{m}{2^n}$, $0\leq m\leq 2^n$ inductively.  Now this $\gamma$ is (Lipschitz, hence uniform) continuous $\mathbb{Q}_{(2)}\cap[0,1]\to X$, so completeness gives an extension to $[0,1]\to X$.
A: Take an $a_0\in A$ and a $b_0\in B$. Now consider a midpoint $c$. Either $c\in A$ or $c\in B$. If $c\in A$, then set $a_1=c$, otherwise set $b_1=c$.
Continue taking the midpoint between the most recent $a_i$ and the most recent $b_j$, and make that either $a_{i+1}$ or $b_{j+1}$ depending on whether it's in $A$ or $B$.
Use that $A$ and $B$ are open to show that the sequences $a_n$ and $b_n$ are infinite. Use the fact that your space is complete to show they both have limits points. Use the fact that the sequences consist of successive midpoints to show that each sequence only has one limit point and that they have the same limit point. Use the fact that $A$ and $B$ are closed to show that this limit is in both $A$ and $B$.
