A map is continuous if and only if for every set, the image of closure is contained in the closure of image As a part of self study, I am trying to prove the following statement:
Suppose $X$ and $Y$ are topological spaces and $f: X \rightarrow Y$ is a map. Then $f$ is continuous if and only if $f(\overline{A})\subseteq \overline{f(A)}$, where $\overline{A}$ denotes the closure of an arbitrary set $A$. 
Assuming $f$ is continuous, the result is almost immediate. Perhaps I am missing something obvious, but I have not been able to make progress on the other direction. Could anyone give me a hint which might illuminate the problem for me? 
 A: Because the property is stated in terms of closures, it's I think slightly easier to use the inverse image of closed is closed equivalence of continuity instead:
If $C$ is closed in $Y$, we need to show that $D = f^{-1}[C]$ is closed in $X$.
Now using our closure property for $D$: $$f[\overline{D}] \subseteq \overline{f[D]} = \overline{f[f^{-1}[C]]} \subseteq \overline{C} = C,$$ as $C$ is closed.
This means that $\overline{D} \subseteq f^{-1}[C] = D$, making $D$ closed, as required.
A: We show that $f$ is continuous at each $x\in X$. Recall that $f$ is continuous at $x$ if for any open nhood $V$ of  $f(x)$, there is an open nhood $U$ of $x$ with $f(U)\subseteq V$.
So, let $x\in X$ and let $V$ be an open nhood of $f(x)$. 
Set $E=X\setminus f^{-1}(V)$.  Noting that $f(E)$ is contained in the closed set $V^C$,
we see that
 $$f(\overline{E})\subseteq \overline{f(E)}\subseteq V^C;  $$
whence $x\notin \overline E$ (since $f(x)$ is in $V$).  
But then $x$ is in the open set $X\setminus \overline{E}$.  Moreover, since $X\setminus \overline{E}\subseteq X\setminus E=f^{-1}(V)$, it follows that $f(X\setminus \overline{E})\subseteq V$, as desired.



An aside:

If $X$ were first countable, we could argue using sequences (where a sequence $(x_n)$ converges to $x$ if for any nhood $U$ of $x$ there is an $N$ so that $x_m\in U$ for all $m\ge N$); for in such a space a function is continuous at $x$ if and only if $(f (x_n))$ converges to $f(x)$ whenever $x_n$ converges to $x$.  
Indeed, it is easily verified that given $x_n\rightarrow x$  and any subsequence $(x_{n_k})$ of $(x_n)$, that the image of this subsequence under $f$ when thought of as a sequence  has a subsequence that converges to $f(x)$. Thus every subsequence of $(f(x_n))$ has a further subsequence which converges to $f(x)$, which implies that $(f(x_n))$ converges to $x$.
Of course, $X$ need not be first countable...
Though I think the sequential method above is a bit much here, I wonder if the argument can be suitably modified to arbitrary $X$ by using nets?
A: Here's one proof of the converse provided $X$ and $Y$ are metric spaces:
Take a limit point $x$ of $A$.  Then because $f(\overline{A}) \subseteq \overline{f(A)}$, we have that $f(x)$ is a limit point of $f(A)$.
Because $x$ is a limit point of $A$, for every $\delta > 0$ there is a point $p \in A$ with $|x - p| < \delta$.  And because $f(x)$ is a limit point of $f(A)$, for every $\epsilon > 0$, there is a point $q \in f(A)$ with $|f(x) - f(p)| < \epsilon$.
We thus have that for every point $x \in A$ with $|x - p| < \delta$, in fact $|f(x) - f(p)| < \epsilon$, so $f$ must be continuous.
A: The assertion is equivalent to:
$\overline{A}\subseteq f^{-1}(\overline{f(A)})$
So, the assertion follows from:
$\overline{A}\subseteq\overline{f^{-1}(f(A))}\subseteq\overline{f^{-1}(\overline{f(A)})}=f^{-1}(\overline{f(A)})$


*

*Inclusion: $A\subseteq f^{-1}(f(A)) \Rightarrow \overline{A}\subseteq\overline{f^{-1}(f(A))}$

*Inclusion: $f(A)\subseteq\overline{f(A)} \Rightarrow f^{-1}(f(A))\subseteq f^{-1}(\overline{f(A)}) \Rightarrow \overline{f^{-1}(f(A))}\subseteq \overline{f^{-1}(\overline{f(A)})}$

*Equality: $\overline{f(A)} \text{ closed} \Rightarrow f^{-1}(\overline{f(A)}) \text{ closed} \Rightarrow \overline{f^{-1}(\overline{f(A)})}=f^{-1}(\overline{f(A)})$


The converse assertion is equivalent to:
$\overline{B}=B \Rightarrow \overline{f^{-1}(B)}=f^{-1}(B)$
So, the converse assertion follows from:
$f^{-1}(B)\subseteq\overline{f^{-1}(B)}\subseteq f^{-1}(f(\overline{f^{-1}(B)}))\subseteq f^{-1}(\overline{f(f^{-1}(B))}) \subseteq f^{-1}(\overline{B}) =f^{-1}(B)$
That gives:
$f^{-1}(B)=\overline{f^{-1}(B)}$


*

*Inclusion: $A\subseteq \overline{A} \text{ in general}$

*Inclusion: $A\subseteq f^{-1}(f(A)) \text{ in general}$

*Inclusion: $f(\overline{A})\subseteq \overline{f(A)} \text{ by assumption}$

*Inclusion: $f(f^{-1}(B))\subseteq B \text{ in general} \Rightarrow \overline{f(f^{-1}(B))}\subseteq \overline{B} \Rightarrow f^{-1}(\overline{f(f^{-1}(B))})\subseteq f^{-1}(\overline{B})$

*Equality: $\overline{B}=B \Rightarrow f^{-1}(\overline{B})=f^{-1}(B)$

A: If $f$ is continuous, then $f^{-1}(Y-\overline{f(A)})$ is open; since $f^{-1}(Y-\overline{f(A)}) = X -f^{-1}(\overline{f(A)})$, then $f^{-1}(\overline{f(A)})$ is closed; since $A\subseteq f^{-1}(f(A))\subseteq f^{-1}(\overline{f(A)})$, we conclude that $\overline{A}\subseteq f^{-1}(\overline{f(A)})$, and therefore $f\left(\overline{A}\right)\subseteq f\left(f^{-1}\left(\overline{f(A)}\right)\right)\subseteq \overline{f(A)}$. This proves one direction. (Since you said you already had this, I posted the full argument).
Conversely, assume that for every $A$, $f\left(\overline{A}\right)\subseteq \overline{f(A)}$. Let $V$ be an open subset of $Y$; we want to show that $f^{-1}(V)$ is open; equivalently, we want to show that $X-f^{-1}(V)$ is closed; that is, we want to show that $X-f^{-1}(V)=\overline{X-f^{-1}(V)}$.
By assumption, $f\left(\overline{X-f^{-1}(V)}\right)\subseteq \overline{f(X-f^{-1}(V))}$. Now, $X-f^{-1}(V) = f^{-1}(Y-V)$, so $f(X-f^{-1}(V)) \subseteq Y-V$, which is closed; so
$$f\left(\overline{X-f^{-1}(V)}\right)=f\left(\overline{f^{-1}(Y-V)}\right)\subseteq\overline{f\left(f^{-1}(Y-V)\right)}\subseteq Y-V.$$ Therefore,
$$\overline{X-f^{-1}(V)} \subseteq f^{-1}(Y-V).$$
Is this sufficient?
A: A proof using nets:
Suppose $y\in f(\overline{A})\backslash \overline{fA}$. Taking $x\in \overline{A}$ with $y=f(x)$; there is a net $x_i\in A$ converging to $x$. Now $f(x_i)$ is a net in $f(A)$ which does not converge to $f(x)$ [for this would imply $f(x)\in \overline{fA}$]. Thus $f$ is not continuous.
A: Henno’s argument is probably the slickest, but one can also work pointwise, either directly or, if one already has those characterizations of continuity, with nets or filters.
Suppose that $f$ is not continuous. Then there is some point $x_0\in X$ at which $f$ fails to be continuous. If $y_0=f(x_0)$, this means that there is an open nbhd $U$ of $y_0$ such that if $V$ is an open nbhd of $x_0$, there is a point $x_V\in V$ such that $f(x_V)\notin U$. Let $$A=\{x_V:V\text{ is an open nbhd of }x_0\}\;.$$
Clearly $x_0\in\overline{A}$, and $f[A]\subseteq Y\setminus U$. Moreover, $Y\setminus U$ is closed, so $\overline{f[A]}\subseteq Y\setminus U$, and hence
$$y_0\in f[\overline{A}]\subseteq\overline{f[A]}\subseteq Y\setminus U\;,$$
contradicting the choice of $U$.
Those who like nets may notice that $A$ actually is a net, over the directed set $\langle\mathscr{N}(x_0),\supseteq\rangle$, where $\mathscr{N}(x_0)$ is the family of open nbhds of $x_0$, and the argument shows that $f$ doesn’t preserve the limit of this net. (I could of course just as well have used the nbhd filter at $x_0$, instead of using only open nbhds.)
Those who prefer filters may modify this to consider the filter $$\mathscr{F}=\{V\cap f^{-1}[Y\setminus U]:V\in\mathscr{N}(x_0)\}$$ instead.
A: I have a solution I think is really elegant, we just need three facts $$\bigcap f^{-1}(S)=f^{-1}(\bigcap S)$$ $$A\subset B\Longleftrightarrow f^{-1}(A)\subset f^{-1}(B)$$ $$f(A)\subset B\Longleftrightarrow A\subset f^{-1}(B)$$
We make the equivalence
$$f(\overline{A})\subset\overline{f(A)}\Longleftrightarrow \overline{A}\subset f^{-1}(\overline{f(A)})\Longleftrightarrow$$$$\Longleftrightarrow \bigcap_{\text{closed }F\supset A}F\subset\bigcap_{\text{closed }S\supset f(A)}f^{-1}(S)\subset\bigcap_{\text{closed }S,\,A\subset f^{-1}(S)}f^{-1}(S)$$
Now if we assume that every preimage of a closed set is closed, then $f^{-1}(S)$ is closed whenever $S$ is closed, so the intersection on the right is a superset because the intersection is taken on a smaller collection of sets.
Conversely, if the above is true, take $A=f^{-1}(B)$ with $B$ closed. Then $$\overline{f^{-1}(B)}\subset\bigcap_{\text{closed }S,\,f^{-1}(B)\subset f^{-1}(S)}f^{-1}(S)=\bigcap_{\text{closed }S\supset B}f^{-1}(S)\subset f^{-1}(B)$$
The last insclusion for $B$ being itself a closed set. Since every set is a subset of its closure, $f^{-1}(B)$ is closed.
