# Prove $E_r = \{z \in \mathbb{C} \text{ }|\text{ } |z - w| \leq r \text{ for some } w \in E \}$ is compact, where $E$ is compact.

I am reading a complex analysis book.

There is the following proposition in the book.

Let $$E$$ be a compact set in the complex plane $$\mathbb{C}$$.
Let $$r$$ be a positive real number.
Let $$E_r = \{z \in \mathbb{C} \text{ }|\text{ } |z - w| \leq r \text{ for some } w \in E \}$$.

Then, $$E_r$$ is a compact set.

Proof:

Since $$E$$ is compact, there exists $$R > 0$$ such that $$E \subset D(0, R) := \{z \in \mathbb{C} | |z - 0| < R\}$$.
Since $$E_r \subset D(0, R + r)$$, $$E_r$$ is bounded.
If $$z \in \mathbb{C} - E_r$$, then $$|z - w| > r$$ for all $$w \in E$$.
So, $$\mathbb{C} - E_r$$ is open.
So, $$E_r$$ is closed.

So, $$E_r$$ is compact.

But I don't think it is obvious that $$\mathbb{C} - E_r$$ is open.

So I proved that $$\mathbb{C} - E_r$$ is open as follows.

1. Let $$E$$ be a compact set in $$\mathbb{C}$$.
$$E \ni z \to |z - a| \in \mathbb{R}$$ is continuous.

2. Let $$\operatorname{dist}(z, E) := \min \{|z - w| | w \in E\}$$.
$$\mathbb{C} \ni z \to \operatorname{dist}(z, E) \in \mathbb{R}$$ is continuous.

3. Let $$z_0 \in \mathbb{C} - E_r$$.
Then, $$\operatorname{dist}(z_0, E) > r$$.
Since $$\operatorname{dist}(z, E)$$ is continuous, $$|z - z_0| < \delta \implies r < \operatorname{dist}(z, E)$$ for some posivitve real number $$\delta$$.
So, $$|z - z_0| < \delta \implies z \in \mathbb{C} - E_r$$ for some posivitve real number $$\delta$$.

I don't think it is obvious that $$\mathbb{C} - E_r$$ is open.

Is this fact really obvious? We don't need to prove this fact?

The set $$E_r$$ is equal to $$\{z\in\mathbb C\mid d(z,E)\leqslant r\}$$. Since the map $$z\mapsto d(z,E)$$ is continuous and $$E_r$$ is the inverse image of $$[0,r]$$ by that map, $$E_r$$ is a closed set.
The criterium used is (probably) the following : a set $$U$$ is open iff for all $$x\in U$$, one can find an open neighborhood $$V$$ of $$x$$ that's contained in $$U$$.
So, $$\mathbb{C} \setminus E_r$$ is open since for any $$z \in \mathbb{C} \setminus E_r$$, the open ball of center $$z$$ and radius $$r$$ is contained in $$\mathbb{C} \setminus E_r$$.