Lim Sup and Measurability of one Random Variable with respect to Another Here, there is a common proposition in probability theory :

Let $X,Y: (\Omega, \mathcal{S}) \rightarrow (\mathbb{R}, \mathcal{R})$ where $\mathcal{R}$ are the Borel Sets for the Reals.  Show that $Y$ is measurable with respect to $\sigma(X) = \{ X^{-1}(B) : B \in \mathcal{R} \}$ if and only if there exists a function $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $Y(\omega) =
f(X(\omega))$ for all $\omega \in \Omega$.

A proof is given here (written by Nate Eldredge).
I have worked on it, but a point need to be clarified :


*

*Why we use the lim sup ? Because we do not know that the lim exists whereas the lim sup always exists ?

*(Mainly) Is there a good example that explain the use of lim sup ? - Because I simply fail to find a good and simple example that could justify the lim sup. I have tried many constructions (with a Logarithm for example) but does not work ... maybe build one with $cos$ or $-1^n$, no ?


We have, by construction, $f_n(X)=Y_n$ and therefore $\lim f_n(X)=Y$, but $\lim f_n(x)$ may not exist for all $x\in\mathbb R$ if the range of $X$ doesn't cover the entire real line. (This is related to the fact that the choice of $B_{i,n}$ may not be unique.) So you take limsup outside the range of $X$ (on the range of $X$ it doesn't matter whether you take limsup or lim because limits exist). 
I've got one thing to add, though. The limsup may yield infinity while $f$ is expected to be finite. So we may note the following: $\limsup f_n=:f$ is measurable as a function from $\mathbb R$ to the extended reals. So the set of $x$'s for which $f$ takes the value of $\infty$ is measurable. Change $\infty$ to any finite number on this set.
