Eq. (2): replacing the test score by does not change the comparison
ProvedConformalCovariateShift.quantile_with_inf_iffLet , let and let . Then
This is the deterministic step (2) in the proof of Lemma 1: replacing the test value by in the empirical distribution does not change whether the test value lies below the level- quantile. The proof of Lemma 3 invokes a weighted analogue ("as in (2)"), with the weights in place of ; that analogue is not part of this statement.
import Mathlib import Definitions.Def_ConformalCovariateShift_Basic open MeasureTheory ProbabilityTheory
namespace ConformalCovariateShift
theorem quantile_with_inf_iff {n : ℕ} (v : Fin (n + 1) → ℝ) (β : ℝ) (hβ0 : 0 < β) (hβ1 : β < 1) :
(v (Fin.last n) : EReal) ≤ quantileWithInf β v ↔ (v (Fin.last n) : EReal) ≤ empQuantile β v := by sorry
end ConformalCovariateShiftRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Fix a natural number (the case is included), a vector of real numbers , and a real number with
All comparisons below take place in the extended real line , with each real viewed as an extended real.
Quantile. For a measure on , the level- quantile is
where the infimum is taken in . The infimum of the empty set is . Here is the set of all extended reals .
The two quantiles compared. The theorem compares two such quantiles, each built from point masses of weight . The weight is an ordinary real division, and , so no division by zero arises.
- uses the measure
This is the empirical distribution of the values . The last coordinate does not enter this measure; its slot is replaced by a point mass at .
- uses the measure
This is the empirical distribution of all real values .
The claim. The statement asserts the equivalence
Both directions are claimed, with non-strict inequalities on each side.
Hypotheses and edge cases.
- The only hypotheses are the strict bounds ; the endpoint levels and are excluded.
- No assumptions are made on : the values may repeat and may lie in any order.
- When , is a unit point mass at and is a unit point mass at .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.