Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 2 (App. B.1) — Massart step: R^SPOn(H)≤ωS(C)2log⁡∣F∣X∣/n\hat{\mathfrak R}^n_{\rm SPO}(\mathcal H)\le\omega_S(\mathcal C)\sqrt{2\log|\mathfrak F_{|\mathbb X}|/n}R^SPOn​(H)≤ωS​(C)2log∣F∣X​∣/n​

Proved
SPOBounds.Natarajan.empirical_rademacher_massart

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

massart-lemmap2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1predict-then-optimizerademacher-complexity

Let S⊆RdS\subseteq\mathbb R^dS⊆Rd be nonempty, compact and convex, let w∗w^*w∗ be any optimization oracle for SSS, let C\mathcal CC be a nonempty bounded set of cost vectors, and let H\mathcal HH be a family of functions f:X→Rdf:\mathcal X\to\mathbb R^df:X→Rd. Fix a sample (x1,c1),…,(xn,cn)(x_1,c_1),\dots,(x_n,c_n)(x1​,c1​),…,(xn​,cn​) with n≥1n\ge1n≥1 and every ci∈Cc_i\in\mathcal Cci​∈C, and let

F∣X={(w∗(f(x1)),…,w∗(f(xn))):f∈H}.\mathfrak F_{|\mathbb X}=\{(w^*(f(x_1)),\dots,w^*(f(x_n))):f\in\mathcal H\}.F∣X​={(w∗(f(x1​)),…,w∗(f(xn​))):f∈H}.

If F∣X\mathfrak F_{|\mathbb X}F∣X​ is finite, then

R^SPOn(H)≤ωS(C)2log⁡∣F∣X∣n.\hat{\mathfrak R}^n_{\rm SPO}(\mathcal H)\le\omega_S(\mathcal C)\sqrt{\frac{2\log|\mathfrak F_{|\mathbb X}|}{n}}.R^SPOn​(H)≤ωS​(C)n2log∣F∣X​∣​​.

The empirical complexity depends on fff only through the decision vector in F∣X\mathfrak F_{|\mathbb X}F∣X​, and each SPO loss lies in [0,ωS(C)][0,\omega_S(\mathcal C)][0,ωS​(C)]; this is the step of the proof of Theorem 2 that the paper attributes to Massart's lemma and the definition of ωS(C)\omega_S(\mathcal C)ωS​(C).

Formalization Note The finiteness hypothesis makes explicit what the printed inequality leaves implicit (for infinite F∣X\mathfrak F_{|\mathbb X}F∣X​ its right-hand side is +∞+\infty+∞); without it Lean's ncard would be 000. For empty H\mathcal HH both sides are 000. The logarithm is natural.

Preamble
import Mathlib
import Definitions.Def_SPOBounds_Natarajan_Model
import Definitions.Def_SPOBounds_Natarajan_Rademacher
import Definitions.Def_SPOBounds_Natarajan_NatarajanDim
Formal statement
namespace SPOBounds.Natarajan

/-- **Proof of Theorem 2, Massart step** (arXiv:1905.11488v3, Appendix B.1, p. 31, the
displayed chain, fourth line). For a fixed sample `s` whose cost vectors lie in the nonempty
bounded set `C`, if the set `𝔉_{|𝕏}` of decision vectors `(w(f(x₁)), …, w(f(xₙ)))`, `f ∈ H`,
is finite, then `R̂ⁿ_SPO(H) ≤ ω_S(C) √(2 log |𝔉_{|𝕏}| / n)`. -/
theorem empirical_rademacher_massart {d : ℕ} {X : Type*}
    (S : Set (EuclideanSpace ℝ (Fin d))) (hS : S.Nonempty) (hSc : IsCompact S)
    (hSv : Convex ℝ S)
    (w : EuclideanSpace ℝ (Fin d) → EuclideanSpace ℝ (Fin d)) (hw : IsOracle S w)
    (C : Set (EuclideanSpace ℝ (Fin d))) (hC : C.Nonempty) (hCb : Bornology.IsBounded C)
    (H : Set (X → EuclideanSpace ℝ (Fin d)))
    (n : ℕ) (hn : 0 < n) (s : Fin n → X × EuclideanSpace ℝ (Fin d)) (hsC : ∀ i, (s i).2 ∈ C)
    (hfin : (sampleDecisions w H s).Finite) :
    empRademacherSPO w H s ≤
      linGapSet S C * Real.sqrt (2 * Real.log ((sampleDecisions w H s).ncard : ℝ) / n) := by sorry

end SPOBounds.Natarajan
Source
El Balghiti, Elmachtoub, Grigas, Tewari, Generalization Bounds in the Predict-then-Optimize Framework, arXiv:1905.11488v3, p. 31, Appendix B.1 (proof of Theorem 2), the displayed chain, fourth line
Read-back

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

Data and hypotheses.

  • d∈Nd \in \mathbb{N}d∈N and XXX is an arbitrary type.
  • S⊆RdS \subseteq \mathbb{R}^dS⊆Rd is nonempty, compact and convex.
  • w:Rd→Rdw : \mathbb{R}^d \to \mathbb{R}^dw:Rd→Rd is an oracle for SSS: for every ccc, w(c)∈Sw(c) \in Sw(c)∈S minimizes v↦⟨c,v⟩v \mapsto \langle c, v\ranglev↦⟨c,v⟩ over SSS, with ties broken arbitrarily.
  • C⊆RdC \subseteq \mathbb{R}^dC⊆Rd is nonempty and bounded.
  • HHH is an arbitrary set of functions X→RdX \to \mathbb{R}^dX→Rd.
  • n≥1n \ge 1n≥1, and s=((x1,c1),…,(xn,cn))s = ((x_1, c_1), \dots, (x_n, c_n))s=((x1​,c1​),…,(xn​,cn​)) is a fixed sample in (X×Rd)n(X \times \mathbb{R}^d)^n(X×Rd)n with every ci∈Cc_i \in Cci​∈C.
  • The set of decision vectors F∣s\mathfrak F_{|s}F∣s​ is finite, where
F∣s={(w(f(x1)),…,w(f(xn))):f∈H}⊆(Rd)n.\mathfrak F_{|s} = \{(w(f(x_1)), \dots, w(f(x_n))) : f \in H\} \subseteq (\mathbb{R}^d)^n.F∣s​={(w(f(x1​)),…,w(f(xn​))):f∈H}⊆(Rd)n.

No measure or probability appears.

Conclusion.

R^SPOn(H;s)≤ωS(C) 2log⁡∣F∣s∣n.\hat{\mathfrak R}^n_{\mathrm{SPO}}(H; s) \le \omega_S(C)\,\sqrt{\frac{2\log|\mathfrak F_{|s}|}{n}}.R^SPOn​(H;s)≤ωS​(C)n2log∣F∣s​∣​​.

The quantities in the bound.

  • The empirical Rademacher complexity is
R^SPOn(H;s)=12n∑σ∈{±1}nsup⁡f∈H1n∑i=1nσi ℓSPOw(f(xi),ci).\hat{\mathfrak R}^n_{\mathrm{SPO}}(H; s) = \frac{1}{2^n}\sum_{\sigma \in \{\pm1\}^n} \sup_{f \in H} \frac1n \sum_{i=1}^n \sigma_i\, \ell_{\mathrm{SPO}}^w(f(x_i), c_i).R^SPOn​(H;s)=2n1​σ∈{±1}n∑​f∈Hsup​n1​i=1∑n​σi​ℓSPOw​(f(xi​),ci​).

Here ℓSPOw(c^,c)=⟨c,w(c^)⟩−⟨c,w(c)⟩\ell_{\mathrm{SPO}}^w(\hat c, c) = \langle c, w(\hat c)\rangle - \langle c, w(c)\rangleℓSPOw​(c^,c)=⟨c,w(c^)⟩−⟨c,w(c)⟩. Each supremum is real-valued: 000 if HHH is empty or the values are unbounded above.

  • ωS(C)=sup⁡c∈C(sup⁡v∈S⟨c,v⟩−inf⁡v∈S⟨c,v⟩)\omega_S(C) = \sup_{c \in C}\big(\sup_{v \in S}\langle c, v\rangle - \inf_{v \in S}\langle c, v\rangle\big)ωS​(C)=supc∈C​(supv∈S​⟨c,v⟩−infv∈S​⟨c,v⟩).
  • ∣F∣s∣|\mathfrak F_{|s}|∣F∣s​∣ is the number of elements of the finite set F∣s\mathfrak F_{|s}F∣s​.

Degenerate cases.

  • H=∅H = \emptysetH=∅: F∣s=∅\mathfrak F_{|s} = \emptysetF∣s​=∅ and ∣F∣s∣=0|\mathfrak F_{|s}| = 0∣F∣s​∣=0. Since log⁡0\log 0log0 is taken to be 000, the right-hand side is 000. The left-hand side is also 000, because every supremum over the empty set is 000.
  • ∣F∣s∣=1|\mathfrak F_{|s}| = 1∣F∣s​∣=1: log⁡1=0\log 1 = 0log1=0, so the bound says R^SPOn(H;s)≤0\hat{\mathfrak R}^n_{\mathrm{SPO}}(H; s) \le 0R^SPOn​(H;s)≤0.
  • d=0d = 0d=0: all losses and gaps are 000.
  • n=0n = 0n=0: excluded by hypothesis.
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