Show there exists an $A\in \mathscr{A}$ s.t. $f=\mathbb{1}_{A_n},$ $\mu - a.a$ Problem:
Let $(X,\mathscr{A},\mu)$ be a measure space, let $\{A_n\}_{n=1}^{\infty}$ be a sequence of sets in $\mathscr{A},$ and let $f\in \mathscr{M}(\mathscr{A}).$ (Where $f\in \mathscr{M}(\mathscr{A})$ means $f$ is a measurable function.)
$(i):$ Assume that $\mathbb{1}_{A_n} \xrightarrow{n\rightarrow\infty} f(x),$ for a.a. $x\in X.$
Show there exists an $A\in \mathscr{A}$ s.t. $f=\mathbb{1}_{A_n},$ $\mu - a.a$
My attempt:
I don't really have one, but i have an idea. I want to some how show that $\lim_{n\rightarrow \infty}\mathbb{1}_{A_n}-f(x)=0.$
But do i show it by integrals? or am i missing the use of a theorem?
Any hints would be greatly appreciated.
 A: We have $f\in \{0,1\}$ $\mu-$a.e. Hence $f(x) = 1_{f=1}(x)$ $\mu$-a.e.
A: Let us follow the suggestions by @Paul. Let $x \in \{\mathbf{1}_{A_n}\to f\}$ (this is a measurable set). Then:
$$\lim_{n \to \infty}\mathbf{1}_{A_n}(x)=f(x)\implies \limsup_{n \to \infty}\mathbf{1}_{A_n}(x)=f(x)$$
Now note the following:
$$f(x)=\limsup_{n \to \infty}\mathbf{1}_{A_n}(x)=\inf_{n \in \mathbb{N}}\sup_{k\geq n}\mathbf{1}_{A_n}(x)=\inf_{n \in \mathbb{N}}\mathbf{1}_{\cup_{k\geq n}A_k}(x)=\mathbf{1}_{\cap_{n \in \mathbb{N}}\cup_{k\geq n}A_k}(x)$$
Define $A:=\cap_{n \in \mathbb{N}}\cup_{k\geq n}A_k$. Since each $A_n$ is measurable, $A$ is measurable. Then $\{\mathbf{1}_{A_n}\to f\}\subseteq \{f=\mathbf{1}_A\}$. Recall that by assumption $\mu(\{\mathbf{1}_{A_n}\to f\}^c)=0$; this implies $\mu(\{f \neq \mathbf{1}_A\})\leq \mu(\{\mathbf{1}_{A_n}\to f\}^c)=0$. So $f=\mathbf{1}_A$ $\mu$-a.e.
A: Did you mean $f=1_A$ rather than $f=1_{A_n}$ ? If so then...
Actually, see here and there:

*

*we have $\limsup 1_{A_n} = 1_{\limsup A_n}$ and similarly


*$\liminf 1_{A_n} = 1_{\liminf A_n}$


*and hence $\lim 1_{A_n} = 1_{\lim A_n}$
So what happens is that $f$ and $1_{\lim A_n}$ are $\mu$-almost equal.
Therefore, choose $A = \lim A_n$.
Note: If the problem is show that $f$ itself is completely equal to an indicator function (if it's true), then I'm not sure you can pick $\lim A_n$ (probably $f=1_B$ where $\mu(B)=\mu(\lim A_n)$ for some $B$), but eh if it's just $\mu$-almost equal, then there you go.
