Proof that $(x,\omega)\mapsto X^n(x,\omega)$ measurable and $X^n(x,\cdot)$ convergence in probabiliity gives a uniform limit in $(x,\omega)$ This is  part of the proof of Lemma 16.12 from Schilling's Brownian Motion.
Let $(E,\mathscr{E})$ be a measurable space and $(\Omega, \mathscr{A},P)$ be a probability space.
Assume that $(X^n(x,\cdot))_{n\ge 1}$ is a sequence of random variables depending on a parameter $x$. Also let $(x,\omega)\mapsto X^n(x,\omega)$ be $\mathscr{E}\otimes \mathscr{A}$ measurable and for every $x\in E$, the sequence $X^n(x,\omega)$ converges in probability.
The goal is then to show that there is a version of the limit $X(x,\omega)$ such that $(x,\omega)\mapsto X(x,\omega)$ is $\mathscr{E}\otimes \mathscr{A}$ measurable.
The proof proceeds as follows.
By assumption, $\lim_{m,n\to \infty}P(|X^n(x,\omega)-X^m(x,\omega)|>2^{-k})=0$  for all $k\ge 0$ and $x\in E$. Next we define $$n_k(x):=\inf\{m>n_{k-1}(x):\sup_{i,j\ge m} P(|X^i(x,\cdot)-X^j(x,\cdot)|>2^{-k})\le 2^{-k}\}.$$
The text then says obviously, $x\mapsto n_k(x)$ is $\mathscr{E}$-measurable and we see that
$$P(\sup_{x\in E} |X^{n_k(x)}(x,\cdot)-X^{n_l(x)}(x,\cdot)|>2^{-k})\le 2^{-k}$$ for all $l>k$.
And then using the completeness of the convergence in probability, this shows that $X^{n_k(x)}(x,\omega)$ converges in probability, uniformly in $x\in E$ and we can set this limit as $X(x,\omega)$.
My questions are $1$. Why is $x\mapsto n_k(x)$ $\mathscr{E}$ measurable? I can't see why this is obvious.
$2$. From the definition of $n_k$, how can we get the boundedness in probability, uniformly in $x$ of the form $$P(\sup_{x\in E} |X^{n_k(x)}(x,\cdot)-X^{n_l(x)}(x,\cdot)|>2^{-k})\le 2^{-k}$$ for all $l>k$?
$3$.Finally, how can we show that this implies convergence in probability for $X^{n_k(x)}(x,\omega)$ uniformly in $x\in E$?
I would greatly appreciate if anyone could provide the details here.
 A: To show $x \to n_k(x)$ is $\mathscr{E}$-measurable, it suffices to show that the map $ x \to P(|X^i(x,\cdot)-X^j(x,\cdot)|>2^{-k})$ is $\mathscr{E}$ measurable $\forall i,j,k \in \mathbb{N}$, since then the map $ Y_m(x) = \sup_{i,j\ge m} P(|X^i(x,\cdot)-X^j(x,\cdot)|>2^{-k})$ is $\mathscr{E}$ measurable $\forall \ m$, so that the event  $\{n_k = n\} = \{n_{k-1} \lt n\} \cap \{Y_m \gt 2^{-k} \ \forall m \lt n \} \cap \{Y_n \leq 2^{-k}\} $, which is of course in $\mathscr{E}$ under the inductive hypothesis $x \to n_{k-1}$ is $\mathscr{E}$-measurable, so that by induction $x \to n_k(x)$ is measurable.
Note that since $(x,\omega) \to X^{n}(x,\omega)$ is measurable in the product $\sigma$-algebra $\forall \ n$, it is true that $ x \to |X^i(x,w)-X^j(x,w)|$ is also measurable. One property of the product $\sigma$-algebra is that if $(x,\omega) \to Z(x,\omega) $ is bounded-measurable in the product sigma-algebra, then $x \to \int Z(x,\omega) dP(\omega)$ is $\mathscr{E}$-measurable, and so taking $Z = 1_{A}(|X^{i}-X^j)|$, where $A$ is a Borel set, we get that the map $x \to P(|X^{i}(x,\cdot)-X^{j}(x,\cdot)| \in A)$ is $\mathscr{E}$ measurable, and in particular this holds for $A = (2^{-k},\infty)$.
The definition of $n_k$ tells us that $\sup_{x\in E} P(|X^{n_k(x)}(x,\cdot)-X^{n_l(x)}(x,\cdot)|>2^{-k})\le 2^{-k}$, and it is not clear to me how this can be extended to $P(\sup_{x\in E} |X^{n_k(x)}(x,\cdot)-X^{n_l(x)}(x,\cdot)|>2^{-k})\le 2^{-k}$ without further regularity conditions on $\mathscr{E}$ and $X$. In fact it is not even clear why $\omega \to \sup_{x\in E} |X^{n_k(x)}(x,\omega)-X^{n_l(x)}(x,\omega)|$ is measurable!
However, it is enough to have $\sup_{x\in E} P(|X^{n_k(x)}(x,\cdot)-X^{n_l(x)}(x,\cdot)|>2^{-k})\le 2^{-k}$ : For each $x$, Borel Cantelli shows that almost surely, $ |X^{n_k(x)}(x,\cdot)-X^{n_l(x)}(x,\cdot)| \leq 2^{-k}$ eventually, which shows that $\forall 
 x, X^{n_k(x)}(x,\cdot)$ is almost surely Cauchy, and therefore we deduce that $\forall x,  X^{n_k(x)}(x,\omega)  \to X(x,\omega)$ almost surely.
Thus $X(x,\omega)$ is almost surely $\limsup_{k} X^{n_k(x)}(x,\omega)$, a sequence of $\mathscr{E} \times \mathscr{A}$ measurable random variables, and is therefore itself measurable.
A: I can give you some details about point 1.
I assume we start with something like $n_0(x)=0$. First we note that measurability of $n_1$ follows if we show that $\{x\in E\mid n_1(x)>t\}$ is measurable for each $t\in\mathbb{N}$. For such a $t$ we see that $n_1(x)>t$ if and only if $\sup_{i,j\geq s}P(\lvert X^i(x,\cdot)-X^j(x,\cdot)\rvert>2^{-1})> 2^{-1}$ for each $s\leq t$. Hence, we may write
$$
\{x\in E\mid n_1(x)>t\}=\bigcap_{s\leq t}\{x\in E\mid\sup_{i,j\geq s}P(\lvert X^i(x,\cdot)-X^j(x,\cdot)\rvert>2^{-1})> 2^{-1}\}.
$$
From the measurability of $(x,\omega)\mapsto X^n(x,\omega)$ you can show that for each $s\in\mathbb{N}$ the map $x\mapsto\sup_{i,j\geq s}P(\lvert X^i(x,\cdot)-X^j(x,\cdot)\rvert>2^{-1})$ is measurable. This gives you measurability of the right-hand side above.
For $k>1$ it should be similar, and you will likely need measurability of $n_{k-1}$ to prove measurability of $n_k$.
