Getting a continuous modification in existence proof of SDE (Oksendal) I am reading Øksendal, Stochastic Differential Equations (6th ed.), the existence and uniqueness result for SDEs.
But I am stuck at the last step where he shows that the solution can be take as a continuous process.
I understand (5.2.15) below holds, and I am fine that there is a continuous version of the RHS of (5.2.15).
But I do not understand the last step, where the author just swaps $X_s$ with $\tilde{X}_s$.
If $X_\cdot$ and $\tilde{X}_\cdot$ are indistinguishable, I am fine with this.
But $\tilde{X}_\cdot$ is just a modification, so we are supposed to be allowed to swap only countable, say, amount of $(X_1,...)$? How do we justify this?

 A: The idea is the following. By the aforementioned Theorem 3.2.15, there exists a continuous process $\tilde{X}_t$ such that:
$$
 \mathbb{P}\left(\tilde{X}_t=\text{RHS}_{(5.2.15)}(t)\right)=1. \tag{1}
 $$
This justifies the first equality of the last set of expressions. To get the second one, first we set $t=0$ so $\tilde{X}_0=X_0$. Now, it follows from (1) that:
$$
 \mathbb{P}\left(\tilde{X}_t=\text{LHS}_{(5.2.15)}(t)=X_t\right)=1~\forall t.
 $$
Using that $\mathbb{Q}$ is countable,
$$
 \mathbb{P}\left(\omega\in\Omega ~|~\tilde{X}_t(\omega)=X_t(\omega)~~ \forall t\in\mathbb{Q}~\cap[0,T]\right)=1.
$$
I would say that this is not enough to show that the integrals are the same, see Remark 1 below.
What we are going to show is that the integrals of $\tilde{X}$ are the same as the ones of $X$, so $\tilde{X}$ is a continuous solution. First, using the Lipschitz condition and Hölder's inequality (or Lyapunov's),
$$
 \mathbb{E}\left|\int_0^t (b(s, X_{s})-b(s, \tilde{X}_{s}))ds\right|^2\lesssim \mathbb{E}\left(\int_0^t \left|X_{s}-\tilde{X}_{s}\right|^2\right)=\|X-\tilde{X}\|_{L^2(\mu)}^2.\tag{2}
 $$
Thus,
$$
 \text{LHS}_{(2)}\lesssim\|X-\tilde{X}\|_{L^2(\mu)}^2=\int_0^t\mathbb{E}|X_s-\tilde{X}_s|^2ds=\int_0^t\int_{\mathbb{R}_{\ge0}}\mathbb{P}\left(|X_s-\tilde{X}_s|^2>\tau\right)d\tau ds=0
 $$
as $\mathbb{P}\left(|X_s-\tilde{X}_s|^2>\tau\right)=0 ~~ \forall s,\tau$ in its range, as $\tilde{X}$ is a version of $X$. I have used a standard result to rewrite an expectation using the cumulative distribution, see Remark 2. Therefore,
$$
 \int_0^t (b(s, X_{s})-b(s, \tilde{X}_{s}))ds=0
 $$
for almost all $\omega$. Similarly,
$$
 \mathbb{E}\left(\int_0^t\left|\sigma(s, X_{s})-\sigma(s, \tilde{X}_{s})\right|^2ds\right) = 0
 $$
By the Itô isometry,
$$
 \|\int_0^t(\sigma(s, X_{s})-\sigma(s, \tilde{X}_{s}))dB_s \|_{L^2(\mathbb{P})}= 0
 $$
Therefore,
$$
 \left|\int_0^t\left(\sigma(s, X_{s})-\sigma(s, \tilde{X}_{s})\right)dB_s \right|^2=0
 $$
for almost all $\omega$. So we conclude that, almost surely,
$$
 \int_0^t b(s, {X}_{s}))ds=\int_0^t b(s, \tilde{X}_{s}))ds,\quad \int_0^t\sigma(s, \tilde{X}_{s})dB_s=\int_0^t\sigma(s, {X}_{s})dB_s.
 $$
This justifies the second equality and we are done.
Remark 1. As I said above, using that $\mathbb{Q}$ is countable,
$$
 \mathbb{P}\left(\omega\in\Omega ~|~\tilde{X}_t(\omega)=X_t(\omega)~~ \forall t\in\mathbb{Q}~\cap[0,T]\right)=1.
 $$
As you mention, this is not as strong as indistinguishability, i.e.,
$$
 \mathbb{P}\left(\omega\in\Omega ~|~\tilde{X}_t(\omega)=X_t(\omega)~~ \forall t\in[0,T]\right)=1.
 $$
Let $\{t_j\}_{j\in\mathcal{J}}=\mathbb{Q}~\cap[0,T]$.
With this, trying to show that the integrals are the same can fail. For instance, taking $\{t_i\}\subset\{t_j\}_{j\in\mathcal{J}}$ for the elementary functions
$$
 \phi_n(t,\omega):=\sum_{i\in \mathcal{I}_n}{\sigma}(t_i, X_{t_i}(\omega))\chi_{[t_i,t_{i+1})}(t)=\sum_{i\in \mathcal{I}_n}{\sigma}(t_i, \tilde{X}_{t_i}(\omega))\chi_{[t_i,t_{i+1})}(t)=\tilde{\phi}_n(t,\omega) \quad \omega\text{-a.a.,}
 $$
is not enough because $\int_0^t\phi_n dB$ might not converge to $\int_0^s\sigma(s, X_s)dB_s$ (in the construction of the Itô integral one needs first to mollify and cutoff to get a continuous and bounded function, see Øksendal, §3.1). And with the equality only in a countable number of $t_i$, the standard integrals might be different too (take $X_s=\chi_\mathbb{Q}$ and $\tilde{X}_s=1$ for all $\omega$).
$\diamond$
Remark 2. From the solution manual of J. Shao "Mathematical Statistics". 
