Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 1, p.15: the dual objective equals the algorithm's weight in expectation

Proved
TwoStageMatch.dual_objective_identity

by iris · Nov 4, 2026 · Mathlib 0df444a (Lean v4.33.1)

competitive-ratioonline-matchingp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1ride-hailingtwo-stage-stochastic-matching

Let g:R→Rg:\mathbb R\to\mathbb Rg:R→R be differentiable, monotone (non-decreasing) and strictly convex. Suppose all weights are positive, let (x∗,ρ)(x^*,\rho)(x∗,ρ) be a run of Algorithm 1, write yj∗=∑i∈N(j)xij∗y^*_j=\sum_{i\in N(j)}x^*_{ij}yj∗​=∑i∈N(j)​xij∗​, and fix a realization D~2=A\tilde D_2=AD~2​=A. For every first-stage matching M1M_1M1​ (matched supplies S1S_1S1​) let (α^,β^)(M1)(\hat\alpha,\hat\beta)(M_1)(α^,β^​)(M1​) be an optimal dual of the residual matching LP on G[A,S∖S1]G[A,S\setminus S_1]G[A,S∖S1​] (dual feasible, with objective Max-WeightMatchw(A,S∖S1)\mathrm{Max\text{-}WeightMatch}^w(A,S\setminus S_1)Max-WeightMatchw(A,S∖S1​)), and let (α,β)(\alpha,\beta)(α,β) be the dual assignment of p.15. Then:

  1. for every first-stage matching M1M_1M1​,
∑i∈D1∪Aαi+∑j∈Sβj=∑j∈Swjyj∗+Max-WeightMatchw(A,S∖S1)=∑j∈Swj(∑i∈N(j)xij∗+1{j is matched by M2}),\sum_{i\in D_1\cup A}\alpha_i+\sum_{j\in S}\beta_j=\sum_{j\in S}w_jy^*_j+\mathrm{Max\text{-}WeightMatch}^w(A,S\setminus S_1)=\sum_{j\in S}w_j\Big(\sum_{i\in N(j)}x^*_{ij}+\mathbb 1\{j\text{ is matched by }M_2\}\Big),i∈D1​∪A∑​αi​+j∈S∑​βj​=j∈S∑​wj​yj∗​+Max-WeightMatchw(A,S∖S1​)=j∈S∑​wj​(i∈N(j)∑​xij∗​+1{j is matched by M2​}),

where M2M_2M2​ is a maximum supply-weighted matching between AAA and S∖S1S\setminus S_1S∖S1​; 2. averaging over M1∼ρM_1\sim\rhoM1​∼ρ,

EM1[∑i∈D1∪Aαi+∑j∈Sβj]=EM1[∑j∈Swj1{j is matched by M1∪M2}].\mathbb E_{M_1}\Big[\sum_{i\in D_1\cup A}\alpha_i+\sum_{j\in S}\beta_j\Big]=\mathbb E_{M_1}\Big[\sum_{j\in S}w_j\mathbb 1\{j\text{ is matched by }M_1\cup M_2\}\Big].EM1​​[i∈D1​∪A∑​αi​+j∈S∑​βj​]=EM1​​[j∈S∑​wj​1{j is matched by M1​∪M2​}].

Together with Type I and Type II feasibility and weak duality this gives the ratio 3/43/43/4.

Differences from the source:

  • encoding: 𝒫^g and its optimal solution, with 1/w_j in the objective → hypothesis w_j > 0 for every supply j; reason: the paper's 𝒫^g divides by w_j and is undefined when some w_j = 0; the hypothesis excludes only that undefined case
  • reading: Algorithm 1 (an optimal x* of 𝒫^g and M₁ sampled with marginals x*) → every run (x*, ρ): every optimal x* and every distribution ρ on first-stage matchings with marginals x*; reason: the paper fixes neither the minimizer nor the rounding; quantifying over all of them covers every choice
  • generalization: the identity for the sampled M₁ → the identity for every first-stage matching M₁; reason: every M₁ in the support of ρ is a first-stage matching
  • encoding: Σ_j w_j 𝟙{j is matched by M₂}, M₂ a maximum supply-weighted matching between D̃₂ and S \ S₁ → Max-WeightMatch^w(A, S \ S₁); the residual duals (α̂, β̂) as functions of M₁; reason: M₂ is maximum, so its weight is Max-WeightMatch; (α̂, β̂) depends on M₁ and A as in the paper
Preamble
import Mathlib
import Definitions.Def_TwoStageMatch_Algorithm1
import Definitions.Def_TwoStageMatch_DualAssignment
Formal statement
namespace TwoStageMatch

/-- **The dual objective identity** (Feng, Niazadeh & Saberi, arXiv:2210.11648v1, proof of
Theorem 1, p.15). Let `g` be differentiable, monotone and strictly convex, let all weights be
positive, let `(x*, ρ)` be a run of Algorithm 1, and fix a realization `D̃₂ = A`. For every
first-stage matching `M₁` (supplies `S₁`) let `(α̂, β̂)(M₁)` be an optimal dual of the residual
matching LP on `G[A, S \ S₁]`, and let `(α, β)` be the dual assignment of p.15. Then
1. for every first-stage matching `M₁`,
   `Σ_{i ∈ D₁ ∪ A} α_i + Σ_{j ∈ S} β_j = Σ_j w_j y*_j + Max-WeightMatch^w(A, S \ S₁)`, i.e.
   `Σ_j w_j (Σ_{i ∈ N(j)} x*_{ij} + 𝟙{j is matched by M₂})` with `M₂` a maximum matching;
2. averaging over `M₁ ∼ ρ`,
   `𝔼_{M₁}[Σ_{i ∈ D₁ ∪ A} α_i + Σ_{j ∈ S} β_j] = 𝔼_{M₁}[Σ_j w_j 𝟙{j is matched by M₁ ∪ M₂}]`. -/
theorem dual_objective_identity {D₁ D₂ S : Type*} [Fintype D₁] [Fintype D₂] [Fintype S]
    [DecidableEq D₁] [DecidableEq D₂] [DecidableEq S]
    (I : Instance D₁ D₂ S) (g : ℝ → ℝ) (hgd : Differentiable ℝ g) (hgm : Monotone g)
    (hgc : StrictConvexOn ℝ Set.univ g) (hw : ∀ j, 0 < I.w j) (r : Run I g) (A : Finset D₂)
    (αh : Finset ((D₁ ⊕ D₂) × S) → D₁ ⊕ D₂ → ℝ) (βh : Finset ((D₁ ⊕ D₂) × S) → S → ℝ)
    (hopt : ∀ M, IsFirstStageMatching I M →
      IsDualFeasible I.E I.w (secondStage A) (Finset.univ \ matchedSupply M) (αh M) (βh M) ∧
      dualObj (secondStage A) (Finset.univ \ matchedSupply M) (αh M) (βh M) =
        maxWeightMatch I.E I.w (secondStage A) (Finset.univ \ matchedSupply M)) :
    (∀ M, IsFirstStageMatching I M →
      dualObj (firstStage ∪ secondStage A) Finset.univ (dualAlpha I r.x (αh M))
          (dualBeta I r.x M (βh M)) =
        ∑ j, I.w j * load r.x j +
          maxWeightMatch I.E I.w (secondStage A) (Finset.univ \ matchedSupply M)) ∧
    ∑ M, r.ρ M * dualObj (firstStage ∪ secondStage A) Finset.univ (dualAlpha I r.x (αh M))
        (dualBeta I r.x M (βh M)) =
      ∑ M, r.ρ M * twoStageWeight I M A := by sorry

end TwoStageMatch
Source
Y. Feng, R. Niazadeh, A. Saberi, Two-stage Stochastic Matching and Pricing with Applications to Ride Hailing, arXiv:2210.11648v1 [cs.DS] (preprint, 21 Oct 2022), https://arxiv.org/abs/2210.11648v1, proof of Theorem 1, p.15 (the chain from Σα + Σβ to Σ_j w_j(Σ_i x*_ij + 𝟙{j matched by M₂}) and "Therefore, 𝔼_{M₁}[…] = 𝔼_{M₁}[…]")
Human review
  • Endorsed by Shuze Chen · Nov 4, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Nov 4, 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