Let $f,g:\mathbb R\to\mathbb R$ be cadlag (continuous from the right and limits existing from the left) functions that are equal almost everywhere with respect to Lebesgue measure. I.e. $f(t+)=f(t)$ and $g(t+)=g(t)$ for all $t\in\mathbb R$, $f(t-)$ and $g(t-)$ exist for all $t$, and $f(t)=g(t)$ for almost all $t$, say except for set $N\subset \mathbb R$ a set of Lebesgue measure zero.
Conclusion: Then $f(t)=g(t)$ for all $t\in\mathbb R$.
Is this true?
Here is my attempt at a proof.
Suppose there is some $a\in\mathbb R$ such that $f(a)\neq g(a)$. Suppose, without loss of generality, that $f(a)-g(a)=L>0$. Then since $f$ and $g$ are cadlag, $f-g$ is also cadlag. Hence $\lim_{t\downarrow a} (f-g)(t)=f(a)-g(a)=L>0$. Let $0<\epsilon<L/2$. Then, we can choose a $\delta>0$ small enough such that for any $t\in(a,a+\delta)$ it holds that $|f(t)-g(t)-L|<\epsilon$. But this implies that $|f(t)-g(t)|>L-\epsilon>L-L/2=L/2>0$ for all $t$ in some contiguous interval. This is not possible since the set where they are unequal has measure zero. Hence $N=\emptyset$ and $f(t)=g(t)$ for all $t\in\mathbb R$.
I didn't use the fact that the left limits exist though, just the right continuity. So the "lag" part is an unnecessary assumption here it seems. So maybe the minimal requirement is that the functions are assumed to have the same type of continuity at every point. In that case, then equality almost everywhere implies equality everywhere? If we allow $f$ to be right-continuous at some point but $g$ being left-continuous, then they are obviously not required to be equal everywhere (just take a step function and shift the filled in point to the other peice).
In particular, I'm interested in $f$ a cadlag function that has a finite number of jump discontinuities on any bounded interval (e.g. a step-function sample path of a continuous time Markov process), and $g$ is equal almost everywhere to $f$, then it must be equal to $f$ everywhere. This is a simpler case, since this $f$ is continuous on a countable list of intervals. Of course, a cadlag function is not necessarily piecewise continuous (see: https://mathoverflow.net/questions/379332/is-a-function-piecewise-continuous-if-it-has-a-left-limit-and-a-right-limit-at-e).
If the two functions are continuous and equal almost everywhere, then they are equal everywhere, see: If two continuous functions are equal almost everywhere on $[a,b]$, then they are equal everywhere on $[a,b]$
Am I overlooking anything?