Upcrossing measurable For upcrossings we have defined $S_{n}=\inf \{k>B_{n}:x_{k}>b\}$  and $B_{n}=\inf \{k>S_{n-1}:x_{k}<a\}$. The number of upcrossings over the interval $(a,b)$ is given by $U_{N}(a,b)=\max\{n:S_{n}\leq N\}$. $U(a,b)=\lim_{N\rightarrow \infty} U_{N}(a,b)$
It is stated that $S_{n}$ and $B_{n}$ are stopping times ($\{S_{n}\leq k\}\in F_{k}$) and that $U_{N}(a,b)$ is $F_{N}$-measurable and $U(a,b)$ is $F_{\infty}$-measurable,
I think I managed to show that $B_{n}$ and $S_{n}$ are stopping times by:
$$\{B_{n}\leq k\}=\bigcup_{i=S_{n-1}}^{k}\{x_{i}<a\}$$
As $\{x_{i}<a\}\in F_{i}\subset F_{k}$ so $\{B_{n}\leq k\}\in F_{k}$. 
I was wondering if I've done this correctly and I have no idea how to prove the second part. Could anyone help me with this?
 A: To avoid using random variables as limits of summations, you could rather write
$$
[B_n\leqslant k]=\bigcup_{i=0}^{k-1}\left([S_{n-1}=i]\cup\bigcup_{\ell=i+1}^k[x_\ell\lt a]\right).
$$
If $S_{n-1}$ is a stopping time, every $[S_{n-1}=i]$ on the RHS is in $F_k$ since $i\leqslant k$, as well as every $[x_\ell\lt a]$ for every $\ell\leqslant k$, hence $[B_n\leqslant k]$ is in $F_k$, which would prove that $B_n$ is a stopping time as well. Similarly,
$$
[S_n\leqslant k]=\bigcup_{i=0}^{k-1}\left([B_{n}=i]\cup\bigcup_{\ell=i+1}^k[x_\ell\gt b]\right),
$$
hence, if $B_{n}$ is a stopping time, every $[B_n=i]$ on the RHS is in $F_k$ since $i\leqslant k$, as well as every $[x_\ell\gt b]$ for every $\ell\leqslant k$, hence $[S_n\leqslant k]$ is in $F_k$, which would prove that $S_n$ is a stopping time as well. Starting from $S_0=0$, which is a stopping time, one sees by recursion that every $S_n$ and every $B_n$ are stopping times.
As regards $U(a,b)$, note that
$$
U_N(a,b)=\sum_{n=1}^{+\infty}\mathbf 1_{S_n\leqslant N}.
$$
Since each $[S_n\leqslant N]$ is in $F_N$ and $F_N\subseteq F_\infty$, every $U_N(a,b)$ is $F_\infty$-measurable. Thus, so is their pointwise limit $U(a,b)$.
