The PSD cone is self-dual
ProvedConvexOptimization.psd_cone_self_dualThe positive semidefinite cone is self-dual.
Equip the space of symmetric real matrices with the trace inner product . Let be symmetric. Then
In the language of dual cones, : 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 by testing against rank-one matrices , for which .
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.
import Mathlib open scoped RealInnerProductSpace ENNReal open MeasureTheory
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
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Theorem statement. For every and every real matrix that is symmetric (, this is a hypothesis), the following equivalence holds: . Here "positive semidefinite" is Mathlib's notion for real matrices: the matrix is symmetric and for every vector (so the quantifier over on the left ranges only over symmetric PSD matrices — the semidefiniteness bundles symmetry). is the trace of the matrix product , i.e. . Both inequalities are non-strict. The forward direction of the iff uses the trace condition against all PSD ; the backward direction asserts the trace nonnegativity from PSD-ness of . Degenerate case : the unique empty matrix is PSD and all traces are , so both sides are trivially true.
Confirmed by the mission captain (proposal self-audit).