Real tree encoded by an excursion
= Real tree encoded by an excursion
Let $g:[0,1]\to\mathbb R_+$ be <continuous> with $g(0)=g(1)=0$, and set
$$
m_g(s,t)=\inf_{r\in[s\wedge t,s\vee t]}g(r),\qquad
d_g(s,t)=g(s)+g(t)-2m_g(s,t).
$$
The function $d_g$ is a <pseudometric>. Its metric quotient
$$
T_g=[0,1]/\{d_g=0\}
$$
is the real tree encoded by $g$.