Repository navigation
feat: the numeraires of the sample sizes need not form an e-process, and two-point nulls on finite spaces - #437
Conversation
…and two-point nulls on finite spaces
For an i.i.d. null and an i.i.d. alternative, the numeraires of n + 1
observations, evaluated at the first n + 1 observations, need not form an
e-process for `Filtration.piLE`: for the null {Ber(1/5), Ber(4/5)} and the
alternative Ber(1/2), a stopping time with values in {0, 1} gives them the
mean 367/340 under the i.i.d. law of Ber(1/5), while half of them form an
e-process. For a null {P₁, P₂} on a finite space, with the alternative Q₁ and
both laws charging every point, they form an e-process exactly when
E_{Q₁}[p₂/p₁] ≤ 1 or E_{Q₁}[p₁/p₂] ≤ 1, which is also exactly when they are
products of copies of one function. Every statement holds for every choice
of the numeraires, Statlib's `numeraire` among them.
Roadmap: EValues, Layer 6, item 1 (the optimal growth rate).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0196ftMVbgjSJzPQEwdek3kM
There was a problem hiding this comment.
🟡 attribution — request_changes claude/claude-opus-5-5
The PR description says the proofs are rewritten from the Lean proofs of the paper project (EVR26, Note 23), but the file credits only RGVS23, which posed the question. The closely followed prior formalization and its informal source have to be named in the code.
LMLExplore/EValues/Numeraire/Sequential.lean:76— The References and module docstring credit only [RGVS23] (the question). The results (the Bernoulli counterexample, 367/340, the half e-process, the two-point criterion) and their proofs come from EVR26 Note 23 and the Lean proofs of the paper project RemyDegenne/evalues_research. The PR description says so, but the code never mentions it. Fix: Add an attribution paragraph to the module docstring, e.g. 'The statements and proofs are adapted from the formalization of [EVR26, Note 23] in the paper project RemyDegenne/evalues_research (fileEValuesResearch/..., commit...).' Also add an [EVR26] entry to References.LMLExplore/EValues/Numeraire/Sequential.lean— The main theorems (isEProcess_numeraires_pair_iff, exists_prod_eq_numeraires_pair_iff, lintegral_numeraires_bernoulli_stop_eq, not_isEProcess_numeraires_bernoulli, isEProcess_half_numeraires_bernoulli) cite only [RGVS23, §8.2.4], as if this file originated the answers. Fix: Have each of these theorem docstrings cite [EVR26, Note 23] as the source of the result, keeping [RGVS23, §8.2.4] for the question.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 29s · 234.5k in (178.6k cache read, 55.9k cache write) / 2.4k out tokens · reviewing this diff · rubric ·
There was a problem hiding this comment.
🟡 api-design — request_changes claude/claude-opus-5-5
The five public theorems are well scoped, but general facts about infinite products, Filtration.piLE and numeraire uniqueness are hidden as private in a file about one specific counterexample, instead of being public in their natural homes.
LMLExplore/EValues/Numeraire/Sequential.lean:96—measurePreserving_finis private but is a pure Mathlib-type fact: the firstncoordinates ofinfinitePihave the lawMeasure.pi.LMLExplore/Probability/ProductMeasure.lean:54-56already proves the same map identity inline (h_pi). Fix: Move it, as a publicMeasureTheory.Measurelemma, toLMLExplore/Probability/ProductMeasure.lean, and use it ininfinitePi_fin_mem_and_forall_add_memin place of the inlineh_pi.LMLExplore/EValues/Numeraire/Sequential.lean:119—indep_piLE_comap_eval_succandsetLIntegral_comp_eval_succ(line 132) are private. They are general facts about i.i.d. sequences andFiltration.piLE, unrelated to numeraires, and the PR says open feat: admissible e-processes, and the admissibility of the sub-Gaussian exponential e-process for nonatomic i.i.d. laws #434 holds identical private copies. Duplicating hidden infrastructure across PRs is the under-exposure this rubric flags. Fix: Make both public in a shared probability file, e.g.LMLExplore/Probability/ProductMeasure.lean, so that feat: admissible e-processes, and the admissibility of the sub-Gaussian exponential e-process for nonatomic i.i.d. laws #434 and later Layer 6 items reuse them.LMLExplore/EValues/Numeraire/Sequential.lean:105—measurable_piLE_fin,adapted_comp_fin(line 112) andisStoppingTime_comp_fin(line 522) are private. They are general facts about measurability, adaptedness and stopping times forFiltration.piLEover initial segments, independent of this file's subject. Fix: Expose them publicly next to the otherpiLElemmas, in the same shared file as the independence lemmas above.LMLExplore/EValues/Numeraire/Sequential.lean:192—eq_of_isNumeraireis private. It is a reusable part of the numeraire API: on a countable space whereQcharges every point, two numeraires are equal. It is general to any nullSand does not depend on the sequential subject. Fix: Make it public asIsNumeraire.eq_of_countable(or similar) inLMLExplore/EValues/Numeraire.lean, next to the existing numeraire API.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 42s · 315.8k in (298.8k cache read, 17k cache write) / 3.8k out tokens · reviewing this diff · rubric ·
There was a problem hiding this comment.
🟡 placement — request_changes claude/claude-opus-5-5
File location and imports are fine, but three generic i.i.d. lemmas are kept private in the e-values file instead of in the existing product-measure file.
LMLExplore/EValues/Numeraire/Sequential.lean:96—measurePreserving_fin,indep_piLE_comap_eval_succ(l.119) andsetLIntegral_comp_eval_succ(l.133) are generic facts about i.i.d.Measure.infinitePisequences andFiltration.piLE, but they sit as private lemmas in an e-values numeraire file. The PR description says open feat: admissible e-processes, and the admissibility of the sub-Gaussian exponential e-process for nonatomic i.i.d. laws #434 keeps private copies of the same piLE lemmas. Fix: Move all three as public lemmas intoLMLExplore/Probability/ProductMeasure.lean(namespaceMeasureTheory.Measure/ProbabilityTheory), adding the needed imports there, and import that module here.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 35s · 296.6k in (284.6k cache read, 12k cache write) / 3.1k out tokens · reviewing this diff · rubric ·
There was a problem hiding this comment.
🟡 documentation — request_changes claude/claude-opus-5-5
The module docstring is accurate and its counterexample values check out (1, 25/34, 25/16, mean 367/340). Two public theorem docstrings describe the proof, and a third makes a claim the theorem statement does not deliver.
LMLExplore/EValues/Numeraire/Sequential.lean:838— The docstring ofisEProcess_numeraires_pair_iffends by describing the proof ('When both expectations exceed1, the proof finds the failure at a stopping time…'), not the result. Fix: Delete that sentence; the module's Implementation notes already contain it.LMLExplore/EValues/Numeraire/Sequential.lean:1129— The docstring ofisEProcess_half_numeraires_bernoulliends with a proof sketch ('half the likelihood ratio against the equal mixture … is at most the likelihood ratio against each of them, a test supermartingale under that law'). Fix: End the docstring at 'whatever numerairesX nare chosen.'LMLExplore/EValues/Numeraire/Sequential.lean:870— The docstring ofexists_prod_eq_numeraires_pair_iffsays the likelihood ratio ofQ₁againstP₁orP₂is the functione, but the statement only gives∃ e; that choice is proved only in the privateisEVar_div_and_eq_prod_of_le. Fix: Remove the last sentence, or put the explicite = fun y ↦ Q₁ {y} / P₁ {y}(resp.P₂) into the public statement.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 45s · 234.6k in (226.2k cache read, 8.4k cache write) / 4.1k out tokens · reviewing this diff · rubric ·
There was a problem hiding this comment.
🟡 proof-quality — request_changes claude/claude-opus-5-5
The proofs rest on uncommented change, show … from rfl and closing rfl steps that depend on definitional unfolding, and not_isEProcess_of_one_lt is a ~175-line proof hiding reusable sub-facts. Repeated side lemmas and a long rw chain in the Bernoulli computation also make the file fragile.
LMLExplore/EValues/Numeraire/Sequential.lean:1086—change X 0 (fun i ↦ ω i) = _(andchange X 1 …at line 1089) is uncommented and relies onif false then 1 else 0reducing by defeq aftercases hω : ω 0. Fix: Rewrite the index instead, e.g.rw [hω, if_neg Bool.false_ne_true]/rw [hω, if_pos rfl], orsimp only [hω, Bool.false_eq_true, if_false].LMLExplore/EValues/Numeraire/Sequential.lean:529— Uncommentedchange MeasurableSet[Filtration.piLE i] {ω | …}unfolds theIsStoppingTimegoal through defeq. Fix: Use the set-builder unfolding lemma for stopping times orshowit with a comment explaining why no rewrite works; or prove the emptiness bysimpon the original goal.LMLExplore/EValues/Numeraire/Sequential.lean:250—rw [show (fun x ↦ piMass μ x) = fun x ↦ ∏ i, μ.real {x i} from rfl, …]unfolds the private def by defeq. Closingrfls at line 186 (aftermul_comminisEProcess_of_eq_prod) and line 292 (piMass_snoc) also close goals only up to unfolding. Fix: Add@[simp] private lemma piMass_def(or usesimp only [piMass]/unfold piMass), and finish lines 186/292 with an explicit rewrite.LMLExplore/EValues/Numeraire/Sequential.lean:701—not_isEProcess_of_one_ltruns from line 701 to about 876 (~175 lines). It has two self-contained sub-facts inlined: the existence ofy₁ y₂withr y₁ < r y₂(otherwiseE_Q[p₂/p₁] = 1, lines 712–733) and the geometric-ratio samplesx jwith injectives(hratio,hinj, lines 799–840). Fix: Extractexists_ratio_lt_of_one_ltand a lemma giving the samplesx jwithpiMass P₂ / piMass P₁ = r₂^(k+1) (r₁/r₂)^jand injectivity, so that the main proof only chains the e-process steps.LMLExplore/EValues/Numeraire/Sequential.lean:312— The fact that every member of{P₁, P₂}is a probability measure is re-proved by the same 3-line block four times (lines 312, 429, 905, 935). Positivity of the mixturew·piMass P₁ + (1-w)·piMass P₂is also re-derived inexists_weight_interior,not_isEProcess_of_one_lt(hmix) andmul_ofReal_div_mix_le. Fix: Add private lemmasisProbabilityMeasure_of_mem_pairandmix_pos (hw0 : 0 ≤ w) (hw1 : w ≤ 1) …and use them at each site.LMLExplore/EValues/Numeraire/Sequential.lean:1094— The final computation of367/340is one long brittlerwchain (measurePreserving_fin,lintegral_fintype,pi_singleton_eq_ofReal_piMass,ENNReal.ofReal_sum_of_nonneg,finTwoArrowEquiv,Fintype.sum_prod_type, threeFintype.sum_bool), followed bysimp only [… Matrix.cons_val_zero, Matrix.cons_val_one …]. It will break on Mathlib renames. Fix: Factor the step∫⁻ f(first two coords) ∂P^ℕ = ∑ b₀ b₁, f ![b₀,b₁] * P{b₀} * P{b₁}into a lemma, then close the numeric goal withsimp [Fin.prod_univ_two, Fintype.sum_bool, hP₁]; norm_num.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5-5 · 37s · 115k in (106.4k cache read, 8.6k cache write) / 3.8k out tokens · reviewing this diff · rubric ·
AI review — changes requestedEach 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 |
This pull request answers the question of [RGVS23, §8.2.4] on whether the numeraires of the
n-sample nulls, as a process, form an e-process for the i.i.d. null. In general they do not. For the null{Ber(1/5), Ber(4/5)}and the alternativeBer(1/2), a stopping time with values in{0, 1}gives them the mean367 / 340under the i.i.d. law ofBer(1/5), and half of the process is an e-process. For a null{P₁, P₂}on a finite space, withQ₁,P₁andP₂charging every point, they form an e-process exactly whenE_{Q₁}[p₂ / p₁] ≤ 1orE_{Q₁}[p₁ / p₂] ≤ 1, which is also exactly when they are products. It adds one new file,LMLExplore/EValues/Numeraire/Sequential.lean(1176 lines), and changes no existing file.Main declarations
All statements are in
ProbabilityTheory. They take any familyX : (n : ℕ) → (Fin (n + 1) → α) → ℝ≥0∞withIsNumeraire (X n) ((fun P ↦ Measure.pi fun _ : Fin (n + 1) ↦ P) '' S₁) (Measure.pi fun _ ↦ Q₁)for everyn:X nis a numeraire (Statlib's) ofn + 1observations. The process isfun n ω ↦ X n fun i ↦ ω ionℕ → α, withFiltration.piLE, so its timenhas seenn + 1observations. The null of the e-process is(fun P ↦ Measure.infinitePi fun _ : ℕ ↦ P) '' S₁.lintegral_numeraires_bernoulli_stop_eq: forS₁ = {Ber(true, false, 1/5), Ber(true, false, 4/5)}andQ₁ = Ber(true, false, 1/2)onBool,fun ω ↦ if ω 0 then 1 else 0is a stopping time forFiltration.piLE, and∫⁻ ω, X (if ω 0 then 1 else 0) (fun i ↦ ω i) ∂(Ber(1/5))^ℕ = 367 / 340.not_isEProcess_numeraires_bernoulli: in the same setting,¬ IsEProcess (fun n ω ↦ X n fun i ↦ ω i) ….isEProcess_half_numeraires_bernoulli: in the same setting,IsEProcess (fun n ω ↦ 2⁻¹ * X n fun i ↦ ω i) ….isEProcess_numeraires_pair_iff: for[MeasurableSingletonClass α] [Finite α], probability measuresQ₁,P₁,P₂charging every point (∀ x, Q₁ {x} ≠ 0, …) andS₁ = {P₁, P₂}, the process is an e-process iff∫⁻ x, P₂ {x} / P₁ {x} ∂Q₁ ≤ 1 ∨ ∫⁻ x, P₁ {x} / P₂ {x} ∂Q₁ ≤ 1.exists_prod_eq_numeraires_pair_iff: under the same hypotheses,(∃ e : α → ℝ≥0∞, ∀ n x, X n x = ∏ i, e (x i))iff the same condition.Roadmap coverage (EValues, Layer 6, item 1)
Covered: the whole bullet "The numeraires of the
n-sample nulls, as a process, are not an e-process in general, a question of [RGVS23, §8.2.4]…". That is the counterexample with its stopping time and the mean367/340, half of the process being an e-process, and the criterion for two-point nulls on a finite space together with "that is, when they are products".Left for other pull requests: the other bullets of item 1. This pull request does not touch them.
Notes for reviewers
Q₁ ^ (n + 1)-almost surely. Without full support, whether the process is an e-process can depend on the version. The statements therefore take every family of numeraires rather than a fixed one. Statlib's chosen versionnumeraireis one such family (isNumeraire_numeraire). Under the hypotheses,Q₁ ^ (n + 1)charges every point, so all versions agree everywhere (privateeq_of_isNumeraire, fromIsNumeraire.ae_unique). The numeraire of0observations is not part of the process.Q₁ ^ nagainst a mixturew P₁ ^ n + (1 - w) P₂ ^ nwith expectation at most1under both null products is the numeraire. This is checked through Statlib'sisNumeraire_iff: the expectation underQ₁ ^ nofYdivided by this ratio is the expectation ofYunder the mixture. IfE_{Q₁}[p₂/p₁] ≤ 1, the weightw = 1works for everyn. The numeraires are then products of copies of the e-variablex ↦ Q₁ {x} / P₁ {x}, which form a test supermartingale (isTestSupermartingale_mul_prod) and hence an e-process (IsTestSupermartingale.isEProcess). If both expectations exceed1, the intermediate value theorem gives an interior weight with both expectations equal to1. Letk + 2be the number of points of the space. The e-process property at the stopping times that stop at timekon one sample ofk + 1observations, and at timek + 1otherwise, forces the mixtures ofk + 1andk + 2observations to agree on the firstk + 1observations. It then forces the rational functions ↦ ∑ y, (p₁ y - p₂ y) q y / (p₁ y + s p₂ y)to vanish atk + 2distinct points. Its numerator has degree at mostk + 1, so it vanishes at0, which contradictsE_{Q₁}[p₂/p₁] > 1. For the products criterion: if the numeraires are products of copies ofe, theneis an e-variable (the numeraire of one observation), so the process is an e-process and the criterion applies.Ber(1/2) ^ nand exchanges the two null products. The likelihood ratio against their equal mixture therefore has expectation1under both, and it is the numeraire by the lemma above. Half of it is at most the likelihood ratio against each null product, which is a test supermartingale for that law.isEProcess_iff_forall_singletonandIsEProcess.monothen give the e-process.367/340, the half e-process and the two-point criterion have no published source. The roadmap cites them[EVR26, Note 23]. The proofs here are rewritten from the Lean proofs of the paper project.isEProcess_of_eq_prod), a direct application ofisTestSupermartingale_mul_prod. It is not restated publicly, since it is the i.i.d. case of the sequential numeraires of Layer 4.5. I looked atLMLExplore/EValues/Numeraire.lean: going through the effective null (isNumeraire_of_ae_eq_rnDeriv) to identify the numeraire of the two-point null is not shorter than the direct check through Statlib'sisNumeraire_iff, so that file is not imported. This pull request does not touch it either, so it does not interact with the open feat: identifying numeraires through the effective null #410.LMLExplore/EValues/SubGaussian/AdmissibleEProcess.lean) has the same two private lemmas as here,indep_piLE_comap_eval_succandsetLIntegral_comp_eval_succ(the coordinaten + 1of an i.i.d. sequence is independent ofFiltration.piLE n). The open feat: e-processes for an i.i.d. null grow at most at the bipolar rate in expectation [RR26, Lemma 3.3] #413 adds the publicinitSegandmeasurePreserving_initSeg. Here the same fact is the privatemeasurePreserving_fin, forfun ω (i : Fin n) ↦ ω i. This pull request cannot depend on either one, so it keeps private copies. Whichever lands second can replace them. No public name is shared with an open pull request.Ber(p)is Mathlib'sBer(true, false, p), with masspattrueandpinunitIntervalwritten⟨1 / 5, by norm_num⟩. The observation0isfalse.Filtration.piLE, "stops after one observation" is time0.∫⁻ x, P₂ {x} / P₁ {x} ∂Q₁.exists_prod_eq_numeraires_pair_iff, about products of copies of one functione : α → ℝ≥0∞.numeraire.Q₁,P₁,P₂probability measures charging every point.LMLExplore/EValues/Numeraire/, next toLMLExplore/EValues/Numeraire.lean. It fits the 1500-line limit, so the Bernoulli example is not split into a second module. The helpers (masses of products, mixtures, the interior weight, the two-valued stopping times, the polynomial argument) are private.Roadmap: EValues
Paper: RemyDegenne/evalues_research
Item: R26
🤖 Generated with Claude Code
https://claude.ai/code/session_0196ftMVbgjSJzPQEwdek3kM