Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 7 — E[OPT_ℓ((ℓ/n) b)] ≤ (ℓ/n) OPT

Proved
DynamicOnlineLP.DLA.expected_partialOPT_le

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

linear-programminglp-dualityrandom-permutation

Let an online LP instance have nnn columns (πt≥0\pi_t\ge0πt​≥0, at∈[0,1]ma_t\in[0,1]^mat​∈[0,1]m) and right-hand side b≥0b\ge0b≥0, arriving in a uniformly random order, and let OPT\mathrm{OPT}OPT be the optimal value of the offline program (1). For ℓ∈{0,…,n}\ell\in\{0,\dots,n\}ℓ∈{0,…,n} let OPTℓ(d)\mathrm{OPT}_\ell(d)OPTℓ​(d) be the optimal value of the partial program on the first ℓ\ellℓ arrivals with right-hand side ddd. Then

E[OPTℓ(ℓn b)]≤ℓn OPT,\mathbb E\Big[\mathrm{OPT}_\ell\Big(\frac{\ell}{n}\,b\Big)\Big]\le\frac{\ell}{n}\,\mathrm{OPT},E[OPTℓ​(nℓ​b)]≤nℓ​OPT,

the expectation being over the random arrival order.

The lemma bounds the value that is lost by not accepting anything in the learning periods: a random sample of ℓ\ellℓ columns with a proportionally scaled budget is worth, in expectation, at most its proportional share of the offline optimum.

Formalization Note The expectation is the average over all n!n!n! permutations. The paper's "for any ℓ\ellℓ" is read as 0≤ℓ≤n0\le\ell\le n0≤ℓ≤n (the first ℓ\ellℓ arrivals must exist). The hypothesis b≥0b\ge0b≥0 makes both programs feasible, so that both optimal values are true optima.

Preamble
import Mathlib
import Definitions.Def_DynamicOnlineLP_DLA_PackingLP
import Definitions.Def_DynamicOnlineLP_DLA_Instance
Formal statement
namespace DynamicOnlineLP.DLA

/-- Lemma 7 (Agrawal–Wang–Ye 2014, p. 884): for any `ℓ`, the expected optimal value of the partial
LP on the first `ℓ` arrivals with right-hand side `(ℓ/n) b` is at most `(ℓ/n) OPT`; the expectation
is over a uniformly random arrival order. -/
theorem expected_partialOPT_le {m n : ℕ} (I : Instance m n) (hb : ∀ i : Fin m, 0 ≤ I.b i)
    (ℓ : ℕ) (hℓ : ℓ ≤ n) :
    avgPerm (fun σ : Equiv.Perm (Fin n) =>
        I.partialOPT σ ℓ (fun i => ((ℓ : ℝ) / (n : ℝ)) * I.b i)) ≤
      ((ℓ : ℝ) / (n : ℝ)) * I.OPT := by sorry

end DynamicOnlineLP.DLA
Source
Agrawal, Wang, Ye, A Dynamic Near-Optimal Algorithm for Online Linear Programming, Oper. Res. 62(4), 2014, p. 884, Lemma 7 (proof as for Lemma 4, p. 883)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let m,n∈Nm,n\in\mathbb{N}m,n∈N, and let III be an instance with πj≥0\pi_j\ge0πj​≥0 and 0≤aj,i≤10\le a_{j,i}\le10≤aj,i​≤1. Assume bi≥0b_i\ge0bi​≥0 for every iii, and let ℓ∈N\ell\in\mathbb{N}ℓ∈N with ℓ≤n\ell\le nℓ≤n. The theorem asserts:

1n!∑σOPTℓσ ⁣(ℓnb) ≤ ℓn OPT.\frac1{n!}\sum_{\sigma}\mathrm{OPT}^\sigma_\ell\!\Big(\tfrac{\ell}{n}b\Big)\ \le\ \frac{\ell}{n}\,\mathrm{OPT}.n!1​σ∑​OPTℓσ​(nℓ​b) ≤ nℓ​OPT.

The symbols mean:

  • The sum ranges over all permutations σ\sigmaσ of {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}.
  • OPTℓσ(d)\mathrm{OPT}^\sigma_\ell(d)OPTℓσ​(d) is the supremum of ∑t<ℓπσ(t)xt\sum_{t<\ell}\pi_{\sigma(t)}x_t∑t<ℓ​πσ(t)​xt​ subject to ∑t<ℓaσ(t),ixt≤di\sum_{t<\ell}a_{\sigma(t),i}x_t\le d_i∑t<ℓ​aσ(t),i​xt​≤di​ for all iii and 0≤xt≤10\le x_t\le10≤xt​≤1 for t<ℓt<\ellt<ℓ. This is the LP restricted to the columns arriving at the first ℓ\ellℓ times.
  • OPT\mathrm{OPT}OPT is the same supremum over all nnn columns with right-hand side bbb.
  • ℓ/n\ell/nℓ/n is real division.

With b≥0b\ge0b≥0, both feasible sets contain x=0x=0x=0, so both values are genuine optima.

Degenerate cases:

  • ℓ=0\ell=0ℓ=0. Both sides are 000.
  • n=0n=0n=0. Then ℓ=0\ell=0ℓ=0, 0/00/00/0 is taken as 000, there is one permutation, and both sides are 000.
  • ℓ=n≥1\ell=n\ge1ℓ=n≥1. Each term on the left equals OPT\mathrm{OPT}OPT, and the claim is OPT≤OPT\mathrm{OPT}\le\mathrm{OPT}OPT≤OPT.
  • m=0m=0m=0. The LP has no resource constraints.
Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

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