Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Equation (1) — ∣Ef∣=2∣ABR∣+2∣ABB∣+∣AB∣+∣AR∣|E_f| = 2|A_{BR}| + 2|A_{BB}| + |A_B| + |A_R|∣Ef​∣=2∣ABR​∣+2∣ABB​∣+∣AB​∣+∣AR​∣

Proved
OnlineStochMatching.TSM.eq_1

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

bipartite-matchingmax-flowonline-algorithmsp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let G=(A,I,E)G = (A, I, E)G=(A,I,E) be a finite bipartite graph, EfE_fEf​ the edge set of an integral maximum flow of the boosted flow graph, and blue/red a TSM colouring of EfE_fEf​. Write ABRA_{BR}ABR​, ABBA_{BB}ABB​, ABA_BAB​, ARA_RAR​ for the advertisers incident to one blue and one red edge, to two blue edges, to only a blue edge, and to only a red edge. Then

∣Ef∣=2∣ABR∣+2∣ABB∣+∣AB∣+∣AR∣.|E_f| = 2|A_{BR}| + 2|A_{BB}| + |A_B| + |A_R|.∣Ef​∣=2∣ABR​∣+2∣ABB​∣+∣AB​∣+∣AR​∣.

The identity says that every edge of EfE_fEf​ is counted at its advertiser, and that no advertiser carries two red edges. It converts the bound on OPT, which is in terms of ∣Ef∣|E_f|∣Ef​∣, into the advertiser classes in which ALG is bounded.

Preamble
import Mathlib
import Definitions.Def_OnlineStochMatching_TSM_Coloring
Formal statement
namespace OnlineStochMatching.TSM

/-- **Equation (1)** (Feldman, Mehta, Mirrokni, Muthukrishnan, *Online Stochastic Matching: Beating
1-1/e*, arXiv:0905.4100v1, §4.2.2, p. 7): for a maximum flow edge set `E_f` and a TSM colouring
`(blue, red)` of it,
`|E_f| = 2|A_BR| + 2|A_BB| + |A_B| + |A_R|`,
where `A_BR`, `A_BB`, `A_B`, `A_R` are the advertisers incident to one blue and one red edge, to
two blue edges, to only a blue edge, and to only a red edge. -/
theorem eq_1 {A I : Type} [Fintype A] [DecidableEq A] [Fintype I] [DecidableEq I]
    (E F blue red : Finset (A × I)) (hF : IsMaxFlowSet E F) (hcol : IsTSMColoring F blue red) :
    F.card = 2 * (adsBR blue red).card + 2 * (adsBB blue red).card + (adsB blue red).card +
      (adsR blue red).card := by sorry

end OnlineStochMatching.TSM
Source
Feldman, Mehta, Mirrokni, Muthukrishnan, Online Stochastic Matching: Beating 1-1/e, arXiv:0905.4100v1, p. 7, Section 4.2.2, equation (1)
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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