Is $\inf\{d(x,F):x\in E\}$ equal to $\inf\{|x-y|:x\in E,y\in F\}$? Let $E,F$ be two non-empty disjoint sets in $\mathbb{R}^n$ and let $|\cdot|$ be the Euclidean norm. As introduced in many textbooks on real analysis, we can define the distance $d(E,F)$ between $E$ and $F$ by
$$d(E,F)=\inf\{|x-y|:x\in E,y\in F\}.$$
I'm wondering if we can find $d(E,F)$ by following a two-step procedure. Specifically, if we define the distance $d(x,F)$ from $x\in E$ to $F$ by
$$d(x,F)=\inf\{|x-y|:y\in F\},$$
then does
$$\inf\{d(x,F):x\in E\}$$
equal $d(E,F)$? I didn't come across a question regarding double infimums before, and this question right here is too abstract for me. Does anyone have an idea? Thank you.
//////////////////////////
Update: I got something!!! Let $\epsilon>0$ be given. If we could verify the following two assertions (1) and (2), then the two infimums in the title would agree!!!
(1) $\forall x\in E$, $d(E,F)-\epsilon<d(x,F)$.
(2) $\exists x\in E$ s.t. $d(E,F)+\epsilon>d(x,F)$.
Assertion (2) can be easily verified by taking $(x,y_0)\in E\times F$ with $d(E,F)+\epsilon>|x-y_0|$ and noting that
$$|x-y_0|\geq\inf\{|x-y|:y\in F\}=d(x,F).$$
Now it remains to show that assertion (1) is true.

It's all the same and you don't have to go so much into the definition of distances to see that. You simply have to show that for a family $(A_i)_{i \in I}$ of subsets of $\mathbb R$ you have
$$\inf_{i \in I} (\inf(A_i)) = \inf \left( \bigcup_{i \in I} A_i \right).$$
