[step:Transform the sample through the null distribution function]
Let $(\Omega,\mathcal F,\mathbb P)$ denote the probability space on which $X_1,\dots,X_n$ are defined. For each $i\in\{1,\dots,n\}$, define the [random variable](/page/Random%20Variable) $U_i:(\Omega,\mathcal F)\to([0,1],\mathcal B([0,1]))$ by
\begin{align*}
U_i(\omega):=F_0(X_i(\omega)).
\end{align*}
Since each $X_i:(\Omega,\mathcal F)\to(\mathbb R,\mathcal B(\mathbb R))$ is measurable and $F_0:\mathbb R\to[0,1]$ is continuous, hence Borel measurable, each $U_i$ is measurable.
We prove that each $U_i$ has the $\operatorname{Unif}(0,1)$ distribution. Fix $i\in\{1,\dots,n\}$ and $t\in[0,1]$. Since $F_0$ is continuous, nondecreasing, and satisfies
\begin{align*}
\lim_{x\to-\infty}F_0(x)=0,
\end{align*}
and
\begin{align*}
\lim_{x\to\infty}F_0(x)=1,
\end{align*}
the level set
\begin{align*}
L_t:=\{x\in\mathbb R:F_0(x)=t\}
\end{align*}
is either empty or a closed interval, possibly unbounded at one end. For $0<t<1$, the intermediate value property gives $L_t\neq\varnothing$. Let
\begin{align*}
\ell_t:=\inf L_t,
\qquad
r_t:=\sup L_t
\end{align*}
in the extended real line. Then
\begin{align*}
\{F_0(X_i)\le t\}
=
\{X_i\le r_t\}
\end{align*}
up to the harmless convention that $\{X_i\le\infty\}=\Omega$ and $\{X_i\le-\infty\}=\varnothing$. Therefore
\begin{align*}
\mathbb P(U_i\le t)
=
\mathbb P(X_i\le r_t)
=
F_0(r_t)
=
t.
\end{align*}
For $t=1$, $0\le U_i\le1$ gives
\begin{align*}
\mathbb P(U_i\le1)=1.
\end{align*}
For $t=0$, fix $y\in\mathbb R$. The event $\{U_i\le0\}$ implies $X_i\le y$ whenever $F_0(y)>0$, and otherwise the bound $\mathbb P(U_i\le0)\le F_0(y)$ is still valid by monotonicity and nonnegativity of $F_0$. Hence
\begin{align*}
\mathbb P(U_i\le0)\le F_0(y)
\end{align*}
for every $y\in\mathbb R$. Letting $y\to-\infty$ and using $\lim_{y\to-\infty}F_0(y)=0$ gives
\begin{align*}
\mathbb P(U_i\le0)=0.
\end{align*}
Thus $U_i\sim\operatorname{Unif}(0,1)$.
Because $U_i=F_0\circ X_i$ is a measurable function of $X_i$, and $X_1,\dots,X_n$ are independent, the [preservation of independence](/theorems/1116) under coordinatewise measurable maps gives that $U_1,\dots,U_n$ are independent. Hence $U_1,\dots,U_n$ are i.i.d. $\operatorname{Unif}(0,1)$.
[/step]