Repository navigation
feat: the randomized Markov inequality and randomized e-to-p calibration - #412
Merged
lmlexplore-automation[bot] merged 2 commits intoNov 15, 2026
Conversation
Co-Authored-By: Claude Code <noreply@github.com>
RemyDegenne
commented
Nov 15, 2026
RemyDegenne
commented
Nov 15, 2026
RemyDegenne
commented
Nov 15, 2026
Contributor
Author
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
…entity, fix docstring Co-Authored-By: Claude Code <noreply@github.com>
Merged
via the queue into
LeanMachineLearning:main
with commit Nov 15, 2026
7142c37
24 of 27 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proves the randomized Markov inequality and the randomized e-to-p calibration, closing EValues Layer 0.3 (The randomized Markov inequality [RW, Theorem 2.9, Corollary 2.10; RM26, Theorem 1.2]).
For a measurable
Y : Ω → ℝ≥0∞andUuniform on[0, 1]and independent ofYunderP,measure_ofReal_le_mul_eq_lintegral_minprovesP {U ≤ α * Y} = ∫⁻ min (α * Y) 1 ∂P, andIsPVar.measure_le_mul_le_mul_lintegralproves≤ α * ∫⁻ Y ∂P. Both are stated for any p-variablepin place ofU, an inequalityP {p ≤ Z} ≤ ∫⁻ min Z 1 ∂P(IsPVar.measure_le_le_lintegral_min) that is an equality for exact p-variables (IsExactPVar.measure_le_eq_lintegral_min). The uniform variable is then the exact p-variableisExactPVar_ofReal_of_map_eq, which is already onmain. Two consequences follow. The randomized e-test{p ≤ α * E}has levelα(IsEVar.measure_le_mul_le). Andp / Eis a p-variable for a p-variable and an e-variable that are independent under every member of the null (IsEVar.isPVar_div), and so isU / E(IsEVar.isPVar_ofReal_div), with no truncation and theℝ≥0∞conventionsp / 0 = ∞,p / ∞ = 0. These are [RW, Corollary 2.10].The proof freezes the independent variable. A new general lemma
ProbabilityTheory.IndepFun.measure_prodMk_mem_eq_lintegral(inLMLExplore/Probability/Independence/Basic.lean) states that for a.e.-measurableX,Yindependent under a finite measure,μ {(X, Y) ∈ s} = ∫⁻ ω, μ {ω' | (X ω', Y ω) ∈ s} ∂μ. It follows from Mathlib'sIndepFun.map_prod_eq_prod_map_mapandMeasure.prod_apply_symm.PVariable.leangains two lemmas:IsExactPVar.measure_le_eq_min(the distribution function of an exact p-variable ismin α 1) andisProbabilityMeasure_of_map_eq_volume_restrict_Icc. The second one means the uniform-variable statements need no separateIsProbabilityMeasurehypothesis.Files:
LMLExplore/EValues/RandomizedMarkov.lean(new, 165 lines),LMLExplore/Probability/Independence/Basic.lean(new, 51 lines),LMLExplore/EValues/PVariable.lean(+21). No declarations are removed or renamed. No Mathlib infrastructure is vendored. The mathematical sources are [RW] (Ramdas–Wang, arXiv:2410.23614v6, Theorem 2.9 and Corollary 2.10) and [RM26] (Ramdas–Manole, arXiv:2304.02611v3, Theorem 1.2), cited in the module docstring.After this PR, Layer 0.3 has nothing left. Its consumer is the randomized Ville inequality of Layer 2.3 [RM26, Corollary 4.1.1], the sequential form of the same randomized threshold.
Quality pass:
IndepFunlemmas computing measures or lower integrals by freezing (IndepFun/lintegral/prodMk), and for p-variable division lemmas. I found nothing; the open PRs (feat: the exact Ville identity, the extended Ville inequality and Ville's inequality in ℝ≥0∞ #399, feat: e-processes, the definition IsEProcess and its first closure properties #401, feat: nulls generated by constraints, their bets, and the complete class theorem for finitely many constraints #402, feat: admissible e-variables, strong admissibility, and the simple null #404, feat: the discrete-time Snell envelope of an ℝ≥0∞-valued process #405, feat: e-merging functions, their domination by weighted means, and the admissible ones #409) do not touch Layer 0.3.IsProbabilityMeasure Pis dropped from the uniform statements because it follows fromP.map U = volume.restrict (Icc 0 1).IndepFunis kept inIsEVar.isPVar_div. Counterexample: withp = UandE = 2 · 𝟙{U ≤ 1/2}(an e-variable),p / E ≤ 1/4holds on{U ≤ 1/2}, which has probability1/2 > 1/4.hS : ∀ P ∈ S, IsProbabilityMeasure Pis kept inIsEVar.isPVar_div, as in the neighbouringIsEVar.isPVar_inv. Independence alone only forcesP univ ∈ {0, 1, ∞}, and Statlib'sIsEVargives no bound∫⁻ E ∂P ≤ 1under an infinite measure. RemovinghSwould need a separate argument for that case.Local checks (not CI):
scope: scoped: against a890e2a10db9833d692cc4872b4b9114e3605534.local-axioms: checked 3 changed module(s), 53 declaration(s); 0 violation(s). Whole-librarylake buildsucceeded; the module-system, header-style and environment lint checks passed.Roadmap: EValues
🤖 Prepared with Claude Code