Theorem 5: nonexchangeable jackknife+
ProvedConformalBeyondExchangeability.nonexchangeable_jackknife_plus_coverageLet the data have an arbitrary joint law . Let with normalized weights , let , and let be a tagged algorithm with fixed tags . Suppose the map to the matrix of leave-two-out residuals is measurable. Then the nonexchangeable jackknife+ interval (eq. (34)), built with the random index drawn independently of , satisfies
Formalization Note The left endpoint uses the largest -quantile and the right endpoint the smallest -quantile, as in footnote 7. The probability over is the sum .
import Mathlib import Definitions.Def_ConformalBeyondExchangeability_Basic open MeasureTheory
namespace ConformalBeyondExchangeability
theorem nonexchangeable_jackknife_plus_coverage {X T : Type*} [MeasurableSpace X] {n : ℕ}
(P : Measure (Fin (n + 1) → X × ℝ)) [IsProbabilityMeasure P]
(w : Fin n → ℝ) (hw : ∀ i, 0 ≤ w i ∧ w i ≤ 1) {α : ℝ} (hα0 : 0 < α) (hα1 : α < 1)
(alg : TaggedAlg X T) (t : Fin (n + 1) → T) (hR : Measurable (jackResiduals alg t)) :
1 - 2 * α - swapGap P w (jackResiduals alg t) ≤ jackCoverage P alg t w α := by sorry
end ConformalBeyondExchangeabilityRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix the following:
- Arbitrary types (the feature space, with some σ-algebra) and (a space of "tags").
- A natural number . The case is allowed.
- A probability measure on , with the product σ-algebra and the Borel σ-algebra on . A generic point is with . Index is the test point and are training points.
- No further assumption is placed on : no exchangeability, no independence, and no product structure.
The remaining inputs are:
- Weights. Deterministic real weights with for every .
- Level. A real with .
- Algorithm. A completely arbitrary map that sends any finite ordered list of triples to a function . It need not be symmetric and need not be measurable.
- Tags. A fixed tag vector .
Derived objects.
Normalized weights. With , set
These are nonnegative and sum to .
Weighted quantiles. For points and a level , define
Here and .
Swap permutation. is the transposition of and ; it is the identity when . The swapped data is defined by , i.e. with entries and exchanged.
Leave-one-out swapped models. For and , let
Two consequences:
- The test pair is never in the list.
- When and , the point sits in position and carries tag .
The corresponding residual is
Jackknife+ interval for index . is the set of with , compared in the extended reals, where
This set depends on only through and .
Coverage. The coverage is the -mixture over the index :
This can be read as drawing with , independently of . No measurability of these events is assumed. For a non-measurable event, the value used is 's outer measure.
Residual matrix. is the real matrix with and, for ,
Here , listed in increasing order of , with each point keeping its own tag.
Gap term. With , let
This compares the law of the matrix under with the law of applied to the data in which training point and the test point are swapped.
Hypothesis on the algorithm. The only regularity assumed is that is measurable into with the product σ-algebra. Nothing is assumed about the measurability of the models used in the interval.
Conclusion. Under these hypotheses,
Edge cases.
- . The left side is at most , while is always nonnegative.
- . Then , and . The only index is , which gives and . The interval is all of , so .
- Zero weights. Weights equal to are allowed, which removes the corresponding training points from both quantiles and from the gap term.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.