Showing infimum of distance between sets is positive I am trying to understand the proof of Lemma 45.1 in Bartle, The Elements of Real Analysis.  The lemma is used to prove that diffeomorphisms map sets with zero content into sets with zero content.  Bartle leaves to reader (with hint that is $\bar{A}$ is compact):

If $\bar{A} \subset \Omega \subset \mathbb{R}^p$ where $\Omega$ is an
open set and $\bar{A}$ is closed and bounded, then $\inf \{ \|a-x\|:
 a\in \bar{A}, x \notin \Omega\}> 0$.

My attempt:  I know $\{ \|a-x\|: a\in \bar{A}, x \notin \Omega\} = \{ \|a-x\|: (a,x) \in \bar{A} \times \Omega^c\}$ where $\Omega^c = \mathbb{R}^p - \Omega$, and the Euclidean norm $\|a-x\|$ is a continuous function of its arguments.  If I knew that $\bar{A} \times \Omega^c$ was compact then I would have the infimum equal to $\|a'-x'\|$ for some point $(a',x')$.  But since $\bar{A} \cap \Omega^c = \emptyset$ we must have $\|a'-x'\| > 0$.
But I am stuck when $\Omega^c$ is not compact.

The key here is to work with the function $a \mapsto d(a, \Omega^c) := \inf\{\|a-x\|:x \in \Omega^c\}$, where it is easy to prove both that
$$\tag{1}\inf\{\|a-x\|: a \in \bar{A}, x \in \Omega^c\}= \inf\{d(a, \Omega^c): a \in \bar{A}\},$$
$$\tag{2} d(\cdot,\Omega^c) \in C(\bar{A})$$
Since $\Omega$ is an open set, for any $a \in \bar{A} \subset \Omega$ there exists $\delta_a > 0$ such that the open ball $B(a;\delta_a)$ is contained in $\Omega$.  If $x \in \Omega^c$, then $x \notin B(a; \delta_a)$ and $\|a-x\| \geqslant \delta_a > 0$.  This implies that $d(a, \Omega^c) \geqslant \delta_a > 0$.
Since $\bar{A}$ is closed and bounded and, hence, compact and the distance function is continuous, there exists $a^* \in \bar{A}$ such that
$$\inf\{\|a-x\|: a \in \bar{A}, x \in \Omega^c\}=\inf\{d(a, \Omega^c): a \in \bar{A}\}= d(a^*,\Omega^c) \geqslant \delta_{a^*} > 0$$
Proof of (2).
To prove that $a \mapsto d(a,\Omega^c)$ is continuous note that for $a_1,a_2 \in \bar{A}$ and any $x \in \Omega^c$, we have, by the reverse triangle inequality
$$d(a_1,\Omega^c)- \|a_1-a_2\| \leqslant \|a_1-x\| - \|a_1-a_2\| \leqslant\|a_2-x\|$$
Thus, $d(a_1,\Omega^c)- \|a_1-a_2\| \leqslant \inf \{\|a_2 - x\|: x \in \Omega^c\} = d(a_2,\Omega^c)$ and after rearranging,
$$d(a_1,\Omega^c) - d(a_2, \Omega^c) \leqslant \|a_1 - a_2\|$$
Whence, switching $a_1$ and $a_2$ leads to
$$|d(a_1,\Omega^c) - d(a_2, \Omega^c)| \leqslant \|a_1 - a_2\|,$$
and it follows that $a \mapsto d(a, \Omega^c)$ is continuous.
