Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The PSD cone is self-dual

Proved
ConvexOptimization.psd_cone_self_dual

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

convexanalysisconvexoptimizationlog-concavity

The positive semidefinite cone is self-dual.

Equip the space of symmetric real n×nn \times nn×n matrices with the trace inner product ⟨A,B⟩=tr⁡(AB)\langle A, B\rangle = \operatorname{tr}(AB)⟨A,B⟩=tr(AB). Let AAA be symmetric. Then

(tr⁡(AB)≥0  for every B⪰0)⟺A⪰0.\bigl(\operatorname{tr}(AB) \ge 0 \ \text{ for every } B \succeq 0\bigr) \qquad\Longleftrightarrow\qquad A \succeq 0 .(tr(AB)≥0  for every B⪰0)⟺A⪰0.

In the language of dual cones, S+n∗=S+n\mathbb{S}^n_{+}{}^{*} = \mathbb{S}^n_{+}S+n​∗=S+n​: the cone of positive semidefinite matrices coincides with its own dual.

Self-duality is why semidefinite programming is dual to semidefinite programming, with the same cone appearing on both sides — the same phenomenon that makes linear programming dual to linear programming through self-duality of the nonnegative orthant. The forward direction is also the standard route to certifying A⪰0A \succeq 0A⪰0 by testing against rank-one matrices B=vvTB = vv^{T}B=vvT, for which tr⁡(AB)=vTAv\operatorname{tr}(AB) = v^{T}Avtr(AB)=vTAv.

Formalization Note Matrices are Matrix (Fin n) (Fin n) ℝ, symmetry is A.IsSymm, and the trace pairing is written (A * B).trace; the statement is an iff, so both the duality inclusion and its converse are asserted. Source: B&V §2.6.1, example 2.24, p. 52.

Preamble
import Mathlib

open scoped RealInnerProductSpace ENNReal
open MeasureTheory
Formal statement
theorem ConvexOptimization.psd_cone_self_dual {n : ℕ}
    (A : Matrix (Fin n) (Fin n) ℝ) (hA : A.IsSymm) :
    (∀ B : Matrix (Fin n) (Fin n) ℝ, B.PosSemidef → 0 ≤ (A * B).trace) ↔
      A.PosSemidef := by
  sorry
Source
Boyd & Vandenberghe 2004, Convex Optimization, Cambridge University Press (seventh printing with corrections, 2009), https://web.stanford.edu/~boyd/cvxbook/, pp. 52, §2.6.1 example 2.24 (the positive semidefinite cone is self-dual)

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