Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(32) — the duality gap equals Tr F(x)Z

Proved
VBSDP.Potential.duality_gap_32

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

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

Let F(x)=F0+∑ixiFiF(x)=F_0+\sum_i x_iF_iF(x)=F0​+∑i​xi​Fi​ be the affine matrix of the primal semidefinite program, with symmetric data. Suppose F(x)⪰0F(x)\succeq0F(x)⪰0 and Z⪰0Z\succeq0Z⪰0, and ZZZ satisfies the dual equations Tr⁡(FiZ)=ci\operatorname{Tr}(F_iZ)=c_iTr(Fi​Z)=ci​. Then the duality gap between the primal objective cTxc^TxcTx and the dual objective −Tr⁡(F0Z)-\operatorname{Tr}(F_0Z)−Tr(F0​Z) is

η=cTx+Tr⁡(F0Z)=Tr⁡(F(x)Z).\eta=c^Tx+\operatorname{Tr}(F_0Z)=\operatorname{Tr}(F(x)Z).η=cTx+Tr(F0​Z)=Tr(F(x)Z).

This identifies the trace quantity used by the potential and by Theorem 5.1 with an objective gap.

Formalization Note Positive semidefiniteness includes symmetry in Mathlib. F0F_0F0​ is separate from the zero-based Fin m family of variable matrices.

Preamble
import Mathlib
import Definitions.Def_VBSDP_Duality_lmi
Formal statement
namespace VBSDP.Potential

/-- Equation (32): the primal-dual objective difference equals the matrix trace. -/
theorem duality_gap_32 {m n : ℕ} (c : Fin m → ℝ)
    (F₀ : Matrix (Fin n) (Fin n) ℝ)
    (F : Fin m → Matrix (Fin n) (Fin n) ℝ)
    (hF₀ : F₀.IsHermitian) (hF : ∀ i, (F i).IsHermitian)
    (x : Fin m → ℝ) (Z : Matrix (Fin n) (Fin n) ℝ)
    (hx : (VBSDP.Duality.lmi F₀ F x).PosSemidef) (hZ : Z.PosSemidef)
    (hdual : ∀ i, (F i * Z).trace = c i) :
    c ⬝ᵥ x + (F₀ * Z).trace = (VBSDP.Duality.lmi F₀ F x * Z).trace := by sorry

end VBSDP.Potential
Source
Vandenberghe and Boyd, Semidefinite Programming, SIAM Rev. 38 (1996), p. 64 (PDF p. 16), (32), 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