Prove that the following statements are equivalent characterizations of continuity Let $f: (X,d) \rightarrow (Y, d')$ be a function. Prove that the following are equivalent:


*

*$f$ is continuous .

*For every $A \subset X$,    $f(cl(A)) \subset cl(f(A))$.

*For every closed set $B$ in $Y$, the set $f^{-1}(B)$ is closed.
My proof:
"1 $\Rightarrow 2$": 
Suppose  $f$ is continuous at $a \in X$. Let $y \in f (cl(A)) \Rightarrow f^{-1}(y) \subset cl(A)$. Then there exists $ x_n \in A$: $x_n \Rightarrow f^{-1}(y)$. Let $a=f^{-1}(y)$. Since $f$ is continuous, $x_n \in A$ and $x_n \rightarrow a \Rightarrow f(x_n) \rightarrow f(a)$. Since $x_n \in A \Rightarrow f(x_n) \in f(A)$ and $f(a) =y$. Then there exists $f(x_n) \in f(A) : f(x_n) \rightarrow y \Rightarrow y \in clf(A) \Rightarrow f(cl(A)) \subset cl(f(A))$. $\blacksquare$
"2 $\Rightarrow$ 3"
Let $A \in X$ such that $f^{-1}(B) = A$. We have $A \subset cl(A)$. Let $x \in cl(A) \Rightarrow f(x) \in f(cl(A))$. Since $f^{-1}{B} = A \Rightarrow B = f(A)$. Since $B$ is closed $\Rightarrow B = cl(B) = f(A) = cl(f(A))$. From (2), $f(cl(A)) \subset cl(f(A)) = cl(B)= B \Rightarrow f(x) \in B \Rightarrow x \in f^{-1}(B)= A \Rightarrow x \in A. $ Then $cl(A) \subset A \Rightarrow A $ is closed. $\blacksquare$
"3 $\Rightarrow$ 1" This can be prove by changing closed set to open set, then by using the definition of continuous to prove.
How was my first 2 proofs?
 A: (a) If $U$ is open in $Y$, then $B=Y-U$ is closed So
$f^{-1}(B)=X-f^{-1}(U)$ is closed iff $f^{-1}(U)$ is open.
Hence $(1)$ iff $(3)$.
(b) Define $cl(A):=\{ x\in X| d_X(x_n,x)\rightarrow x,\ x_n\in A
\}$.
This is closed set : $y\in X-cl(A)$ Consider open
$\frac{1}{n}$-ball $B:=B_\frac{1}{n} (y)$. If each $B$ contains
$x_n\in cl(A)$, then $x_n\rightarrow y$. Since $x_n\in cl(A)$ there
exists $d_X(x_n,z_n)< \frac{1}{n},\ z_n\in A$ That is
$z_n\rightarrow y$. So $y\in cl(A)$. That is for some $n$, $B \cap
cl(A)=\emptyset$ So we complete the proof.
So (3) implies that $f^{-1} ( cl(f(A)) )$ is closed And note that it
contains $A$ In further it contains $cl(A)$ So $$
 f(cl (A)) \subset cl (f(A) ) $$
That is $(3)$ implies $(2)$.
(c) $f(cl(A))\subset cl(f(A))$ iff $x_n\in A\rightarrow x$ implies
that $f(z_n)\rightarrow f(x) $ and $z_n\in A$
That is $(2)$ implies the following : If $A=\{x_n\}$ where
$x_n\rightarrow x$, then $f(x_n)$ has a convergent subsequence whose
limit is $f(x)$.
We will show that $(2)$ implies $(3)$ : For closed $B$ in $Y$,
assume that $f^{-1}(B)$ is not closed That is there exists $x_n$
s.t. $x_n=f^{-1}(y_n)\rightarrow x$ and $f(x)$ is not in $B$. By
above, $y_n=f(x_n)$ has a convergent subsequence whose limit is
$f(x)$. This is a contradiction.
