Solution (source code)

= Solution

For nonempty compact subsets $A,B$ of a <metric space> $(Z,d)$, the <Hausdorff distance> is
$$
d_H^Z(A,B)=\max\left\{\sup_{a\in A}\inf_{b\in B}d(a,b),
\sup_{b\in B}\inf_{a\in A}d(a,b)\right\}.
$$
For compact <metric spaces> $X,Y$, the <Gromov-Hausdorff distance> is
$$
d_{GH}(X,Y)=\inf_{Z,\varphi,\psi}d_H^Z(\varphi(X),\psi(Y)),
$$
where $\varphi$ and $\psi$ range over <isometric embeddings> into a common <metric space> $Z$.

The collection of compact <real tree>[real trees] is not compact in the <Gromov-Hausdorff topology>. Indeed, the intervals $T_n=[0,n]$ are compact real trees and
$$
|\operatorname{diam}(X)-\operatorname{diam}(Y)|\leq2d_{GH}(X,Y).
$$
Their diameters are unbounded, so $(T_n)$ has no convergent subsequence in the <Gromov-Hausdorff topology>.