Measurability of $\sup_{[0,1]}X(t)$ with respect to continuity Let $X\colon[0,1]\to\mathbb{R}$ be a stochastic process on some probability space $(\Omega, \mathcal{F}, P)$.
I was always told that
$$
f(\omega)=\sup_{t\in[0,1]} X(t, \omega)
$$
is not always a measurable function. However, if $X$ is a.s. continuous (e.g., a Brownian motion), then it is measurable.
My questions are of two folds:

*

*How to explictly show that $f\colon\Omega\to\mathbb{R}$ can be non-measurable? Do we have a concrete example to show this?

*Why does the continuity imply the measurability? People say that if $X$ is continuos, then $\sup_{t\in[0,1]} X(t, \omega) = \sup_{t\in[0,1]\cap\mathbb{Q}} X(t, \omega)$, but why the latter is measurable (i.e., why the sup over a countable set gives measurable $f$)?


Related questions:
Is the supremum of an almost surely continuous stochastic process measurable? This is similar to my question but does not really answers my 1 and 2.
$f(x,y)$, continuous in $x$. Is $\sup_{x\in A}f(x,y)$ measurable?
https://mathoverflow.net/questions/102258/when-is-the-infimum-of-an-arbitrary-family-of-measurable-functions-also-measurab
 A: Question 2 is answered in the comments, so I'll skip that. Any textbook on measure theory will include the statement that the supremum of a countable family of random variables is measurable.
For question 1, we need to go back to what measurability means. Responding quickly to the discussion in the comments, as your intuition suggests, the issue in question 1 doesn't really have anything(*) to do with the axiom of choice. It has a lot to do with people being sloppy with notation. Whenever we talk about measurability, we always need to ask with respect to what?
Let's start by considering what it means to define a stochastic process $(X(t,\omega) : t \in T)$, where $T$ is some index set. Measurability is always with respect to two measure spaces; here these are some $(\Omega,\mathcal{F})$ and $(\mathbb{R},\mathcal{B})$. To define a stochastic process $X(t,\omega)$, we need to find a space $(\Omega,\mathcal{F})$ in which, at a minimum, the map $\omega \mapsto (X(t_1,\omega),\dots, X(t_n,\omega))$ is measurable in the sense that for $B_1,\dots,B_n \in \mathcal{B}$, $\{\omega : X(t_1,\omega) \in B_1,\dots, X(t_n,\omega) \in B_n\} \in \mathcal{F}$
The standard construction which shows that probability spaces supporting stochastic processes exist is given by Kolmogorov's extension theorem. The resulting space can typically be taken to be the product space $(\Omega, \mathcal{F}) = (\mathbb{R}^T,\mathcal{B}^T)$. The extension theorem says that the finite dimensional marginal distributions of this process determine the distribution of the process in this space.
If $T$ happens to be uncountable, as is the case here, then one can immediately see what the problem is. Measurability lets us say something about what happens at countably many time locations, but not at all times.
One can prove the result you want directly, but a proof by contradiction is instructive here. Suppose that the supremum map is $(\mathcal{F},\mathcal{B})$ measurable for this $\mathcal{F}$ and this $\mathcal{B}$. Notice that if the map sending a process to its supremum is measurable, then the distribution of the process must determine the distribution of the supremum.
To show that the supremum is not measurable on this product space, it suffices to couple two processes $X(t,\omega)$ and $Y(t,\omega)$ on this space which have the same finite dimensional distributions (and so are the same process in distribution, by Kolmogorov's theorem), but for which the associated suprema have different distributions.
Define $Y(t,\omega) = 0$ for all $t \in [0,1]$ and $\omega$ and let $U$ be a Uniform[0,1] random variable, which is coupled together with $Y$ on $([0,1]^T,\mathcal{B}^T)$ and call $\mathbb{P}$ the resulting joint distribution. Let $X(t,\omega) =  0$ for $t \neq U(\omega)$ and let $X(U(\omega),\omega)=1.$ Then for any $t_1\dots,t_n$, we have $\mathbb{P}(U \in \{t_1,\dots,t_n\})=0$, which implies that $\mathbb{P}(Y(t_1) = 0, \dots, Y(t_n)=0) = \mathbb{P}(X(t_1) = 0, \dots X_{t_n}= 0) = 1$. Therefore the two processes have the same distribution. On the other hand, $\mathbb{P}(\sup_t X_t = 1) = 1$ and $\mathbb{P}(\sup_t Y_t = 0) = 1.$
The point here is that events which involve uncountably many time coordinates in an essential way cannot hope to be measurable in the product space. If we want to consider these random variables, we need some path regularity to be imposed at the outset which reduces the problem to something happening at countably many points. Often one does this by viewing the process $Y$ as a random variable taking values, for example, in the space $C([0,1],\mathbb{R})$ equipped with its Borel sigma algebra. In this space, the supremum is measurable.  The process $X$ that we constructed is not continuous and so cannot be viewed as a variable on this space, which resolves the issue with this counterexample.
(*) We of course need a little choice to do analysis at all. This example works, for example, under dependent choice, which can coexist in certain axiomatic frameworks with the statement "all subsets of $\mathbb{R}$ are Lebesgue measurable".
