\newcommand{\si}{\sigma} \newcommand{\es}{\mathscr{S}} \newcommand{\bR}{\mathbb{R}} \newcommand{\bsT}{\boldsymbol{T}} First, what is a random function? To define it we need a parameter space \bsT, \newcommand{\eS}{\mathscr{S}} a probability space (\Omega, \eS, P), and a target space X. Roughly speaking a random function \bsT\to X is defined to be a choice of probability measure (and underlying \si-algebra of events) on X^{\bsT}= the space of functions \bsT\to X.
In applications X is a metric space and \bsT is a locally closed subset of some Euclidean space \bR^N. (Example to keep in mind: \bsT an open subset of \bR^N or \bsT a properly embedded submanifold of \bR^N. Often X is a vector space.)
A random function on \bsT is then a function
f:\bsT\times\Omega\to X,\;\; \bsT\times\Omega\ni (t,\omega)\mapsto f(t,\omega) \in X,
such that, for any t\in\bsT, the correspondence
\Omega\ni \omega\mapsto f_t(\omega) :=f(t,\omega)\in X
is measurable with respected to the \si-algebra of Borel subsets of X. In other words, a random function on \bsT is a family of random variables (on the same probability space) parameterized by \bsT.
Observe that we have a natural map \Phi: \Omega\to X^{\bsT},
\Omega\ni \omega\mapsto f_\omega\in X^\bsT,\;\;f_\omega(t)=f(t,\omega).
The pushforward via \Phi of (\eS,P) induces structure of probability space on X^{\bsT}. The functions f_\omega, \omega\in \Omega are called the sample functions of the given random function.
Let us observe that there are certain properties of functions which a priori may not measurable subsets of \Omega. For example the set of \omega's such that f_\omega is continuous on \bsT may not be measurable if \bsT is uncountable. To deal with such issues we will restrict our attention to certain classes of random functions, namely the separable ones.
Definition 1. Suppose that \bsT is a locally closed subset of \bR^N and X is a Polish space, i.e., a complete, separable metric space. Fix a countable, dense subset S\subset \bsT. A random function f:\bsT\times\Omega\to X is called S-separable if there exists a negligible subset N\subset \Omega, with the following property: for any closed subset F\subset X, any open subset U\subset \bsT the symmetric difference of the sets
\Omega(U,F):=\Bigl\{ \omega\in \Omega;\;\; f_\omega(t)\in F,\forall t\in U\;\Bigr\},\;\;\Omega_S(U, F):=\Bigl\{ \omega\in \Omega;\;\; f_\omega(t)\in F,\;\;\forall t\in U\cap S\;\Bigr\} \tag{1}\label{1}
is a subset of N, i.e.,
\Omega(U,S)\setminus \Omega_S(U,S),\;\;\Omega_S(U,F)\setminus \Omega(U,F)\subset N.
Definition 2. Let \bsT and X be as in Definition 1. A random function g: \bsT\times \Omega\to X is called a version of the random function f:\bsT\times \Omega\to X if
P(g_t=f_t)=1,\;\;\forall t\in\bsT.
Let me give an application of separability. We say that a random function g:\bsT\times \Omega\to X is a.s. continuous if
P\bigl(\;\lbrace \omega;\;\; f_\omega: \bsT\to X\;\;\mbox{is continuous} \rbrace\;\bigr)=1.
Proposition 3. Suppose that f is an S-separable random function \bsT\times \Omega\to \bR and g is a version of f. If g is a.s. continuous, then
P\bigl(\lbrace \omega; \;\;g_\omega=f_\omega\rbrace\bigr)=1.
In particular, f is a.s. continuous.
Proof. Consider the set N\subset \Omega in the definition of S-separability of f. Define
\Omega_*:=\bigl\lbrace \;\omega\in \Omega\setminus N;\;\;g_\omega\;\mbox{is continuous},\;\;g(s,\omega)=f(s,\omega),\;\;\forall s\in S\;\bigr\rbrace.
Observe that P(\Omega_*)=1. We will prove that
g_\omega(t)=f_\omega(t),\;\;\forall \omega\in \Omega_*,\;\; t\in\bsT.\tag{$\ast$}\label{ast}
Fix an open set U\subset \bsT. For any \omega\in\Omega_* set
M_\omega(U, S):= \sup_{t\in S\cap U} f_\omega(t).
Invoking the definition of separability with F=(-\infty, M_\omega(U, S)] we deduce that
f_\omega(t)\leq M_\omega(U,S),\;\;\forall t\in U,
so that
\sup_{t\in U} f_\omega(t)\leq \sup_{t\in S\cap U} f_\omega(t)\leq \sup_{t\in U} f_\omega(t).
In other words, for any open set U\subset\bsT we have
\sup_{t\in U}f_\omega(t)=\sup_{t\in S\cap U} f_\omega(t),\;\;\forall \omega\in\Omega_*\tag{2}\label{2}.
A variation of the above argument shows
\inf_{t\in U}f_\omega(t)=\inf_{t\in S\cap U} f_\omega(t),\;\;\forall \omega\in\Omega_*\tag{3}\label{3}.
Now let \omega\in\Omega_*, t_0\in T. Given \newcommand{\ve}{\varepsilon} \ve>0, choose an neighborhood U=U(\ve \omega) of t_0 such that
g_\omega(t_0)-\ve\leq g_\omega(t)\leq g_\omega(t_0)+\ve,\;\;\forall t\in U(\ve,\omega).
Since g_\omega(t)=f_\omega(t) for t\in S\cap U we deduce from (\ref{2}) and (\ref{3}) that
g_\omega(t_0)-\ve \leq \inf_{t\in U(\ve,\omega)} f(t) \leq \sup_{t\in U(\ve,\omega)} f_\omega(t)\leq g_\omega(t_0)+\ve.
In particular, we deduce
g_\omega(t_0)-\ve \leq f_\omega(t_0)\leq g_\omega(t_0)+\ve,\;\;\forall \ve>0.
This proves (\ref{ast}). Q.E.D.
We have the following result.
Theorem 4. Suppose that f:\bsT\times \Omega\to X is a random function, where \bsT are Polish spaces. If X is compact, then f admits a separable version.
Proof. We follow the approach in Gikhman-Skhorohod. \DeclareMathOperator{\cl}{\mathbf{cl}} Fix a countable dense subset S\subset \bsT. \newcommand{\eV}{\mathscr{V}} Denote by \eV the collection of open balls in \bsT centered at points in S and with rational radii. For any \omega\in\Omega and any open set U\subset \bsT we set
R(U,\omega):=\cl\bigl\lbrace f_\omega(t);\;\;t\in S\cap U\,\bigr\rbrace,
R(t,\omega)=\bigcap_{t\in V\in\eV} R(V,\omega),
where \cl stands for the closure of a set. Observe that R(t,\omega)\neq\emptyset because it is the intersection of a family of compact sets such that any finitely many sets in the family have nonempty intersection.
Lemma 5. The following statements are equivalent.
(a) The random function f is S-separable.
(b) There exists N\subset \Omega such that P(N)=0 and for any \omega\in\Omega\setminus N and any t\in\bsT we have f_\omega(t)\in R(t,\omega).
Proof of the lemma. (a) \Rightarrow (b) We know that f is S-separable. Choose N as in the definition of S-separability. Fix \omega_0\in \Omega\setminus N and t_0\in \bsT. For any ball V\in \eV that contains t_0 we have
\bigl\lbrace \omega\in \Omega\setminus N;\;\;f_\omega(t)\in R(V,\omega_0)\;\;\forall t\in S\cap B\;\bigr\}=\bigl\lbrace\; \omega\in \Omega\setminus N;\;\;f_\omega(t)\in R(V,\omega_0)\;\;\forall t\in B\;\bigr\rbrace.
Observe that \omega_0 belongs to the set in the left-hand-side of the above equality and so it must belong to the set in the right-hand-side. Hence
f_{\omega_0}(t)\in R(B,\omega_0),\;\;\forall t\in B
and therefore f_{\omega_0}(t_0)\in R(B,\omega_0) for any B\in\eV that contains t_0. Thus f_{\omega_0}(t_0)\in R(t_0,\omega_0) which finishes the proof of the implication (a) \Rightarrow (b).
(b) \Rightarrow (a) Set \Omega_*=\Omega\setminus N. Suppose that F\subset X is closed. For any B\in\eV and \omega\in \Omega_* we have
f_\omega(t)\in F\;\;\forall t\in S\cap B \Leftrightarrow F\supset R(B,\omega).
Since R(t,\omega)\subset R(B,\omega) for any t\in B we deduce that
\Omega(B,F):=\bigl\{ \omega\in \Omega_*;\;\; f_\omega(t)\in F\;\;\forall t\in B\;\bigr\} =\bigl\{ \omega\in \Omega_*;\;\; f+\omega(t)\in F\;\;\forall t\in S\cap B\;\bigr\}=\Omega_S(B,F).
If U an open set then we can write U as a countable union of balls in \eV
U=\bigcup_n B_n.
Then
\Omega(U,F)=\bigcap_n \Omega(B_n, F)=\bigcap_n\Omega_S(B_n, F)= \Omega_S(U,F).
This finishes the proof of the lemma. q.e.d.
Lemma 6. For any Borel set B\subset X there exists a countable subset C_B\subset \bsT such that for any t\in\bsT the set
N(t, B):=\bigl\{ \omega\in \Omega; \;\;f_\omega(\tau)\in B,\;\;\forall \tau\in C_B,\;\;f_\omega(t)\in \bsT\setminus B\;\bigr\}
has probability 0.
Proof of the lemma. We construct C_B recursively. Choose \tau_1\in\bsT arbitrarily and set C_B^1:=\{\tau_1\}. Suppose that we have constructed C_B^k=\{\tau_1,\dotsc,\tau_k\}. Set
N_k(t):=\bigl\{\omega;\;\; g_\omega(\tau)\in B\;\;\forall \tau\in C_B^k,\;\;f_\omega(t)\in\Omega\setminus B\;\bigl\},\;\;p_k=\sup_{t\in\bsT} P\bigl(\;N_k(t)\;\bigr).
Observe that p_1\geq p_2\geq \cdots \geq p_k. If p_k=0 we stop and we set C_B:=C_B^k.
If this is not the case, there exists \tau_{k+1}\in \bsT such that
P\bigl(N_k(\tau_{k+1}\bigr)\geq \frac{1}{2}p_k.
Set C_B^{k+1}:=C_B^k\cup\{\tau_{k+1}\}. Observe that the events N_1(\tau_2),\dotsc , N_k(\tau_{k+1}) are mutually exclusive and thus
1\geq \sum_{j=1}^k P(N_j(\tau_{j+1})) \geq \frac{1}{2}\sum_{j=1}^k p_{j+1}.
Hence \lim_{n\to\infty} p_n=0. Now set
N(t, B):=\bigcap_{k\geq 1} N_k(t).
q.e.d.
Lemma 7. \newcommand{\eB}{\mathscr{B}} Suppose that \eB_0 is a countable family of Borel subsets of X and \eB is the family obtained by taking the intersections of all the subfamilies of \eB_0. Then there exists a countable subset C\subset \bsT, and for each t a subset N(t) of probability zero such that for any B\in \eB we have
\bigl\{ \omega;\;\; f_\omega(\tau)\in B\;\;\forall \tau\in C\;\; f_\omega(t)\not\in B\;\bigr\}\subset N(t).
Proof. For any t\in \bsT we define
C:=\bigcup_{B\in\eB_0}C_B, \;\; N(t) :=\bigcup_{B\in\eB_0} N(t,B),
where C_B and N(t,B) are constructed as in Lemma 6. Clearly C is countable.
If B'\in\eB and B\in\eB_0 are such that B\supset B', then
\bigl\{ \omega;\;\; f_\omega(\tau)\in B'\;\;\forall \tau\in C\;\; f_\omega(t)\not\in B\;\bigr\}\subset \bigl\{ \omega;\;\; f_\omega(\tau)\in B\;\;\forall \tau\in C\;\; f_\omega(t)\not\in B\;\bigr\}\subset N(t,B)\subset N(t).
If
B'=\bigcap_{k\geq 1} B_k,\;\;B_k\in\eB_0\;\;\forall k,
then
\bigl\{ \omega;\;\; f_\omega(\tau)\in B'\;\;\forall \tau\in C\;\; f_\omega(t)\not\in B'\;\bigr\}\subset \bigcup_{k\geq 1} \bigl\{ \omega;\;\; f_\omega(\tau)\in B'\;\;\forall \tau\in C\;\; f_\omega(t)\not\in B_k\;\bigr\}\subset \bigcup_{k\geq 1} N(t, B_k)\subset N(t).
q.e.d.
The proof of Theorem 4 is now within reach. Suppose that S is a countable and dense set of points in \bsT and D is a countable dense subset of X. Denote by \eV the collection of open balls in \bsT centered at points in S. Denote by \eB_0=\eB_0(D) the collection of open balls with in X of rational radii centered at points in D. As in Lemma 7, denote by \eB the collection of sets obtained by taking intersections of arbitrary families in \eB_0. Clearly \eB contains all the closed subsets of X.
Fix a ball V\in \eV. Lemma 7 applied to the restriction of f to V implies the existence of a countable set
C(V)\subset V
and of a family of negligible sets
N_V(t)\subset \Omega,\;\;t\in V
such that for any B\in eB
\{ \omega;\;\; f_\omega(\tau)\in B,\;\;\forall \tau\in C,\;\;f_\omega(t)\in V\setminus B\;\bigr\}\subset N_V(t).
Set
C=\bigcup_{V\in\eV}C(V),
while for t\in \bsT we set
$$ N(t):=\bigcup_{\eV\niV\ni t}N_V(t).
Clearly $C$ is both countable and dense in $\bsT$. We can now construct a $C$-separable version $\tilde{f}$ of $f$. Define
- \tilde{f}_\omega(t)= f_\omega(t) if t\in C or \omega\not\in N(t)
- If \omega\in N(t) and t\in \bsT\setminus C we assign \tilde{f}^V_\omega(t) an arbitrary value in R(t,\omega).
By construction \tilde{f} is a version of f because for any t\in \bsT
\{\omega;\;\;\tilde{f}_\omega(t)\neq f_\omega(t)\;\}\subset N(t).
Since f_\omega(\tau)=\tilde{f}_\omega(\tau) for any \tau\in C, \omega\in \Omega sets R(t,\omega), defined as as in Lemma 5, are the same for both functions \tilde{f} and f. By construction \tilde{f}_\omega(t)\in R(t,\omega), \forall t,\omega. Q.E.D.