Baire class 1 and discontinuities Is it true that a bounded real function $f:[0,1]\to[0,1]$ with only countably many discontinuities has to be of Baire class 1, that is pointwise limit of a sequence of continuous functions? Is there a counter-example?
This would be an easy consequence of a theorem stated here: https://encyclopediaofmath.org/wiki/Baire_theorem
The theorem, attributed to Baire in that webpage, states that a function is the pointwise limit of a sequence of continuous functions if and only if its restriction on any perfect set has a point of continuity. However, in the original work by Baire added as a reference I could only find a weaker version of this theorem, which does not imply what I am searching for.
Many thanks!
 A: Baire showed in his 1899 thesis that such a function $f$ is a pointwise limit of continuous functions if and only if, for each perfect set $P,$ the function $f|_P$ (the restriction of $f$ to $P)$ is continuous on a set of points that is both dense and $G_{\delta}$ relative to $P.$ For the "if" half, we can replace "both dense and $G_{\delta}$ relative to $P$" with "nonempty" (still under the umbrella of "for each perfect set $P$").
Note: Here and below, "perfect" means "nonempty perfect" and "interval" means "interval of positive length".
Note that if a function $f$ is such that its restriction to every closed interval $I$ ("closed" is not actually needed) has at least one continuity point, then the function has a dense set of continuity points. This follows easily (see next sentence) from the obvious fact that every continuity point of $f_I$ that lies in the interior of $I$ will be a continuity point of $f.$ Thus, given any open subinterval $J$ of $[0,1],$ there exists a continuity point of $f$ lying in $J,$ because of the existence of a continuity point of $f|_I$ where $I$ is a closed-in-${\mathbb R}$ subinterval of $J.$
A similar argument works for perfect sets in place of intervals, and hence for the dense part of the "only if" half of Baire's theorem, it suffices to prove that, given any perfect set $P,$ the function $f_P$ has at least one continuity point. Thus, if $f$ is Baire $1$ and $P$ is a perfect set, then $f_P$ has a dense set of continuity points. Indeed, $f_P$ has a dense $G_{\delta}$ (both properties are relative to $P)$ set of continuity points, which implies that $f_P$ has a $c$-dense (relative to $P)$ set of continuity points, and more (non-continuity points only form a meager subset of $P).$
Incidentally, Baire proved the Baire category theorem for perfect sets (and not just for the reals), so he definitely would have known that $f_P$ has uncountably many continuity points in every subinterval of $P,$ but I don't know whether he specifically stated this anywhere. The fact that "uncountably many" can be sharpened to "continuum many" follows from William H. Young's result (in 1903 I believe) that any uncountable $G_{\delta}$ set has cardinality $c = 2^{\aleph_0}.$
Thus, the only if half of Baire's theorem has the following consequences for a Baire $1$ function $f:[0,1] \rightarrow [0,1].$ Note that for the statements below, the first implies that the continuity points are dense in $[0,1]$ and the second is an automatic consequence of the first.

*

*For each open subinterval $J$ of $[0,1],$ $f$ has at least one continuity point in $J.$

*For each open subinterval $J$ of $[0,1],$ $f$ has infinitely many continuity points in $J.$

*For each open subinterval $J$ of $[0,1],$ $f$ has uncountably many continuity points in $J.$

*For each open subinterval $J$ of $[0,1],$ $f$ has continuum many continuity points in $J.$

*For each open subinterval $J$ of $[0,1],$ $f$ has co-meagerly many continuity points in $J.$
Moreover, the "if" half of Baire's theorem implies if a function $f:[0,1] \rightarrow [0,1]$ doesn't have too many discontinuity points, then the function will be a Baire $1$ function. The following are examples of "not too many".

*

*At most finite or countably infinitely many discontinuity points.

*At most meagerly many discontinuity points (i.e. the discontinuity set is first Baire category).

To see how the second condition just above (which of course includes the first condition) follows from Baire's theorem, let $D(f)$ be the discontinuity set of $f:[0,1] \rightarrow [0,1],$ let $P$ be a perfect subset of $[0,1],$ and assume $D(f)$ is a meager subset of $[0,1].$ Then $D(f) \cap P$ is meager relative to $P$ and every point in $P - (D(f) \cap P)$ is a continuity point of $f,$ and hence a continuity point of $f_P$ (any restriction of a function is continuous, when defined, at the continuity points of the function), so the continuity set of $f_P$ is a dense $G_{\delta}$ subset of $P.$ (The $G_{\delta}$ part is automatic, since the continuity set of any function from $[0,1]$ to $[0,1]$ is a $G_{\delta}$ set.)
A natural question is to what extent is the "restriction to perfect sets" aspect needed. Let $Z$ be the non-endpoints of the usual middle thirds (or any) Cantor set and let $f$ the the characteristic function of $Z$ (i.e. $f(x) = 1$ if $x \in Z$ and $f(x) = 0$ if $x \in [0,1] - Z.)$ Then $f$ is continuous at each point NOT in the Cantor set (because $f$ is locally constant at each such point), and hence the discontinuity set of $f$ is small in many ways. For instance, instead of the usual middle thirds Cantor set, we could use a Cantor set that has Hausdorff dimension zero. Nonetheless, $f$ is not a Baire $1$ function because the restriction of $f$ to the Cantor set is discontinuous at every point of the Cantor set (the restriction is $1$ on a dense subset of the Cantor set and $0$ on another dense subset of the Cantor set). Baire gave essentially this same example on p. 50 of his 1899 thesis. The reason I say "essentially" is because I believe Baire's example used the left endpoints of the Cantor middle thirds set rather than all the endpoints.
The example just above shows that while Baire $1$ functions are continuous almost everywhere in the sense of Baire category, the converse is not true. A function can be continuous almost everywhere in the sense of Baire category without being a Baire $1$ function. As indicated above, Baire proved this in 1899 by giving an explicit counterexample. A few years later Hausdorff (see p. 389 in his 1914 book Grundzüge der Mengenlehre) observed that a simple cardinality argument gives a nonconstructive proof of a stronger result—there are $c = 2^{\aleph_0}$ many Baire $1$ functions and $2^c$ many functions continuous almost everywhere in the sense of Baire category: The cardinality of the Baire $1$ functions is at least $c$ (consider constant functions) and no more than $c$ (there are $c$ many continuous functions, and hence $c$ many sequences of continuous functions), whereas the characteristic function of any of the $2^c$ many subsets of the Cantor set is continuous almost everywhere in the sense of Baire category (indeed, continuous except for a nowhere dense set).
A: It sounds like you're looking for Baire's characterization theorem. The first reference Google gives me is here.
