Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6 — with probability 1 − ε, Σ_{t≤2ℓ} π_t x_t(p̂^ℓ) ≥ (1 − 2h_ℓ − ε) OPT_{2ℓ}((2ℓ/n) b) for all ℓ ∈ L

Proved
DynamicOnlineLP.DLA.learned_price_near_optimal

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

concentration-inequalitiesonline-linear-programmingrandom-permutation

Under the setting of Lemma 5 (an online LP instance with m≥1m\ge1m≥1 constraints, πt≥0\pi_t\ge0πt​≥0, at∈[0,1]ma_t\in[0,1]^mat​∈[0,1]m, in general position and in uniformly random order; ε=2−E\varepsilon=2^{-E}ε=2−E, E≥1E\ge1E≥1, εn\varepsilon nεn a positive integer; LLL, hℓh_\ellhℓ​ and the learned dual prices p^ℓ\hat p^\ellp^​ℓ of (13) as there), let OPTs(d)\mathrm{OPT}_s(d)OPTs​(d) denote the optimal value of the partial program LPs(d)\mathrm{LP}_s(d)LPs​(d) on the first sss arrivals with right-hand side ddd. There is an absolute constant C>0C>0C>0 such that, if B=min⁡ibi≥C mlog⁡(n/ε)/ε2B=\min_ib_i\ge C\,m\log(n/\varepsilon)/\varepsilon^2B=mini​bi​≥Cmlog(n/ε)/ε2, then with probability at least 1−ε1-\varepsilon1−ε, for all ℓ∈L\ell\in Lℓ∈L,

∑t=12ℓπt xt(p^ℓ) ≥ (1−2hℓ−ε) OPT2ℓ(2ℓn b).\sum_{t=1}^{2\ell}\pi_t\,x_t(\hat p^{\ell})\ \ge\ (1-2h_\ell-\varepsilon)\,\mathrm{OPT}_{2\ell}\Big(\frac{2\ell}{n}\,b\Big).t=1∑2ℓ​πt​xt​(p^​ℓ) ≥ (1−2hℓ​−ε)OPT2ℓ​(n2ℓ​b).

This is the optimality half of the analysis: the price learned from the first ℓ\ellℓ arrivals, applied to the first 2ℓ2\ell2ℓ arrivals, is nearly optimal for the proportionally scaled partial program.

Formalization Note The paper's condition is B≥10mlog⁡(n/ε)/ε2B\ge10m\log(n/\varepsilon)/\varepsilon^2B≥10mlog(n/ε)/ε2; as for Lemma 5, its proof does not deliver the constant 101010, and an absolute constant CCC quantified before every instance parameter is used instead. The probability 1−ε1-\varepsilon1−ε and the factor 1−2hℓ−ε1-2h_\ell-\varepsilon1−2hℓ​−ε are exact. log⁡\loglog is the natural logarithm; times 1,…,2ℓ1,\dots,2\ell1,…,2ℓ are Lean's firstTimes n (2ℓ).

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

/-- Lemma 6 (Agrawal–Wang–Ye 2014, p. 884), with an absolute constant `C` in place of the paper's
`10`: under Assumptions 1–3, `ε = 2^{-E}` and `εn ∈ ℕ`, if `b_i ≥ C m log(n/ε)/ε²` for all `i`,
then with probability at least `1 - ε` over the arrival order, for all `ℓ ∈ L`,
`∑_{t=1}^{2ℓ} π_t x_t(p̂^ℓ) ≥ (1 - 2h_ℓ - ε) OPT_{2ℓ}((2ℓ/n) b)`. -/
theorem learned_price_near_optimal :
    ∃ C : ℝ, 0 < C ∧
      ∀ (m n E : ℕ) (I : Instance m n) (rule : DualRule m n),
        1 ≤ m → 1 ≤ E → 0 < n → 2 ^ E ∣ n → I.GeneralPosition → IsValidDualRule rule →
        (∀ i : Fin m, C * (m : ℝ) * Real.log ((n : ℝ) / eps E) / eps E ^ 2 ≤ I.b i) →
        1 - eps E ≤ probPerm (fun σ : Equiv.Perm (Fin n) =>
          ∀ ℓ ∈ phases n E,
            (1 - 2 * slack n E ℓ - eps E) *
                I.partialOPT σ (2 * ℓ) (fun i => (2 * (ℓ : ℝ) / (n : ℝ)) * I.b i) ≤
              ∑ t ∈ firstTimes n (2 * ℓ),
                I.arrPi σ t * threshold (I.arrPi σ) (I.arrA σ) (learnedPrice I rule E σ ℓ) t) := 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 6 (proof: p. 884 and p. 888, Appendix B.2)
Read-back

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

The theorem asserts that there is a real constant C>0C>0C>0, chosen once before all other quantities, that works for all of the following.

Setting. Take any m,n,E∈Nm,n,E\in\mathbb{N}m,n,E∈N, any instance III (with πj≥0\pi_j\ge0πj​≥0, 0≤aj,i≤10\le a_{j,i}\le10≤aj,i​≤1, and bbb unrestricted), and any dual rule. Suppose:

  • m≥1m\ge1m≥1, E≥1E\ge1E≥1, n≥1n\ge1n≥1, and 2E∣n2^E\mid n2E∣n;
  • III is in general position: for every p≥0p\ge0p≥0, at most mmm columns satisfy ∑ipiaj,i=πj\sum_ip_ia_{j,i}=\pi_j∑i​pi​aj,i​=πj​;
  • the rule is valid: it depends only on the first ℓ\ellℓ arrivals, and for ℓ≤n\ell\le nℓ≤n and d≥0d\ge0d≥0 it returns an optimal dual price of the packing LP on the first ℓ\ellℓ columns;
  • bi≥Cmlog⁡(n/ε)/ε2b_i\ge C m\log(n/\varepsilon)/\varepsilon^2bi​≥Cmlog(n/ε)/ε2 for all iii, where ε=2−E\varepsilon=2^{-E}ε=2−E and log⁡\loglog is the natural logarithm.

Conclusion. With σ\sigmaσ uniformly random over the n!n!n! permutations, the following holds with probability at least 1−ε1-\varepsilon1−ε for every ℓ∈L={λ2r:0≤r≤E−1}\ell\in L=\{\lambda2^r:0\le r\le E-1\}ℓ∈L={λ2r:0≤r≤E−1}, where λ=n/2E\lambda=n/2^Eλ=n/2E:

(1−2hℓ−ε)⋅OPT2ℓσ ⁣(2ℓnb) ≤ ∑t=02ℓ−1πσ(t) xt(p^ℓ(σ)).(1-2h_\ell-\varepsilon)\cdot \mathrm{OPT}^\sigma_{2\ell}\!\Big(\tfrac{2\ell}{n}b\Big)\ \le\ \sum_{t=0}^{2\ell-1}\pi_{\sigma(t)}\,x_t\big(\hat p^\ell(\sigma)\big).(1−2hℓ​−ε)⋅OPT2ℓσ​(n2ℓ​b) ≤ t=0∑2ℓ−1​πσ(t)​xt​(p^​ℓ(σ)).

The symbols mean:

  • hℓ=εn/ℓh_\ell=\varepsilon\sqrt{n/\ell}hℓ​=εn/ℓ​.
  • OPT2ℓσ(d)\mathrm{OPT}^\sigma_{2\ell}(d)OPT2ℓσ​(d) is the supremum of ∑t<2ℓπσ(t)xt\sum_{t<2\ell}\pi_{\sigma(t)}x_t∑t<2ℓ​πσ(t)​xt​ over xxx with ∑t<2ℓaσ(t),ixt≤di\sum_{t<2\ell}a_{\sigma(t),i}x_t\le d_i∑t<2ℓ​aσ(t),i​xt​≤di​ for all iii and 0≤xt≤10\le x_t\le10≤xt​≤1. It is 000 if no such xxx exists.
  • xt(p)x_t(p)xt​(p) is 000 if πσ(t)≤∑ipiaσ(t),i\pi_{\sigma(t)}\le\sum_ip_ia_{\sigma(t),i}πσ(t)​≤∑i​pi​aσ(t),i​, and 111 otherwise.
  • p^ℓ(σ)\hat p^\ell(\sigma)p^​ℓ(σ) is the rule's output at ℓ\ellℓ on the permuted data, with right-hand side (1−hℓ)ℓnb(1-h_\ell)\frac{\ell}{n}b(1−hℓ​)nℓ​b.

The sum on the right runs over all times 0,…,2ℓ−10,\dots,2\ell-10,…,2ℓ−1, including the first ℓ\ellℓ. It uses the threshold proposals, not the algorithm's executed decisions.

Degenerate cases:

  • Parameters. 1≤ℓ≤n/21\le\ell\le n/21≤ℓ≤n/2, so 2ℓ≤n2\ell\le n2ℓ≤n. The bound on bbb forces b>0b>0b>0, so the partial LP is feasible and its optimum is a true supremum, which is ≥0\ge0≥0 since π≥0\pi\ge0π≥0.
  • Negative coefficient. 1−2hℓ−ε1-2h_\ell-\varepsilon1−2hℓ​−ε can be negative. For example, with E=1E=1E=1 and ℓ=n/2\ell=n/2ℓ=n/2, the coefficient is 1−2−121-\sqrt2-\tfrac121−2​−21​. For such ℓ\ellℓ the left side is ≤0≤\le0\le≤0≤ the right side, and the inequality holds automatically.
  • Excluded cases. m=0m=0m=0, n=0n=0n=0 and E=0E=0E=0 are excluded.
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