holds for every $\{u, v\} \in E(T_1)$.

The formulas $$T_1(l_1) \simeq T_2(l_2) \quad \text{and} \quad T_1(w_1) \simeq T_2(w_2)$$ mean that the labeled trees $T_1(l_1)$, $T_2(l_2)$ are isomorphic and, respectively, that the weighted trees $T_1(w_1)$, $T_2(w_2)$ are isomorphic.

\[d2.8\] Let $T_1 = T_1(r_1, l_1)$ and $T_2 = T_2(r_2, l_2)$ be labeled rooted trees. An isomorphism $f \colon V(T_1) \to V(T_2)$ of the free (unrooted, without labelings) trees $T_1$ and $T_2$ is an isomorphism of $T_1(r_1, l_1)$ and $T_2(r_2, l_2)$ if it is an isomorphism of $T_1(r_1)$ and $T_2(r_2)$ and, simultaneously, an isomorphism of $T_1(l_1)$ and $T_2(l_2)$ ($T_1(w_1)$ and $T_2(w_2)$).

The labeled rooted trees $T_1(r_1, l_1)$ and $T_2(r_2, l_2)$ are isomorphic if there is an isomorphism of these trees. In this case we write $T_1(r_1, l_1) \simeq T_2(r_2, l_2)$.

Analogously, we define an isomorphism of weighted rooted trees $T_1(r_1, w_1)$, $T_2(r_2, w_2)$ and write $T_1(r_1, w_1) \simeq T_2(r_2, w_2)$ if $T_1(r_1, w_1)$ and $T_2(r_2, w_2)$ are isomorphic as weighted rooted trees.

\[t2.7\] Let $(X, d)$ and $(Y, \rho)$ be nonempty, finite ultrametric spaces with the representing trees $T_X$ and $T_Y$. Then $$((X, d) \simeq (Y, \rho)) \Leftrightarrow (T_X \simeq T_Y)$$ is valid.

If $T = T(r)$ is a rooted tree and $u$, 