Right continuous version of a martingale

This is an exercise in chapter 2 of the book "Continuous Martingales and Brownian Motion" by Revuz and Yor:

Consider the probability space $([0,1], \mathcal{B}([0,1]), dx)$, where $dx$ denotes Lebesgue measure, and for $0\leq t < 1$, let $\mathcal{F}_t$ be the smallest sub $\sigma$-field of $\mathcal{B}([0,1])$ containing $\mathcal{B}([0,t])$ and the Lebesgue-measure zero sets of $[0,1]$.

Then, given $f \in L^1([0,1],dx)$, and $0\leq t < 1$, how would one find an expression for the right-continuous version of the martingale $X_t(\omega)=\mathbb{E}[f|\mathcal{F}_t](\omega)$?


I decided to rewrite the answer almost completely since @Byron's hint allows me to make the answer more clear (I hope). First of all, thanks for the question - this is something really enlightening the notion of the martingale and the conditional expectation.

Second, some motivation - inspired by the comment of @TheBridge, I tried first to realize what does $X_t(\omega)$ mean. Well, $$ X:(t,\omega)\in[0,1]\times [0,1]\mapsto X_{t}(\omega)\in\mathbb R $$ so for each moment $t\in[0,1]$ the random vairable $X_t$ is a function on $[0,1]$ in $\omega$ which is $\mathscr F_t$-measurable. Somehow this function should depend only on values of $f(\omega)$ for $\omega\in [0,t]$ and be the best approximation of the latter function. In particular, $\mathsf EX_t = \mathsf Ef<\infty$ for any $t$. The finiteness of the expectation holds due to the fact that $f\in L^1([0,1])$.

Let me put the answer in two steps: first, using the definition of the conditional expectation we will guess the shape of $X_t$ and then prove that it is indeed what we need. Before let's prove one important fact about the filtration. Let $\mathsf P$ denote the Lebesgue measure and $$ \mathscr N = \{F\in \mathscr B([0,1]):\mathsf P(F) = 0\} $$ be the class of all null-sets, so $\mathscr F_t = \sigma(\mathscr B([0,t])\cup \mathscr N)$.

Claim: for any $F\in \mathscr F_t$ it holds that $$ \mathsf P(F\cap (t,1]) \in \{0,1-t\}.\tag{1} $$ Proof: first of all, let's denote $\mathscr F^\prime_t$ to be all elements of $\mathscr F_t$ satisfying $(1)$. Then clearly $$ \mathscr B([0,t])\cup \mathscr N\subset \mathscr F^\prime_t $$ and in that case the probability in $(1)$ is always zero. To finish the prove we only need to show that if $F,(F_n)_{n\geq 0}\in \mathscr F^\prime_t$ then $F^c,\bigcup F_n\in \mathscr F^\prime_t$ which is an easy task. As a result, $\mathscr F^\prime_t$ is a $\sigma$-algebra which contains $\mathscr B([0,t])\cup \mathscr N$ hence $\mathscr F^\prime_t = \mathscr F_t$ and all elements of the latter admit $(1)$.

By the definition of the conditional expectation, $X_t$ has to be $\mathscr F_t$-measurable and for any $F\in\mathscr F_t$ we should have $$ \int\limits_F (f-X_t)d\mathsf P = 0.\tag{2} $$ Since $\mathscr B([0,t])\subset\mathscr F_t$ it gives us a hint that $X_t(\omega) = f(\omega)$ $\mathsf P$-a.e. on $[0,t]$. With regards to $\omega\in (t,1]$ - from our claim it follows that $X_t(\omega)$ is constant $\mathsf P$-a.e. on $(t,1]$. Indeed, if it would not be true, then there should exist $r\in \mathbb R$ such that $$ \mathsf P(X_t^{-1}((-\infty,r))\cap (t,1])>0\text{ and }\mathsf P(X_t^{-1}([r,\infty))\cap (t,1])>0 $$ which contradicts with the claim since $X_t^{-1}((-\infty,r))$ and $ (t,1]$ are in $\mathscr F_t$. This constant we can find from the condition that $\mathsf EX_t = \mathsf Ef$ so the result is: $$ X_t(\omega) = f(\omega)1\{\omega\leq t\}+\frac{1}{1-t}\left(\int\limits_t^1f(\omega)d\omega\right)\cdot 1\{\omega >t\} $$ for all $0\leq t<1$.

To finish the answer, let us verify that $X_t$ is indeed $\mathscr F_t$-measurable and that $(2)$ holds.

First, the $\mathscr F_t$-measurability of $\{\omega:\omega\leq t\} = [0,t]$ and of its complement $(t,1]$ is clear. Let us consider $f(\omega)1\{\omega\leq t\}$. For $A\in \mathscr B(\mathbb R)$ we have: $$ \{\omega:f(\omega)1\{\omega\leq t\}\in A\} = \begin{cases} f^{-1}(A)\cap[0,t], &\text{ if }0\notin A \\ f^{-1}(A)\cap[0,t]\cup(t,1], &\text{ if }0\in A. \end{cases} $$ and so $X_t$ is $\mathscr F_t$-measurable as a linear combination of measurable functions.

To check $(1)$, we pick up any $F\in \mathscr F_t$ and $$ \int\limits_F (f(\omega)-X_t(\omega))d\omega = \int\limits_{B\cap (t,1]}f(\omega)d\omega - \frac{1}{1-t}\mathsf P(B\cap (t,1])\cdot\int\limits_t^1 f(\omega)d\omega = 0 $$ as it follows from the claim.