Theorem A.1 (as proved): asymptotic risk control for non-monotone losses
ProvedConformalRiskControl.monotonized_asymptotic_risk_controlLet be nonempty and compact with , and let . Let be i.i.d. random functions on with right-continuous, possibly non-monotone, realisations. Assume that almost surely, for every :
- is bounded below by a fixed constant;
- ;
- .
Let and . Then
Formalization Note The paper writes , but its proof bounds by Fatou's lemma and does not show that the limit exists, so the statement is made for . Indices start at : uses and is tested on .
import Mathlib import Definitions.Def_ConformalRiskControl_Basic open MeasureTheory ProbabilityTheory Filter
namespace ConformalRiskControl
theorem monotonized_asymptotic_risk_control {Ω : Type*} [MeasurableSpace Ω]
(P : Measure Ω) [IsProbabilityMeasure P] (Λ : Set ℝ) (hΛ : IsCompact Λ)
(hΛne : Λ.Nonempty) (B α : ℝ) (hαB : α < B) (L : ℕ → Ω → ℝ → ℝ) (hiid : IsIID P Λ L)
(hrc : ∀ i ω, IsRightContOn Λ (L i ω)) (lo : ℝ) (hlo : ∀ᵐ ω ∂P, ∀ i, ∀ x ∈ Λ, lo ≤ L i ω x)
(h5 : ∀ᵐ ω ∂P, ∀ i, LossBounds Λ B α (L i ω)) :
limsup (fun n : ℕ => upperExp P B (fun ω => L n ω (lhatPlus Λ α (fun i : Fin n => L i ω))))
atTop ≤ (α : EReal) := by sorry
end ConformalRiskControlRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a measurable space with a probability measure . Fix:
- a set that is compact and nonempty, with ;
- real numbers and with (strict);
- a sequence of random functions , indexed by starting at , where is defined for every and every (not only );
- a real number .
Hypotheses.
- i.i.d. For every and every , the map is measurable. The random elements of , with the product -algebra, are mutually independent under (every finite subfamily is independent). For all they have the same distribution on .
- Right-continuity, for every sample. For every and every (not merely almost surely), is right-continuous on . That is, at each it is continuous relative to . No monotonicity in is assumed.
- Uniform lower bound. For -almost every , for all and all .
- Bounds (eq. 5). For -almost every , for all :
- for all , and
- .
The parameter. For and , the calibration losses are and the test loss is . Define the empirical risk
When this is the empty sum divided by , which by convention is .
Define its monotonization
This is a real supremum, with the convention that it equals if the index set is empty or the values are unbounded above.
Let
Then
The threshold is itself; there is no correction. No measurability of is assumed or asserted.
The expectation used. For a function , set
Here the integral is a lower Lebesgue integral in , defined even for non-measurable . When almost surely and is measurable, this equals the ordinary expectation , which may be .
Conclusion. In the extended reals,
That is, the expected test loss at the monotonized parameter built from the first samples has limit superior at most as . Nothing is claimed for any individual finite , including the degenerate case .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.