TITLE: Points of continuity is a Borel set?
QUESTION [5 upvotes]: Let $f:X \to \mathbb R$ be a function where $X$ is a metric space. Is the set of points at which $f$ is continuous a Borel set?
i.e. Is the set $\{ x \in X : f$ is continuous at $x \in X$ $\}$ a Borel set in $X$?
(Maybe separability of $X$ is needed?)

REPLY [3 votes]: If $f:X\to Y$ where $X$ is a topological space and $Y$ is a metric space, then the set of points of continuity of $f$ is the $G_\delta$ set
$$\bigcap_{n=1}^\infty\bigcup\left\{D\subseteq X:D\text{ is open and }\operatorname{diam}f[D]\le\frac1n\right\}.$$