Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (4), p. 9 — the expected matched weight of Algorithm 1 is Σ w_e p_e Pr[e free] Pr[Y_e = 1 ∩ A_e = 1] = Σ w_e p_e y_e a(e) Pr[e free]

Proved
OfflineStochMatch.InfinitePatience.eq_4

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

expectationp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1random-orderstochastic-matching

Let G=(V,E)G=(V,E)G=(V,E) be a graph with activeness probabilities pe∈[0,1]p_e\in[0,1]pe​∈[0,1], arbitrary patiences tv∈N∪{∞}t_v\in\mathbb N\cup\{\infty\}tv​∈N∪{∞} and a feasible solution (ye)(y_e)(ye​) of LP (3), and let a~\tilde aa~ map [0,1][0,1][0,1] into [0,1][0,1][0,1], with a(e)=a~(peye)a(e)=\tilde a(p_ey_e)a(e)=a~(pe​ye​). Run Algorithm 1; an edge is matched when it is probed and active (Pe=1P_e=1Pe​=1). Then for all real weights (we)e∈E(w_e)_{e\in E}(we​)e∈E​ the expected weight of the matching satisfies

∑e∈EwePr⁡[e probed and Pe=1]=∑e∈EwepePr⁡[e is free]Pr⁡[Ye=1∩Ae=1]=∑e∈Ewepeyea(e)Pr⁡[e is free].\sum_{e\in E} w_e\Pr[e\text{ probed and }P_e=1]=\sum_{e\in E}w_ep_e\Pr[e\text{ is free}]\Pr[Y_e=1\cap A_e=1]=\sum_{e\in E}w_ep_ey_ea(e)\Pr[e\text{ is free}].e∈E∑​we​Pr[e probed and Pe​=1]=e∈E∑​we​pe​Pr[e is free]Pr[Ye​=1∩Ae​=1]=e∈E∑​we​pe​ye​a(e)Pr[e is free].

The identity reflects that the algorithm decides to probe eee before it learns PeP_ePe​, and that "e is free" depends only on the edges processed before eee. It reduces the expected weight of Algorithm 1 to the per-edge quantity a(e)Pr⁡[e is free]a(e)\Pr[e\text{ is free}]a(e)Pr[e is free], and Pr⁡[e is probed]=yea(e)Pr⁡[e is free]\Pr[e\text{ is probed}]=y_ea(e)\Pr[e\text{ is free}]Pr[e is probed]=ye​a(e)Pr[e is free].

Formalization Note. The identity holds for every patience, so no patience hypothesis is assumed. Of LP (3) only 0≤ye≤10\le y_e\le 10≤ye​≤1 matters.

Preamble
import Mathlib
import Definitions.Def_OfflineStochMatch_InfinitePatience_Setting
Formal statement
namespace OfflineStochMatch.InfinitePatience

/-- (4), p. 9: the expected weight of the matching produced by Algorithm 1 (an edge is matched when
it is probed and active) equals `∑_e w_e p_e Pr[e is free] Pr[Y_e = 1 ∩ A_e = 1]`, which equals
`∑_e w_e p_e y_e a(e) Pr[e is free]`, for any patience and any weights. -/
theorem eq_4 {V E : Type} [Fintype V] [DecidableEq V] [Fintype E] [DecidableEq E]
    (G : EdmondsMatching65.Polyhedron.Graph V E) (p y w : E → ℝ) (t : V → ℕ∞) (aT : ℝ → ℝ)
    (hp : ∀ f, 0 ≤ p f ∧ p f ≤ 1) (hy : LPFeasible G p t y)
    (haT : ∀ z ∈ Set.Icc (0 : ℝ) 1, aT z ∈ Set.Icc (0 : ℝ) 1) :
    ∑ e, w e * prob p y aT (fun σ Y A P => IsProbed G t σ Y A P e ∧ P e = true)
        = ∑ e, w e * p e * probFree G p t y aT e *
            prob p y aT (fun _ Y A _ => Y e = true ∧ A e = true) ∧
      ∑ e, w e * p e * probFree G p t y aT e *
            prob p y aT (fun _ Y A _ => Y e = true ∧ A e = true)
        = ∑ e, w e * p e * y e * aT (p e * y e) * probFree G p t y aT e := by sorry

end OfflineStochMatch.InfinitePatience
Source
Brubach, Grammel, Ma, MacRury, Srinivasan, Improved Guarantees for Offline Stochastic Matching via New Ordered Contention Resolution Schemes, arXiv:2106.06892v3, p. 9, §3.2, Eq. (4)
Human review
  • Endorsed by Shuze Chen · Oct 14, 2026

    Confirmed by the moderator at approval.

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