Today in class we proved the following theorem:

Let $(X, T\_x), (Y,T\_y)$ be topological spaces. A map $f:X \to Y$ is continuous iff $f(\overline{A}) \subset \overline{f(A)} $

But now when I'm going through my notes, something in the yellow highlighted part feels wrong, specially the $f(\overline{A}) = f(f^{-1}(A))$. Can someone verify if my notes are correct, or wrong?

$(\Leftarrow)$
Asssume now that $f(\overline{A}) \subset \overline{f(A)} $ for every $A \in X$. Let $M \subset Y$ be closed and let $A = f^{-1}(M)$. Then 

> 
> $f(\overline{A}) = f(f^{-1}(A)) \subset \overline{f(f^{-1}(M))} = \overline{M} = M$
> 
> 
> 

This implies 

> 
> $\overline{A} \subset f^{-1}(f(A)) = f^{-1}(M) = A$
> 
> 
> 

Hence $A = \overline{A}$, hence every preimage of a closed set is closed, i.e f continuous.