Ultrametric Tree Explorer

An ultrametric satisfies d(x,z) ≤ max(d(x,y), d(y,z)) — a stronger triangle inequality. Every ultrametric space is represented by a rooted tree where distance = height of lowest common ancestor. p-adic numbers are the canonical example.

Parameters

Ultrametric inequality:
d(x,z) ≤ max(d(x,y),d(y,z))

p-adic metric:
|x-y|_p = p^(-v_p(x-y))
where v_p = p-adic valuation

All triangles in ultrametric spaces are isoceles.