Every compact real tree is isometric to a real tree encoded by an excursion. One construction takes finite subtrees spanning successively finer finite nets, performs depth-first contour traversals of those subtrees, and chooses compatible time parameterizations. The contour functions have a uniformly convergent subsequence, and continuity of excursion coding in the Gromov-Hausdorff distance identifies the limiting coded tree with the original tree.
For nonempty compact subsets of a metric space , the Hausdorff distance is
For compact metric spaces , the Gromov-Hausdorff distance is
where and range over isometric embeddings into a common metric space .
The collection of compact real trees is not compact in the Gromov-Hausdorff topology. Indeed, the intervals are compact real trees and
Their diameters are unbounded, so has no convergent subsequence in the Gromov-Hausdorff topology.
Choose a root and finite sets whose union is dense, arranging that is a -net and . Let be the finite subtree spanned by and . A depth-first contour traversal of , recording distance from , gives a continuous excursion whose real tree encoded by an excursion is .
The traversals may be chosen compatibly: when passing from to , insert the new branch traversals into small time intervals at their attachment points. Since every new component has height at most , choose the time changes so that
After harmlessly taking a faster sequence of nets, these errors are summable. Hence is uniformly Cauchy and converges uniformly to a continuous with .
The net property gives . By the stated continuity of excursion coding, . Since is isometric to , uniqueness of limits in the Gromov-Hausdorff distance implies that is isometric to . This proves the excursion coding theorem for compact real trees.