Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 8, p. 27, displays 5–7 — on the set differences, E[ℓ|X] < −λ vs ≥ −λ gives E|T′(X)∖T_λ(X)| ≥ E|T_λ(X)∖T′(X)|

Proved
RiskControl.Optimal.setdiff_size_ge

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

optimalityp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1prediction-setsrisk-controlset-size

Let PPP be a measure on X×Y\mathcal X \times \mathcal YX×Y with marginal PXP_XPX​ on X\mathcal XX, let κ\kappaκ be a Markov kernel from X\mathcal XX to Y\mathcal YY, let μ\muμ be a measure on Z\mathcal ZZ and ℓ:Y×Z→[0,∞)\ell : \mathcal Y \times \mathcal Z \to [0, \infty)ℓ:Y×Z→[0,∞) measurable, and write E[ℓ(Y;z)∣X=x]=∫ℓ(y,z) dκ(x)(y)\mathbb E[\ell(Y; z) \mid X = x] = \int \ell(y, z)\, d\kappa(x)(y)E[ℓ(Y;z)∣X=x]=∫ℓ(y,z)dκ(x)(y). Let λ<0\lambda < 0λ<0, let Tλ(x)={z:E[ℓ(Y;z)∣X=x]≥−λ}\mathcal T_\lambda(x) = \{z : \mathbb E[\ell(Y; z) \mid X = x] \ge -\lambda\}Tλ​(x)={z:E[ℓ(Y;z)∣X=x]≥−λ} be the predictor (11), and let T′\mathcal T'T′ be a set-valued predictor with measurable graph. If

E[∫z∈T′(X)∖Tλ(X)E[ℓ(Y;z)∣X] dμ(z)]≥E[∫z∈Tλ(X)∖T′(X)E[ℓ(Y;z)∣X] dμ(z)],\mathbb E\Big[\int_{z \in \mathcal T'(X) \setminus \mathcal T_\lambda(X)} \mathbb E[\ell(Y; z) \mid X]\, d\mu(z)\Big] \ge \mathbb E\Big[\int_{z \in \mathcal T_\lambda(X) \setminus \mathcal T'(X)} \mathbb E[\ell(Y; z) \mid X]\, d\mu(z)\Big],E[∫z∈T′(X)∖Tλ​(X)​E[ℓ(Y;z)∣X]dμ(z)]≥E[∫z∈Tλ​(X)∖T′(X)​E[ℓ(Y;z)∣X]dμ(z)],

with X∼PXX \sim P_XX∼PX​, then

E[∣T′(X)∖Tλ(X)∣]≥E[∣Tλ(X)∖T′(X)∣],\mathbb E\big[|\mathcal T'(X) \setminus \mathcal T_\lambda(X)|\big] \ge \mathbb E\big[|\mathcal T_\lambda(X) \setminus \mathcal T'(X)|\big],E[∣T′(X)∖Tλ​(X)∣]≥E[∣Tλ​(X)∖T′(X)∣],

where ∣⋅∣|\cdot|∣⋅∣ is the measure μ\muμ.

This is the passage from the fifth to the seventh display of the proof of Theorem 8: on T′(x)∖Tλ(x)\mathcal T'(x) \setminus \mathcal T_\lambda(x)T′(x)∖Tλ​(x) the conditional expected cost is below −λ-\lambda−λ and on Tλ(x)∖T′(x)\mathcal T_\lambda(x) \setminus \mathcal T'(x)Tλ​(x)∖T′(x) it is at least −λ-\lambda−λ.

Formalization Note The paper allows λ≤0\lambda \le 0λ≤0; the step needs −λ>0-\lambda > 0−λ>0 and is stated for λ<0\lambda < 0λ<0. The size ∣⋅∣|\cdot|∣⋅∣ is μ\muμ, as the sixth to seventh display of the proof requires. Integrals are lower Lebesgue integrals in [0,∞][0, \infty][0,∞].

Preamble
import Mathlib
import Definitions.Def_RiskControl_Optimal_Setting

open MeasureTheory ProbabilityTheory
open scoped ENNReal NNReal
Formal statement
namespace RiskControl.Optimal

/-- Proof of Theorem 8, arXiv:2101.02703v3, p. 27, displays 5–7: if `λ < 0`, `𝒯′` has a measurable
graph and display 5 holds, i.e.
`𝔼[∫_{𝒯_λ(X) ∖ 𝒯′(X)} 𝔼[ℓ(Y; z) | X] dμ] ≤ 𝔼[∫_{𝒯′(X) ∖ 𝒯_λ(X)} 𝔼[ℓ(Y; z) | X] dμ]`, then
`𝔼[|𝒯_λ(X) ∖ 𝒯′(X)|] ≤ 𝔼[|𝒯′(X) ∖ 𝒯_λ(X)|]`, sizes measured by `μ` and `X ~ P.fst`. -/
theorem setdiff_size_ge {𝒳 𝒴 𝒵 : Type*} [MeasurableSpace 𝒳] [MeasurableSpace 𝒴]
    [MeasurableSpace 𝒵]
    (P : Measure (𝒳 × 𝒴)) (μ : Measure 𝒵)
    (ℓ : 𝒴 → 𝒵 → ℝ≥0) (hℓ : Measurable (Function.uncurry ℓ))
    (κ : Kernel 𝒳 𝒴) [IsMarkovKernel κ]
    (lam : ℝ) (hlam : lam < 0)
    (T' : 𝒳 → Set 𝒵) (hT' : MeasurableSet {q : 𝒳 × 𝒵 | q.2 ∈ T' q.1})
    (h5 : ∫⁻ x, ∫⁻ z in thresholdSet κ ℓ lam x \ T' x, condLoss κ ℓ x z ∂μ ∂P.fst
      ≤ ∫⁻ x, ∫⁻ z in T' x \ thresholdSet κ ℓ lam x, condLoss κ ℓ x z ∂μ ∂P.fst) :
    ∫⁻ x, μ (thresholdSet κ ℓ lam x \ T' x) ∂P.fst
      ≤ ∫⁻ x, μ (T' x \ thresholdSet κ ℓ lam x) ∂P.fst := by sorry

end RiskControl.Optimal
Source
Bates, Angelopoulos, Lei, Malik & Jordan, arXiv:2101.02703v3, Proof of Theorem 8, p. 27, fifth to seventh displays
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