Borel function which is not continuous (in every point) Give example function $f: \mathbb{R} \rightarrow \mathbb{R}$ which $\forall x \in \mathbb{R}$ is not continuous function but is Borel function.
I think that I can take $$f(x) =  \begin{cases} 1 & x \in \mathbb{R} \setminus \mathbb{Q} \ \\ -1 & x \in \mathbb{Q} \end{cases} $$
Am I right? How fast prove that it is Borel function?

Our you can do nothing but write $f=-\chi_{\mathbb{Q}}+\chi_{\mathbb{R}\setminus\mathbb{Q}}$ where $\chi_A$ is the characteristic function of $A$. And use the following :
$\mathbb{Q}$ is countable so it is a borel set  and then $\mathbb{R}\setminus{\mathbb{Q}}$ as well (complementary property of $\sigma-$algebra). And the result follows because characteristic function of Borel set are by definition borel function. 
But of course you could have just choose $f=\chi_{\mathbb{Q}}$.
