Solution (source code)

= Solution

Values at the endpoint one do not affect any of the conclusions, since $\mathbb P(U=1)=0$. Set $b_n(1)=1$ to define each <random variable> everywhere, and choose a <Borel measurable function> agreeing with $f$ <almost everywhere> if necessary. These choices leave all integrals and almost-sure assertions unchanged.

Every <dyadic interval> at level $n+1$ lies in a <dyadic interval> at level $n$. Equivalently, $b_n(U)$ is a measurable function of $b_{n+1}(U)$, so $\mathcal F_n\subseteq\mathcal F_{n+1}$: these <sigma-algebras> form a <filtration>. Since the <uniform distribution> of $U$ gives $\mathbb E|f(U)|=\int_0^1|f(u)|\,du<\infty$, the <conditional expectations> $X_n=\mathbb E[f(U)\mid\mathcal F_n]$ are integrable and adapted. The <tower property of conditional expectation> gives
$$
\mathbb E[X_{n+1}\mid\mathcal F_n]
=\mathbb E[\mathbb E[f(U)\mid\mathcal F_{n+1}]\mid\mathcal F_n]
=\mathbb E[f(U)\mid\mathcal F_n]=X_n.
$$
Thus $(X_n)$ is a <martingale>, and part (a) proves that it is <uniformly integrable>.

For $I_{n,k}=[k2^{-n},(k+1)2^{-n})$, the <event> $\{U\in I_{n,k}\}$ is an <atom of a sigma-algebra> $\mathcal F_n$, with <probability> $2^{-n}$. The value of the <conditional expectation> there is therefore
$$
\frac{\mathbb E[f(U)\mathbf1_{\{U\in I_{n,k}\}}]}{\mathbb P(U\in I_{n,k})}
=2^n\int_{I_{n,k}}f(u)\,du.
$$
Consequently $\boxed{X_n=f_n(U)\text{ almost surely}.}$ This also shows directly that $\int_0^1|f_n|\leq\int_0^1|f|$.

By the <uniformly integrable martingale convergence theorem>, there is an integrable $Y$ such that $X_n\to Y$ <almost surely> and in the <L1 norm>. To identify this limit, put $\mathcal F_\infty=\sigma(\bigcup_n\mathcal F_n)$. Since $0\leq U-b_n(U)<2^{-n}$ away from the harmless endpoint, $U=\lim_n b_n(U)$, and $U$ is $\mathcal F_\infty$-measurable. Conversely every $b_n(U)$ is a measurable function of $U$. Thus $\mathcal F_\infty=\sigma(U)$, and both $Y$ and $f(U)$ have $\mathcal F_\infty$-measurable versions.

For $A\in\mathcal F_m$, the defining property of <conditional expectation> gives $\mathbb E[X_n\mathbf1_A]=\mathbb E[f(U)\mathbf1_A]$ whenever $n\geq m$. Passing to the limit in the <L1 norm> yields
$$
\mathbb E[Y\mathbf1_A]=\mathbb E[f(U)\mathbf1_A].
$$
The increasing <union> $\bigcup_m\mathcal F_m$ is an <algebra of sets> generating $\mathcal F_\infty$. The class of <events> for which this integral identity holds is a <Dynkin system>, so the <pi-lambda theorem> extends the identity to every $A\in\mathcal F_\infty$. Since both <random variables> are measurable there, uniqueness of <conditional expectation> gives $Y=f(U)$ <almost surely>. We have proved that the <dyadic conditional averages recover integrable functions>:
$$
\boxed{f_n(x)\longrightarrow f(x)\quad\text{for Lebesgue-almost every }x\in[0,1],}
$$
because a <probability>-one assertion for $U$ is a full-<Lebesgue measure> assertion for $x$. Likewise, the <uniform distribution> of $U$ turns <convergence in L1> into
$$
\boxed{\int_0^1|f_n(u)-f(u)|\,du
=\mathbb E|X_n-f(U)|\longrightarrow0.}
$$
No pointwise continuity of $f$ is required.