# $\{\omega: f_n(\omega)\in[a,b]\text{ for finitely many }n\}$ is measurable

The question:

Given a sequence of measurable functions $$(f_n):\Omega\rightarrow \mathbb{R}$$. Prove the following set $$A$$ is measurable: $$A=\{\omega:f_n(\omega)\in[a,b]\text{ for finitely many }n\}$$ $$B=\{\omega:f_n(\omega)\in[a,b]\text{ for infinitely many }n\}$$

I found another similar post but I don't think it was helpful.

My thoughts:

For $$A$$, $$f_n(\omega)\in[a,b]$$ for finitely many $$n$$ means: $$\forall \,N < \infty\,\,\exists \,\,n\leq N \text{ such that } f_n(\omega)\in [a,b]$$translate that to set language is:$$\bigcup_{N\in\mathbb{N}}\bigcap_{n\leq N} \{\omega:f_n(\omega) \in [a,b]\}$$However, this does not seem right, cause if for some $$n \leq N$$, set $$\{\omega: f_n(\omega)\in[a,b]\}$$ is empty, then the intersection over all $$n \leq N$$ would be empty, and that is not necessarily true.

For $$B$$, $$f_n(\omega)\in[a,b]$$ for infinitely many $$n$$ means: $$\exists \,N < \infty\,\,\forall \,\,n\geq N \text{ such that } f_n(\omega)\in [a,b]$$ in set it is: $$\bigcap_{N\in\mathbb{N}}\bigcup_{n\geq N} \{\omega:f_n(\omega) \in [a,b]\}$$

Are my thoughts correct? I apologize if I made any stupid mistakes. Since I don't have a solid background on sets or logic, any help would be very much appreciated!

• Your characterization of $A$ is wrong; the statement you've written says 'the set of $n$ with $f_n(\omega)\in[a,b]$ is non-empty', but that's different from finite. What you want to say is that there's some $N_0$ such that for all $n\gt N_0$, $f_n(\omega)\not\in[a,b]$; the set of $n$ with $f_n(\omega)\in[a,b]$ is bounded. Aug 4, 2021 at 16:49
• Thank you, I think it is working with $\{f_n(\omega)\in [a,b]\}^C$? But it feels like if we do $n>N_0,f_n(\omega)\notin [a,b]$, that says all but finitely many $n$, $f_n(\omega) \notin [a,b]$? Is it good enough? Aug 4, 2021 at 16:56
• Notice that you are basically asking whether or not $\limsup f_{n}$ and $\liminf f_{n}$ are measurable. This is true: as shown in the answers below, it follows because there is a compatible definition of "limsup" and "liminf" of sets. See here for a formal definition of "limsup" and "liminf" of sets: en.wikipedia.org/wiki/Set-theoretic_limit
– user711689
Aug 4, 2021 at 17:47

For some $$N$$, for all $$n$$, if $$n\geq N$$, then $$f_{n}(\omega)\notin[a,b]$$.
$$f_{n}(\omega)\notin[a,b]$$ is equivalent to $$f_{n}(\omega)\in(-\infty,a)\cup(b,\infty)$$.
The set becomes \begin{align*} \bigcup_{N=1}^{\infty}\bigcap_{n\geq N}f_{n}^{-1}(-\infty,a)\cup f_{n}^{-1}(b,\infty). \end{align*}
Hints: For each $$n$$, let $$C_{n}=\{\omega\mid f_{n}(\omega)\in[a,b]\}$$, which is measurable.
Note that $$A=\cup_{n\in\mathbb{N}}\cap_{k\geq n}C_{k}^{c}$$ and $$B=\cap_{n\in\mathbb{N}}\cup_{k\geq n}C_{k}$$. (Here, I assume that the word "for finitely many $$n$$" includes the case "for no $$n$$".)