Let $(\mathbb{N},\tau)$ be a topological space, where $\tau=\{\emptyset, \mathbb{N}, \{0\},\{0,1\},\{0,1,2\},\dots\}$

If $f$ takes two different values, say $r$ and $s$, can you think of two open subsets of $\mathbb{R}$ that will lead to a contradiction?


According to a comment to this post, the above sentence alone did not constitute "an answer".

To supplement, I wrote a detailed answer. I changed it a bit:

Let $r=f(0)$ be the value of $f$ at $0$. Let $s\in\mathbb{R}\setminus\{ r \}$ be any other real number. We can choose an open neighborhood $U$ of $s$ in $\mathbb{R}$ which does not contain $r$. For example an open interval $U=(s-\epsilon,s+\epsilon)$ where $\epsilon$ is a positive real number not exceeding $|r-s|$. Now, because $f$ is contionuous, $f^{-1}[U]$ must be open in $(\mathbb{N},\tau)$, so $f^{-1}[U]\in\tau$. We cannot have $0\in f^{-1}[U]$ because $f(0)=r\notin U$. Looking at the list defining $\tau$, we conclude the only open set left is $\varnothing$, so $f^{-1}[U]=\varnothing$. This means that $f$ does not take any value in $U$, in particular $f$ does not take the value $s$. Since $s$ was arbitrary, $f$ takes no other value than $r$. So $f$ is the constant function $f\equiv r$.

This proof uses only the fact that the codomain of $f:(\mathbb{N},\tau)\to\mathbb{R}$ is a $T_1$ space, i.e. we do not require it to be Hausdorff ($T_2$).