I have a question about the proof of the following lemma from Basic Topology by Armstong, page 39:
(2.13) Lemma. The real-valued function on $X$ defined by $x \mapsto d(x,A)$ is continuous.
Proof
Let $x \in X$ and let $N$ be a neighbourhood of $d(x,A)$ on the real line. Choose $ \varepsilon > 0$ small enough so that the interval $(d(x,A) — \varepsilon, d(x,A) + \varepsilon)$ lies inside $N$.
Let $U$ denote the open ball centre $x$, radius $\varepsilon/2$, and choose a point $ a \in A$ such that $d(x,a) < d(x,A) + \varepsilon/2$.
If $z \in U$ we have $d(z,A) < d(z,a) < d(z,x) + d(x,a) < d(x,A) + \varepsilon$. By reversing the roles of $x$ and $z$ we also have $d(x,A) < d(z,A) + \varepsilon$.
Therefore $U$ is mapped inside $(d(x,A) — \varepsilon, d(x,A) + \varepsilon)$, and hence inside $N$, by our function, showing that the inverse image of Ν is a neighbourhood of χ in Ζ as required.
The question is how do we know we can choose a point $a \in A$ such that $d(x,a) < d(x,A) + \varepsilon/2$? $A$ is simply defined to be a subset of $X$. Surely the subset $A$ of $X$ could be such that there is no such $a$. I have seen an alternative proof using the triangle inequality which I prefer, but I would like to get my head around this one.
If you were right, by definition it would follow that $d(x,A) = \inf \{d(x,a) \mid a \in A\} > d(x,A)+\varepsilon/2$.