For reference, this is a result used in the "Are These Distances Euclidean?" chapter of Matousek's Thirty-three Miniatures.
By "triangle inequality," he's referring to the fact that: if you want three points p,q,r to have some fixed distances between each other (can be a different distance for each pair), then a necessary condition for the existence of such points is that they must satisfy the triangle inequality.
(So I believe this theorem is giving something stronger than triangle inequality, that ends up being necessary and sufficient for this "points exist given distances" problem.)
I did some calculations, but haven't really gotten anywhere...I have:
- $g_{0i}, g_{i0} = 0$
- $g_{ii} = m_{0i} = \| p_0 - p_i \| $
and then some other calculations that seem way too in the weeds.
