Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 7 — edge form of the cost: C(f)=∑eℓe(fe)feC(f) = \sum_e \ell_e(f_e) f_eC(f)=∑e​ℓe​(fe​)fe​

Proved
SelfishRouting.Bicriteria.cost_eq_sum_edges

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

network-flowsp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1selfish-routing

Let AAA be an edge–route incidence matrix, ℓ=(ℓe)e\ell = (\ell_e)_eℓ=(ℓe​)e​ any family of functions R→R\mathbb R \to \mathbb RR→R, and f=(fP)Pf = (f_P)_Pf=(fP​)P​ any vector of route flows, with edge flows fe=∑PAePfPf_e = \sum_P A_{eP} f_Pfe​=∑P​AeP​fP​. Then the cost can be computed edge by edge:

C(f)=∑PℓP(f) fP=∑eℓe(fe) fe.C(f) = \sum_{P} \ell_P(f)\, f_P = \sum_{e} \ell_e(f_e)\, f_e .C(f)=P∑​ℓP​(f)fP​=e∑​ℓe​(fe​)fe​.

The paper uses both forms of the cost throughout; in particular the proof of Theorem 3.1 moves between them.

Formalization Note. The identity is pure algebra and holds for any real matrix AAA, any functions ℓe\ell_eℓe​ and any real fff; no hypothesis is assumed.

Preamble
import Mathlib
import Definitions.Def_KellyStochasticNetworks_Wardrop
import Definitions.Def_SelfishRouting_Bicriteria_Model
Formal statement
namespace SelfishRouting.Bicriteria

open KellyStochasticNetworks

/-- §2.1 (p. 7): the edge form of the cost, `C(f) = ∑ₑ ℓₑ(fₑ) fₑ`. -/
theorem cost_eq_sum_edges {J R : ℕ} (A : Fin J → Fin R → ℝ) (ℓ : Fin J → ℝ → ℝ)
    (x : Fin R → ℝ) :
    cost A ℓ x = ∑ j, ℓ j (linkFlow A x j) * linkFlow A x j := by sorry

end SelfishRouting.Bicriteria
Source
Roughgarden & Tardos, How Bad is Selfish Routing?, J. ACM 49(2) (2002), author's manuscript of 5 Dec 2001, p. 7, §2.1 (unnumbered display after the definition of C(f))
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