# $X, Y$ metric spaces, $X$ compact, $f: X \to Y$ continuous then $f^{-1}(V) \subset U$

Let $X$ and $Y$ be metric spaces, with $X$ compact, and $f: X \to Y$ continuous.
Let $C$ be a closed subset of $Y$.
Show that for any open neighboorhood $U$ of $f^{-1}(C)$ there is an open neighborhood $V$ of $C$ such that $$f^{-1}(V) \subset U.$$

This question is answered here but I don't understand the answer.
Specifically, I don't see why $$U^c \cap f^{-1}(C) = \emptyset,$$ with $U^c$ the complement of $U$ in $X$.

Here is my attempt.
Since $U$ is open and $f^{-1}(C)$ is closed then the $f^{-1}(C)$ complement of $U$ is closed. Let $U^c$ be this complement.
since $f$ is continuous, then $f(U^c)$ is closed.
Let $V=C\setminus f(U^c)$, then $V$ is open, but I don't see why $$f^{-1}(V) \subset U.$$

-
If $A\supseteq B$, then $A^c\cap B=\varnothing$; draw a Venn diagram if you don’t see it otherwise. Here $A=U$, and $B=f^{-1}[C]$. – Brian M. Scott Jan 14 '13 at 22:03
$f^{-1}(C)\subset U\Rightarrow f^{-1}(C)\cap U^c=\emptyset$. – Sigur Jan 14 '13 at 22:11
No, it means that $U\supseteq f^{-1}[C]$ (and $U$ is open). – Brian M. Scott Jan 14 '13 at 22:24
@BrianM.Scott, notation q: $f^{-1}[C] = f^{-1}(C)$? – alancalvitti Jan 14 '13 at 22:37
@alancalvitti: I am one of those who make a careful distinction between $f^{-1}[C]=\{x\in X:f(x)\in C\}$ and $f^{-1}(C)$, the latter making sense only when $f$ is an injection from some set with $C$ in its range. – Brian M. Scott Jan 14 '13 at 22:43

## 1 Answer

We know that $U^{c}$ is closed, and hence, compact in $X$. Thus, $f(U^{c})$ is compact, and hence, closed in $Y$ since $f$ is continuous and $Y$ is a metric space.

Let $V=Y\setminus f(U^{c})$. Then, $V$ is an open set. We'll show that $f^{-1}(V)\subset U$. Pick $x\in f^{-1}(V)$. Then, $y:=f(x)\in V$, so that $y\notin f(U^{c})$. Therefore, $x\notin U^{c}$, which means that $x\in U$. Hence, $f^{-1}(V)\subset U$, as desired.

-