Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 3.1: with the 0-1 loss, a strengthened type I constraint can cost a fixed excess type II error over the NP oracle

Proved
NeymanPearsonClassification.strengthened_constraint_negative_result

by Xeroth · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

binary-classificationchance-constrained-optimizationconvex-surrogateempirical-processesneyman-pearson

Fix α∈(0,1)\alpha\in(0,1)α∈(0,1) and a dimension d≥1d\ge1d≥1. There exist base classifiers h1,h2:Rd→[−1,1]h_1,h_2:\mathbb{R}^d\to[-1,1]h1​,h2​:Rd→[−1,1] and class-conditional laws P−,P+P^-,P^+P−,P+ with the following properties. Write hλ=λh1+(1−λ)h2\mathsf h_\lambda=\lambda h_1+(1-\lambda)h_2hλ​=λh1​+(1−λ)h2​, λ∈[0,1]\lambda\in[0,1]λ∈[0,1].

  1. Some hλ\mathsf h_\lambdahλ​ is negative everywhere, so it has zero type I error and zero empirical type I error. Hence the strengthened problems below are feasible.
  2. Every hλ\mathsf h_\lambdahλ​ with R−(hλ)<αR^-(\mathsf h_\lambda)<\alphaR−(hλ​)<α satisfies
R+(hλ)−min⁡λ′∈[0,1]: R−(hλ′)≤αR+(hλ′)≥α>0,R^+(\mathsf h_\lambda)-\min_{\lambda'\in[0,1]:\,R^-(\mathsf h_{\lambda'})\le\alpha}R^+(\mathsf h_{\lambda'})\ge\alpha>0,R+(hλ​)−λ′∈[0,1]:R−(hλ′​)≤αmin​R+(hλ′​)≥α>0,

that is, its excess type II error over the NP oracle at level α\alphaα is at least α\alphaα. 3. If α≤1/2\alpha\le1/2α≤1/2, then for every sample size n−≥1n^-\ge1n−≥1 and every i.i.d. sample X1−,…,Xn−−X^-_1,\dots,X^-_{n^-}X1−​,…,Xn−−​ from P−P^-P−, with probability at least α∧14\alpha\wedge\frac14α∧41​ the same inequality holds for every hλ\mathsf h_\lambdahλ​ whose empirical type I error R^−(hλ)=1n−∑i1(hλ(Xi−)≥0)\hat R^-(\mathsf h_\lambda)=\frac1{n^-}\sum_i\mathbf 1(\mathsf h_\lambda(X^-_i)\ge0)R^−(hλ​)=n−1​∑i​1(hλ​(Xi−​)≥0) is <α<\alpha<α.

So with the 0-1 loss, any strengthened type I constraint, empirical or not, can cost a fixed excess type II error of α\alphaα over the NP oracle, whatever the sample size.

Formalization Note The pair (h1,h2)(h_1,h_2)(h1​,h2​) is indexed by Fin 2\mathrm{Fin}\,2Fin2, and [h1,h2][h_1,h_2][h1​,h2​] is the convex hull over the 2-simplex. The reference value is the α\alphaα-constrained minimum min⁡λ′:R−(hλ′)≤αR+(hλ′)\min_{\lambda':R^-(\mathsf h_{\lambda'})\le\alpha}R^+(\mathsf h_{\lambda'})minλ′:R−(hλ′​)≤α​R+(hλ′​), which is what the paper's proof subtracts (Section 6.1) and what its "excess type II risk" sentences refer to. The printed display subtracts the unconstrained min⁡λ∈[0,1]\min_{\lambda\in[0,1]}minλ∈[0,1]​; with that reference the existential is satisfied trivially, e.g. by h1≡−1h_1\equiv-1h1​≡−1, h2≡1h_2\equiv1h2​≡1, which have zero excess over the NP oracle. Item 1 makes explicit the feasibility that the paper's "in particular" consequences (about h∗(α−εn−)h^*(\alpha-\varepsilon_{n^-})h∗(α−εn−​) and h^(α−εn−)\hat h(\alpha-\varepsilon_{n^-})h^(α−εn−​)) presuppose; without it the existential would also be satisfied by classifiers that never meet the strengthened constraint. The minimum is written as an infimum. The probability claim bounds the (outer) probability of the failure event by 1−α∧141-\alpha\wedge\frac141−α∧41​.

Preamble
import Mathlib
import Definitions.Def_NeymanPearsonClassification_Basic

open MeasureTheory ProbabilityTheory
Formal statement
namespace NeymanPearsonClassification

theorem strengthened_constraint_negative_result {d : ℕ} (hd : 1 ≤ d) (α : ℝ)
    (hα : α ∈ Set.Ioo 0 1) :
    ∃ (h : Fin 2 → EuclideanSpace ℝ (Fin d) → ℝ) (Pm Pp : Measure (EuclideanSpace ℝ (Fin d))),
      IsBaseFamily h ∧ IsProbabilityMeasure Pm ∧ IsProbabilityMeasure Pp ∧
      (∃ lam ∈ stdSimplex ℝ (Fin 2), ∀ x, convComb h lam x < 0) ∧
      (∀ lam ∈ stdSimplex ℝ (Fin 2), typeI Pm (convComb h lam) < α →
        α ≤ typeII Pp (convComb h lam) -
          sInf ((fun l => typeII Pp (convComb h l)) ''
            {l | l ∈ stdSimplex ℝ (Fin 2) ∧ typeI Pm (convComb h l) ≤ α})) ∧
      (α ≤ 1 / 2 → ∀ nm : ℕ, 1 ≤ nm →
        ∀ (Omega : Type) [MeasurableSpace Omega] (μ : Measure Omega), IsProbabilityMeasure μ →
        ∀ Xm : Fin nm → Omega → EuclideanSpace ℝ (Fin d), (∀ i, Measurable (Xm i)) →
          iIndepFun Xm μ → (∀ i, μ.map (Xm i) = Pm) →
          μ {ω | ¬ ∀ lam ∈ stdSimplex ℝ (Fin 2),
              empTypeI Finset.univ (fun i => Xm i ω) (convComb h lam) < α →
              α ≤ typeII Pp (convComb h lam) -
                sInf ((fun l => typeII Pp (convComb h l)) ''
                  {l | l ∈ stdSimplex ℝ (Fin 2) ∧ typeI Pm (convComb h l) ≤ α})} ≤
            1 - ENNReal.ofReal (min α (1 / 4))) := by sorry

end NeymanPearsonClassification
Source
Rigollet and Tong, Neyman-Pearson classification, convexity and stochastic constraints, arXiv:1102.5750v1 (2011), Section 3.1, Proposition 3.1, eq. (3.3), p. 6; proof in Section 6.1, pp. 13-14 (reference value as subtracted in the proof)
Read-back

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

For every natural number d≥1d \ge 1d≥1 and every real α\alphaα with 0<α<10 < \alpha < 10<α<1, the statement asserts that there exist the following objects on the Euclidean space Rd\mathbb{R}^dRd (with its Borel σ\sigmaσ-algebra):

  • two real-valued functions h1,h2:Rd→Rh_1, h_2 : \mathbb{R}^d \to \mathbb{R}h1​,h2​:Rd→R;
  • two measures P−P^-P− and P+P^+P+ on Rd\mathbb{R}^dRd.

All of the following conditions must hold.

Notation. Let Λ={λ=(λ1,λ2)∈R2:λ1,λ2≥0, λ1+λ2=1}\Lambda = \{\lambda = (\lambda_1, \lambda_2) \in \mathbb{R}^2 : \lambda_1, \lambda_2 \ge 0,\ \lambda_1 + \lambda_2 = 1\}Λ={λ=(λ1​,λ2​)∈R2:λ1​,λ2​≥0, λ1​+λ2​=1} be the standard simplex. For λ∈R2\lambda \in \mathbb{R}^2λ∈R2, write

hλ(x)=λ1h1(x)+λ2h2(x).h_\lambda(x) = \lambda_1 h_1(x) + \lambda_2 h_2(x).hλ​(x)=λ1​h1​(x)+λ2​h2​(x).

For a function f:Rd→Rf : \mathbb{R}^d \to \mathbb{R}f:Rd→R, the type I and type II errors are the real numbers

R−(f)=P−({x:f(x)≥0}),R+(f)=P+({x:f(x)≤0}).R^-(f) = P^-\big(\{x : f(x) \ge 0\}\big), \qquad R^+(f) = P^+\big(\{x : f(x) \le 0\}\big).R−(f)=P−({x:f(x)≥0}),R+(f)=P+({x:f(x)≤0}).

Both are finite and lie in [0,1][0,1][0,1], because the measures will be probability measures. Define the quantity

γ∗=inf⁡{ R+(hl)  :  l∈Λ, R−(hl)≤α },\gamma^\ast = \inf\big\{\, R^+(h_l) \;:\; l \in \Lambda,\ R^-(h_l) \le \alpha \,\big\},γ∗=inf{R+(hl​):l∈Λ, R−(hl​)≤α},

an infimum of a set of real numbers. Under the convention used, an empty set would give the value 000. By condition (3) below, the set is nonempty, since the λ\lambdaλ found there has R−(hλ)=0≤αR^-(h_\lambda) = 0 \le \alphaR−(hλ​)=0≤α.

Conditions.

  1. Base family. Each hjh_jhj​ (j=1,2j = 1, 2j=1,2) is Borel measurable and takes values only in [−1,1][-1, 1][−1,1].

  2. Probability measures. P−P^-P− and P+P^+P+ are probability measures.

  3. Everywhere-negative combination. There exists λ∈Λ\lambda \in \Lambdaλ∈Λ with hλ(x)<0h_\lambda(x) < 0hλ​(x)<0 for every x∈Rdx \in \mathbb{R}^dx∈Rd.

  4. Population statement. For every λ∈Λ\lambda \in \Lambdaλ∈Λ, if R−(hλ)<αR^-(h_\lambda) < \alphaR−(hλ​)<α (strict), then

α  ≤  R+(hλ)−γ∗.\alpha \;\le\; R^+(h_\lambda) - \gamma^\ast.α≤R+(hλ​)−γ∗.
  1. Sampling statement. This part applies only when α≤12\alpha \le \tfrac12α≤21​; if α>12\alpha > \tfrac12α>21​ it imposes nothing. If α≤12\alpha \le \tfrac12α≤21​, then the following holds for:

    • every integer n−≥1n^- \ge 1n−≥1;
    • every probability space (Ω,μ)(\Omega, \mu)(Ω,μ), with Ω\OmegaΩ any type in the lowest universe and any σ\sigmaσ-algebra;
    • every family X1,…,Xn−:Ω→RdX_1, \dots, X_{n^-} : \Omega \to \mathbb{R}^dX1​,…,Xn−​:Ω→Rd of measurable maps that are mutually independent under μ\muμ and each have law (push-forward of μ\muμ) exactly equal to P−P^-P−.

    For ω∈Ω\omega \in \Omegaω∈Ω and λ∈Λ\lambda \in \Lambdaλ∈Λ, let the empirical type I error be

R^ω−(hλ)=1n− #{ i∈{1,…,n−}:hλ(Xi(ω))≥0 }.\hat R^-_\omega(h_\lambda) = \frac{1}{n^-}\,\#\{\, i \in \{1,\dots,n^-\} : h_\lambda(X_i(\omega)) \ge 0 \,\}.R^ω−​(hλ​)=n−1​#{i∈{1,…,n−}:hλ​(Xi​(ω))≥0}.

No division by zero occurs, since n−≥1n^- \ge 1n−≥1. Let BBB be the set of ω\omegaω for which the following fails: for every λ∈Λ\lambda \in \Lambdaλ∈Λ with R^ω−(hλ)<α\hat R^-_\omega(h_\lambda) < \alphaR^ω−​(hλ​)<α (strict), one has α≤R+(hλ)−γ∗\alpha \le R^+(h_\lambda) - \gamma^\astα≤R+(hλ​)−γ∗. Here R+R^+R+ and γ∗\gamma^\astγ∗ are the population quantities defined above, computed from the true P−P^-P− and P+P^+P+, not from the sample. The conclusion is

μ(B)  ≤  1−min⁡ ⁣(α,14).\mu(B) \;\le\; 1 - \min\!\big(\alpha, \tfrac14\big).μ(B)≤1−min(α,41​).

This is a bound in the extended non-negative reals, where min⁡(α,14)∈(0,14]\min(\alpha, \tfrac14) \in (0, \tfrac14]min(α,41​)∈(0,41​]. No measurability of BBB is asserted; μ(B)\mu(B)μ(B) is the outer measure if BBB is not measurable.

Remarks on scope. No sample from P+P^+P+ appears anywhere. The dimension ddd enters only as the ambient space of the constructed objects. Only two base functions are involved, and they are fixed by the existential choice, together with P±P^\pmP±, before n−n^-n−, Ω\OmegaΩ, μ\muμ and the XiX_iXi​ are quantified.

Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 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