Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Claim 1 — a (1 − ε)-competitive solution of the constructed instance accepts close to B/z vectors w_i: Σ_i |r_i − B/z| ⩽ 7εB

Proved
DynamicOnlineLP.LowerBound.claim1

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

linear-programminglower-boundonline-linear-programming

Consider the constructed instance of the lower-bound construction with z≥1z\ge 1z≥1 pairs, m=2zm=2^zm=2z items, capacity B=zkB=zkB=zk for every item (so B/z=kB/z=kB/z=k), and for each pair iii: kkk inputs (4,vi)(4,v_i)(4,vi​), qiq_iqi​ inputs (3,wi)(3,w_i)(3,wi​), sss inputs (2,wi)(2,w_i)(2,wi​) and 2k−qi2k-q_i2k−qi​ inputs (1,wi)(1,w_i)(1,wi​), where qi≤2kq_i\le 2kqi​≤2k and s≥0s\ge 0s≥0 are arbitrary. Let ε∈R\varepsilon\in\mathbb Rε∈R and let xxx be a (1−ε)(1-\varepsilon)(1−ε)-competitive solution: a feasible solution of the offline linear program (∑cajcxc≤B\sum_c a_{jc}x_c\le B∑c​ajc​xc​≤B for every item jjj, 0≤xc≤10\le x_c\le 10≤xc​≤1) whose objective satisfies ∑cπcxc≥(1−ε) OPT\sum_c\pi_c x_c\ge(1-\varepsilon)\,\mathrm{OPT}∑c​πc​xc​≥(1−ε)OPT. Let ri=∑xcr_i=\sum x_cri​=∑xc​ over the inputs of pair iii with demand vector wiw_iwi​. Then

∑i∣ ri−Bz∣≤7εB.\sum_{i}\Bigl|\,r_i-\frac{B}{z}\Bigr|\le 7\varepsilon B .i∑​​ri​−zB​​≤7εB.

In words, a near-optimal solution must accept almost exactly B/zB/zB/z of the wiw_iwi​-inputs of every pair, whatever the realized numbers qiq_iqi​ of profit-3 inputs are. This is the combinatorial half of the lower bound (Theorem 2): an online algorithm must commit to accepting or rejecting the profit-2 inputs of pair iii before it can tell whether qiq_iqi​ exceeds B/zB/zB/z, and Claim 1 says each wrong commitment costs profit.

Formalization Note rir_iri​ counts accepted wiw_iwi​-inputs fractionally (xc∈[0,1]x_c\in[0,1]xc​∈[0,1]), as in the linear program (1). The claim is stated for every ε∈R\varepsilon\in\mathbb Rε∈R (for ε<0\varepsilon<0ε<0 there is no such solution unless OPT≤0\mathrm{OPT}\le 0OPT≤0) and for any number sss of profit-2 inputs; the paper's instance has s=B/4zs=\sqrt{B/4z}s=B/4z​ and its proof never uses the value of sss. B/z=kB/z=kB/z=k is a natural number, as the page's "B/zB/zB/z inputs" requires.

Preamble
import Mathlib
import Definitions.Def_DynamicOnlineLP_LowerBound_OnlineLP
import Definitions.Def_DynamicOnlineLP_LowerBound_HardInstance
Formal statement
namespace DynamicOnlineLP.LowerBound

/-- Agrawal–Wang–Ye 2014, Claim 1 (p. 886). In the constructed instance (`m = 2^z` items, `B = z k`
units of each, `B/z = k`, any number `s` of profit-2 inputs per pair, any `q_i ≤ 2k`), let `x` be a
feasible solution of the offline problem (1) that is `1 - ε` competitive, i.e. its objective is at
least `(1 - ε) OPT`, and let `r_i` be the amount of `w_i`-inputs it accepts. Then
`∑_i |r_i - B/z| ≤ 7 ε B`. -/
theorem claim1 (z k s : ℕ) (hz : 1 ≤ z) (q : Fin z → ℕ) (hq : ∀ i, q i ≤ 2 * k) (ε : ℝ)
    (x : HardCol z k s q → ℝ) (hx : IsFeasible (hardDemand z k s q) (hardCapacity z k) x)
    (hcomp : (1 - ε) * OPT (hardProfit z k s q) (hardDemand z k s q) (hardCapacity z k) ≤
      objective (hardProfit z k s q) x) :
    ∑ i : Fin z, |acceptedW x i - (k : ℝ)| ≤ 7 * ε * ((z : ℝ) * (k : ℝ)) := by sorry

end DynamicOnlineLP.LowerBound
Source
Agrawal, Wang, Ye, A Dynamic Near-Optimal Algorithm for Online Linear Programming, Oper. Res. 62(4), 2014, p. 886, Claim 1
Read-back

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

Hypotheses. The statement holds for all of the following:

  • natural numbers z,k,sz,k,sz,k,s with z≥1z\ge 1z≥1;
  • every q∈Nzq \in \mathbb{N}^zq∈Nz with qi≤2kq_i\le 2kqi​≤2k for all iii;
  • every real number ε\varepsilonε, with no sign or size restriction;
  • every real vector xxx indexed by the columns of the instance below.

The instance. It has 2z2^z2z items jjj, each with capacity zkzkzk. Its columns come in zzz pairs iii, and each pair has:

  • kkk columns of profit 444 with demand viv_ivi​, where vi(j)v_i(j)vi​(j) is bit iii of jjj;
  • qiq_iqi​ columns of profit 333, sss columns of profit 222, and 2k−qi2k-q_i2k−qi​ columns of profit 111, all with demand wi=1−viw_i=1-v_iwi​=1−vi​.

Conditions on xxx. Two conditions are assumed.

  • xxx is feasible: 0≤xc≤10\le x_c\le 10≤xc​≤1 for every column ccc, and ∑cdc(j) xc≤zk\sum_c d_c(j)\,x_c\le zk∑c​dc​(j)xc​≤zk for every item jjj.
  • xxx satisfies
(1−ε) OPT  ≤  ∑cpc xc,(1-\varepsilon)\,\mathrm{OPT} \;\le\; \sum_c p_c\,x_c,(1−ε)OPT≤c∑​pc​xc​,

where OPT\mathrm{OPT}OPT is the real supremum of ∑cpcyc\sum_c p_c y_c∑c​pc​yc​ over all feasible yyy. Since 000 is feasible here, this supremum is an attained maximum.

Conclusion. Let ri(x)r_i(x)ri​(x) be the sum of xcx_cxc​ over the profit-3, profit-2 and profit-1 columns of pair iii. Then

∑i=0z−1∣ ri(x)−k ∣  ≤  7 ε z k.\sum_{i=0}^{z-1} \big|\, r_i(x) - k \,\big| \;\le\; 7\,\varepsilon\,z\,k.i=0∑z−1​​ri​(x)−k​≤7εzk.

Degenerate cases.

  • ε≥1\varepsilon \ge 1ε≥1: the second condition holds automatically, because OPT≥0\mathrm{OPT}\ge 0OPT≥0 and every feasible objective is ≥0\ge 0≥0 (profits are positive and x≥0x\ge 0x≥0). The claim then applies to every feasible xxx.
  • ε=0\varepsilon=0ε=0: the condition says xxx attains OPT\mathrm{OPT}OPT, and the conclusion forces ri(x)=kr_i(x)=kri​(x)=k for every iii.
  • ε<0\varepsilon<0ε<0 with OPT>0\mathrm{OPT}>0OPT>0: the condition would require an objective larger than OPT\mathrm{OPT}OPT, so there is no such xxx and the statement is vacuous.
  • k=0k=0k=0: every qi=0q_i=0qi​=0 and the right-hand side is 000, so the conclusion requires every ri(x)=0r_i(x)=0ri​(x)=0.
  • sss: any value is allowed, including 000.
  • z=0z=0z=0: 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