Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 8, p. 27, display 8 — E|A(X)∖B(X)| ≤ E|B(X)∖A(X)| ⟹ E|A(X)| ≤ E|B(X)|

Proved
RiskControl.Optimal.expSize_le_of_setdiff

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

p2o-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 μ\muμ be a finite measure on Z\mathcal ZZ, and let A,B:X→2Z\mathcal A, \mathcal B : \mathcal X \to 2^{\mathcal Z}A,B:X→2Z be set-valued predictors with measurable graphs. Write ∣⋅∣|\cdot|∣⋅∣ for μ\muμ and X∼PXX \sim P_XX∼PX​. If

E[∣A(X)∖B(X)∣]≤E[∣B(X)∖A(X)∣],\mathbb E\big[|\mathcal A(X) \setminus \mathcal B(X)|\big] \le \mathbb E\big[|\mathcal B(X) \setminus \mathcal A(X)|\big],E[∣A(X)∖B(X)∣]≤E[∣B(X)∖A(X)∣],

then

E[∣A(X)∣]≤E[∣B(X)∣].\mathbb E\big[|\mathcal A(X)|\big] \le \mathbb E\big[|\mathcal B(X)|\big].E[∣A(X)∣]≤E[∣B(X)∣].

This is the last step of the proof of Theorem 8, with A=Tλ\mathcal A = \mathcal T_\lambdaA=Tλ​ and B=T′\mathcal B = \mathcal T'B=T′: adding the common part E∣A(X)∩B(X)∣\mathbb E|\mathcal A(X) \cap \mathcal B(X)|E∣A(X)∩B(X)∣ to both sides turns the comparison of the set differences into a comparison of expected sizes.

Formalization Note The step is stated for arbitrary predictors with measurable graphs; 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, display 8: for set-valued predictors
`A B : 𝒳 → 2^𝒵` with measurable graphs, `𝔼[|A(X) ∖ B(X)|] ≤ 𝔼[|B(X) ∖ A(X)|]` implies
`𝔼[|A(X)|] ≤ 𝔼[|B(X)|]`, sizes measured by the finite measure `μ` and `X ~ P.fst`
(on the page, `A = 𝒯_λ` and `B = 𝒯′`). -/
theorem expSize_le_of_setdiff {𝒳 𝒴 𝒵 : Type*} [MeasurableSpace 𝒳] [MeasurableSpace 𝒴]
    [MeasurableSpace 𝒵]
    (P : Measure (𝒳 × 𝒴)) (μ : Measure 𝒵) [IsFiniteMeasure μ]
    (A B : 𝒳 → Set 𝒵) (hA : MeasurableSet {q : 𝒳 × 𝒵 | q.2 ∈ A q.1})
    (hB : MeasurableSet {q : 𝒳 × 𝒵 | q.2 ∈ B q.1})
    (h : ∫⁻ x, μ (A x \ B x) ∂P.fst ≤ ∫⁻ x, μ (B x \ A x) ∂P.fst) :
    expSize P μ A ≤ expSize P μ B := by sorry

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