I have this problem that I can't get my head around. Consider a Lebesgue measurable set $A$ with $0<\mu(A)<+\infty$. Define $f:\mathbb{R}\rightarrow \mathbb{R}$, $f(x)=\mu(A\cap(-\infty,x])$. Prove:
a) $f$ is continuous.
b) There exists a measurable set $B\subset A$ such that $\mu(B)=\mu(A)/2$.
c) There exists a compact set $C\subset A$ such that $\mu(C)=\mu(A)/2$.
For a), I chose a sequence $(x_n)$ with $x_n\rightarrow x_0$ and proved $f(x_n)\rightarrow f(x_0)$, easy peasy.
Also for b), since $f$ continuous and assumes values in $[0,\mu(A)]$, we can find $x$ such that $B=(-\infty,x)\cap A$ has measure $\mu(B)=\mu(A)/2$.
For c), I have no idea how to produce C...
Any help? Thanks in advance.
Hint: By inner regularity, there exists a compact subset $K\subset A$ such that $\mu(K)>\mu(A)/2$. Now consider the function $x\mapsto\mu(K\cap(-\infty,x])$...