# Continuous function between two topological space.

Let $(R,\sigma)$ be the usual topology on $R$ and let $(R,\tau)$ be the smallest toplogy containg all the open subsets in $(R,\sigma)$ contained in $[0,1]$ along with all the subsets of $[0,1]^c$.

Let $f:(R,\sigma)\rightarrow (R,\tau)$ with $f(x)=x,$ if $x\in[0,1]$ and $f(x)=2$ if $x\in [0,1]^c$.

Is $f$ continuous?

-
Is $f^{-1}([0,1])$ open? –  Daniel Fischer Feb 8 at 15:37
@DanielFischer it is $[0,1]$ so it is closed in $(R,\sigma)$ –  Abhra Abir Kundu Feb 8 at 15:38
But it is also open in $\tau$ since $[0,1]$ is an open subset of $[0,1]$. Or did you mean "all open subsets of $(R,\sigma)$ that are contained in $[0,1]$ (and hence in $(0,1)$)"? –  Daniel Fischer Feb 8 at 15:41
@DanielFischer I mean all open subsets of $(R,\sigma)$ contained in $[0,1]$. –  Abhra Abir Kundu Feb 8 at 15:42
Write down a subbasis for $(\mathbb R,\tau)$ and check whether the preimages of those subbasic sets are open in $(\mathbb R,\sigma)$. –  Brad Feb 8 at 15:50

$$\tau = \{R\} \cup \left\{M \subset R : M\cap \{0,1\} = \varnothing, M\cap (0,1) \in \sigma \right\}.$$
If $U \in \tau$, then either $U = R$ and $f^{-1}(U) = R$, or neither $0$ nor $1$ belong to $U$, and $f^{-1}(U)$ is one of $U\cap(0,1)$ - if $2\notin U$ - and $U\cap (0,1) \cup [0,1]^c$. Both these sets are open in $\sigma$.
Thanks a lot for the answer.I have another question.It will be helpful if you can provide an answer to that too.The question is the following- If $A\in \tau$ is closed then does it mean $\{1,0\}\in A$? I basically want to know whether $\{1,0\}$ belongs to every sets closure? –  Abhra Abir Kundu Feb 8 at 16:00
If $A\neq \varnothing$. If $A\neq \varnothing$ is closed in $\tau$, its complement $U$ is an open set that isn't all of $R$. Hence $U$ contains neither $0$ nor $1$, so we must have $\{0,1\} \subset A$. –  Daniel Fischer Feb 8 at 16:04