Proposition 1 (as proved): without monotonicity the risk can be arbitrarily close to
ProvedConformalRiskControl.nonmonotone_counterexampleLet , with , and . Then there are a probability space and exchangeable random functions on with the following properties. Every realisation is right-continuous, takes values in and satisfies . At least one realisation is not non-increasing. The test loss at the conformal risk control parameter of eq. (4) is a random variable (measurable), and
So Theorem 1 fails without monotonicity, by an amount arbitrarily close to the largest possible.
Formalization Note The printed statement fixes neither nor . The proof (with after rescaling) assumes and constructs i.i.d. piecewise-constant losses on . The statement is made for that range, with the properties the construction provides. Measurability of the test loss is required explicitly so that the expectation is the genuine one.
import Mathlib import Definitions.Def_ConformalRiskControl_Basic open MeasureTheory ProbabilityTheory Filter
namespace ConformalRiskControl
theorem nonmonotone_counterexample (n : ℕ) (hn : 0 < n) (B α ε : ℝ)
(hα₁ : B / (n + 1) < α) (hα₂ : α < B) (hε : 0 < ε) :
∃ (Ω : Type) (_ : MeasurableSpace Ω) (P : Measure Ω) (_ : IsProbabilityMeasure P)
(L : Fin (n + 1) → Ω → ℝ → ℝ),
IsExchangeable P (Set.Icc 0 1) L ∧
(∀ i ω, IsRightContOn (Set.Icc 0 1) (L i ω)) ∧
(∀ i ω, LossBounds (Set.Icc 0 1) B α (L i ω) ∧ ∀ x ∈ Set.Icc (0 : ℝ) 1, 0 ≤ L i ω x) ∧
(∃ i ω, ¬ AntitoneOn (L i ω) (Set.Icc 0 1)) ∧
Measurable (fun ω =>
L (Fin.last n) ω (lhat (Set.Icc 0 1) B α (fun i : Fin n => L i.castSucc ω))) ∧
((B - ε : ℝ) : EReal) ≤
upperExp P B (fun ω =>
L (Fin.last n) ω (lhat (Set.Icc 0 1) B α (fun i : Fin n => L i.castSucc ω))) := by sorry
end ConformalRiskControlRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting and hypotheses. Fix a natural number with , and real numbers , , such that
Together, the two inequalities on force and . No upper bound is placed on relative to . Throughout, the parameter set is the closed interval , so .
Conclusion (an existence claim). The theorem asserts that there exist the following objects:
- a sample space with some σ-algebra;
- a probability measure on it;
- a family of random functions , each of the form , written .
These objects satisfy all six of the following properties.
-
Exchangeability on .
- For every and every , the map is measurable.
- For every permutation of , the joint law under of equals the joint law of . Both are viewed as random elements of the space of maps , carrying the product σ-algebra.
- Only the values at enter. Values of outside are unconstrained here and in properties 2–4.
-
Right-continuity. For every and every , the function is right-continuous on . That is, at each it is continuous at relative to the set . At this condition holds trivially.
-
Bounds. For every and every :
- for all ;
- ;
- for all .
-
Non-monotonicity. There is at least one index and one outcome for which is not non-increasing on .
-
Measurability of the test loss at the chosen parameter. For each , let be the conformal risk control parameter computed from the first losses . It is defined as
where the empirical risk is
By convention, whenever this set is empty. Note that always lies in . The property asserted is that the map
is measurable.
- Expected test loss is nearly maximal. Write . The theorem asserts the following inequality in the extended reals:
Here the integral is a lower Lebesgue integral of a nonnegative function, with value in , so the right-hand side lies in . Because , property 3 gives everywhere. Hence the truncation at is inactive and the right-hand side equals the ordinary expectation (or if that expectation diverges downward). The assertion therefore amounts to .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.