I have to prove this statement.
Let A and B be nonempty disjoint subsets of $\mathbb{R}$ where A is closed and B is compact. Then there exist $a \in A$ and $b \in B$ such that $\inf\{|a-b| | a \in A, b \in B\}=|a-b|$.
This is the question in Distance between sets with one closed set and one compact set.
I'm trying to complete the proof referring to the questioner's idea and the two answers, but I'm having difficulty in completing the proof.
Let $E=\{|a-b| | a \in A, b \in B\}$.
And I can find the sequence $\{x_n\}\subset E$ s.t. $\lim x_n=\inf E$, since $E$ is not empty. (If $E$ is not bounded below, I consider $\inf E$ as $-\infty$.)
Since each $x_n$ is in $E$, there exist $\{a_n\}\subset A, \{b_n\}\subset B$ s.t. $x_n=|a_n-b_n|$
(Up to here, the questioner's idea. And from here, I refer to the Hagen's answer.)
From the compactness of $B$, there exists a subsequence $\{b_{n_k}\}$ of $\{b_n\}$ and exists $b\in B$ s.t. $\lim_k b_{n_k}=b.$ ($b$ is called a limit point of $\{b_n\}$.)
Then, the zwim's answer says
$(\ast)$ we can work locally in the disk of center $b$ and radius $r$ (large enough so it intersects $A$ but more importantly contains the convergent part of $(a_n)$)
I have not fully understood this.
Since $\lim_k b_{n_k}=b,$ for all $r>0$, there exists $k_0\in \mathbb N$ s.t. $k\geqq k_0 \Rightarrow |b_{n_k}-b|<r,$ i.e., $k\geqq k_0 \Rightarrow b_{n_k}\in B_r(b)$.
According to $(\ast)$, it appears that I have to choose $r$ so that $B_r(b)$ can interact $A$ and contain the convergent part of $\{a_n\}$.
However, I don't know what "the convergent part of $\{a_n\}$" means.
$\{a_n\}$ is in $A$ and $A$ is not necessarily bounded, so this doesn't necessarily have the convergent subsequence, and I don't know how I should choose $r$ specifically.