For a compact set $S$ covered with a finite number of neighborhoods, why is the following inequality true? Let $S$ be a compact set which is covered by a finite number of neighborhoods $N(a_i,r_i)$ with $i=\{1,2,\cdots,k\}$, i.e., $S\subset{N(a_1,r_1)\cup{N(a_2,r_2)}\cdots\cup{N(a_k,r_k)}}$. Let $x,y\notin {S}\cap{N(a_i,r_i)}$, how to show that $\|x-y\|\geq\underset{i}{\min}r_i$ ?
Any thoughts or suggestions are greatly appreciated.

Let me write the actual question presented in the book "Nonlinear Systems" By H. K. Khalil.
Let $f:\mathbb{R}^{n}\to\mathbb{R}^{n}$ be locally Lipschitz in a domain $D\in\mathbb{R}^{n}$. Let $S\subset{D}$ be a compact set. Show that there is a positive constant $L$ such that for all $x,y\in{S}$,
\begin{equation}
\|f(x)-f(y)\|\leq{L}\|x-y\|. \tag{1}
\end{equation}
Hints were provided with this excercise problem, which are stated as follows.
Hints: Consider the following two cases separately

*

*$x,y\in{S}\cap{N(a_i,r_i)}$ for some $i$.


*$x,y\notin {S}\cap{N(a_i,r_i)}$ for any $i$; in this case, $\|x-y\|\geq\underset{i}\min{r_i}$.
In the second case, use the fact that $f(x)$ is uniformly bounded on $S$.
My original question was particularly related to this second case and I am not sure how come $\|x-y\|\geq\underset{i}\min{r_i}$ for this case.
 A: A somewhat different approach: for each $x\in S,$ there is a nbhd $U_x$ such that $y\in U_x\Rightarrow |f(y)-f(x)|\le L_x|y-x|.$ Let $\delta>0$ be the Lebesgue number for the cover $\{U_x\}_{x\in S}$. Set $F(x,y)=\frac{|f(y)-f(x)|}{|y-x|}.$ Now, $F$ is bounded on $A:=S\times S\cap\{(x,y):|x-y|<\delta\}$ by the local Lipschitz hypothesis and has a finite maximum on the compact set $B:S\times S\cap\{(x,y):|x-y|\ge\delta\}.$ Since $A\cup B=S\times S$, the result follows.
A: I think the statement wants to say something else (but similar), and it comes from some previous work. Let's see it.
Since $S$ is compact and $f$ is continuous we can set $M=\underset{x\in S}\max\|f(x)\|$. Let $x\in S$; there has to be some $r>0$ such that $f$ is lipschitz in $\overline N(x,r)$. Then there exists some $L>0$ such that for every $y,z\in\overline N(x,r)$ we have $\|f(y)-f(z)\|\le L\|y-z\|$. We could do this for every $x\in S$, each one accompanied by some radius $r_x$ and some lipschitz constant $L_x$. Now, $\{N(x,\frac{r_x}{2}):x\in S\}$ is an open cover of $S$, so it has to have a finite subcover $\{N(x_i,\frac{r_i}{2})\}_{i\in I}$ (with $I$ finite).
Let $\;r=\frac{1}{2}\underset{i\in I}\min r_i,\quad$ $L'=\underset{i\in I}\max L_i,\quad$ $L_S=\max\left(L',\dfrac{2M}{r}\right)$.
Given $y,z\in S$, if there is some $i_0\in I$ such that $y,z\in N(x_{i_0},r_{i_0})$ then $y,z\in\overline N(x_{i_0},r_{i_0})$, so $\|f(y)-f(z)\|\le L_{i_0}\|y-z\|\le L'\|y-z\|\le L_S\|y-z\|$.
On the other hand, if there is no $i\in I$ such that $y,z\in N(x_i,r_i)$ then $\|y-z\|\ge r$, because otherwise: if $\|y-z\|<r$, since $y,z\in S$ there has to be some $i_1$ such that $y\in N(x_{i_1},\frac{r_{i_1}}{2})$ (and another one for $z$, but we don't need it).
Then $\|z-x_{i_1}\|\le\|z-y\|+\|y-x_{i_1}\|<r+\frac{r_{i_1}}{2}\le \frac{r_{i_1}}{2}+\frac{r_{i_1}}{2}=r_{i_1}$, so $z\in N(x_{i_1},r_{i_1})$. But $y$ and $z$ weren't in the same ball! Then we must have $\|y-z\|\ge r$.
In that case $\dfrac{\|f(y)-f(z)\|}{\|y-z\|}\le\dfrac{\|f(y)\|+\|f(z)\|}{r}\le\dfrac{2M}{r}\le L_S$.
So, in any case, for $y,z\in S$ we have that $\|f(y)-f(z)\|\le L_S\|y-z\|$, and then $f$ is lipschitz in $S$.
