TITLE: Measurable subset of $\mathbb{R}$ with a specific property
QUESTION [13 upvotes]: Let $A$ be a subset of $\mathbb{R}$ such that its intersection with every finite segment is Lebesgue measurable. I am looking for an example of such an $A$ with the additional property that the function $\varphi(t)=\mu (A\cap\lbrack t,t+1])$ is strictly increasing in $t$, where $\mu$ is Lebesgue measure. 
It is easy to see that such a set $A$ should have empty interior in $\mathbb{R}$.
Thanks.

REPLY [4 votes]: Here is how to construct such a set $A$.
It is well-known that the interval $[0,1)$ contains two disjoint measurable subsets $X$ and $Y$ such that for any $0\leq x < y \leq 1$, both $\mu(X\cap (x,y))>0$ and $\mu(Y\cap(x,y))>0$.  See, for example, the very short proof of this by Rudin.  It is straightforward to extend Rudin's argument to show that $[0,1)$ contains countably many disjoint sets which all intersect any such interval $(x,y)$ in positive measure.
Let $\ldots,X_{-1},X_0,X_1,X_2,\ldots$ be such a partition of $[0,1)$.  Let $T_x$ be the map which translates subsets of $\mathbb{R}$ right by $x$ and define
\[
A = \bigcup_{\stackrel{m,n\in\mathbb{Z}}{m \leq n}} T_n(X_m),
\]
so the intersection of $A$ with $[n,n+1)$ is the union of appropriate translates of $X_m$ for all $m \leq n$.
Now suppose $k\in\mathbb{Z}$ and $x,y\in\mathbb{R}$ satisfy $k\leq x<y\leq k+1$.  Let $s = x-k$ and $t = y-k$, so $0\leq s<t \leq 1$.  Then
\[
\begin{split}
\phi(y)-\phi(x) & = \mu(A\cap [y,y+1]) - \mu(A\cap [x,x+1]) \\
&= \mu(A\cap (x+1,y+1]) - \mu(A\cap [x,y)) \\
& = \mu(A\cap(x+1,y+1)) - \mu(A\cap (x,y)) \\
& = \sum_{l\leq k+1} \mu(X_l\cap (s,t)) - \sum_{l\leq k} \mu(X_l\cap (s,t)) \\
& = \mu(X_{k+1}\cap(s,t)) > 0.
\end{split}
\]
By transitivity of inequality $\phi(x) < \phi(y)$ for all $x < y$ in $\mathbb{R}$.

To see where the construction above came from, you can prove that any $A$ with the properties specified in the original post is of the form constructed above, with two modifications.  First, there may be an additional $X_{-\infty}$ disjoint from all the $X_k$ translated into every $A\cap[n,n+1)$.  Second, the whole construction may be modified by any measure zero set.