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?

Yes, you're correct. To show that it's a Borel function, begin by showing that if $\mathcal{O} \subseteq \mathbb{R}$ is an open set, then $f^{-1}(\mathcal{O})$ is one of exactly four possible sets: $\emptyset, \mathbb{Q}$, $\mathbb{R} \setminus \mathbb{Q}$, and $\mathbb{R}$.
