Is the integral of a modification of a stochastic process equal to the integral of the original process? For a measurable stochastic process $X_t(\omega): \Omega \times [0,T] \to \mathbb{R}$, $\tilde{X}_{t}(\omega)$ is a modification of $X_t(\omega)$ if $\mathbb{P}(X_t = \tilde{X}_t) = 1$ for all $t \in [0,T]$.
Does this imply that
$$\int_0^t X_s(\omega) ds = \int_0^t \tilde{X}_s(\omega) ds ~~\text{ almost all }\omega, \forall ~t\in[0,T]?
$$
I tried to prove that the set $A = \{ \omega: X_t(\omega) \neq \tilde{X}_t(\omega) \text{ for a subset of } [0,T] \text{ of positive measure} \}$ has measure 0, but I didn't know how to.
I also tried to construct a counterexample, where a modification has a different integral, but I couldn't think of a way to make sure that for a subset of $\Omega$ of positive measure the two processes are different for a subset of $[0,T]$ of positive measure.
 A: For the case that the processes $X$ and $\tilde X$ have both right continuous paths a.s., it is true. Because two right continuous modifications are indistinguishable (see Protter page 4). And if $X$ and $\tilde X$ are indistinguishable is clear that $\int_0^tX_sds = \int_0^t \tilde X_sds$ a.s.
A: First, using the Hölder inequality (or Lyapunov's), for $\mu:=\lambda\times \mathbb{P}$ with $\lambda$ the Lebesgue measure on the real line,
$$
 \mathbb{E}\left|\int_0^t (X_{s}-\tilde{X}_{s})ds\right|^2\lesssim \mathbb{E}\left(\int_0^t \left|X_{s}-\tilde{X}_{s}\right|^2\right)^{1/2}=\|X-\tilde{X}\|_{L^2(\mu)}.\tag{1}
 $$
Thus,
$$
 \text{LHS}_{(1)}\lesssim\|X-\tilde{X}\|_{L^2(\mu)}=\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 (X_{s}-\tilde{X}_{s})ds=0
 $$
for almost all $\omega$.

GENERALIZATION
We can proceed similarly for the Itô integral and with a general function $\sigma$ satisfying the Lipschitz condition of the existence theorem of SDE ($|\sigma(t,x)-\sigma(t,y)|\leq D|x-y|$). Indeed, as above
$$
 \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\left(\sigma(s, X_{s})-\sigma(s, \tilde{X}_{s})\right)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.
 $$
where $|b(t,x)-b(t,y)|\leq D|x-y|$.
Remark 1. 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.
 $$
But 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,
 $$
and it is unclear that the equality of integrals can be proved from here.
For instance, let $\{t_j\}_{j\in\mathcal{J}}=\mathbb{Q}~\cap[0,T]$, 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". 
