Let $f:[0,1]\rightarrow \mathbb{R}$ be a positive measurable function. If $f\leq 1$ almost surely and $f\geq 1$ almost surely (with respect to lebesgue measure). Show that $f=1_{A}$ for some $A\in B[0,1]$.
I'm not sure how to start.
My attempt is as follows:
So $f\geq 1$ almost surely means there exists some set U in borel algebra on [0,1] such that $\mu(U)=0$ on which $f<1$
$f\leq 1$ almost surely means that there exists some set V in borel algebra on [0,1] such that $\mu(V)=0$ on which $f>1$
By construction of U and V, $U\cap V=\varnothing$. Hence, setting $A=U\cup V$, we obtain
However, I have gotten nowhere.
May someone elaborate? What should I modify the problem for the conclusion to hold (if it doesnt hold?)
There exist sets $E,F$ of measure $0$ such that $f(x) \leq 1$ if $x \notin E$ and $f(x) \geq 1$ if $x \notin F$. Let $A=E \cup F$. Then $A$ has measure $0$ and $f(x) = 1$ if $x \notin A$ (because $x \notin A$ implies $x \notin E$ and $x \notin F$). Now let $D=\{x: f(x)=1\}$. Then $D$ is a Lebesgue measurable set and $f=1_D$ almost everywhere. To complete the proof just note that there is a Borel set $B$ such that $I_D=I_B$ almost everywhere.