The set of points at which a real function is continuous is borel? $f: \mathbb D(f) \subset \mathbb R \rightarrow \mathbb R$. I have to prove that $\mathcal C_f = \{x\in \mathbb R : \text{ f is continuous at } x\}$ is a Borel set. So I define 
$A_n=\{x∈\mathbb R:\exists \delta>0 \text{ such that }∀x_1,x_2 \in (x-\delta, x+\delta)(∣f(x_1)−f(x_2)∣<1 / n)\}$ 
and I plan to show that $A = \cap_{n \in \mathbb N}A_n$ is equal to  $\mathbb C_f $. 
I know that each $A_n$ is open, so $A$ is Borel. I also proved that $A \subset \mathbb C_f$. I am stuck in trying to prove that $\mathbb C_f \subset A$. Let $x$ in $\mathbb C_f$. Then there is a $\delta > 0$ such that $x_0 \in \mathbb D(f) \cap (a-\delta,a+\delta) \Rightarrow |f(x_0) - f(x)| < 1/2n$. Then I would take $x_1, x_2$ for this $\delta$, use the triangle inequality and be done. But my problem is, that this is not true for all $x_1, x_2$. By the definition of continuity, the function must be defined on them. Generally, there might be $x'$'s in $(a-\delta, a+\delta)$ for which $f$ is not defined.
For example, if $f$ is continuous on $[1,2]$, then $f$ is continuous at $1$, but $1 \not\in A_n$. Is there a way to bypass this problem?
EDIT: Corrected the domain.
 A: Define
$$
f_{\ast}(x) = \sup_{\epsilon > 0} \inf_{|y-x|<\epsilon} f(y)
$$
Then, I claim that for any $p\in \mathbb{Q}$,
$$
S_p = \{x : f_{\ast}(x) > p\}
$$
is open.
Proof : Suppose $x_0 \in S_p$, then there is $\epsilon > 0$ such that
$$
\inf_{|y-x_0|<\epsilon} f(y) > p
$$
Then, for any $x$ such that $|x-x_0| < \epsilon$, choose $\epsilon'$ such that
$$
(x-\epsilon',x+\epsilon') \subset (x_0-\epsilon, x_0+\epsilon)
$$
Then
$$
\inf_{|y-x|<\epsilon'}f(y) > p \Rightarrow f_{\ast}(x) > p
$$
Hence, $S_p$ is open.

Now, define
$$
f^{\ast}(x) = \inf_{\epsilon > }\sup_{|y-x|<\epsilon}f(y)
$$
Then, $f^{\ast} = -(-f)_{\ast}$, so a similar fact is true for $f^{\ast}$.

Now note that the set of discontinuities of $f$ is
$$
D = \{ x : f_{\ast}(x) < f^{\ast}(x)\}
$$
$$
= \{x : \exists p, q \in \mathbb{Q} : f_{\ast}(x) \leq p < q \leq f^{\ast}(x)\}
$$
$$
= \bigcup_{p,q\in\mathbb{Q}, p<q} (\{x: f_{\ast}(x) \leq p\}\cap \{x : f^{\ast}(x) \geq q\})
$$
Hence, $D$ is borel, so $D^c$ is Borel (in fact, a $G_{\delta}$ set)
A: In general $\mathcal C_f$ is not a Borel set. For example, let $\phi$ be the Cantor-Lebesgue function that is an increasing continuous function from $[0,1]$ onto $[0,1]$. Now define the function $\psi: [0,1]\rightarrow [0,2]$ with $\psi(x)=\phi(x)+x$, where it is a strictly increasing continuous function that maps $[0,1]$ onto $[0,2]$. Then there exists a measurable set $A$ subset of the Cantor set
such that $\psi(A)$ is a nonmeasurable set. Now if the function $f$ is identity map on $\psi(A)$, then $\mathcal C_f=\psi(A)$, where its a nonmeasurable set.
