# Continuous function on a compact metric space

The question is:

Suppose $f\colon X\to Y$ is continuous on a compact metric space $X$, $Y$ is a metric space and $C\subset Y$ is closed. Show that for any open neighborhood $U$ of $f^{-1}(C)$ in $X$, there exists an open neighborhood $V$ of $C$ in $Y$ such that $f^{-1}(V)⊂U$.

I have tried to argue that $f^{-1}(C)$ is closed (and hence compact) by continuity of $f$ and compactness of $X$, then $C=f(f^{-1}(C))$ is also compact by continuity of $f$ again.

But the compactness of the two sets seems don't help me very much. Can anyone help me? Thx!

-
Careful if $f$ is not surjective, there's no reason that $C=f(f^{-1}(C))$. – JSchlather Dec 12 '12 at 17:36
But I think $f(f^-1(C))={ f(y) : y∈f^-1(C) }={ f(y) : f(y)∈C }=C$ so $f$ need not to be surjective. – Lawrence Dec 12 '12 at 17:54
Consider $f: [0,1] \rightarrow \mathbb R$ given by $f(x)=x$ what is $f(f^{-1}([5,6]))$? – JSchlather Dec 12 '12 at 17:56
It should be empty set. Thank you for correcting my concept. But then can one state that $f(f^-1(C))⊂C$? Anyway, I can't use the compactness to solve this problem. – Lawrence Dec 12 '12 at 18:02
Yes you always have the inclusion $f(f^{-1}(C)) \subset C$. – JSchlather Dec 12 '12 at 18:04

Let $U$ be an open neighborhood of $f^{-1}(C) \Longrightarrow U^c\cap f^{-1}(C)=\emptyset$.

Then $U^c$ is compact $\Longrightarrow f(U^c)$ is compact $\Longrightarrow$ closed and $C\cap f(U^c)= \emptyset$
(Proof: If $x\in C\cap f(U^c)$ then $x=f(a)$ for some $a\in U^c \Longrightarrow$ $a\in U^c\cap f^{-1}(C)=\emptyset$ ↯).

Now we find $V$ open with $C\subset V$ and $V\cap f(U^c)=\emptyset$.

Show that $f^{-1}(V) \cap U^c=\emptyset$. Therefore $f^{-1}(V)\subseteq U$ .

-
Sorry that I don't even know why $C∩f(U^c)=∅$. Thank for your help and kindly response. – Lawrence Dec 12 '12 at 20:21
If $x\in C\cap f(U^c)$ then $x=f(a)$ for some $a\in U^c$. Then $a\in U^c$ and $a\in f^{-1}(C)$ ↯. – P.. Dec 12 '12 at 20:25
After establishing $f(U^c)$ is closed, then $Y\f(U^c)$ is open in $Y$ and $C⊂Y\f(U^c)$ as $C∩f(Uc)=∅$. So let $V=Y\f(U^c)$, then $f^{-1}(V)⊂U$? My Claim: $x∈f^{-1}(V) => f(x)∈Y\f(U^c) => f(x)∉f(U^c)$ Suppose $x∉U$ then $x∈U^c$, $f(x)∈f(U^c) ↯$. – Lawrence Dec 12 '12 at 22:36
@Lawrence: That's right. – P.. Dec 13 '12 at 5:43
Thank you very much=) – Lawrence Dec 13 '12 at 5:52

This does not seem to be true as it is currently stated. (Edit: Or before it was added that $Y$ is also a metric space).

Take $Y=\{0,1\}$ and $\tau=\{\emptyset,\{0\},\{0,1\}\}$, and choose $f:[0,1]\to (\{0,1\},\tau\,)$ by setting $f(\frac{1}{2})=1$ and $f(x)=0$ otherwise. The preimage of every open set is open so this function is continuous, and $[0,1]$ is a compact metric space. Take $C=\{1\}$, which is a closed subset of $\{0,1\}$ since its complement is open, and $f^{-1}(C)=\{\frac{1}{2}\}$. Now by taking $U=]\frac{1}{4},\frac{3}{4}[$, for example, as an open neighborhood of $f^{-1}(C)$ in $[0,1]$, then $f^{-1}(\{0,1\})=[0,1]\not\subset ]\frac{1}{4},\frac{3}{4}[$, and $\{0,1\}$ is the only open set containing $C$. So for any open neighbourhood $V$ of $C$ we have $f^{-1}(V)\not\subset U$.

-
I don't understand what ({0,1},τ)is but I wonder how can $f$ be continuous. Why can you state that the preimage of every open set is open in this case? Since I think f^-1(1)={1/2} is not open in [0,1]. – Lawrence Dec 12 '12 at 19:38
@Lawrence: By $(\{0,1\},\tau)$ I mean the two-point set $\{0,1\}$ equipped with the topology $\tau$. In this case, $\frac{1}{2}\notin \{0,1\}$, so we can't take preimage of $\frac{1}{2}$ (or to be precise, it is the empty set). On the other hand, $f$ is continuous because $f^{-1}(\emptyset)=\emptyset$, $f^{-1}(\{0\})=[0,\frac{1}{2}[\cup]\frac{1}{2},1]$ and $f^{-1}(\{0,1\})=[0,1]$. So the preimage of every open set is open. Note also that $\{1\}$ is not an open set since it is not a member of $\tau$. – T. Eskin Dec 12 '12 at 19:38
I have not be introduced with the concept of ({0,1},τ). So I am not quite understand why {1} is not an open set here. Or can you suggest me what is the metric associated with Y? In fact this question is in the past exam paper of my university in Analysis course so if it is incorrect, then I should ask my professor the details. – Lawrence Dec 12 '12 at 19:49
@ThomasE.: Probably here $Y$ is a metric space. – P.. Dec 12 '12 at 19:51
@Lawrence: In this case, there does not exist a metric associated to $Y$, since it is not even Hausdorff. $(Y,\tau)$ is just a topological pair here. – T. Eskin Dec 12 '12 at 19:51