Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (25): the weighted fraction of strange points is at most α\alphaα

Proved
ConformalBeyondExchangeability.strange_weight_le

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

conformal-predictioncoverage-guaranteesdistribution-free-inferencejackknife-plustotal-variation

Let w1,…,wn∈[0,1]w_1,\dots,w_n\in[0,1]w1​,…,wn​∈[0,1] with normalized weights w~1,…,w~n+1\tilde w_1,\dots,\tilde w_{n+1}w~1​,…,w~n+1​ (eq. (10)), and let α∈(0,1)\alpha\in(0,1)α∈(0,1). For r∈Rn+1r\in\mathbb R^{n+1}r∈Rn+1 let

S(r)={i∈[n+1]:ri>Q1−α(∑j=1n+1w~jδrj)}\mathcal S(r)=\Big\{i\in[n+1]:r_i>\mathsf Q_{1-\alpha}\Big(\sum_{j=1}^{n+1}\tilde w_j\delta_{r_j}\Big)\Big\}S(r)={i∈[n+1]:ri​>Q1−α​(j=1∑n+1​w~j​δrj​​)}

be the set of strange points (eq. (24)). Then for all r∈Rn+1r\in\mathbb R^{n+1}r∈Rn+1,

∑i∈S(r)w~i≤α.\sum_{i\in\mathcal S(r)}\tilde w_i\le\alpha.i∈S(r)∑​w~i​≤α.

This deterministic inequality is the last step of the proof of Theorem 2.

Preamble
import Mathlib
import Definitions.Def_ConformalBeyondExchangeability_Basic

open MeasureTheory
Formal statement
namespace ConformalBeyondExchangeability

theorem strange_weight_le {n : ℕ} (w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i ∧ w i ≤ 1)
    {α : ℝ} (hα0 : 0 < α) (hα1 : α < 1) (r : Fin (n + 1) → ℝ) :
    ∑ i ∈ strangeSet (normWeights w) α r, normWeights w i ≤ α := by sorry

end ConformalBeyondExchangeability
Source
Barber, Candès, Ramdas and Tibshirani, Conformal prediction beyond exchangeability, arXiv:2202.13415v5 (2023), Section 6.2, eqs. (24)-(25), p. 31
Read-back

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

Setting. Fix a natural number n≥0n \ge 0n≥0, possibly n=0n = 0n=0. The statement takes:

  • real weights w1,…,wnw_1, \dots, w_nw1​,…,wn​, each satisfying 0≤wi≤10 \le w_i \le 10≤wi​≤1 (zero weights are allowed; when n=0n = 0n=0 there are no weights);
  • a real number α\alphaα with 0<α<10 < \alpha < 10<α<1;
  • an arbitrary real vector r=(r1,…,rn+1)∈Rn+1r = (r_1, \dots, r_{n+1}) \in \mathbb{R}^{n+1}r=(r1​,…,rn+1​)∈Rn+1, with no further assumptions.

Normalized weights. Let W=w1+⋯+wnW = w_1 + \cdots + w_nW=w1​+⋯+wn​, so W+1≥1W + 1 \ge 1W+1≥1. The normalized weights w~1,…,w~n+1\tilde w_1, \dots, \tilde w_{n+1}w~1​,…,w~n+1​ are

w~i=wiW+1(1≤i≤n),w~n+1=1W+1.\tilde w_i = \frac{w_i}{W + 1} \quad (1 \le i \le n), \qquad \tilde w_{n+1} = \frac{1}{W + 1}.w~i​=W+1wi​​(1≤i≤n),w~n+1​=W+11​.

Weighted quantile. Define QQQ as the smallest (1−α)(1-\alpha)(1−α)-quantile of the discrete distribution ∑j=1n+1w~j δrj\sum_{j=1}^{n+1} \tilde w_j \, \delta_{r_j}∑j=1n+1​w~j​δrj​​, taken over the extended real line [−∞,+∞][-\infty, +\infty][−∞,+∞]:

Q=inf⁡{q∈[−∞,+∞]  :  ∑j : rj≤qw~j  ≥  1−α},Q = \inf\Big\{ q \in [-\infty, +\infty] \;:\; \sum_{j \,:\, r_j \le q} \tilde w_j \;\ge\; 1 - \alpha \Big\},Q=inf{q∈[−∞,+∞]:j:rj​≤q∑​w~j​≥1−α},

with the infimum of the empty set being +∞+\infty+∞. Here qqq ranges over all extended reals, including ±∞\pm\infty±∞.

Strange points. The set of "strange" indices is the set of indices whose value lies strictly above QQQ:

S(r)={ i∈{1,…,n+1}  :  Q<ri }.S(r) = \{\, i \in \{1, \dots, n+1\} \;:\; Q < r_i \,\}.S(r)={i∈{1,…,n+1}:Q<ri​}.

Claim. For every such nnn, www, α\alphaα and rrr, the total normalized weight of the strange indices is at most α\alphaα:

∑i∈S(r)w~i  ≤  α.\sum_{i \in S(r)} \tilde w_i \;\le\; \alpha .i∈S(r)∑​w~i​≤α.

The inequality is non-strict. The index n+1n+1n+1 is treated like the others here: it belongs to S(r)S(r)S(r) exactly when rn+1>Qr_{n+1} > Qrn+1​>Q.

Degenerate cases. These are covered by the quantifiers rather than excluded:

  • n=0n = 0n=0: the only weight is w~1=1\tilde w_1 = 1w~1​=1, and rrr is a single real number.
  • Zero weights: if some wi=0w_i = 0wi​=0, the corresponding w~i=0\tilde w_i = 0w~i​=0.
  • Ties: the vector rrr may contain repeated values.
Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

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