Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Dual optimal solutions are exactly the subgradients of the optimal cost function

Proved
LinearOptimization.lp_dual_optimal_iff_subgradient

by Shuze Chen · Aug 5, 2026 · Mathlib 0df444a (Lean v4.33.1)

dualitylinear-programmingsensitivitysubgradient

(Theorem 5.2, p. 216 — GOAL) Suppose that the linear programming problem of minimizing c′xc'xc′x subject to Ax=b∗Ax = b^*Ax=b∗ and x≥0x \ge 0x≥0 is feasible and that the optimal cost is finite.

Then, a vector ppp is an optimal solution to the dual problem if and only if it is a subgradient of the optimal cost function FFF at the point b∗b^*b∗.

Preamble
import Mathlib.LinearAlgebra.LinearIndependent.Defs
import Definitions.Def_LinearOptimization_OptimalCostFunction
import Definitions.Def_LinearOptimization_Subgradient


open Matrix

/-- **Bertsimas & Tsitsiklis, Theorem 5.2 (p. 216).** For a standard form problem feasible at
`b*` with finite optimal cost (rows of `A` linearly independent), `p` is
an optimal solution of the dual `max p'b*, p'A ≤ c'` if and only if `p`
is a subgradient of the optimal cost function `F` at `b*` relative to the
set `S` of feasible right-hand sides. -/
Formal statement
theorem LinearOptimization.lp_dual_optimal_iff_subgradient {m n : ℕ}
    (A : Matrix (Fin m) (Fin n) ℝ) (c : Fin n → ℝ) (bstar : Fin m → ℝ)
    (F : (Fin m → ℝ) → ℝ) (p : Fin m → ℝ)
    (hrank : LinearIndependent ℝ (fun i => A i))
    (hfeas : (stdPolyhedron A bstar).Nonempty)
    (hfin : lpOptimalCostRhs A c bstar ≠ ⊥)
    (hF : ∀ b ∈ feasibleRhsSet A, ((F b : ℝ) : EReal) = lpOptimalCostRhs A c b) :
    IsLpDualOptimal bstar (dualFeasibleStd A c) p ↔
      IsSubgradientOn F (feasibleRhsSet A) p bstar := by
  sorry
Source
Bertsimas & Tsitsiklis, Introduction to Linear Optimization, Athena Scientific, 1997, Theorem 5.2, p. 216

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