Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 8.7.4 — the smallest enclosing ball from a convex quadratic program

Proved
MatousekLP.SmallestBall.smallest_ball_qp

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

convex-programmingdiscrete-geometryp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1quadratic-programmingsmallest-enclosing-ball

Let p1,…,pnp_1,\dots,p_np1​,…,pn​ be points in Rd\mathbb{R}^dRd with n≥1n\ge 1n≥1, let P={p1,…,pn}P=\{p_1,\dots,p_n\}P={p1​,…,pn​}, and let QQQ be the d×nd\times nd×n matrix whose jjjth column is formed by the ddd coordinates of pjp_jpj​. Consider the optimization problem

(8.15)minimize xTQTQx−∑j=1nxj pjTpjsubject to  ∑j=1nxj=1, x≥0\text{(8.15)}\qquad \text{minimize } x^{T}Q^{T}Qx-\sum_{j=1}^{n}x_j\,p_j^{T}p_j\quad\text{subject to }\ \sum_{j=1}^n x_j=1,\ x\ge 0(8.15)minimize xTQTQx−j=1∑n​xj​pjT​pj​subject to  j=1∑n​xj​=1, x≥0

in the variables x1,…,xnx_1,\dots,x_nx1​,…,xn​. Then the objective function f(x)=xTQTQx−∑jxjpjTpjf(x)=x^TQ^TQx-\sum_{j}x_jp_j^Tp_jf(x)=xTQTQx−∑j​xj​pjT​pj​ is convex on Rn\mathbb{R}^nRn, and:

  1. Problem (8.15) has an optimal solution x∗x^*x∗.
  2. There exists a point p∗p^*p∗ such that p∗=Qx∗p^*=Qx^*p∗=Qx∗ for every optimal solution x∗x^*x∗. Moreover, for every optimal solution x∗x^*x∗, −f(x∗)≥0-f(x^*)\ge 0−f(x∗)≥0, and the ball with center p∗p^*p∗ and squared radius −f(x∗)-f(x^*)−f(x∗) (radius −f(x∗)\sqrt{-f(x^*)}−f(x∗)​) is the unique ball of smallest radius containing PPP.

In particular the smallest enclosing ball of a finite point set exists and is unique, and it is computed by a convex quadratic program.

Formalization Note Points live in EuclideanSpace ℝ (Fin d) and x∈Rnx\in\mathbb{R}^nx∈Rn is Fin n → ℝ (0-based indices). The hypothesis n≥1n\ge 1n≥1 is the book's "points p1,…,pnp_1,\dots,p_np1​,…,pn​"; for n=0n=0n=0 the feasible set is empty and (i) fails. "Unique ball of smallest radius" is the definition IsUniqueSmallestEnclosingBall: the ball contains PPP, no ball containing PPP is smaller, and any ball containing PPP of radius at most the optimum has center p∗p^*p∗. The equation p∗=Qx∗p^*=Qx^*p∗=Qx∗ is stated coordinatewise. Convexity is stated on all of Rn\mathbb{R}^nRn.

Preamble
import Mathlib
import Definitions.Def_MatousekLP_SmallestBall_Basic

open Matrix
Formal statement
namespace MatousekLP.SmallestBall

/-- Theorem 8.7.4 (Matoušek & Gärtner, p. 190). Let `p₁, …, pₙ ∈ ℝ^d` with `n ≥ 1`, `Q` the
`d × n` matrix with columns `pⱼ`, and `f(x) = xᵀQᵀQx − ∑ⱼ xⱼ pⱼᵀpⱼ`. Then `f` is convex, and
(i) problem (8.15) "minimize `f(x)` subject to `∑ⱼ xⱼ = 1`, `x ≥ 0`" has an optimal solution;
(ii) there is a point `p*` with `p* = Qx*` for every optimal solution `x*`, and for every optimal
`x*` we have `−f(x*) ≥ 0` and the ball with center `p*` and radius `√(−f(x*))` (squared radius
`−f(x*)`) is the unique ball of smallest radius containing `P = {p₁, …, pₙ}`. -/
theorem smallest_ball_qp {d n : ℕ} (hn : 1 ≤ n) (p : Fin n → EuclideanSpace ℝ (Fin d)) :
    ConvexOn ℝ Set.univ (ballObjective p) ∧
    (∃ x : Fin n → ℝ, IsOptimalBallQP p x) ∧
    ∃ pstar : EuclideanSpace ℝ (Fin d),
      (∀ x : Fin n → ℝ, IsOptimalBallQP p x → ∀ i, pstar i = (pointMatrix p *ᵥ x) i) ∧
      ∀ x : Fin n → ℝ, IsOptimalBallQP p x →
        0 ≤ -ballObjective p x ∧
        IsUniqueSmallestEnclosingBall (Set.range p) pstar (Real.sqrt (-ballObjective p x)) := by sorry

end MatousekLP.SmallestBall
Source
Matoušek & Gärtner, Understanding and Using Linear Programming, Springer 2007, p. 190, Theorem 8.7.4 (program (8.15)); P from §8.7, p. 184
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me