In doing some old exam questions I came across this. The results are all excruciatingly obvious intuitively, but I have no idea how to formalize a proof for any of them.
Let $(M,d)$ be a metric space. For $A\subseteq M, A \ne \emptyset$ and $x\in M$ we define the distance from x to A as $$dist(x,A):=\inf\{d(x,a):a\in A\}$$ Show the following:
a) If $x,y\in M$ and $r:=\frac{d(x,y)}{2}$, then $dist(x,U_r(y))\ge r$
b) Let $A_1, ..., A_i$ be non-empty subsets of M and let $x\in M$ then $$dist(x,\bigcup_{k=0}^i A_k) = \min \{dist(x,A_j): j\le i\}$$
c) If $K\subseteq M$ is compact and $x\in M\setminus K$, then $dist(x,K)>0$
My best attempt at (a) was using that obviously for every $z\in M\setminus U_r(y)$ $$d(y,z)\ge r$$ but then i still need to prove $x\in M\setminus U_r(y)$
I'm stumped on (b) and (c). I would be grateful for any hints on how to solve these kinds of problems in general as well.
Hints: a) uses the triangle inequality, b) uses that the infimum of a finite set is the minimum of that set, and c) proceed by contradiction using an open cover.
For a), you want to use the idea that $d(x,a) + d(a,y) \leq d(x,y)$ is true for every $a \in U_r(a)$ (which I assume is the open ball of radius $r$ centered at $a$).
For b) use that the infimum of the union of finitely many sets is the minimum of their infima: $\inf(A \cup B) = \min\{\inf A, \inf B\}$. (Warning: need not be true for an infinite collection of sets. Consider $\cup A_k$, $A_k = \{1/k\} \subseteq \mathbb{R}$.)
For c), cover $K$ by open balls of radius $r$ (part a) might help us subsequently) and note that since $K$ is compact, finitely many balls suffice (part b) might help us subsequently). So if $dist(x,K) = 0$, it is always in this cover.