Question:
is $f: (\mathbb{R},τ) \rightarrow (Y,σ)$ with $f(x)=\begin{cases} 0 & \text{ if } x\in (-\infty,0) \\ 1 & \text{ if } x\in [0,+\infty] \end{cases}$, continuous?
Where $τ$ is the usual topology of $\mathbb{R}$, $Y=\{0,1,2\}$ and $σ=\{\emptyset,Y,\{0\}\}$
my answer would that its continuous since $f^{-1}(\emptyset) \in τ$, $f^{-1}(Y)\in τ$ and $f^{-1}(\{0\})= (-\infty,0)\in τ$
Is my answer correct? If not, how can I properly answer and prove it?