Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§2.1, p. 5 — the cost of a flow is the edge sum C(f) = Σₑ ℓₑ(fₑ)fₑ

Proved
PoAIndep.Topology.cost_eq_sum_edges

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

flow-costp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1selfish-routing

Let (G,r,ℓ)(G,r,\ell)(G,r,ℓ) be an instance and let fff be a flow, that is, a nonnegative assignment of flow to simple source–sink paths of each commodity. The cost of fff is defined as the total latency C(f)=∑PℓP(f)fPC(f)=\sum_{P}\ell_P(f)f_PC(f)=∑P​ℓP​(f)fP​, summed over all commodities and paths. Summing over the edges of each path and reversing the order of summation gives the edge form

C(f)=∑e∈Eℓe(fe) fe.C(f)=\sum_{e\in E}\ell_e(f_e)\,f_e .C(f)=e∈E∑​ℓe​(fe​)fe​.

The edge form is how the cost enters every later argument of the paper: Lemmas 3.5 and 3.7 and Theorem 3.8 all compare flows edge by edge.

Formalization Note. Neither feasibility nor any property of the latency functions is needed. The identity uses that a simple path contains each edge at most once.

Preamble
import Mathlib
import Definitions.Def_PoAIndep_Topology_Model
Formal statement
namespace PoAIndep.Topology

theorem cost_eq_sum_edges {V E : Type} [Fintype V] [DecidableEq V] [Fintype E]
    [DecidableEq E] (I : Instance V E) (f : Flow I) (hf : IsFlow I f) :
    cost I f = ∑ e, I.ℓ e (edgeFlow I f e) * edgeFlow I f e := by sorry

end PoAIndep.Topology
Source
Roughgarden, The price of anarchy is independent of the network topology (journal-version manuscript, Dec. 23, 2002), p. 5, §2.1, third paragraph
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