Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4.3(b) — the marginal cost of a path w.r.t. f/2f/2f/2 equals its latency w.r.t. fff: ℓP∗(f/2)=ℓP(f)\ell^*_P(f/2)=\ell_P(f)ℓP∗​(f/2)=ℓP​(f)

Proved
SelfishRouting.Linear.lemma_4_3_b

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

linear-latencymarginal-costp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1selfish-routing

Let every edge have a linear latency ℓe(x)=aex+be\ell_e(x)=a_ex+b_eℓe​(x)=ae​x+be​, with marginal cost ℓe∗(x)=2aex+be\ell^*_e(x)=2a_ex+b_eℓe∗​(x)=2ae​x+be​. For every route flow fff and every route PPP, the marginal cost of increasing the flow on PPP with respect to f/2f/2f/2 equals the latency of PPP with respect to fff:

ℓP∗(f/2)=∑e∈Pℓe∗(fe/2)=∑e∈Pℓe(fe)=ℓP(f).\ell^*_P(f/2)=\sum_{e\in P}\ell^*_e(f_e/2)=\sum_{e\in P}\ell_e(f_e)=\ell_P(f).ℓP∗​(f/2)=e∈P∑​ℓe∗​(fe​/2)=e∈P∑​ℓe​(fe​)=ℓP​(f).

It connects the marginal costs at the optimal flow f/2f/2f/2 of Lemma 4.3(a) with the equilibrium latencies of fff, and through Lemma 2.3 with the cost C(f)C(f)C(f).

Formalization Note The page states (b) under the lemma's preamble ("fff is a flow at Nash equilibrium"). The identity holds edge by edge for every flow, so the formal statement drops the equilibrium hypothesis (and the sign conditions on ae,bea_e,b_eae​,be​ and the incidence); it is the stronger identity and implies the page's statement.

Preamble
import Mathlib
import Definitions.Def_KellyStochasticNetworks_Wardrop
import Definitions.Def_SelfishRouting_Linear_Model
import Definitions.Def_SelfishRouting_Linear_LinearLatency
Formal statement
namespace SelfishRouting.Linear

/-- Lemma 4.3(b) (p. 15): with linear latencies, the marginal cost `ℓ*_P(f/2)` of every route
with respect to `f/2` equals its latency `ℓ_P(f)` with respect to `f`. Stated for every flow
`f` (the page's equilibrium hypothesis is not needed). -/
theorem lemma_4_3_b {J R : ℕ} (A : Fin J → Fin R → ℝ) (a b : Fin J → ℝ)
    (x : Fin R → ℝ) (r : Fin R) :
    SelfishRouting.Bicriteria.pathLatency A (marginalLatency a b) (fun r => x r / 2) r =
      SelfishRouting.Bicriteria.pathLatency A (linLatency a b) x r := by sorry

end SelfishRouting.Linear
Source
Roughgarden & Tardos, How Bad is Selfish Routing?, J. ACM 49(2) (2002), author's manuscript of 5 Dec 2001, p. 15, Lemma 4.3(b)
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