I am trying to define a continuous function $f:(0,1) \mapsto \{0,1\}$. Intuitively, it seems that the possible continuous functions are the trivial functions of $f(x) = 0$ or $f(x) =1$.
Based on the definition of continuity (topology), I first set topologies on $(0,1)$ and $\{0,1\}$. Let $(0,1)$ be equipped the standard Euclidean metric space and $\{0,1\}$ be equipped with the discrete topology.
[Editted: [0.5,1) open -> closed]
Let define $f_{0.5}(x) = 1_{x < 0.5}(x)$. Then since $f_{0.5}^{-1}(0) = [0.5,1)$ is closed and $f_{0.5}^{-1}(1) = (0,0.5)$ is open, $f_{0.5}(x)$ is not continuous.
Can we prove that the only continuous function is a trivial one?
I am looking for some clear explanations or intuition behind this. Any comments/answers/suggestions will be very appreciated.