about Euclidean Space Suppose $E_1,E_2 \subseteq  \Bbb R^m$ are closed sets and at least one of them is a bounded set.
Prove that there exist $x_0\in E_1,y_0\in E_2$,such that $\rho (x_0,y_0)=\rho(E_1,E_2)$
Attempt :I think $\rho(E_1,E_2)$ is $\inf\{\rho(x,y)|x\in E_1,y \in E_2\}$
Then for $\epsilon_n =\frac{1}{n}> 0$,there exist $x_n,y_n$,s.t 
$$\rho(E_1,E_2)\ge \rho(x_n,y_n)\ge \rho(E_1,E_2)-\epsilon_n$$
I want to use Weierstrass theorem ,but  this set doesn’t  satisfy the condition of the theorem.
can someone see my prove is right or not
prove
Now for $\epsilon_n =\frac{1}{n}> 0$,there exists $\{y_n\}\in E_2,\{x_n\}\in E_1$,such that 
$$\rho(E_1,E_2)\le \rho(x_n,y_n)\le \rho(E_1,E_2)+\epsilon_n.$$ 
Since $x_n$ is bounded,$\rho(x_n,x_m)\le M$
Also note that
\begin{align}
 \rho(y_n,y_m)&\leq \rho(y_n,x_n)+\rho(x_m,y_m)+\rho(x_m,x_n)\\
&\leq 2\rho(E_1,E_2)+2+M,\forall m,n \in \Bbb N.
\end{align}
So $y_n$ has  convergence  sub consequence $y_{n_k}$ converse to $y_0 \in E_2$
So $$\rho(E_1,E_2)\le \rho(x_{n_k},y_{n_k})\le \rho(E_1,E_2)+\epsilon_{n_k}.$$ 
Also  $x_{n_k}$ has  convergence  sub consequence $x_{n_{k_l}}$ converse to $x_0 \in E_1$
so $\rho (x_0,y_0)=\rho (E_1,E_2)$
 A: WLOG,let $E_1$ be a bounded set. By Heine-Borel Theorem, $E_1$ is  compact. Define $f:E_1 \to \Bbb R $ such that  $x\mapsto \rho (x,E_2)$. Clearly, $\rho (E_1,E_2)\leq f(x),  \forall x \in E_1$. Since a continuous function from a compact set attains its bounds, there exists  $x_0 \in E_1$ such that  $f(x_0)=\rho (x_0,E_2)=\rho (E_1,E_2)$.
Now for $\epsilon_n =\frac{1}{n}> 0$,there exists $\{y_n\}\in E_2$,such that 
$$\rho(E_1,E_2)\le \rho(x_0,y_n)\le \rho(E_1,E_2)+\epsilon_n.$$ 
Also note that
\begin{align}
 \rho(y_n,y_m)&\leq \rho(y_n,x_0)+\rho(x_0,y_m)\\
&\leq 2\rho(E_1,E_2)+2,\forall m,n \in \Bbb N.
\end{align}
So  $\{y_n\}$ is a bounded sequence and hence has a convergent sub-sequence. Can you complete the proof? 
A: Now for $\epsilon_n =\frac{1}{n}> 0$,there exists $\{y_n\}\in E_2,\{x_n\}\in E_1$,such that 
$$\rho(E_1,E_2)\le \rho(x_n,y_n)\le \rho(E_1,E_2)+\epsilon_n.$$ 
for $E_1$ is bounded ,and $x_n\in E_1$,so $x_n$ is bounded Since $x_n$ is bounded,$\rho(x_n,x_m)\le M$
Also note that
\begin{align}
 \rho(y_n,y_m)&\leq \rho(y_n,x_n)+\rho(x_m,y_m)+\rho(x_m,x_n)\\
&\leq 2\rho(E_1,E_2)+2+M,\forall m,n \in \Bbb N.
\end{align}
So $y_n$ has a convergent  subsequence $y_{n_k}$ converging to $y_0 \in E_2$.
So $$\rho(E_1,E_2)\le \rho(x_{n_k},y_{n_k})\le \rho(E_1,E_2)+\epsilon_{n_k}.$$ 
Also  $x_{n_k}$ has a convergent subsequence $x_{n_{k_l}}$ converging  to $x_0 \in E_1$. 
So $\rho (x_0,y_0)=\rho (E_1,E_2)$
