Repository navigation
feat: test martingales for a convex i.i.d. null have no power against its linear span - #431
RemyDegenne wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
🟡 attribution — request_changes claude/claude-opus-5-5
The main file credits [ZRW24, §7], [EVR26, Note 03], and the adapted formalization TestMartingaleConverse.lean at commit 6f05c5f. The polarization argument at the heart of Note 03, Theorem 1 now lives in generic files that carry no credit.
LMLExplore/MeasureTheory/Constructions/Pi.lean—lintegral_pi_eq_of_add_sum_eq_sumand its helpersum_prod_bif_mul_eq_of_one_ltare the central proof of [EVR26, Note 03, Theorem 1]: expand the product of copies of Q + t•B as a polynomial in t, check it for t ≥ 1, then use the identity theorem. The PR says this was rewritten from the paper project's Lean proof, but neither the module docstring nor the declaration docstrings name that source. Fix: Add a sentence to the module docstring's mixtures paragraph (or to the lemma docstring) saying the polarization argument is adapted from [EVR26, Note 03, Theorem 1] /EValuesResearch/Results/TestMartingaleConverse.lean(commit6f05c5f). Add a matching References entry.LMLExplore/Probability/ProductMeasure.lean:96— Same issue here:lintegral_infinitePi_eq_of_add_sum_eq_sum, the i.i.d. form of the same polarization step taken from the paper project, credits no source. Fix: Cite [EVR26, Note 03, Theorem 1] and the adapted formalization in the lemma docstring or the module docstring.
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 · 22s · 72.2k in (65.3k cache read, 7k cache write) / 2k out tokens · reviewing this diff · rubric ·
There was a problem hiding this comment.
🟡 documentation — request_changes claude/claude-opus-5-5
The module and theorem docstrings are accurate and describe the statements, not the process. But the file cites [ZRW24, §7] only for the conjecture and never cites [EVR26, Note 03], the only source of the result it formalizes.
LMLExplore/EValues/PowerOne/TestMartingale.lean:58— The## Referencessection lists only [ZRW24]. That paper only states the question, so the convexity theorem and the Bool counterexample have no source cited in the file. The roadmap credits both to [EVR26, Note 03], and the PR description says the proofs rewrite that project's Lean proofs. Fix: Add an [EVR26, Note 03] entry to## References. Cite it in the module docstring, where the result and the counterexample are stated, and in the docstrings ofisTestMartingale_infinitePi_of_add_sum_eq_sumandexists_isTestMartingale_dirac_tendsto_top.
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 · 92.9k in (84.2k cache read, 8.6k cache write) / 2.3k 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 |
… its linear span For a convex set `S₁` of measures and a probability measure `Q₁` with `Q₁ + ∑ i, b i • P i = ∑ i, c i • P i` for finitely many probability measures `P i ∈ S₁`, a test martingale for the i.i.d. laws of `S₁` whose initial value has expectation `1` under the null, for a filtration each of whose σ-algebras depends on finitely many observations, is a test martingale under the i.i.d. law of `Q₁`, so its `limsup` is almost surely finite there. For the null of the two point masses on `Bool`, some test martingale tends to `∞` almost surely under i.i.d. fair coin flips, so convexity is needed (EValues roadmap, Layer 6.2, power one). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMVbgjSJzPQEwdek3kM
… Note 03] Move the generic product-of-mixtures lemmas to `MeasureTheory/Constructions/Pi.lean` (`Measure.pi_const_smul`, `Measure.pi_sum_smul`, `Measure.lintegral_pi_sum_smul`), the finite convex combinations over `ℝ≥0∞` to `Analysis/Convex/ENNReal.lean` (`Finset.sum_smul_eq_smul_sum_div_smul`, `Convex.sum_nnreal_smul_mem`) and `MeasureTheory.isProbabilityMeasure_sum_smul` to `MeasureTheory/Measure/ProbabilityMeasure/Convex.lean`, all public. Split the identity-theorem step of the polarization proof into its own lemma, and cite [EVR26, Note 03] and the adapted paper-project file. Co-Authored-By: Claude Code <noreply@github.com>
…mas by topic Make the polarization lemmas public as `MeasureTheory.Measure.lintegral_pi_eq_of_add_sum_eq_sum` (in `Constructions/Pi`) and `MeasureTheory.Measure.lintegral_infinitePi_eq_of_add_sum_eq_sum` (in `Probability/ProductMeasure`). Move `Finset.sum_smul_eq_smul_sum_div_smul` to `Algebra/BigOperators/Field` and `isProbabilityMeasure_sum_smul` to `MeasureTheory/Measure/Typeclasses/Probability`. Use `Preorder.frestrictLe_apply` instead of unfolding in the adaptedness of the counterexample. Co-Authored-By: Claude Code <noreply@github.com>
ba36365 to
bdb9bff
Compare
Co-Authored-By: Claude Code <noreply@github.com>
This pull request proves that for a convex i.i.d. null, a test martingale is still a test martingale under the i.i.d. law of every probability measure in the linear span of the null, so it has no power one against such an alternative. It also proves that convexity is needed: for the null of the two point masses on
Bool, some test martingale tends to∞almost surely under i.i.d. fair coin flips. It addsLMLExplore/EValues/PowerOne/TestMartingale.lean, and, as public prerequisites, the generic lemmas on products of mixtures and finite convex combinations that the proof uses (listed below).Main declarations
isTestMartingale_infinitePi_of_add_sum_eq_sum: letS₁ : Set (Measure 𝓧)be convex (Convex ℝ≥0∞ S₁),P : ι → Measure 𝓧finitely many probability measures inS₁,b c : ι → ℝ≥0, andQ₁a probability measure withQ₁ + ∑ i, b i • P i = ∑ i, c i • P i. Letℱbe a filtration onℕ → 𝓧with∀ n, ∃ N, ℱ n ≤ Filtration.piLE N. Then anMwithIsTestMartingale M ℱ ((fun P ↦ Measure.infinitePi fun _ ↦ P) '' S₁)and∫⁻ ω, M 0 ω ∂Measure.infinitePi (fun _ ↦ P) = 1for everyP ∈ S₁satisfiesIsTestMartingale M ℱ {Measure.infinitePi fun _ ↦ Q₁}.ae_limsup_lt_top_infinitePi_of_add_sum_eq_sum: under the same hypotheses,∀ᵐ ω ∂Measure.infinitePi (fun _ ↦ Q₁), limsup (fun n ↦ M n ω) atTop < ∞. SoMneither tends to∞nor has an infinitelimsupon a set of positive probability: it does not have power one againstQ₁.exists_isTestMartingale_dirac_tendsto_top: there isM : ℕ → (ℕ → Bool) → ℝ≥0∞withM 0 = 1, a test martingale forFiltration.piLEand the i.i.d. laws of{dirac false, dirac true}, that tends to∞almost surely under the i.i.d. law of2⁻¹ • (dirac false + dirac true). The fair coin is the midpoint of the null, so it lies in the span; the null is not convex.Supporting public lemmas
LMLExplore/MeasureTheory/Constructions/Pi.lean(existing file):MeasureTheory.Measure.pi_const_smul(Measure.pi (fun _ ↦ s • ν) = s ^ card ι • Measure.pi (fun _ ↦ ν)),MeasureTheory.Measure.pi_sum_smul(Measure.pi (fun _ ↦ ∑ k, w k • R k) = ∑ e, (∏ i, w (e i)) • Measure.pi (fun i ↦ R (e i))), its integral formMeasureTheory.Measure.lintegral_pi_sum_smul, and the polarization lemmaMeasureTheory.Measure.lintegral_pi_eq_of_add_sum_eq_sum(ifQ + ∑ b k • P k = ∑ c k • P k, equal integrals under the products of copies of every convex combination of theP kgive equal integrals under the product of copies ofQ), with its private identity-theorem helpersum_prod_bif_mul_eq_of_one_lt.LMLExplore/Probability/ProductMeasure.lean(existing file):MeasureTheory.Measure.lintegral_infinitePi_eq_of_add_sum_eq_sum, the same polarization for i.i.d. laws ofFiltration.piLE N-measurable functions.LMLExplore/Algebra/BigOperators/Field.lean(new):Finset.sum_smul_eq_smul_sum_div_smul(over any semifield).LMLExplore/Analysis/Convex/ENNReal.lean(new):Convex.sum_nnreal_smul_mem(a set convex overℝ≥0∞in anyℝ≥0∞-module contains its finite combinations withℝ≥0weights of sum1; Mathlib'sConvex.sum_memneeds a field acting on an additive group).LMLExplore/MeasureTheory/Measure/Typeclasses/Probability.lean(new):MeasureTheory.isProbabilityMeasure_sum_smul, the finite form of Tau Ceti'sisProbabilityMeasure_smul_add_smul.Roadmap coverage (EValues, Layer 6, item 2)
Covered: the bullet "Test martingales [ZRW24, §7]", that is, the statement for convex
S₁, its consequence "none has power one againstQ₁", and the counterexample showing that convexity is needed. Not covered: the other bullets of item 2 (the equivalences of [Ram26, Theorem 3.1], the expected stopping times of [Ram26, Corollary 3.2], [RR26, Theorem 3.14], the instance without power [BS56], and [RW, Proposition 3.12, Theorem 3.14]).The two theorems have no published source: [ZRW24, §7] states the question, and the roadmap cites the answer
[EVR26, Note 03]. The proofs here rewrite the Lean proofs of the paper project (EValuesResearch/Results/TestMartingaleConverse.lean, commit6f05c5f), credited in the file with the reference [EVR26, Note 03, Theorem 1 and Counterexample 1].Notes for reviewers
ℱ n-measurable set and the valuesM nandM (n + 1)are measurable for someFiltration.piLE N. So they factor through the firstN + 1observations (Mathlib'sMeasurable.exists_eq_measurable_comp), and their integrals underMeasure.infinitePiare integrals underMeasure.pioverFinset.Iic N(lintegral_restrict_infinitePi). The finite-dimensional step is a polarization argument in one variable. PutB = ∑ i, b i • P i. Expanding the product of copies ofQ₁ + t • Bshows that the integral of a function of the observations is a polynomial intwith coefficients inℝ≥0∞. Those coefficients are finite, as the caset = 1shows. Fort ≥ 1,Q₁ + t • B = ∑ i, (c i + (t - 1) * b i) • P iis a positive multiple of a convex combination of theP i, which lies in the null, so the martingale identities hold there. The real polynomials are analytic and agree on(1, ∞), so they agree att = 0(AnalyticOnNhd.eq_of_eventuallyEq). The two polarization lemmas are public (above); the identity-theorem step for the polynomials (sum_prod_bif_mul_eq_of_one_lt) and the counterexample process are private.Convex ℝ≥0∞ S₁. That is how convex sets of measures are stated in LMLExplore (convex_effectiveSet), Statlib (convex_isEVar) and Tau Ceti (the sets of exchangeable laws). Withℝ≥0∞scalars,a + b = 1makes both weights finite. Mathlib'sConvex.sum_memneeds a field and an additive group, so the file proves the finite convex combinations (Convex.sum_nnreal_smul_mem), by induction. The proof only uses the convex combinations of theP i. The statement withconvexHull ℝ≥0∞ (Set.range P) ⊆ S₁in place of the convexity ofS₁is the theorem applied to that convex hull, a one-line term (convex_convexHull,subset_convexHull,IsTestMartingale.anti_set; checked to compile), so it is not stated separately.1". The hypothesis here is weaker:∫⁻ M 0 = 1under the i.i.d. law of every member ofS₁, whichM 0 = 1implies. It enters the proof through one more polarization step, forM 0against the constant1. The counterexample hasM 0 = 1and satisfies every hypothesis of the theorem except convexity.∀ P ∈ S₁, IsProbabilityMeasure P. The theorems assume it only for theP i, which is all the proof uses.b c : ι → ℝ≥0, acting on measures throughℝ≥0. They must be finite: withb i = c i = ∞, the identityQ₁ + ∞ • P i = ∞ • P iholds for everyQ₁ ≪ P i.limsupunderQ₁, fromIsTestSupermartingale.ae_limsup_lt_top. This excludes both forms of power one in item 2, tending to∞and having an infinitelimsup.Bool, and the fair coin is2⁻¹ • (dirac false + dirac true).LMLExplore/EValues/PowerOne/, named after item 2 of Layer 6, for the other bullets of that item. The i.i.d. growth rates of item 1 are inLMLExplore/EValues/BipolarRate/.initSegand lemmas on functions of the firstnobservations. This pull request does not use them: it works with Mathlib'sFiltration.piLE_eq_comap_frestrictLe,Measurable.exists_eq_measurable_compandlintegral_restrict_infinitePi.Roadmap: EValues
Paper: RemyDegenne/evalues_research
Item: R17
🤖 Generated with Claude Code
https://claude.ai/code/session_0196ftMVbgjSJzPQEwdek3kM