Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(7): Type II dual constraints hold in expectation with factor 3/43/43/4

Proved
TwoStageMatch.type_II_feasibility

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

competitive-ratioonline-matchingp2o-gran-per-chapterp2o-plan-paperp2o-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 for every edge (i,j)∈E(i,j)\in E(i,j)∈E with i∈Ai\in Ai∈A,

EM1[αi+βj]≥EM1[wj1{j is not matched in M1}+wjyj∗2]=wj(1−yj∗)+wjyj∗2≥34wj,\mathbb E_{M_1}[\alpha_i+\beta_j]\ge\mathbb E_{M_1}\big[w_j\mathbb 1\{j\text{ is not matched in }M_1\}+w_jy_j^{*2}\big]=w_j(1-y^*_j)+w_jy_j^{*2}\ge\frac34w_j,EM1​​[αi​+βj​]≥EM1​​[wj​1{j is not matched in M1​}+wj​yj∗2​]=wj​(1−yj∗​)+wj​yj∗2​≥43​wj​,

where M1∼ρM_1\sim\rhoM1​∼ρ.

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
  • encoding: 𝔼_{M₁}[·] with M₁ sampled with marginals x* → Σ_M ρ(M)·(·) over all Finsets of edges, ρ supported on first-stage matchings; the first two steps of (7) merged into one inequality; reason: the expectation over the finite law ρ; the residual duals depend on M₁; the merged steps are unfolding the definition of (α, β) and β̂ ≥ 0
Preamble
import Mathlib
import Definitions.Def_TwoStageMatch_Algorithm1
import Definitions.Def_TwoStageMatch_DualAssignment
Formal statement
namespace TwoStageMatch

/-- **Type II dual constraints in expectation, (7)** (Feng, Niazadeh & Saberi,
arXiv:2210.11648v1, proof of Theorem 1, pp.15–16). 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₁` 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
for every edge `(i, j) ∈ E` with `i ∈ A`,
`𝔼_{M₁}[α_i + β_j] ≥ 𝔼_{M₁}[w_j 𝟙{j is not matched in M₁}] + w_j y*_j² = w_j (1 − y*_j) + w_j y*_j²
 ≥ (3/4) w_j`, where `M₁ ∼ ρ`. -/
theorem type_II_feasibility {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)) :
    ∀ i ∈ A, ∀ j, I.E (Sum.inr i) j →
      ∑ M, r.ρ M * (I.w j * (if j ∈ Finset.univ \ matchedSupply M then 1 else 0) +
            I.w j * (load r.x j) ^ 2) ≤
          ∑ M, r.ρ M * (dualAlpha I r.x (αh M) (Sum.inr i) + dualBeta I r.x M (βh M) j) ∧
        ∑ M, r.ρ M * (I.w j * (if j ∈ Finset.univ \ matchedSupply M then 1 else 0) +
            I.w j * (load r.x j) ^ 2) =
          I.w j * (1 - load r.x j) + I.w j * (load r.x j) ^ 2 ∧
        (3 / 4 : ℝ) * I.w j ≤ I.w j * (1 - load r.x j) + I.w j * (load r.x j) ^ 2 := 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, pp.15–16, eq. (7) (Type II edges)
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