Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

The S-procedure (losslessness)

Proved
ConvexOptimization.s_procedure

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

convex-optimizations-proceduresemidefinite-programming

The S-procedure — the goal of this mission: one quadratic inequality implies another exactly when a single nonnegative multiplier certifies it.

Let F1,F2F_1, F_2F1​,F2​ be symmetric n×nn \times nn×n real matrices, g1,g2∈Rng_1, g_2 \in \mathbb{R}^ng1​,g2​∈Rn, h1,h2∈Rh_1, h_2 \in \mathbb{R}h1​,h2​∈R, and set

qk(x)  =  xTFkx+2gkTx+hk(k=1,2),q_k(x) \;=\; x^{T}F_k x + 2 g_k^{T} x + h_k \qquad (k = 1, 2),qk​(x)=xTFk​x+2gkT​x+hk​(k=1,2),

with associated block matrices Mk=[FkgkgkThk]M_k = \begin{bmatrix} F_k & g_k \\ g_k^{T} & h_k\end{bmatrix}Mk​=[Fk​gkT​​gk​hk​​]. Assume the strict-feasibility (Slater) condition: some x^\hat{x}x^ satisfies q1(x^)<0q_1(\hat{x}) < 0q1​(x^)<0. Then

(q1(x)≤0⇒q2(x)≤0  for every x∈Rn)⟺∃ λ≥0: λM1−M2  ⪰  0.\bigl(q_1(x) \le 0 \Rightarrow q_2(x) \le 0 \ \text{ for every } x \in \mathbb{R}^n\bigr) \qquad\Longleftrightarrow\qquad \exists\, \lambda \ge 0 : \ \lambda M_1 - M_2 \;\succeq\; 0 .(q1​(x)≤0⇒q2​(x)≤0  for every x∈Rn)⟺∃λ≥0: λM1​−M2​⪰0.

The right-hand side is a linear matrix inequality in λ\lambdaλ, so an implication between two quadratic inequalities — a statement quantified over all of Rn\mathbb{R}^nRn, and in general nonconvex — becomes a small semidefinite feasibility problem. The direction ⇐\Leftarrow⇐ is elementary; it is the converse, losslessness, that is the theorem, and it holds only for a pair of quadratics: with two or more constraints the analogous procedure is merely sufficient.

Known as the S-procedure in control, where it certifies stability and dissipativity of systems with quadratic constraints, the result is also the exactness statement behind trust-region subproblems and behind robust optimization with ellipsoidal uncertainty — one of the very few nonconvex problems with a provably zero duality gap.

Formalization Note The quadratics and their block matrices are the mission's quadForm and symQuadBlock; the certificate is PosSemidef of lam • symQuadBlock F₁ g₁ h₁ - symQuadBlock F₂ g₂ h₂. Strict feasibility is a hypothesis of the whole iff, matching the book. Source: B&V §B.2, p. 655, proved in §B.4, pp. 657–658.

Preamble
import Mathlib
import Definitions.Def_ConvexOptimization_quadraticForms

open scoped RealInnerProductSpace ENNReal
open MeasureTheory

Formal statement
theorem ConvexOptimization.s_procedure {nn : ℕ}
    (F₁ F₂ : Matrix (Fin nn) (Fin nn) ℝ) (hF₁ : F₁.IsSymm) (hF₂ : F₂.IsSymm)
    (g₁ g₂ : Fin nn → ℝ) (h₁ h₂ : ℝ)
    (xh : Fin nn → ℝ) (hxh : quadForm F₁ g₁ h₁ xh < 0) :
    (∀ x, quadForm F₁ g₁ h₁ x ≤ 0 → quadForm F₂ g₂ h₂ x ≤ 0) ↔
      ∃ lam : ℝ, 0 ≤ lam ∧
        (lam • symQuadBlock F₁ g₁ h₁ - symQuadBlock F₂ g₂ h₂).PosSemidef := by
  sorry
Source
Boyd & Vandenberghe 2004, Convex Optimization, Cambridge University Press (seventh printing with corrections, 2009), https://web.stanford.edu/~boyd/cvxbook/, pp. 655, 657-658, §B.2 eq. (B.6)-(B.7) (the S-procedure for a single quadratic constraint), proof in §B.4
Human review
  • Endorsed by Shuze Chen · Oct 7, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 7, 2026

    Confirmed by the mission captain (proposal self-audit).

  • Endorsed by Community (Bot) · Oct 22, 2026

    Confirmed by the moderator at approval.

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