Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3.2, p. 391 — in any realization, the distance from x to the y–z path is ½(μ(x, y) + μ(x, z) − μ(y, z))

Proved
MetricGenerators.ConnectedJoin.three_point

by mikedeng1 · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

graph-theoryp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1tree-metric

Let μ:X×X→N\mu:X\times X\to\mathbb Nμ:X×X→N and let (A,g)(A,g)(A,g) be a realization of μ\muμ: AAA is a tree and dA(g(x),g(y))=μ(x,y)d_A(g(x),g(y))=\mu(x,y)dA​(g(x),g(y))=μ(x,y) for all x,y∈Xx,y\in Xx,y∈X. Let x,y,z∈Xx,y,z\in Xx,y,z∈X and let www be a vertex of the path of AAA between g(y)g(y)g(y) and g(z)g(z)g(z) that is nearest to g(x)g(x)g(x) among the vertices of that path. Then

dA(g(x),w)=μ(x,y,z):=12(μ(x,y)+μ(x,z)−μ(y,z)).d_A\bigl(g(x),w\bigr)=\mu(x,y,z):=\tfrac12\bigl(\mu(x,y)+\mu(x,z)-\mu(y,z)\bigr).dA​(g(x),w)=μ(x,y,z):=21​(μ(x,y)+μ(x,z)−μ(y,z)).

So the length of the path joining g(x)g(x)g(x) to the g(y)g(y)g(y)–g(z)g(z)g(z) path is determined by μ\muμ, independently of the realization. The paper uses this quantity in its inductive construction of the minimal realization of a tree metric.

Formalization Note. The vertices of the path of the tree AAA between g(y)g(y)g(y) and g(z)g(z)g(z) are the vertices www with dA(g(y),w)+dA(w,g(z))=dA(g(y),g(z))d_A(g(y),w)+d_A(w,g(z))=d_A(g(y),g(z))dA​(g(y),w)+dA​(w,g(z))=dA​(g(y),g(z)). The identity is stated multiplied by 222 and with the subtraction moved to the other side, 2 dA(g(x),w)+μ(y,z)=μ(x,y)+μ(x,z)2\,d_A(g(x),w)+\mu(y,z)=\mu(x,y)+\mu(x,z)2dA​(g(x),w)+μ(y,z)=μ(x,y)+μ(x,z), to avoid division and truncated subtraction on N\mathbb NN. A nearest vertex www always exists, since the path is finite and nonempty.

Preamble
import Mathlib
import Definitions.Def_MetricGenerators_ConnectedJoin_TreeMetric
Formal statement
namespace MetricGenerators.ConnectedJoin

/-- **§3.2, p. 391 (unnumbered display).** "for any tree A realizing μ and for any x, y, z ∈ X,
the length of the path joining x and the path between y and z in A is determined by
μ(x, y, z) = ½(μ(x, y) + μ(x, z) − μ(y, z)), independently of the realization." (Sebő and
Tannier, On Metric Generators of Graphs, Math. Oper. Res. 29(2):383–393 (2004),
DOI 10.1287/moor.1030.0070, p. 391.)

Let `(A, g)` be a realization of `μ : X → X → ℕ` and `x, y, z ∈ X`. If `w` is a vertex of the
path of `A` between `g y` and `g z` at minimum distance from `g x` among the vertices of that path,
then `2 · d_A(g x, w) + μ(y, z) = μ(x, y) + μ(x, z)`.

**Formalization Note.** The vertices of the `g y`–`g z` path of the tree `A` are the vertices `w`
with `d_A(g y, w) + d_A(w, g z) = d_A(g y, g z)` (in a tree the path is unique). The length of the
path joining `g x` to that path is `d_A(g x, w)` for a nearest such `w` (one exists: the path is
finite and nonempty). The halving and the subtraction are multiplied out, to avoid `ℕ` division
and truncated subtraction. -/
theorem three_point {X : Type*} (μ : X → X → ℕ) {N : ℕ} (A : SimpleGraph (Fin N))
    (g : X → Fin N) (hA : IsRealization μ A g) (x y z : X) (w : Fin N)
    (hw : A.dist (g y) w + A.dist w (g z) = A.dist (g y) (g z))
    (hmin : ∀ w' : Fin N, A.dist (g y) w' + A.dist w' (g z) = A.dist (g y) (g z) →
      A.dist (g x) w ≤ A.dist (g x) w') :
    2 * A.dist (g x) w + μ y z = μ x y + μ x z := by sorry

end MetricGenerators.ConnectedJoin
Source
Sebő and Tannier, On Metric Generators of Graphs, Math. Oper. Res. 29(2):383–393 (2004), DOI 10.1287/moor.1030.0070, p. 391, §3.2 (unnumbered display)
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me