I know how to prove the following fact:
If $\{f_n\}_{n=1}^{\infty}$ is a collection of measurable functions, and $\lim\limits_{n\to\infty} f_n(x)=f(x),$ then $f$ is measurable.
But let's consider a bit different statement:
If $\{f_n\}_{n=1}^{\infty}$ is a collection of measurable functions, and $\lim\limits_{n\to\infty} f_n(x)=f(x)$ a.e., then $f$ is measurable.
Intuitively, i know that the set of zero measure does not influene, but I am not able to down the rigorous proof.
I was trying to consider two sets: $A=\{x:\lim\limits_{n\to\infty} f_n(x)=f(x)\}$ and $B=\{x:\lim\limits_{n\to\infty} f_n(x)\neq f(x)\}$. Then $m(B)=0$. But how to show that $f$ is measurable I don't know.
Could anyone show me how to do it?
Would be very grateful for help!
EDIT 1: I guess that the key thing here is the following: Suppose $f$ is measurable, and $f(x)=g(x)$ for a.e. $x$. Then $g$ is measurable.
EDIT 2: Since $\{f_n(x)\}_{n=1}^{\infty}$ is a collection of measurable functions on $E$, then we can define it's point-wise limit on $E$ as $F(x)$. Then we know that $F(x)$ is measurable.
Consider the set $A=\{x\in E: \lim \limits_{n\to \infty} f_n(x)\neq f(x)\}$ then by condition $A$ is measurable and $m(A)=0$. Let $B=\{x\in E: \lim \limits_{n\to \infty} f_n(x)= f(x)\}$. Note that $F(x)=f(x)$ a.e. on E, since $A=\{x:F(x)\neq f(x)\}$ has zero measure. So using fact from EDIT we have that $f(x)$ is also measurable. Right?
First fact: if $f$ is measurable and $f=g$ almost everywhere, then $g$ is measurable.
Define $E = \{x : f_n(x) \not\to f(x)\}$. By virtue of the fact that $f_n \to f$ almost everywhere, $E$ is measurable because it has measure zero (I'm assuming Lebesgue measure here, or at least a complete measure on some space). Let $G$ denote the complement of $E$.
Define $g_n(x) = f_n(x) \chi_G(x)$ and $g(x) = f(x) \chi_G(x)$. Each $g_n$ is a product of measurable functions, thus measurable.
Also note that $g_n \to g$ everywhere. If $x \in G$ then $g_n(x) = f_n(x) \to f(x) = g(x)$. If $x \notin G$ then $g_n(x) = 0$ for all $n$ and $g(x) = 0$.
It follows that $g$ is measurable too.
According to the first fact, so is $f$.