To find two points in compact metric space satisfying specific property Let $(X,d)$ be a compact metric space.Suppose that for all positive real numbers $t<1$ ,there are points  $x_{t}$,$y_{t}$ such that $d(x_{t},y_{t})=t$.Prove that there are points $x$, $y$ in $X$ such that $d(x,y)=1$.
My thought is to construct a continuous function and then use the compactness to prove the desired result.But I couldn't find the proper function to achieve it.
 A: For each $n \in \Bbb N$, there are $x_n$ and $y_n$ such that $d(x_n, y_n) = 1 - \frac1{n}$. The sequence $\{(x_n,y_n)\}_n \subset X \times X $ has a convergent subsequence $(x_{n_k}, y_{n_k})$, converging to, say, $(x,y)$. We have $d(x, y)  = \lim d(x_{n_k}, y_{n_k}) = \lim\left( 1 - \frac1{n_k} \right) = 1$
Note that when $X \times X$ is equipped with the max metric, and $(x_n,y_n)$ is a sequence in $X \times X$ converging to $(x,y)$, we have:
$$d(x_n,y_n) \le d(x_n,y) + d(y,y_n)$$
$$d(x_n,y) \le d(x_n,y_n) + d(y_n, y)$$
These give:
$$|d(x_n,y_n) - d(x_n,y)| \le d(y_n,y)$$
Similarly,
$$|d(x_n,y) - d(x,y)| \le d(x_n,x)$$
Thus,
$$|d(x_n,y_n) - d(x,y)| = |d(x_n,y_n) - d(x_n,y) + d(x_n,y) - d(x,y)| \le |d(x_n,y_n) - d(x_n,y)| + |d(x_n, y) - d(x,y)| \le d(y_n, y) + d(x_n,x) \to 0$$
which justifies the last statement in the first paragraph 
A: Let $\{t_n\}$ be a sequence of distinct real numbers such that $t_n < 1$ and $t_n$ converges to 1. For each $n$, find $(x_n,y_n)$ such that $d(x_n,y_n) = t_n$. $X\times X$ is compact and hence complete. The sequence $(x_n,y_n)$ is Cauchy and hence has a convergent sub sequence. If it converges to $(x,y)$, then we have $d(x,y) = 1$
