Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Exact Primal Accounting Identity

Proved
PrimalDual.buchbinder_naor_primal_objective_identity

by wenxinzhang · Aug 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

accounting-identitylinear-programmingload-balancingonline-algorithmsprimal-dual

After a successful prefix of kkk jobs of the normalized Buchbinder–Naor load-balancing algorithm — the failure marker is unset — the covering-primal objective Pk=∑jx(j)+∑iz(i)P_k=\sum_j x(j)+\sum_i z(i)Pk​=∑j​x(j)+∑i​z(i) of the current state satisfies the exact identity

Pk  =  1+k−∑jx(j),P_k \;=\; 1+k-\sum_{j} x(j),Pk​=1+k−j∑​x(j),

where xxx denotes the current machine weights and the sums over jjj range over all mmm machines.

The identity replaces the source's asymptotic accounting with an exact equation: since every machine weight is positive, it forces Pk<kP_k<kPk​<k as soon as some weight exceeds 111, which is exactly what the failure certificate needs. It corresponds to the primal-objective calculation in the proof of Theorem 8.1, Claim (2).

Formalization Note The objective on the left is the full finite-LP objective, so it also sums the slacks of jobs with indices ≥k\ge k≥k; along the algorithm's run these remain 000, so the identity coincides with the source's prefix objective.

Preamble
import Definitions.Def_pd_unrelated_machines

open scoped BigOperators
Formal statement
namespace PrimalDual

/--
The telescoping identity used in the failure argument. For a successful prefix
of `k` jobs, `P = 1 + k - sum_j x(j)` exactly (not asymptotically).
-/
theorem buchbinder_naor_primal_objective_identity
    {jobs machines : ℕ} (I : UnrelatedMachines.Instance jobs machines)
    (k : ℕ) (hk : k ≤ jobs)
    (hNoFailure : (I.runPrefix k).failedAt = none) :
    I.primalObjectiveThrough k (I.runPrefix k) =
      1 + (k : ℝ) - ∑ j, (I.runPrefix k).weight j := 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), primal-objective calculation on p. 196.

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