Why is the inverse image of a compact set under a special sort of function compact? Let $f$ be a continuous closed function from $X$ to $Y$ where $X$ and $Y$ are topological spaces. (Closed means that for any closed set $C$, $f(C)$ is also closed).
Suppose that for any $y$ in $Y$, the inverse image of $y$ is compact.

Show that if $K$ is a compact subset of $Y$, then the inverse image of $K$ is also compact.

I'm having trouble figuring out how to prove this.
 A: HINT: Say that a family $\mathscr{A}$ of sets has the finite intersection property (FIP) if $\bigcap\mathscr{F}\ne\varnothing$ whenever $\mathscr{F}\subseteq\mathscr{A}$ is finite. First prove the following useful result:

Proposition $1$. A set $K$ in a space $X$ is compact if and only if $\bigcap\mathscr{F}\ne\varnothing$ whenever $\mathscr{F}$ is a family of of closed subsets of $K$ with the finite intersection property.

This is pretty straightforward; use the fact that if $\bigcap\mathscr{F}=\varnothing$, then $\{X\setminus F:F\in\mathscr{F}\}$ is an open cover of $K$.
Then prove this little result:

Proposition $2$. Let $\mathscr{F}$ be a family of subsets of a set $X$ with the FIP. Let $$\mathscr{F}^*=\left\{\bigcap\mathscr{A}:\mathscr{A}\text{ is a finite subset of }\mathscr{F}\right\}\;,$$ the closure of $\mathscr{F}$ under finite intersections; then $\mathscr{F}^*$ has the FIP, and $\bigcap\mathscr{F}=\bigcap\mathscr{F}^*$.

Now let $H=f^{-1}[K]$, and let $\mathscr{F}$ be a family of closed subsets of $H$ with the FIP; you want to show that $\bigcap\mathscr{F}\ne\varnothing$. By Prop. $2$ you can work with $\mathscr{F}^*$ instead: it has the FIP, and it has the same intersection as $\mathscr{F}$. You know that $$\bigcap\{f[F]:F\in\mathscr{F}^*\}\ne\varnothing\;;$$ why? 
Let $y\in\bigcap\{f[F]:F\in\mathscr{F}^*\}$, let $C=f^{-1}[\{y\}]$, and let $\mathscr{F}_C^*=\{F\cap C:F\in\mathscr{F}^*\}$. Show that $\mathscr{F}_C^*$ has the FIP and conclude (how?) that $\bigcap\mathscr{F}=\bigcap\mathscr{F}^*\supseteq\bigcap\mathscr{F}_C^*\ne\varnothing$.
A: I thank Brian Scott for his marvelous proof.  It took me quite a while to understand his proof in complete detail.  So I'm posting a write-up with hopefully enough details to make it light reading.
Definition: Let $\mathcal F$ be a collection of sets.  Then $\mathcal F$ has the finite intersection property (FIP) if whenever $F_1,\dots,F_n\in \mathcal F$, $F_1\cap\cdots\cap F_n\not=\emptyset$.
Claim: Let $X$ be a topological space.  Then $X$ is compact $\Longleftrightarrow$ for every collection $\mathcal F$ of closed sets in $X$ with the FIP, $\cap_{F\in\mathcal F}{F}\not=\emptyset$. 
Proof: $(\Leftarrow)$ Let $\{U_\alpha\}$ be an open cover of $X$.  Then $\mathcal F=\{U_\alpha^c\}$ is a collection of closed sets such that $\cap U_\alpha^c=(\cup U_\alpha)^c=X^c=\emptyset$.  Thus $\mathcal F$ cannot have the FIP. So $\exists$ a finite set such that $U_{\alpha_1}\cup\cdots\cup U_{\alpha_n}=\emptyset$.  Thus $U_{\alpha_1}\cup\cdots\cup U_{\alpha_n}=X$.  Thus $\{U_\alpha\}$ has a finite subcover.  Thus $X$ is compact.
$(\Rightarrow)$ Let $\{C_\alpha\}$ be a collection of closed sets with the FIP.  Then $\{C_\alpha^c\}$ is a collection of open sets.  Since $\{C_\alpha\}$ has the FIP, no finite subset of it has empty intersection.  Note that $\cap A_i=\emptyset$ $\Leftrightarrow$ $\cup A_i^c=X$.  Thus no finite subset of $\{C_\alpha^c\}$ is an open cover.  Since $X$ is compact, it follows that $\{C_\alpha^c\}$ cannot be an open cover.  In other words $\cup C_\alpha^c\not=X$.  Thus $\cap C_\alpha\not=\emptyset$.  $\square$
Now we use this characterization of compactness to prove the theorem. Let $K\in Y$ be compact. Let $\mathcal F$ be a family of closed subsets of $H=f^{-1}(K)$ with the finite intersection property (FIP).  We need to show that $\cap_{F\in\mathcal F}F\not=\emptyset$.  Let $\mathcal F^*=\{F_1\cap\cdots\cap F_n\mid F_1,\dots,F_n\in\mathcal F\}$.  Then $\cap_{F\in\mathcal F}F=\cap_{F\in\mathcal F^*}F$.  And $\mathcal F^*$ also has the FIP.  Now consider the sets $f(F)$ where $F\in\mathcal F^*$.  Since $F\in\mathcal F^*$ are closed subsets of $H$, $\exists$ closed sets $C_F\in X$ such that $C_F\cap H=F$.  The collection $\{C_F\}_{F\in\mathcal F^*}$ also has the FIP.  It follows that $\{f(C_F)\}_{F\in\mathcal F^*}$ has the FIP (since it's always true that $f(A\cap B)\subseteq f(A)\cap f(B)$).  Notice that for any finite subset of $\{C_F\}_{F\in\mathcal F^*}$ we have $H\cap(C_{F_1}\cap\cdots\cap C_{F_n})\not=\emptyset$.  It follows that $\{f(C_F)\cap K\}_{F\in\mathcal F^*}$ has the FIP.  Since $C_F$ is closed and $f$ is a closed map, $f(C_F)$ is closed in $Y$. Since $K$ is compact and $\{f(C_F)\cap K\}_{F\in\mathcal F^*}$ is a collection of closed sets in $K$, it must be that $\cap_{F\in\mathcal F^*}f(C_F)\cap K\not=\emptyset$.  Next we will show that $f(C_F)\cap K=f(F)$.  To see this let $x\in f(C_F)\cap K$.  Then $x=f(c)$ for $c\in C_F$.  And $f(c)=x\in K$, so $c\in f^{-1}(K)=H$.  Thus $c\in C_F\cap H$.  Thus $c\in F$.  Thus $x=f(c)\in f(F)$.  So we have shown  $f(C_F)\cap K\subseteq f(F)$.  Now let $y\in f(F)$.  Then $\exists$ $x\in F$ such that $f(x)=y$.  Since $F\subseteq f^{-1}(K)$, $y=f(x)\in K$.  Also $x\in F\subseteq C_F$.  So $y=f(x)\in f(C_F)$. Thus $y\in f(C_F)\cap K$.  Thus we can conclude that $f(C_F)\cap K= f(F)$.   Thus we have shown that $\{f(F)\}_{F\in\mathcal F^*}$ is a collection of closed sets in $K$ that have the FIP.  Thus $\cap_{F\in\mathcal F^*}f(F)\not=\emptyset$.  Let $y\in\cap_{F\in\mathcal F^*}f(F)$.  Then $C=f^{-1}(y)$ is compact.  Now consider $\mathcal{F}_C^*=\{F\cap C:F\in\mathcal{F}^*\}$.  Let $F_1,\dots,F_n\in \mathcal{F}^*$.  Then by the way $\mathcal F^*$ was defined, $F_1\cap\cdots\cap F_n=F\in \mathcal F^*$.  Thus $(F_1\cap C)\cap\cdots\cap(F_n\cap C)=(F_1\cap\cdots\cap F_n)\cap C=F\cap C$.  Now $y\in f(F)$ $\Rightarrow$ $\exists$ $x\in F$ s.t.\ $f(x)=y$ $\Rightarrow$ $x\in C$. Thus $F\cap C\not=\emptyset$.  Thus $(F_1\cap C)\cap\cdots\cap(F_n\cap C) \not=\emptyset$.  Thus $\{F \cap C\mid {F\in\mathcal F^*}$ has the finite intersection property.  Since by assumption $C$ is compact, $\cap_{F\in\mathcal F^*} F \cap C\not=\emptyset$.   Thus $\cap_{F\in\mathcal F^*} F\not=\emptyset$.  Thus $\cap_{F\in\mathcal F} F\not=\emptyset$.  Thus $H$ is compact.
