How to prove limit of measurable functions is measurable
I need help to prove the following theorem
Suppose $f$ is the pointwise limit of a sequence of $f_n$, $n = 1, 2, \cdots$, where $f_n$ is a Borel measurable function on $X$. Then $f$ is Borel measurable on $X$.
My idea is to use the standard definition like for every $c$,$\{x:f(x)<c\}$ is Borel measurable. But got stuck as how to do it for sequence of $f_n$.
First, we prove that $\limsup\limits_{n\to\infty\space k\geqslant n}f_k$ and $\liminf\limits_{n\to\infty\space k\geqslant n}f_k$ are measurable.
By definition $$ \limsup\limits_{n\to\infty\space k\geqslant n}f_k=\inf\limits_{n\geqslant1}\sup\limits_{\space k\geqslant n}f_k $$ $$ \liminf\limits_{n\to\infty\space k\geqslant n}f_k=\sup\limits_{n\geqslant1}\inf\limits_{\space k\geqslant n}f_k $$
Since \begin{align} \inf_{n\geqslant 1} \sup_{k\geqslant n} f_k(x) \leqslant c &\iff \forall \epsilon>0,\: \exists n\geqslant 1: \quad \sup_{k \geqslant n} f_k(x)< \inf \sup_{k\geqslant n} f_k(x)+\epsilon \leqslant c+\epsilon \\ &\iff \forall j\geqslant 1,\: \exists n\geqslant 1: \quad \sup_{k \geqslant n} f_k(x) \leqslant c+\frac1{j} \\ &\iff \forall j\geqslant 1,\: \exists n\geqslant 1, \:\forall k\geqslant n: \quad f_k(x) \leqslant c+\frac1{j} \\ &\iff x\in\bigcap\limits_{j\geqslant 1}\bigcup\limits_{n\geqslant 1}\bigcap\limits_{k\geqslant n}\left\{x:f_k(x) \leqslant c+\frac1{j}\right\} \end{align} We have $$ \{x:\inf\limits_{n\geqslant1}\sup\limits_{\space k\geqslant n}f_k\leqslant c\}=\bigcap\limits_{j\geqslant 1}\bigcup\limits_{n\geqslant 1}\bigcap\limits_{k\geqslant n}\left\{x:f_k(x) \leqslant c+\frac1{j}\right\}\tag1 $$ Similarly \begin{align} \sup_{n\geqslant 1} \inf_{k\geqslant n} f_k(x) \leqslant c &\iff \forall n\geqslant 1: \quad \inf_{k \geqslant n} f_k(x)\leqslant c \\ &\iff \forall \epsilon>0,\:\forall n\geqslant 1, \:\exists k\geqslant n: \quad f_k(x)<\inf_{k \geqslant n} f_k(x)+\epsilon\leqslant c+\epsilon \\ &\iff \forall j\geqslant 1,\: \forall n\geqslant 1, \:\exists k\geqslant n: \quad f_k(x) \leqslant c+\frac1{j} \\ &\iff x\in\bigcap\limits_{j\geqslant 1}\bigcap\limits_{n\geqslant 1}\bigcup\limits_{k\geqslant n}\left\{x:f_k(x) \leqslant c+\frac1{j}\right\} \end{align} So $$\{x:\sup\limits_{n\geqslant1}\inf\limits_{\space k\geqslant n}f_k\leqslant c\}=\bigcap\limits_{j\geqslant 1}\bigcap\limits_{n\geqslant 1}\bigcup\limits_{k\geqslant n}\left\{x:f_k(x) \leqslant c+\frac1{j}\right\}\tag2 $$ Since both $(1)$ and $(2)$ are measurable $$ \limsup\limits_{n\to\infty\space k\geqslant n}f_k \quad\text{ and }\quad\liminf\limits_{n\to\infty\space k\geqslant n}f_k\quad\text{} $$ are measurable. Since $\lim\limits_{n\to\infty\space}f_n=f$, $$f=\limsup\limits_{n\to\infty\space k\geqslant n}f_k=\liminf\limits_{n\to\infty\space k\geqslant n}f_k $$ So $f$ is measurable.
As a more "direct" proof, you could also note that $$\{x\in X\mid f(x)>a\}=\bigcup_{m=1}^\infty\bigcup_{N=1}^\infty \bigcap_{n=N}^\infty \left\lbrace x\in X :f_n(x)>a+\frac{1}{m}\right\rbrace$$