Proving a characterisation for closed functions. Let $X$ and $Y$ be topological spaces and $ f \colon  X \to Y $ a function. Prove that $ f $ is closed  ( that for every closed set $F$ in $X$ $f(F) $ is closed) if and only if for every $ A \subset Y$ and every open subset $ V \subset X$ in $X$ so that the inverse image $ f^{-1} (A) \subset V$ there exists an open subset $ U \subset Y $ in $Y$ so that $ A \subset U $ and $ f^{-1}(U) \subset V $
I tried proving this but I got confused on the way with all the images and inverse images because f doesn't have to be bijective so equalities are not valid when I look at the image of an inverse image of a set and so on. 
To prove that $f$ is closed I tried by putting for an arbitrary closed set $F$ in $X$ $ A = f(X\setminus F) $ and $V=X\setminus F$
 A: The proof is straightforward, really, but you need a lot of small arguments (mostly by contradiction, because we're dealing with complements) to prove all required inclusions via pointwise arguments. A full proof by "set algebra" could also be done, but I prefer this, as it's easier to reconstruct from memory.
If $f:X \to Y$ is closed and $A \subseteq Y$ and $f^{-1}[A] \subseteq V$ then 
$V$ is open, so $X\setminus V$ is closed in $X$, hence $f[X\setminus V]$ is closed in $Y$ (as $f$ is closed) and so $U:= Y\setminus f[X\setminus V]$ is open in $Y$.
It remains to verify: 


*

*$A \subseteq U$: Let $y \in A$. Suppose, for a contradiction, that $y \notin U$; this means (by the definition of $U$) that $y \in f[X\setminus V]$ so there exists some $x \in X\setminus V$ such that $f(x)=y$. But then $x \in f^{-1}[A]$ (as $y=f(x)$ and $y \in A$) so $x \in V$ (as $f^{-1}[A] \subseteq V$) but this contradicts $x \in X\setminus V$. This contradiction thus shows that $y \in U$ and the inclusion has been shown.

*$f^{-1}[U] \subseteq V$: Let $x \in f^{-1}[U]$ and suppose, for a contradiction, that $x \notin V$. Then $x \in X\setminus V$, and $f(x) \in f[X\setminus V]$ and so $f(x) \notin U$, contradicting that $x \in f^{-1}[U]$. So $x \in V$ and again we have the required inclusion.
This shows one direction. 
Now suppose $f$ obeys the condition with $A,V$ and $U$ and we will show that $f$ is closed. So let $C \subseteq X$ be closed and we want to show that $f[C]$ is closed in $Y$. So let $y \in Y$ be a point not in $f[C]$. Then $f^{-1}[\{y\}] \subseteq X\setminus C$ (otherwise some $x \in C \cap f^{-1}[\{y\}]$ exists and then $f(x)=y$ and $f(x) \in f[C]$ contradicting that $y \notin f[C]$). Now apply the condition for $A=\{y\}$ and $V=X\setminus C$ (which is open as $C$ is closed) and so we have some $U$ open in $Y$ such that $\{y\} \subseteq U$, or equivalently $y \in U$, and also $f^{-1}[U] \subseteq V$. The latter implies that $U \cap f[C] = \emptyset$: if not we have $y' = f(x')$ with $x' \in C$ and $y' \in U$, but then $x' \in f^{-1}[U]$ and so $x' \in V=X\setminus C$, so $x' \notin C$. Contradiction, and so indeed we have found an open neighbourhood $U$ of $y$ such that $U \cap f[C] = \emptyset$, showing that $f[C]$ is closed and so $f$ is a closed map.
A: You can consider a closed set $F$ of $X$ so $X\setminus F$ is open and you can define $A:= Y\setminus f(F)$ and the open set $V$ will be  $V:=X\setminus F$ infact 
$f^{-1}(A)=X\setminus(f^{-1}f(F))\subset X\setminus F= V$
so there exists an open set $U\subset Y$ such that 
$A\subseteq U$ and $f^{-1}(U)\subset V=X\setminus F$
Now if $f$ is bijective you have that 
$U=f(f^{-1}(U))\subseteq f(V)=f(X\setminus F)=Y/f(F)$
so
$Y\setminus f(F)=U$ but $U$ is open then 
$f(F)$ is closed 
