The Baire's simple limit theorem states that if the functions $f\_n : \mathbb{R} \to \mathbb{R}$ are continuous and converge everywhere to a function $f$ then $f$ has a dense set of continuity points. We say that $f$ is of Baire class one when $f$ is a limit everywhere of continuous functions. 


In the following, "measure" will refer to the Lebesgue measure. 


**Question.** Assume that there is continuous functions $f\_n : [0,1] \to \mathbb{R}$ and a measurable function $f$ such that $f(t)=\lim \_{n \to \infty} f\_n(t)$ for $t \in A \subset [0,1]$, a measurable set of measure $1$. Is it true that $f$ is equal almost everywhere to a function of Baire class $1$ ? 


**N.B.** Yesterday I posted a trivial (and useless) version of the question and a user proposed $f\_n=0$ and $f=1\_{\mathbb{Q}}$, but $f=0$ a.e which does not provides a counter-example with this formulation. 


The problem is that when we take continuous functions $f\_n : [0,1] \to \mathbb{R}$ and a $f$ such that $f(t)=\lim \_{n \to \infty} f\_n(t)$ for $t \in A$ (of measure $1$) we are not sure that $(f\_n(t))\_{n \ge 0}$ converges and not even sure if $f\_n(t)$ is defined. 


**Example.** If $N\_k=2^{q\_k}$, $q\_1=1$ and $q\_{k+1}=2^{q\_k}+q\_k+1$. Setting $e\_N(\theta)=e^{2i \pi \theta}$ for $\theta \in [0,1]$ one can see that : $$h:= \sum\_{k \ge 1} \frac{e\_{N\_k}+e\_{-N\_k}}{k} \in L^2 \subset L^1$$
Thus there exists an increasing sequence $K\_j \to \infty$ satisfying : $$h(\theta)= \lim\_{j \to \infty} \sum\_{k=1}^{K\_j} \frac{2 \cos (2\pi K\_j\theta)}{k} \text{ a.e }$$


Let $f\_j : x \mapsto \sum\_{k=1}^{K\_j} \frac{2 \cos (2\pi K\_j\theta)}{k}$ which is a continuous function. What my question ask here is to state whether $\lim f\_j$ agrees almost everywhere with a function of Baire class $1$ i.e a function which is a simple limit of continuous functions. It is not far since the $f\_j$ are continuous and that $(f\_j(t))\_{j}$ converges for a.e $t$, but NOT everywhere since for example $f\_j(0)$ diverges. 


If it is not clear please tell me what is unclear and I will clarify !



Baire's simple limit theorem "almost everywhere"
No.


Your first hypothesis is true for any Lebesgue measurable function $f$; there is a sequence of continuous functions $f\_n$ such that $f\_n \to f$ almost everywhere. This is standard.


But there do exist Lebesgue measurable (even Borel) functions which are not a.e. equal to any function of Baire class 1.


For instance, it's a fairly standard exercise to construct a Borel set $B \subset [0,1]$ such that for any nontrivial interval $I$, we have $0 < m(B \cap I) < m(I)$. See [this Math.SE post](https://math.stackexchange.com/questions/57317/construction-of-a-borel-set-with-positive-but-not-full-measure-in-each-interval) for details. Take $f = 1\_B$. 


Suppose $g = f$ a.e.; let $C\_1 = g^{-1}(\{1\})$ and $C\_0 = g^{-1}(\{0\})$, so $m(C\_1 \triangle B) = 0$ and $m(C\_0 \triangle B^c) =0$. As such, for any interval $I$ we have $m(C\_i \cap I) > 0$. So in particular, on any interval, there are points at which $g=0$ and points at which $g=1$. Hence $g$ is nowhere continuous and thus not Baire class 1. 


See also <https://math.stackexchange.com/questions/15088/is-every-lebesgue-measurable-function-on-mathbbr-the-pointwise-limit-of-con>. It's mentioned there that every Lebesgue measurable function is a.e. equal to some function of Baire class 2.


