TITLE: Can the supremum of continuous functions be discontinuous at every point of an interval?
QUESTION [10 upvotes]: Pether Luthy gave an example of a sequence of continuous real valued functions whose supremum was discontinuous on a set of positive measure. But does it exist a sequence of continuous real valued functions $f_n:\mathbb{R}\to\mathbb{R}$ such that $f(x) = \sup_{n \in \mathbb{N}} f_n(x)$ is a discontinuous function at every point of a subinterval of $\mathbb{R}$ ?
If such a sequence does not exist, how is it possible to prove it?

REPLY [29 votes]: Since the function $f$ is supremum of a set of continuous functions, it is lower-semicontinuous.1
Every lower semicontinuous function belongs to the first Baire class.2
If $f\colon \mathbb R\to\mathbb R$ is of the first Baire class, then the set $D_f$ of the points of discontinuity is a meager set.3
In particular, $D_f$ cannot be an interval.

1Theorem 10.3  in van Rooij-Schikhof: A Second Course on Real Functions. Mathematics Stack Exchange: To show that the supremum of any collection of lower semicontinuous functions is lower semicontinuous or Show that the supremum of a collection of lower semicontinuous function is lower semicontinuous.
2Theorem 10.6 and Exercise 11.E in van Rooij-Schikhof; Show that lower semicontinuous function is the supremum of an increasing sequence of continuous functions on Mathematics Stack Exchange
3Theorem 11.4 in van Rooij-Schikhof; MathOverflow: Points of continuity of Baire class one functions