I am trying to prove this statement:
Let:
- $X,Y$ be compact sets
- $d$ be a distance metric on $X$
- $S\subset X$ be closed and bounded
- $f:X\rightarrow Y$ be a function
- $B_{\delta}(x)$ denote the open $\delta$-ball around $x\in X$, defined by $B_{\delta}(x)=\{x':d(x,x')<\delta\}$.
If;
$ \forall s\in S, \exists \epsilon_s>0$ such that $f$ is continuous and bounded on $B_{\epsilon_s}(s)$
Then;
$f$ is continuous and bounded on $S$.
I was given this in an exercise from some old lecture notes (I don't think I am allowed to share them on here as they were someones private notes). I think it needs an $\epsilon-\delta$ argument as it must use the fact that the balls are open and therefore they must overlap.
I thought about using some sort of boundedness theorem and saying a union of the balls contains a closed region over which $f$ must be continous and therefore bounded. But I am confused and don't think this works. I have spent a lot of time on this already and feel like I am now going back and forth on the argument.
For the continuity there is no problem, as it is a local feature. More precisely, let $s \in S$. For every $V$ neighborhood of $f(s)$ there exists $U$ neighborhood of $s$ inside $B_{\epsilon_s}(s)$ such that $f(U) \subset V$. Then $U$ is also a neighborhood of $s$ in $S$, so $f : S\to Y$ is continuous.
For every $s \in S$ let $\epsilon_s$ as in the hypothesis. Then $\{B_{\epsilon_s}\}_{s \in S}$ is an open cover of $S$, and we can select $s_1, \dotsc, s_n$ finitely many points such that $S \subset B_{\epsilon_{s_1}} \cup \dotsb \cup B_{\epsilon_{s_n}}$. Hence, $f$ will be continuous and bounded on $B_{\epsilon_{s_k}}$ for every $k = 1, \dotsc, n$.
Let $M_k = \max \{|f(x)| : x \in B_{\epsilon_{s_k}}\}$ and $M = \max \{M_1, \dotsc, M_n\}$. Then $|f(x)| \leq M$ for every $x \in S$, since every $x$ belongs to one of the selected balls.