Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Maintained Prefix Primal Feasibility

Proved
PrimalDual.buchbinder_naor_primal_feasible_through

by wenxinzhang · Aug 18, 2026 · Mathlib c5ea003 (Lean v4.30.0)

linear-programmingload-balancingonline-algorithmsprimal-dualprimal-feasibility

Consider the normalized Buchbinder–Naor load-balancing algorithm after a successful prefix: it has processed the first kkk jobs and its failure marker is unset. Then the current machine weights xxx and job slacks zzz form a feasible solution of the covering primal restricted to those kkk jobs: all coordinates are nonnegative, and

p~(i,j) x(j)+z(i)  ≥  1\tilde p(i,j)\,x(j)+z(i)\;\ge\;1p~​(i,j)x(j)+z(i)≥1

for every eligible pair (i,j)(i,j)(i,j) with i<ki<ki<k.

This is the maintained primal feasibility from Theorem 8.1, Claim (2), of the source. Together with the exact primal-objective identity and weak duality, it produces the failure certificate that drives the mission's final theorem.

Formalization Note Feasibility is stated for the prefix linear program whose constraints are exactly the eligible pairs revealed so far; the slack coordinates of jobs that have not yet arrived are retained (at value 000) and are subject only to nonnegativity.

Preamble
import Definitions.Def_pd_unrelated_machines
Formal statement
namespace PrimalDual

/--
After every successful prefix, the online load-balancing updates give a feasible covering
solution for exactly the eligible constraints revealed in that prefix.
-/
theorem buchbinder_naor_primal_feasible_through
    {jobs machines : ℕ} (I : UnrelatedMachines.Instance jobs machines)
    (k : ℕ) (hk : k ≤ jobs)
    (hNoFailure : (I.runPrefix k).failedAt = none) :
    I.PrimalFeasibleThrough k (I.runPrefix k) := by
  sorry

end PrimalDual
Source
Niv Buchbinder and Joseph (Seffi) Naor, The Design of Competitive Online Algorithms via a Primal--Dual Approach, https://www.tau.ac.il/~nivb/download/pd-survey.pdf, proof of Theorem 8.1, Claim (2), first paragraph, p. 196.
Read-back

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

For all J,M∈NJ,M\in\mathbb NJ,M∈N, write [n]={0,…,n−1}[n]=\{0,\ldots,n-1\}[n]={0,…,n−1}, with [0]=∅[0]=\varnothing[0]=∅; for every instance III consisting of a proof 0<M0<M0<M, a load function p:[J]×[M]→Rp:[J]\times[M]\to\mathbb Rp:[J]×[M]→R, and proofs 0≤p(i,j)0\le p(i,j)0≤p(i,j) for every i∈[J]i\in[J]i∈[J] and j∈[M]j\in[M]j∈[M]; and for every k∈Nk\in\mathbb Nk∈N with k≤Jk\le Jk≤J, let sks_ksk​ be the state obtained by starting with weights w(j)=1/(2M)w(j)=1/(2M)w(j)=1/(2M), assignments a(i)=nonea(i)=\mathrm{none}a(i)=none, slacks z(i)=0z(i)=0z(i)=0, dual entries y(i,j)=0y(i,j)=0y(i,j)=0, and failure marker failedAt=none\mathrm{failedAt}=\mathrm{none}failedAt=none, and then recursively processing the first kkk members of the list 0,1,…,J−10,1,\ldots,J-10,1,…,J−1. On arrival of iii, a state whose failure marker is already some(i′)\mathrm{some}(i')some(i′) is left unchanged; otherwise let Ei={j∈[M]∣p(i,j)≤1}E_i=\{j\in[M]\mid p(i,j)\le1\}Ei​={j∈[M]∣p(i,j)≤1}, and if Ei=∅E_i=\varnothingEi​=∅ or there exists j∈[M]j\in[M]j∈[M] with 1<w(j)1<w(j)1<w(j), change only the failure marker to some(i)\mathrm{some}(i)some(i); if neither condition holds, compute the optional machine returned by taking an argmin of p(i,j)w(j)p(i,j)w(j)p(i,j)w(j) over the naturally sorted list of EiE_iEi​, changing only the failure marker to some(i)\mathrm{some}(i)some(i) if this option is none\mathrm{none}none, while if it is some(ℓ)\mathrm{some}(\ell)some(ℓ), with p0=p(i,ℓ)p_0=p(i,\ell)p0​=p(i,ℓ) and w0=w(ℓ)w_0=w(\ell)w0​=w(ℓ), replace w(ℓ)w(\ell)w(ℓ) by w0(1+p0/2)w_0(1+p_0/2)w0​(1+p0​/2), a(i)a(i)a(i) by some(ℓ)\mathrm{some}(\ell)some(ℓ), z(i)z(i)z(i) by 1−p0w01-p_0w_01−p0​w0​, and y(i,ℓ)y(i,\ell)y(i,ℓ) by 111, leave every other coordinate unchanged, and set the failure marker to none\mathrm{none}none. The theorem assumes that the failedAt\mathrm{failedAt}failedAt component of this particular state sks_ksk​, whose type is Option([J])\mathrm{Option}([J])Option([J]), equals none\mathrm{none}none, and asserts that all primal coordinates determined by sks_ksk​ are nonnegative—namely 0≤wk(j)0\le w_k(j)0≤wk​(j) for every j∈[M]j\in[M]j∈[M] and 0≤zk(i)0\le z_k(i)0≤zk​(i) for every i∈[J]i\in[J]i∈[J], including jobs with index at least kkk—and that for every i∈[J]i\in[J]i∈[J] and j∈[M]j\in[M]j∈[M] satisfying both i<ki<ki<k and p(i,j)≤1p(i,j)\le1p(i,j)≤1, the covering inequality 1≤p(i,j)wk(j)+zk(i)1\le p(i,j)w_k(j)+z_k(i)1≤p(i,j)wk​(j)+zk​(i) holds; no covering inequality is quantified for an ineligible pair with p(i,j)>1p(i,j)>1p(i,j)>1 or for a job with i≥ki\ge ki≥k. When k=0k=0k=0, no arrival is processed, the failure premise holds for the initial state, the covering-inequality quantifier is empty, and only nonnegativity of all initial machine weights and all job slacks remains; when J=0J=0J=0, the hypothesis k≤Jk\le Jk≤J forces k=0k=0k=0, all job and covering quantifiers are empty, but M>0M>0M>0 and nonnegativity of the machine weights remain; M=0M=0M=0 admits no such instance because an instance contains a proof 0<M0<M0<M; and values k>Jk>Jk>J, or prefix states whose failure marker is not none\mathrm{none}none, do not satisfy the theorem’s hypotheses.

Human review
  • Endorsed by Shuze Chen · Aug 19, 2026

  • Endorsed by wenxinzhang · Aug 19, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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.

How Prove2Me works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me