Compactness and connectedness, existence of connected set Let $X$ a compact metric space. Show that if $a,b \in X$ such that for every $r > 0$ exists $\{ x_0 = a, x_1, \dots, x_n = b \} \subseteq X$, such that $d(x_i, x_{i+1}) < r$ for every $i \in \{0,1,\dots, n-1\}$, then exits a conected set $L$ in $X$ such that $\{a,b\} \subseteq L$.
$\textit{Hint:}$ For every $r = 1/n$ exists $E_n = \{ x_0^n = a, x_1^n, \dots, x_{m_n}^n = b \}$, define $L = \{ x \in X \mid \exists (x_{n_k}), s.t. x_{n_k} \in E_{n_k}, (x_{n_k}) \to x \}$.
Could someone help me. If I suppose that L is disconnected, I don't know how to arrive at a contradiction.
 A: Define $E_n$ and $L$ as in the hint, with one clarification: we require $n_k$ to be a strictly increasing sequence.
$$ S_n = (a=x_0^n, x_1^n, \ldots, x_{m_n}^n = b) $$
$$ E_n = \{x_0^n, x_1^n, \ldots, x_{m_n}^n\} $$
where $$|x_i^n-x_{i+1}^n| < \frac{1}{n}, \forall (0 \leq n \leq m_n-1)$$
$$ L = \{ x \in X: \exists (n_k) \in \mathbb{N}^\mathbb{N}\, \exists (x_k) \in X^\mathbb{N}\, \Big(\big(\forall k\in \mathbb{N}\, (n_k < n_{k+1} \land x_k \in E_{n_k})\big) \land (x_k) \to x\Big) \} $$
Since $\{a,b\} \subset E_n$ for each $n$, the sequences $(a,a,\ldots) \to a$ and $(b,b,\ldots)$ show that $a \in L$ and $b \in L$.
Suppose by way of contradiction that $L$ is not connected. Then there exist open sets $U$ and $V$ with $L \subset U \cup V$, $L \cap U \neq \emptyset$, $L \cap V \neq \emptyset$, and $U \cap V = \emptyset$. Without loss of generality, assign the names $U$ and $V$ so that $a \in U$.
Since $L \cap V \neq \emptyset$, there is some point $y \in L \cap V$. As $V$ is open, there exists a $\delta_y > 0$ such that $B(y, \delta_y) \subseteq V$. As $y \in L$, there is a converging sequence $(y_k) \to y$ where $y_k \in E_{n_k}$ for some increasing sequence $n_k$. There must be an infinite number of $y_k$ elements with $|y_k-y| < \delta_y$, which implies $y \in B(y,\delta_y)$ and $y_k \in V$, so $E_{n_k} \cap V \neq \emptyset$.
Now let $(n_k)$ be the increasing sequence of all indices such that $E_{n_k} \cap V \neq \emptyset$. For each of these, let $v_{n_k}$ be the first element of $S_{n_k}$ with $v_{n_k} \in V$. Since $a \in U$ and $a \notin V$, $v_{n_k}$ is not the first element of $S_{n_k}$; let $u_{n_k}$ be the element previous to $v_{n_k}$ in $S_{n_k}$. Then $u_{n_k} \notin V$, and $|u_{n_k}-v_{n_k}| < \frac{1}{n_k}$. (Despite the name, it's not necessarily true that $u_k \in U$.)
Since $X$ is compact, the infinite sequence $(v_{n_k})$ has some infinite subsequence $(v_{q_k})$ which converges to a point $z \in X$, and with $v_{q_k} \in E_{q_k}$. Therefore $z \in L$, so either $z \in U$ or $z \in V$.
If $z \in U$, then there is a $\delta_z > 0$ such that $B(z,\delta_z) \subseteq U$. But since $(v_{q_k}) \to z$, there are infinitely many $v_{q_k} \in B(z, \delta_z)$ and $v_{q_k} \in V$, so $U \cap V \neq \emptyset$. Contradiction.
If $z \in V$, then there is a $\delta_z > 0$ such that $B(z,\delta_z) \subseteq V$. Since $(v_{q_k}) \to z$, there is a natural $N_1$ so that $q_k>N_1 \implies |v_{q_k}-z| < \delta_z/2$. If $q_k > 2/\delta_z$ then $|u_{q_k}-v_{q_k}| < \delta_z/2$. So for any $k$ where $q_k > \max(N_1, 2/\delta_z)$, we have
$$ |u_{q_k}-z| \leq |u_{q_k}-v_{q_k}| + |v_{q_k}-z| < \frac{\delta_z}{2} + \frac{\delta_z}{2} = \delta_z $$
so $u_{q_k} \in B(z,\delta_z) \subseteq V$. This contradicts the earlier conclusion $u_{n_k} \notin V$, since $(q_k)$ is a subsequence of $(n_k)$.
