Does $f\colon X\to X$ with $f^{-1}(U)=U$ imply $f$ is homeomorphism? Let $X$ be a topological space. Does $f\colon X\to X$ with $f^{-1}(U)=U$ for all $U$ open imply $f$ is homeomorphism?
 A: No. Let $X$ be any topological space with the indiscrete topology and more than one element. Let $a$ be one of those elements. Then define $f(x)=a$ for all $x\in X$.
Since $X$ has the indiscrete topology the only open sets are $X$ and $\emptyset$. 
Therefore, $f^{-1}(X)=X$ and $f^{-1}(\emptyset)=\emptyset$ but since $f$ maps more than one element to one element it cannot be a homeomorphism.
A: No. Consider this topology $\{\{\Phi\},\{1\},\{1,2,3\}\}$ on $X=\{1,2,3\}$ and $f:X\rightarrow X$ by $f(1)=1,f(2)=3,f(3)=3$.
A: This is true if and only if $X$ is $T_0$, in which case any such $f$ is the identity.  First, suppose $X$ is $T_0$.  For each $x\in X$, let $U_x$ be the intersection of all open sets containing $x$.  If $f:X\to X$ is such that $f^{-1}(U)=U$ for all open sets $U$, it follows that $f^{-1}(U_x)=U_x$ for each $x$.  For any $x\in X$, $f(x)\in U_{f(x)}$, so $x\in f^{-1}(U_{f(x)})=U_{f(x)}$.  But also $x\in U_x=f^{-1}(U_x)$, so $f(x)\in U_x$.  That is, $x$ is in every open set containing $f(x)$, and $f(x)$ is in every open set containing $x$.  Since $X$ is $T_0$, this implies $x=f(x)$.  Thus $f$ is the identity.
Conversely, suppose $X$ is not $T_0$; say there are distinct points $x,y\in X$ such that an open set contains $x$ iff it contains $y$.  Define $f:X\to X$ by $f(z)=z$ if $z\neq y$, and $f(y)=x$.  Then it is easy to see that $f^{-1}(U)=U$ for all open $U$, but $f$ is not a homeomorphism because it is not a bijection.  More generally, you can see that $f:X\to X$ satisfies $f^{-1}(U)=U$ for all open $U$ iff $f(x)\sim x$ for all $x\in X$, where $\sim$ is the "topologically indistinguishable" equivalence relation.
