A set whose Hausdorff dimension gradually changes?

Can there be a set whose Hausdorff dimension gradually changes?

For instance, a set of real numbers contained in an interval, whose Hausdorff dimension is 0 at the beginning and 1 closer to the end, and changes without jumps?

I assume you want a set $$A\subseteq [0,1]$$ such that $$\dim (A\cap [0,x])=x$$ for all $$x$$. We can define $$A_1$$ by taking the union of a (Borel) subset of dimension $$0$$ of $$[0,1/2]$$ with a subset of dimension $$1/2$$ of $$[1/2,1]$$.To obtain $$A_2$$, we then make our sets larger on $$[1/4,1/2]$$, $$[3/4,1]$$ and again, we make the dimension on each current interval equal to its left endpoint. Then $$A_1\subseteq A_2\subseteq \ldots$$, and $$A=\bigcup A_n$$ works: by monotone convergence, $$h^d(I\cap A)=\lim h^d(I\cap A_n)$$, so $$A\cap [0,x]$$ has the right dimension at each $$x=k2^{-n}$$ and thus everywhere.
• @Anixx Each $A_n$ has Hausdorff dimension below $1$, so their (1-dimensional) Lebesgue measure is zero. So $A$ has Lebesgue measure zero. You can certainly integrate functions over null sets, but the results are not too interesting... – Wojowu Jan 18 at 23:11
• In fact for all $0<x\le1$ $A\cap[0,x]$ is an $x$-dimensional set of $x$-dimensional null measure, for the same reason. – Pietro Majer Jan 19 at 20:05
• Cool. I think a similar idea (reversing subintervals of $[k/2^n,(k+1)/2^n]$ as needed, for $n\rightarrow \infty, 0\le k<n$) can also be used to produce a set $A$ with density $x$ at $x$, i.e. $\mu(A\cap[0,x])=x^2/2$. – Yaakov Baruch Jan 20 at 8:31
For an example of a different sort, you can consider the record set $$R$$ of a fractional Brownian motion with varying Hurst parameter $$H(t)$$. In this short paper it is shown that when $$H(t)$$ is constant, it equals the Hausdorff dimension of $$R$$. The properties of the fBM with varying Hurst parameter $$H(t)$$ are given here for measurable functions $$H(t)$$ taking values in $$(\tfrac12,1)$$. One expects that the Hausdorff dimension of $$R\cap (t-\epsilon,t+\epsilon)$$ converges to $$H(t)$$ as $$\epsilon\to 0$$.