For every closed set $C$, $f^{-1}(C)$ is closed. Is $f$ necessarily continuous? I am trying to prove this using the definition of continuity (and complements) where $f$ is continuous iff for every open set $U$, $f^{-1}(U)$ is also open. But I am uncertain about my proof when I try to write it formally. If somebody can present a formal proof, it will be really appreciated.
Thanks!
 A: A function is continuous if and only if the pre-image of an open set is open. Let $f:X\to Y$ be such that for every closed set $C$ in $Y$ the set $f^{-1}(C)$ is closed. Now, consider an open set $U$. Then $Y-U$ is closed by definition, so $f^{-1}(Y-U)$ is closed. But $$f^{-1}(Y-U)=f^{-1}(Y)-f^{-1}(U)=X-f^{-1}(U).$$ Since $X-f^{-1}(U)=(f^{-1}(U))^c$ is closed, its complement, i.e., $f^{-1}(U)$ is open, thus $f$ is continuous.
A: The two key facts are: (a) a set is open iff its complement is closed; and (b) inverse image preserves complements, i.e. if $f:X\to Y$, and $U \subseteq Y$, then $f^{-1}(U^c) = (f^{-1}(U))^c$.
Given this: suppose $U \subseteq Y$ is open.  We need to show that $f^{-1}(U)$ is open; equivalently, that its complement is closed.  But its complement is $(f^{-1}(U))^c = f^{-1}(U^c)$, the inverse image of a closed set, so is closed by the assumption on $f$.
A: Suppose that $f:X\to Y$ is such that $f^{-1}[F]$ is closed in $X$ whenever $F$ is closed in $Y$. Let $U$ be an arbitrary open set in $Y$. Then $Y\setminus U$ is closed in $Y$, so $f^{-1}[Y\setminus U]$ is closed in $X$, and therefore $X\setminus f^{-1}[Y\setminus U]$ is open in $X$. Now show that $X\setminus f^{-1}[Y\setminus U]=f^{-1}[U]$, and you’re done.
A: Suppose $f:X \to Y$ satisfies the condition, and let $U \subset Y$ be an open set.  Then $U^c$ is closed subset of $Y$, and so we have that $f^{-1}(U^c)$ is closed in $X$.  But $f^{-1}(U^c) = f^{-1}(U)^c$, and so $f^{-1}(U)$ is open since its complement is closed.
