The distance between a point $a \in \mathbb{R}$ and a set $X \subset \mathbb{R}$ is defined as $$d(a,X) := \inf\{|x-a|: x \in X\}.$$ How to prove if $X$ is closed, then there is a $b \in X$ such that $d(a,X) = |b-a|$?
I've constructed a decreasing sequence converging to $d$ as follows: Given $r > d(a,X)$, there is a $x \in X$ such that $|x-a| < r$. Repeating the process with $r_{n+1} := \frac{d+r_n}{2}$ we get the inequality:
$$d \le |x_n-a| < r_n$$
It's easy to prove that $r_n \to d$, and therefore $|x_n-a| \to d$. If i could show the set $A := \{|x-a|: x\in X\}$ is closed, the result would be immediate. This is somehow my second question, is true that for every closed set $X$, the set $|X| := \{|x|: x\in X\}$ is closed?
Be free to contribute alternative proofs, i would appreciate.
EDIT: A simple search just answered my question in the negative, see here. I'll just leave this here though in case anyone else coming across this is curious
– kyp4 Dec 11 '15 at 03:35