Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 5, p. 7 — the Waudby-Smith–Ramdas bound R̂⁺_WSR is a (1 − δ) upper confidence bound for the mean loss

Proved
RiskControl.WSR.proposition_5

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

betting-confidence-bounddistribution-freep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1prediction-setsrisk-controlupper-confidence-bound

This is Proposition 5 of Bates, Angelopoulos, Lei, Malik and Jordan (the Waudby-Smith–Ramdas bound), for one fixed parameter λ\lambdaλ.

Let QQQ be a probability measure on R\mathbb RR concentrated on [0,1][0,1][0,1], the law of the loss L(Y,Tλ(X))L(Y, \mathcal T_\lambda(X))L(Y,Tλ​(X)), and let R=∫x dQ(x)R = \int x\, dQ(x)R=∫xdQ(x) be its mean, the risk R(λ)R(\lambda)R(λ). Let n≥1n \ge 1n≥1, let δ∈(0,1)\delta \in (0,1)δ∈(0,1), and let L1,…,LnL_1, \dots, L_nL1​,…,Ln​ be i.i.d. with law QQQ (the losses of the calibration points). With R^WSR+\widehat R^+_{\mathrm{WSR}}RWSR+​ the bound of Proposition 5 computed from L1,…,LnL_1, \dots, L_nL1​,…,Ln​ (see the definition RiskControl.WSR.Process),

P(R^WSR+<R)≤δ,equivalentlyP(R≤R^WSR+)≥1−δ.\mathbb P\bigl(\widehat R^+_{\mathrm{WSR}} < R\bigr) \le \delta, \qquad\text{equivalently}\qquad \mathbb P\bigl(R \le \widehat R^+_{\mathrm{WSR}}\bigr) \ge 1 - \delta.P(RWSR+​<R)≤δ,equivalentlyP(R≤RWSR+​)≥1−δ.

That is, R^WSR+\widehat R^+_{\mathrm{WSR}}RWSR+​ is a (1−δ)(1-\delta)(1−δ) upper confidence bound for R(λ)R(\lambda)R(λ) in the sense of display (3) of the paper. Combined with the paper's Theorem 1, it yields Theorem 4: UCB calibration with this bound gives a risk-controlling prediction set.

Formalization Note λ\lambdaλ is fixed and dropped from the notation: QQQ is the law of L(Y,Tλ(X))L(Y, \mathcal T_\lambda(X))L(Y,Tλ​(X)), which lies in [0,1][0,1][0,1] by the standing assumption of §3.1 (loss nonnegative and bounded by one), so the calibration losses are i.i.d. with law QQQ and the probability is the product measure Q⊗nQ^{\otimes n}Q⊗n on Rn\mathbb R^nRn. The statement bounds the failure event {R^WSR+<R}\{\widehat R^+_{\mathrm{WSR}} < R\}{RWSR+​<R} by δ\deltaδ; it is evaluated by the outer measure, which for a measurable event is the page's P(R≤R^WSR+)≥1−δP(R \le \widehat R^+_{\mathrm{WSR}}) \ge 1 - \deltaP(R≤RWSR+​)≥1−δ. Two hypotheses implicit on the page are added: n≥1n \ge 1n≥1 (nnn is the sample size and appears in a denominator of νi\nu_iνi​) and 0<δ<10 < \delta < 10<δ<1 (so that log⁡(1/δ)>0\log(1/\delta) > 0log(1/δ)>0; for δ≥1\delta \ge 1δ≥1 the claim is trivial). The infimum defining R^WSR+\widehat R^+_{\mathrm{WSR}}RWSR+​ is taken in the extended reals, so it is +∞+\infty+∞ (and the bound holds) when no R≥0R \ge 0R≥0 qualifies.

Preamble
import Mathlib
import Definitions.Def_RiskControl_WSR_Process

open MeasureTheory
Formal statement
namespace RiskControl.WSR

/-- Proposition 5 (Waudby-Smith–Ramdas bound), p. 7 (arXiv:2101.02703v3): for `n ≥ 1` i.i.d.
losses with law `Q` on `[0, 1]` and `δ ∈ (0, 1)`, `R̂⁺_WSR` is a `(1 − δ)` upper confidence
bound for the mean `R = ∫ x dQ`: `Qⁿ(R̂⁺_WSR < R) ≤ δ`. -/
theorem proposition_5 (Q : Measure ℝ) [IsProbabilityMeasure Q]
    (hQ : ∀ᵐ x ∂Q, x ∈ Set.Icc (0 : ℝ) 1) (n : ℕ) (hn : 1 ≤ n)
    (δ : ℝ) (hδ0 : 0 < δ) (hδ1 : δ < 1) :
    (Measure.pi fun _ : Fin n => Q)
        {ω | wsrUCB n δ ω < ((∫ x, x ∂Q : ℝ) : EReal)} ≤ ENNReal.ofReal δ := by sorry

end RiskControl.WSR
Source
Bates, Angelopoulos, Lei, Malik & Jordan, arXiv:2101.02703v3, Proposition 5, p. 7; proof p. 26
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 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