Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Weak duality, p. 19 — every feasible solution of the dual (19) bounds the LP (5)

Proved
MultiPriceOnline.Balance.weak_duality

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

linear-programminglp-dualityonline-matchingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Consider the LP (5) of the multi-price online allocation problem: items iii with inventories kik_iki​ and prices ri(j)r_i^{(j)}ri(j)​, j∈[mi]j\in[m_i]j∈[mi​]; customers t∈[T]t\in[T]t∈[T]; purchase probabilities pt,i(j)p^{(j)}_{t,i}pt,i(j)​. Let xxx be feasible for (5), i.e. it satisfies (5b)–(5d). Let (y,z)(y,z)(y,z) be feasible for its dual (19), i.e. it satisfies (19b)–(19c). Then

∑t=1T∑i∑j=1mipt,i(j)ri(j)xt,i(j) ≤ ∑ikiyi+∑t=1Tzt.\sum_{t=1}^T\sum_i\sum_{j=1}^{m_i}p^{(j)}_{t,i}r_i^{(j)}x^{(j)}_{t,i}\ \le\ \sum_i k_iy_i+\sum_{t=1}^T z_t.t=1∑T​i∑​j=1∑mi​​pt,i(j)​ri(j)​xt,i(j)​ ≤ i∑​ki​yi​+t=1∑T​zt​.

In particular OPT(S,A)\mathrm{OPT}(\mathcal S,\mathcal A)OPT(S,A) is at most the objective of any dual feasible solution. This is the first step of the primal–dual proof of Theorem 4.

Formalization Note No sign condition on ppp is assumed; the inequality holds for all real ppp, which is a stronger statement than needed. The same statement is posed in mission II of this series (Multi-price Ranking), because drafts of concurrent missions cannot import each other.

Preamble
import Mathlib
import Definitions.Def_MultiPriceOnline_Balance_LP
Formal statement
namespace MultiPriceOnline.Balance

/-- Weak duality for the LP (5) and its dual (19) (Ma–Simchi-Levi, arXiv:1905.04770v1, p. 19, the
sentence after (19c)): the objective (5a) of every feasible solution of (5) is at most the
objective (19a) of every feasible solution of (19). -/
theorem weak_duality {ι : Type*} [Fintype ι] (k m : ι → ℕ) (r : ι → ℕ → ℝ) {T : ℕ}
    (p : Fin T → ι → ℕ → ℝ) (x : Fin T → ι → ℕ → ℝ) (hx : LPFeasible k m p x)
    (y : ι → ℝ) (z : Fin T → ℝ) (hyz : DualFeasible m r p y z) :
    lpObj m r p x ≤ dualObj k y z := by sorry

end MultiPriceOnline.Balance
Source
Ma, Simchi-Levi, Algorithms for Online Matching, Assortment, and Pricing with Tight Weight-dependent Competitive Ratios, arXiv:1905.04770v1, p. 19, (19a)–(19c) and the sentence after (19c)
Human review
  • Endorsed by Shuze Chen · Oct 9, 2026

    Confirmed by the moderator at approval.

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