Continuous function and the openess of points Suppose that I have a continuous function $f: X \rightarrow Y$ such that $f(a) = f(b) $ where $a$ and $b$ are points of $X$. Is it the case that we have that either both $a$ and $b$ are open or neither $a$ nor $b$ are open?
Thanks

Notice that a constant function $f: X \rightarrow Y$ is continuous. And  for any two points $x,y \in X$ that $f(x)=f(y)$. This hold for any topology on $X$ so we have that $\{x\}$ can be open, closed or neither and similarly for $\{y\}$ with no dependence between the two.
