Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem A.1, p. 26 — UCB calibration for any continuous nonincreasing R: P(R(λ̂) ≤ α) ≥ 1 − δ

Proved
RiskControl.UCB.theorem_A_1

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

calibrationdistribution-freep2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1risk-controlupper-confidence-bound

Theorem A.1 (Validity of UCB calibration, abstract form). Let (Ω,F,μ)(\Omega, \mathcal F, \mu)(Ω,F,μ) be a probability space, let Λ⊆R‾\Lambda \subseteq \overline{\mathbb R}Λ⊆R be closed, and let R:R‾→RR : \overline{\mathbb R} \to \mathbb RR:R→R be continuous and nonincreasing on Λ\LambdaΛ, with R(λ)≤αR(\lambda) \le \alphaR(λ)≤α for some λ∈Λ\lambda \in \Lambdaλ∈Λ. Let R^+:Ω×R‾→R\widehat R^+ : \Omega \times \overline{\mathbb R} \to \mathbb RR+:Ω×R→R satisfy the pointwise upper confidence bound

μ(R^+(λ)<R(λ))≤δfor every λ∈Λ,(3)\mu\big(\widehat R^+(\lambda) < R(\lambda)\big) \le \delta \qquad \text{for every } \lambda \in \Lambda, \tag{3}μ(R+(λ)<R(λ))≤δfor every λ∈Λ,(3)

and let λ^(ω)=inf⁡{λ∈Λ:R^+(ω,λ′)<α ∀λ′∈Λ, λ′≥λ}\hat\lambda(\omega) = \inf\{\lambda \in \Lambda : \widehat R^+(\omega, \lambda') < \alpha \ \forall \lambda' \in \Lambda,\ \lambda' \ge \lambda\}λ^(ω)=inf{λ∈Λ:R+(ω,λ′)<α ∀λ′∈Λ, λ′≥λ} as in (4). Then

μ({ω:the set in (4) is nonempty and R(λ^(ω))>α})≤δ,\mu\Big(\{\omega : \text{the set in (4) is nonempty and } R(\hat\lambda(\omega)) > \alpha\}\Big) \le \delta,μ({ω:the set in (4) is nonempty and R(λ^(ω))>α})≤δ,

that is, R(λ^)≤αR(\hat\lambda) \le \alphaR(λ^)≤α with probability at least 1−δ1 - \delta1−δ.

It is the abstract engine behind Theorem 1 and the later calibration theorems of the paper: any family of predictors with a monotone continuous risk and any pointwise confidence bound yield a risk-controlling choice of λ\lambdaλ.

Formalization Note The page's conclusion reads P(R(λ)≤α)≥1−δP(R(\lambda) \le \alpha) \ge 1 - \deltaP(R(λ)≤α)≥1−δ; the statement and proof are about λ^\hat\lambdaλ^, which is what is stated here. "With probability at least 1−δ1-\delta1−δ" is written as a failure probability at most δ\deltaδ, measured by μ\muμ as an outer measure, so no measurability of R^+\widehat R^+R+ or of λ^\hat\lambdaλ^ is assumed (for a measurable event this is the page's statement; dropping "R^+(λ)\widehat R^+(\lambda)R+(λ) is a random variable" only strengthens the result). When the set in (4) is empty, λ^=+∞\hat\lambda = +\inftyλ^=+∞ need not lie in Λ\LambdaΛ and R(λ^)R(\hat\lambda)R(λ^) is not defined on the page; the event is restricted to a nonempty set. No range is placed on α\alphaα or δ\deltaδ, as on the page.

Preamble
import Mathlib
import Definitions.Def_RiskControl_UCB_Setting

open MeasureTheory
Formal statement
namespace RiskControl.UCB

/-- Theorem A.1 (Validity of UCB calibration, abstract form), arXiv:2101.02703v3, p. 26, with
the conclusion about `λ̂` (the page prints `λ`). `R : Λ → ℝ` is continuous and nonincreasing on
`Λ` with `R(λ) ≤ α` for some `λ ∈ Λ`; `R̂⁺(λ)` satisfies (3) pointwise; then the event
"the calibration set of (4) is nonempty and `R(λ̂) > α`" has (outer) probability at most `δ`. -/
theorem theorem_A_1 {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ]
    (Λ : Set EReal) (hΛ : IsClosed Λ) (R : EReal → ℝ)
    (hanti : AntitoneOn R Λ) (hcont : ContinuousOn R Λ) (α δ : ℝ)
    (hex : ∃ l ∈ Λ, R l ≤ α) (Rhat : Ω → EReal → ℝ)
    (hucb : ∀ l ∈ Λ, μ {ω | Rhat ω l < R l} ≤ ENNReal.ofReal δ) :
    μ {ω | (calSet Λ (Rhat ω) α).Nonempty ∧ α < R (lambdaHat Λ (Rhat ω) α)}
      ≤ ENNReal.ofReal δ := by sorry

end RiskControl.UCB
Source
Bates, Angelopoulos, Lei, Malik & Jordan, arXiv:2101.02703v3, Theorem A.1, p. 26 (conclusion read with λ̂ for the printed λ)
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