I am working on the following task:
Let $A\subseteq[0,1]$ Lebesgue measureable with $\lambda^1(A)>0$. Show that there is a Lipschitz-continous function $f:[0,1]\rightarrow[0,1]$ and $0<b\leq1$ with $f(A)=[0,b]$.
There is the following hint for the task: Choose a closed set $F\subseteq[0,1]$ with $f\subseteq A$ and $\lambda^1(F)>0$ and set $f(x):=\lambda^1(F\cap[0,x])$ for $x\in[0,1]$. Now show that $f(F)=f(A)=f([0,1])$ holds.
I am not really sure how to prove the statement here. Can somebody help me with this task? This is what I have so far, but I am really not sure if this is good:
Since $\lambda^1(A)>0$ there is an open-set with $U\supseteq A$ with $\lambda^1(U)>0$. Look at $F=U^C$, the closed set, which is the complement of $[0,1]$, obviously $F\subseteq A$ and $\lambda^1(F)>0$. Now define $f:[0,1]\rightarrow [0,1]$ as $f(x)=\lambda^1(F\cap[0,x])$ for $x\in[0,1]$. Now we see that $f(F)=\lambda^1(F\cap F)=\lambda^1(F)>0$ and $f([0,1])=\lambda^1(F\cap[0,1])=\lambda^1(F)>0$, also $f(A)=\lambda^1(F\cap A)\geq\lambda^1(F)>0$ (since $F\subseteq A$). I think from here we can rescale and move the function to reach $f(A)=[0,b]$.