[step:Apply the squared-integral functional on measurable bounded paths to obtain the Cramer-von Mises limit]Let $\mu_0$ denote the probability measure on $(\mathbb R,\mathcal B(\mathbb R))$ whose distribution function is $F_0$. Let $\mathcal M$ be the set of bounded Borel-[measurable functions](/page/Measurable%20Functions) $f:\mathbb R\to\mathbb R$, equipped with the metric inherited from $\ell^\infty(\mathbb R)$. The space $\mathcal M$ is closed in $\ell^\infty(\mathbb R)$ because a uniform limit of bounded Borel-measurable functions is bounded and Borel-measurable. Define the squared-integral functional $Q:\mathcal M\to\mathbb R$ by
\begin{align*}
Q(f):=\int_{\mathbb R}f(x)^2\,d\mu_0(x).
\end{align*}
This definition is well-defined because $f^2$ is bounded and Borel-measurable whenever $f\in\mathcal M$. The empirical distribution functions and the deterministic distribution functions are Borel-measurable, so $Z_n\in\mathcal M$ for every $n\in\mathbb N$. Also $Y+g\in\mathcal M$ almost surely, since the Brownian bridge has continuous sample paths on $[0,1]$, $F_0$ is Borel-measurable, and $h$ is continuous.
If $f_m\to f$ in the uniform metric on $\mathcal M$, then
\begin{align*}
|Q(f_m)-Q(f)|
\leq \int_{\mathbb R}|f_m(x)-f(x)|\,|f_m(x)+f(x)|\,d\mu_0(x).
\end{align*}
Since $\mu_0(\mathbb R)=1$, this gives
\begin{align*}
|Q(f_m)-Q(f)|
\leq \|f_m-f\|_{\ell^\infty(\mathbb R)}
\left(\|f_m\|_{\ell^\infty(\mathbb R)}+\|f\|_{\ell^\infty(\mathbb R)}\right).
\end{align*}
[Uniform convergence](/page/Uniform%20Convergence) implies that $\|f_m\|_{\ell^\infty(\mathbb R)}$ is bounded for all sufficiently large $m$, so the right-hand side tends to $0$. Hence $Q$ is continuous on $\mathcal M$. Although the process convergence is stated in $\ell^\infty(\mathbb R)$, the statistic only uses the closed Borel-measurable subspace $\mathcal M$: the paths $Z_n$ belong to $\mathcal M$ for every $n\in\mathbb N$, and $Y+g$ belongs to $\mathcal M$ almost surely. Since $\mathcal M$ is closed, the Borel $\sigma$-algebra on $\mathcal M$ is the subspace Borel $\sigma$-algebra inherited from $\ell^\infty(\mathbb R)$; equivalently, convergence in distribution in the ambient metric restricts to convergence in distribution in $\mathcal M$ for random elements supported on $\mathcal M$. Therefore the [Continuous Mapping Theorem](/theorems/1847) applies to the continuous map $Q:\mathcal M\to\mathbb R$. Let $C_n$ denote the Cramer-von Mises-type statistic, defined by
\begin{align*}
C_n:=Q(Z_n).
\end{align*}
Then
\begin{align*}
C_n=Q(Z_n)\xrightarrow{d}Q(Y+g).
\end{align*}
Finally, because $F_0$ is continuous, if $X$ is a real-valued [random variable](/page/Random%20Variable) with distribution function $F_0$, then $F_0(X)$ has the uniform distribution on $[0,1]$. Almost surely, the map $t\mapsto (B(t)+h(t))^2$ is bounded and Borel-measurable on $[0,1]$, because $B$ has continuous sample paths and $h$ is continuous. Applying the probability-integral-transform change of variables pathwise gives
\begin{align*}
Q(Y+g)=\int_{\mathbb R}\left(B(F_0(x))+h(F_0(x))\right)^2\,d\mu_0(x).
\end{align*}
Therefore
\begin{align*}
Q(Y+g)=\int_0^1\left(B(t)+h(t)\right)^2\,d\mathcal L^1(t).
\end{align*}
Consequently
\begin{align*}
C_n\xrightarrow{d}\int_0^1\left(B(t)+h(t)\right)^2\,d\mathcal L^1(t).
\end{align*}
This completes the proof of the process limit and of both EDF-test statistic limits.[/step]