Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Complementary slackness for an optimal primal–dual pair

Proved
VBSDP.Duality.compl_slackness

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

dualityp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1semidefinite-programming

Suppose xxx is primal feasible, ZZZ is dual feasible, and their objective values agree: cTx=−Tr⁡(F0Z)c^Tx=-\operatorname{Tr}(F_0Z)cTx=−Tr(F0​Z). Then

ZF(x)=0.ZF(x)=0.ZF(x)=0.

Feasibility and equality of objective values make both points optimal, so this is the paper’s complementary slackness condition.

This statement supplies a target in the duality development.

Formalization Note Matrices have dimension n×nn\times nn×n, with coefficients F1,…,FmF_1,\ldots,F_mF1​,…,Fm​ indexed in Lean from 0 and F0F_0F0​ passed separately. Positive semidefiniteness and positive definiteness are matrix conditions; trace is the matrix trace.

Preamble
import Mathlib
import Definitions.Def_VBSDP_Duality_IsPrimalFeasible
import Definitions.Def_VBSDP_Duality_IsDualFeasible
Formal statement
namespace VBSDP.Duality

theorem compl_slackness {m n : ℕ} (c : Fin m → ℝ)
    (F₀ : Matrix (Fin n) (Fin n) ℝ) (F : Fin m → Matrix (Fin n) (Fin n) ℝ)
    (x : Fin m → ℝ) (Z : Matrix (Fin n) (Fin n) ℝ)
    (hx : IsPrimalFeasible F₀ F x) (hZ : IsDualFeasible F c Z)
    (hopt : c ⬝ᵥ x = -(F₀ * Z).trace) :
    Z * lmi F₀ F x = 0 := by sorry

end VBSDP.Duality
Source
Vandenberghe and Boyd, Semidefinite Programming, SIAM Review 38(1) (1996), p. 65, complementary slackness, PDF p. 17, https://doi.org/10.1137/1038003
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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