Let $f: X \to Y$ be a function between metric spaces. I was told that the points of continuity of $f$ are a $G_\delta$ set and the points of discontinuity an $F_\sigma$ set of $X$. Can anyone give me a reference for this fact to an analysis/topology book (so no handouts or something similar). I could only find references treating $X = \mathbb{R} \supseteq Y$.
Thanks in advance.
It's sort of implicit in Engelking's and Willard's treatment of the Lavrentieff theorem, where they define points of oscillation $0$ and show that these form $G_\delta$ sets to which we can extend some continuous functions.
It's made explicit in Kechris, Classical descriptive set theory, Proposition 3.6, page 15. which states:
The proof is reasonably short (modulo some minor details): define for each $x \in X$ $$\operatorname{osc}_f(x) = \inf \{\operatorname{diam}(f[U]): U \text{ open neighbourhood of } x\}$$ the so-called oscillation of $f$ at $x$. Then $A_\varepsilon = \{x \in X: \operatorname{osc}_f(x) < \varepsilon\}$ is open in $X$ for each $\varepsilon >0$ and the set of continuity of $f$ equals $\{x \in X: \operatorname{osc}_f(x) = 0 \} = \bigcap_{n \ge 1} A_{\frac1n}$ which is a $G_\delta$ set.
That the points of discontinuity are an $F_\sigma$ is then immediate of course, and needs no separate statement. The complement of a $G_\delta$ always is an $F_\sigma$.