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