Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3(b) — the SPO loss is Lipschitz-like away from degeneracy

Proved
SPOBounds.Margin.spo_loss_lipschitz_like

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

lipschitzp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1predict-then-optimizespo-loss

Let EEE be a finite-dimensional real normed space with dual norm ∥⋅∥∗\|\cdot\|_*∥⋅∥∗​, and let S⊆ES\subseteq ES⊆E be nonempty, compact, convex and not a singleton. Let w∗w^*w∗ be any optimization oracle for SSS, and suppose SSS satisfies the strength property with parameter μ>0\mu>0μ>0. Then for every fixed cost vector ccc and all c^1,c^2\hat c_1,\hat c_2c^1​,c^2​,

∣ℓSPO(c^1,c)−ℓSPO(c^2,c)∣  ≤  (∥c∥∗μ⋅min⁡{νS(c^1),νS(c^2)}) ∥c^1−c^2∥∗,|\ell_{\rm SPO}(\hat c_1,c)-\ell_{\rm SPO}(\hat c_2,c)| \;\le\; \Big(\frac{\|c\|_*}{\mu\cdot\min\{\nu_S(\hat c_1),\nu_S(\hat c_2)\}}\Big)\,\|\hat c_1-\hat c_2\|_* ,∣ℓSPO​(c^1​,c)−ℓSPO​(c^2​,c)∣≤(μ⋅min{νS​(c^1​),νS​(c^2​)}∥c∥∗​​)∥c^1​−c^2​∥∗​,

where the right-hand side is read as +∞+\infty+∞ when the minimum is zero.

The SPO loss is discontinuous at degenerate predictions; this result quantifies its regularity away from them.

Formalization Note Stated multiplied out: μmin⁡{νS(c^1),νS(c^2)} ∣ℓSPO(c^1,c)−ℓSPO(c^2,c)∣≤∥c∥∗ ∥c^1−c^2∥∗\mu\min\{\nu_S(\hat c_1),\nu_S(\hat c_2)\}\,|\ell_{\rm SPO}(\hat c_1,c)-\ell_{\rm SPO}(\hat c_2,c)|\le\|c\|_*\,\|\hat c_1-\hat c_2\|_*μmin{νS​(c^1​),νS​(c^2​)}∣ℓSPO​(c^1​,c)−ℓSPO​(c^2​,c)∣≤∥c∥∗​∥c^1​−c^2​∥∗​, equivalent to the displayed form when the minimum is positive and trivially true when it is zero.

Preamble
import Mathlib
import Definitions.Def_SPOBounds_Margin_Model
import Definitions.Def_SPOBounds_Margin_Degeneracy
Formal statement
namespace SPOBounds.Margin

/-- **Theorem 3(b)** (arXiv:1905.11488v3, p. 16). Under the strength property with parameter
`μ > 0` (nonempty, compact, convex, non-singleton `S`, any oracle `w`), for every fixed cost
vector `c` and all `ĉ₁, ĉ₂`,
`|ℓ_SPO(ĉ₁, c) − ℓ_SPO(ĉ₂, c)| ≤ (‖c‖_* / (μ · min{ν_S(ĉ₁), ν_S(ĉ₂)})) ‖ĉ₁ − ĉ₂‖_*`,
stated multiplied out (the paper reads the right-hand side as `+∞` when the minimum is `0`). -/
theorem spo_loss_lipschitz_like {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
    [FiniteDimensional ℝ E]
    (S : Set E) (hS : S.Nonempty) (hSc : IsCompact S) (hSv : Convex ℝ S) (hSnt : S.Nontrivial)
    (w : StrongDual ℝ E → E) (hw : IsOracle S w)
    (μ : ℝ) (hμ : 0 < μ) (hstr : StrengthProperty S μ w)
    (c c₁ c₂ : StrongDual ℝ E) :
    μ * min (nu S c₁) (nu S c₂) * |spoLoss w c₁ c - spoLoss w c₂ c| ≤
      ‖c‖ * ‖c₁ - c₂‖ := by sorry

end SPOBounds.Margin
Source
El Balghiti, Elmachtoub, Grigas, Tewari, Generalization Bounds in the Predict-then-Optimize Framework, arXiv:1905.11488v3, p. 16, Theorem 3(b)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. Let EEE be a finite-dimensional real normed space and E∗E^*E∗ its dual with the operator norm ∥⋅∥∗\|\cdot\|_*∥⋅∥∗​. Assume:

  • S⊆ES \subseteq ES⊆E is nonempty, compact and convex, and contains two distinct points.
  • w:E∗→Ew : E^* \to Ew:E∗→E is an oracle for SSS: for every ccc, w(c)∈Sw(c) \in Sw(c)∈S minimizes ccc over SSS.
  • μ>0\mu > 0μ>0 is a real number satisfying the strength property: for all c^∈E∗\hat c \in E^*c^∈E∗ and v∈Sv \in Sv∈S,
μ νS(c^)2∥v−w(c^)∥2≤c^(v−w(c^)).\tfrac{\mu\,\nu_S(\hat c)}{2}\|v - w(\hat c)\|^2 \le \hat c(v - w(\hat c)).2μνS​(c^)​∥v−w(c^)∥2≤c^(v−w(c^)).

Here νS(c^)\nu_S(\hat c)νS​(c^) is the operator-norm distance from c^\hat cc^ to the set of cost vectors with two distinct minimizers on SSS.

The SPO loss is ℓSPO(c^,c)=c(w(c^))−c(w(c))\ell_{\mathrm{SPO}}(\hat c, c) = c(w(\hat c)) - c(w(c))ℓSPO​(c^,c)=c(w(c^))−c(w(c)).

Conclusion. For all c,c1,c2∈E∗c, c_1, c_2 \in E^*c,c1​,c2​∈E∗:

μ⋅min⁡{νS(c1),νS(c2)}⋅∣ℓSPO(c1,c)−ℓSPO(c2,c)∣  ≤  ∥c∥∗ ∥c1−c2∥∗.\mu \cdot \min\{\nu_S(c_1), \nu_S(c_2)\} \cdot \big|\ell_{\mathrm{SPO}}(c_1, c) - \ell_{\mathrm{SPO}}(c_2, c)\big| \;\le\; \|c\|_*\, \|c_1 - c_2\|_*.μ⋅min{νS​(c1​),νS​(c2​)}⋅​ℓSPO​(c1​,c)−ℓSPO​(c2​,c)​≤∥c∥∗​∥c1​−c2​∥∗​.

Note that ℓSPO(c1,c)−ℓSPO(c2,c)=c(w(c1))−c(w(c2))\ell_{\mathrm{SPO}}(c_1, c) - \ell_{\mathrm{SPO}}(c_2, c) = c(w(c_1)) - c(w(c_2))ℓSPO​(c1​,c)−ℓSPO​(c2​,c)=c(w(c1​))−c(w(c2​)).

Degenerate cases.

  • Distance to degeneracy is zero. If νS(c1)=0\nu_S(c_1) = 0νS​(c1​)=0 or νS(c2)=0\nu_S(c_2) = 0νS​(c2​)=0 (for example, if either is the zero functional), the left side is 000 and the claim is trivial.
  • Zero cost vector or equal predictions. If c=0c = 0c=0 or c1=c2c_1 = c_2c1​=c2​, both sides are 000.
  • No division. The statement is multiplied out, so no division by zero occurs. EEE has dimension at least 111.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me