Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The dual objective is at most the doubly-weighted sum

Proved
PrimalDualOnline.LP.dual_le_weighted

by moutei · Sep 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

complementary-slacknessdualitylinear-programmingoptimization

The other inequality in the weak-duality chain. If yyy is componentwise nonnegative and xxx satisfies the primal constraints bj≤∑iAijxib_j \le \sum_i A_{ij} x_ibj​≤∑i​Aij​xi​ for every jjj, then

∑jbjyj ≤ ∑j(∑iAijxi)yj.\sum_j b_j y_j \ \le\ \sum_j \Bigl(\sum_i A_{ij} x_i\Bigr) y_j.j∑​bj​yj​ ≤ j∑​(i∑​Aij​xi​)yj​.

Only these two hypotheses are needed: primal nonnegativity x≥0x \ge 0x≥0 and the dual constraints Ay≤cA y \le cAy≤c play no part, and the cost vector ccc does not appear at all.

Preamble
import Definitions.Def_PrimalDualOnline_FiniteLP
import Mathlib.Tactic
Formal statement
open PrimalDualOnline.LP

theorem PrimalDualOnline.LP.dual_le_weighted
    {I J : Type*} [Fintype I] [Fintype J]
    (A : I → J → ℝ) (b : J → ℝ) (x : I → ℝ) (y : J → ℝ)
    (hy : ∀ j : J, 0 ≤ y j) (hpf : ∀ j : J, b j ≤ ∑ i : I, A i j * x i) :
    dualObjective b y ≤ ∑ j : J, (∑ i : I, A i j * x i) * y j := by sorry
Source
Niv Buchbinder, Designing Competitive Online Algorithms via a Primal-Dual Approach, PhD thesis, Tel Aviv University, 2008, https://www.tau.ac.il/~nivb/download/phd-thsis.pdf, Section 2.1, second inequality in the proof of Theorem 2.1, p. 8
Read-back

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

Read-back 3 — dual_le_weighted

Data and binders. Two implicitly quantified types III and JJJ in arbitrary universes, each with a finiteness structure, and four explicit pieces of real-valued data:

  • A:I→J→RA : I \to J \to \mathbb{R}A:I→J→R, a real matrix with rows indexed by III, columns by JJJ, entries Ai,jA_{i,j}Ai,j​;
  • b:J→Rb : J \to \mathbb{R}b:J→R, one real number bjb_jbj​ per column index;
  • x:I→Rx : I \to \mathbb{R}x:I→R, one real number xix_ixi​ per row index;
  • y:J→Ry : J \to \mathbb{R}y:J→R, one real number yjy_jyj​ per column index.

Hypotheses. Two, each universally quantified over the column index type JJJ:

  1. ∀j∈J,  0≤yj\forall j \in J,\; 0 \le y_j∀j∈J,0≤yj​ — every component of yyy is nonnegative.
  2. ∀j∈J,  bj  ≤  ∑i∈IAi,j xi\forall j \in J,\; b_j \;\le\; \displaystyle\sum_{i \in I} A_{i,j}\, x_i∀j∈J,bj​≤i∈I∑​Ai,j​xi​ — for each column index jjj, bjb_jbj​ is at most the sum over all row indices iii of Ai,jxiA_{i,j} x_iAi,j​xi​. Note the direction: bjb_jbj​ is the smaller side.

Conclusion. Unfolding the bundle's definition dualObjective(b,y)=∑j∈Jbj yj\texttt{dualObjective}(b,y) = \sum_{j \in J} b_j\, y_jdualObjective(b,y)=∑j∈J​bj​yj​, the assertion is

∑j∈Jbj yj    ≤    ∑j∈J(∑i∈IAi,j xi)yj.\sum_{j \in J} b_j\, y_j \;\;\le\;\; \sum_{j \in J} \left( \sum_{i \in I} A_{i,j}\, x_i \right) y_j .j∈J∑​bj​yj​≤j∈J∑​(i∈I∑​Ai,j​xi​)yj​.

Here the inner sum runs over iii, the first index of AAA (a column of AAA contracted against xxx), and the outer sum runs over jjj, the second index of AAA; the column value is multiplied on the right by yjy_jyj​. The inequality is non-strict and points in the direction: dual objective ≤\le≤ weighted quantity.

Sign conditions present and absent. Nonnegativity is assumed only for yyy. There is no sign condition on xxx — its components may be negative — nor on the entries of AAA, nor on bbb. Both stated hypotheses bear on data occurring in the conclusion (yyy in hypothesis 1; bbb and the column sums in hypothesis 2); neither is left unused in the sense of constraining data absent from the conclusion.

Degenerate cases. If JJJ is empty, both hypotheses are vacuously true and both sides are the empty sum 000, giving 0≤00 \le 00≤0. If III is empty, each inner sum ∑iAi,jxi\sum_i A_{i,j} x_i∑i​Ai,j​xi​ is 000, hypothesis 2 degenerates to bj≤0b_j \le 0bj​≤0 for every jjj, the right-hand side is ∑j0⋅yj=0\sum_j 0 \cdot y_j = 0∑j​0⋅yj​=0, and the assertion becomes ∑jbjyj≤0\sum_j b_j y_j \le 0∑j​bj​yj​≤0. If both are empty, the statement reduces to 0≤00 \le 00≤0. Nothing excludes y=0y = 0y=0, x=0x = 0x=0, b=0b = 0b=0, or A=0A = 0A=0.

Not asserted. The statement does not assert equality, nor strict inequality, nor nonnegativity of either side. It says nothing about ccc, about primalObjective\texttt{primalObjective}primalObjective, or about any comparison between the dual objective and a primal objective; no weak-duality chain is claimed. It assumes and asserts nothing about the sign of xxx, about xxx being a feasible or optimal primal point, or about yyy being feasible for constraints of the form A⊤y≤cA^{\top} y \le cA⊤y≤c (no such hypothesis appears). It does not assert that the right-hand side may be rewritten with the summation order reversed, and it states no connection to the other two statements in this bundle. The declaration's body is a placeholder, so no proof is supplied by the code.

Human review
  • Endorsed by Shuze Chen · Sep 17, 2026

  • Endorsed by moutei · Sep 17, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me