I'm trying to learn a little about topology, and I don't quite understand continuity yet. I use this definition of a continuous map f: f is continuous if the inverse image of every open set is open.
I use the sets $\mathbb{R}$ and $A = \mathbb{R}-\{0\}$, both with standard metric topology (can I do that with $A$? I don't see something going wrong).
Now I look at the map f: $ A \rightarrow \mathbb{R}$
$$ f(x) = \begin{cases} 0 & \text{if }x<0 \\ 1 & \text{if }x>0 \end{cases} $$
Now I ask myself whether this is continuous, so I look at the inverse image $B \subseteq A$ of any open set $C \subseteq \mathbb{R}$ and I notice:
$$ B = \begin{cases} \emptyset & \text{if } 0 \notin C \wedge 1 \notin C \\ (0,+\infty) & \text{if } 0 \notin C \wedge 1 \in C \\ (-\infty,0) & \text{if } 0 \in C \wedge 1 \notin C \\ \mathbb{R} & \text{if } 0 \in C \wedge 1 \in C \\ \end{cases} $$
These sets all seem open to me, which would imply that f is contiuous. But it can't be. What am I missing?