# Show function is not continuous using the topological definition

Good afternoon, I want to show this function is not continuous using the topological definition, namely, the inverse image of an open set is open.

Let $f: [0,1] \to \Bbb{R}$ be the function with

$f(x) = \{0$ if $x >0$ and $1$ if $x = 0$}.

I believe $f^{-1}(\Bbb{R})=[0,\inf)$, which is not open.

Would anyone please verify this for me?

• can you please correct your typo? & what is f(0)? – Anubhav Mukherjee Feb 27 '15 at 20:46

$f^{-1}(\frac{1}{2},\infty)=0$ which is closed (because $[0,1]$ is $T_1$ and singleton's are closed in this case), however $(\frac{1}{2},\infty)=\cup_{n\in \mathbb{N}} (\frac{1}{2},n)$ is open; so $f$ is not continuous.