Does a compact space contain a compact fractal of every dimension? Let $X$ be a compact metric space with Hausdorff dimension $x \in \mathbb{R}$. Let $0 \leq w < x$.
Does there exist a compact subspace $W \subset X$ with Hausdorff dimension $w$?
If not, what are the necessary conditions on $X$ that guarantee such a subspace?
 A: As it turns out, the answer is yes. This is a corollary of Corollary 7 in the paper On Dimension and on the Existence of Sets of Finite Positive Hausdorff Measure by J.D. Howroyd.
The corollary itself reads:

Corollary 7. For $X$ an analytic subset of a complete separable metric space, and $h$ a continuous Hausdorff function, suppose that one of the following is satisfied:
(1) $h$ if of finite order;
(2) $X$ has finite structural dimension;
(3) $X$ is ultrametric.
Then for all real $l$ with $l < \Lambda^{h}(X)$, there exists a (compact) subset $A$ of $X$ such that
$$l < \lambda^{h}(A) = \Lambda^{h}(A) < \infty.$$

If we want to study a compact metric space $X$, then $X$ itself is a complete separable metric space and is an analytic subset of itself.
A function $h \colon \mathbb{R}_{0}^{+} \rightarrow \mathbb{R}_{0}^{+}$ is a Hausdorff function if:

*

*$h(t) > 0$ for all $t > 0$,

*$h(t) \geq h(s)$ for all $t \geq s$,

*$h$ is continuous from the right for all $t \geq 0$.

Moreover, a Hausdorff function $h$ is of finite order if
$$
  \limsup_{t \rightarrow 0} \frac{h(3t)}{h(t)} \leq \eta
$$
for some $\eta < \infty$. With these definitions, the function $h(t) = t^{w}$ is a continuous Hausdorff function of finite order. Since our function is of finite order, we don't have to worry about the other two conditions given in the corollary.
One last bit of notation: $\Lambda^{h}(X)$ is the Hausdorff measure of $X$ with respect to the Hausdorff function $h$. With our particular $h(t) = t^{w}$, $\Lambda^{h}(X)$ is the usual $w$-dimensional Hausdorff measure of $X$. The other function $\lambda^{h}$ is a weighted Hausdorff measure that we don't have to worry about for this particular problem.
Now, since $X$ has Hausdorff dimension $x > w$, the $w$-dimensional Hausdorff measure $\Lambda^{h}(X)$ is $\infty$. Thus, we can find a compact subset $A \subset X$ with $0 < \Lambda^{h}(A) < \infty$. Since $A$ has strictly positive and finite $w$-dimensional Hausdorff measure, the Hausdorff dimension of $A$ must be $w$.
The proof of the corollary is in the paper. It's a bit long to write down here, since it involves other propositions and results from the paper. There's also a bunch of generalization that goes on, as is evident from the full statement of the corollary I wrote down.
This wasn't part of the question, but for posterity I feel like I should add that for more background on general Hausdorff measure stuff, the book Hausdorff measures by C.A. Rogers is pretty good. I hadn't seen Hausdorff measures with general Hausdorff functions before, and it gave me a good intro to that topic.
