Repository navigation
feat: the maximal expected logarithm of n-sample e-variables, its superadditivity and the bipolar rate - #403
Conversation
…eradditivity and the bipolar 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.
🟡 api-design — request_changes claude/claude-opus-5-5
The characteristic API of maxLogGrowth/bipolarRate is complete with hidden bodies and (rfl) def lemmas, but a general maxUtility lemma is in the wrong file, general superadditivity steps are hidden as private, and one name does not follow the naming convention.
LMLExplore/EValues/BipolarRate.lean:90—maxUtility_zero_measureis a general fact about Statlib'smaxUtility(anyΩ,T,U) with no dependence on i.i.d. nulls or the bipolar rate, placed in the bipolar-rate file. Fix: Move it to a generalmaxUtilitycompanion module underLMLExplore/EValues/thatBipolarRate.leanimports, keeping it public and@[simp].LMLExplore/Analysis/Subadditive.lean:59—eq_top_of_superadditiveis general infrastructure for superadditiveℕ → ERealsequences, but it isprivate. The same applies to the iterate(q + 1) • u m ≤ u ((q + 1) * m), now a localhave h_mulinside the privatensmul_add_nsmul_le_of_superadditive(line 41). Fix: MakeEReal.eq_top_of_superadditivepublic. Extracth_mulas a publicEReal.nsmul_le_of_superadditive(and exposensmul_add_nsmul_le_of_superadditiveif it stays separate). Keep onlyReal.fekete_boundprivate.LMLExplore/EValues/BipolarRate.lean:105—div_le_bipolarRatedrops the subject of its statementmaxLogGrowth Q₁ S₁ n / n ≤ bipolarRate Q₁ S₁, so it reads like a generic division lemma. Fix: Rename it tomaxLogGrowth_div_le_bipolarRateand update its uses inbipolarRate_le_iffandbipolarRate_nonneg.
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 · 40s · 119.7k in (87.3k cache read, 32.4k cache write) / 3.7k out tokens · reviewing this diff · rubric ·
There was a problem hiding this comment.
🟡 proof-quality — request_changes claude/claude-opus-5-5
The proofs work, but the Fekete proof is about 60 lines with reusable facts buried inside it, and several steps move coercions by hand with brittle rewrite chains.
LMLExplore/Analysis/Subadditive.lean:67—h_top(a⊤value atj ≠ 0carries forward to everyn ≥ j) and the closing real inequalityn r / m - C ≤ (q + 1) r + s a(lines 112–121) are separate facts buried in a 60-line proof. Fix: Makeh_topa private lemma (eq_top_of_superadditive). Make the arithmetic bound a private real lemma stated in terms ofq,s,m,r,a. The main proof then keeps only the filter argument.LMLExplore/Analysis/Subadditive.lean:110— Coercions are moved by hand:rw [hn_eq, hr, ha, ← EReal.coe_nsmul, ← EReal.coe_nsmul, ← EReal.coe_add] at key. Lines 92 and 104 do the same withrw [hr, ← EReal.coe_natCast, ← EReal.coe_div, EReal.coe_lt_coe_iff]andrw [le_div_iff_mul_le …, ← EReal.coe_natCast, ← EReal.coe_mul]. These chains break when Mathlib renames lemmas. Fix: After substitutinghr/ha, usenorm_cast/push_cast(orexact_mod_cast) to move betweenERealandℝ.LMLExplore/EValues/BipolarRate.lean:94—maxLogGrowth_onedefinesh0 : maxUtility 0 T logUtility = 0as a localhave. That is a general fact aboutmaxUtility, not something specific to this proof. Fix: Extract it as a standalone@[simp] lemma maxUtility_zero_measureand use it in the empty-space branch.LMLExplore/EValues/BipolarRate.lean:186—maxLogGrowth_le_mul_klDivcloses its goal with a five-step rewrite chainrw [maxUtility_singleton_eq_klDiv, klDiv_pi_const, Fintype.card_fin, EReal.coe_ennreal_mul, ENNReal.toEReal_natCast], which is brittle. Fix: Userw [maxUtility_singleton_eq_klDiv, klDiv_pi_const]followed bysimp/push_cast.Fintype.card_finand theENNReal→ERealcast lemmas are simp/norm_cast lemmas.
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 · 25s · 47.3k in (41.8k cache read, 5.4k cache write) / 2.5k out tokens · reviewing this diff · rubric ·
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 |
Hide the bodies of maxLogGrowth and bipolarRate behind _def lemmas, add div_le_bipolarRate and bipolarRate_le_iff, mark maxLogGrowth_one simp, extract maxUtility_zero_measure, and split the Fekete proof into private lemmas for the propagation of ⊤ and the real arithmetic bound. Co-Authored-By: Claude Code <noreply@github.com>
…e, rename the bipolar-rate bound Move `maxUtility_zero_measure` to the companion module `LMLExplore/EValues/DPI.lean` of Statlib's `Statlib.EValues.DPI`; make `EReal.eq_top_of_superadditive` and `EReal.nsmul_add_nsmul_le_of_superadditive` public, extracting the public `EReal.nsmul_le_of_superadditive`; rename `div_le_bipolarRate` to `maxLogGrowth_div_le_bipolarRate`. Co-Authored-By: Claude Code <noreply@github.com>
a890e2a
This pull request adds the quantity
a nof EValues Layer 6 and its rated, with the parts of item 6.1 that need no e-processes.a nis the maximal expected logarithm, underQ₁ ^ n, of an e-variable for then-fold products of the members of the nullS₁. Its name,maxLogGrowth, is the oneSuggested.leanuses. The ratedis namedbipolarRate, the term Ram and Ramdas use [RR26, Section 4]. It is defined as the supremum ofa n / novern ≥ 1, and the pull request proves thata n / nconverges to it.No dependency has Fekete's lemma for values in
ERealorℝ≥0∞: Mathlib'sSubadditive.tendsto_limtakes real sequences withu n / nbounded below. The pull request therefore addsEReal.tendsto_div_iSup_of_superadditiveinLMLExplore/Analysis/Subadditive.lean, the directory of Mathlib's version. It holds for every superadditive sequence of extended reals that takes the value⊥at non ≠ 0, with no bound, and the limit may be⊤.Main declarations
LMLExplore/EValues/BipolarRate.lean, namespaceProbabilityTheory:maxLogGrowth Q₁ S₁ n:maxUtility (Measure.pi fun _ : Fin n ↦ Q₁) ((fun P ↦ Measure.pi fun _ ↦ P) '' S₁) logUtility.bipolarRate Q₁ S₁:⨆ n, maxLogGrowth Q₁ S₁ (n + 1) / (n + 1).maxLogGrowth_add_le: superadditivity [RR26, Lemma 3.2]. The proof splitsFin (m + n)intoFin m ⊕ Fin nand applies Statlib'smaxUtility_prod_eq_add(which rests onIsEVar.prod),maxUtility_map_leandmaxUtility_anti.tendsto_maxLogGrowth_div_bipolarRate:a n / n → d[RR26, Lemma 3.2].maxLogGrowth_le_mul_bipolarRate:a n ≤ n * dforn ≠ 0.maxLogGrowth_nonneg,bipolarRate_nonneg.maxLogGrowth_anti,bipolarRate_anti(@[gcongr]): both are antitone in the null.maxLogGrowth_one:a 1 = maxUtility Q₁ S₁ logUtility, on any measurable space, including an empty one.maxLogGrowth_le_mul_klDiv,bipolarRate_le_klDiv:a n ≤ n * klDiv Q₁ Pandd ≤ klDiv Q₁ Pfor eachP ∈ S₁. These need no hypothesis on the other members of the null.bipolarRate_le_iInf_klDiv:d ≤ ⨅ P ∈ S₁, klDiv Q₁ P, withKL_infvalued inℝ≥0∞as the roadmap specifies [RR26, proof of Theorem 4.1].LMLExplore/Analysis/Subadditive.lean:EReal.tendsto_div_iSup_of_superadditive: Fekete's lemma for superadditive sequences of extended reals.Hypotheses
Q₁is a probability measure.S₁are finite measures (IsFiniteMeasure, as in Statlib'smaxUtility_prod_eq_add). They do not need to be probability measures.KL_inftakes probability measures.Roadmap item 6.1: covered
a, from Statlib'sIsEVar.prod[RR26, Lemma 3.2], so thata n / nconverges to its supremumd.d ≤ KL_inf(Q₁, S₁).Roadmap item 6.1: left for later pull requests
limsup (1/n) ∫ᵉ log W n ≤ dfor every e-process and every blockwise e-process [RR26, Lemma 3.3].d[RR26, Theorem 3.5].d = KL_infunder weak lower semicontinuity, the almost sure growth of block test supermartingales, Propositions 4.5, 5.4 and 7.1.Checks run locally
lake build LMLExplore.Analysis.Subadditive,lake build LMLExplore.EValues.BipolarRate, and then the fulllake build: no warnings.#lint in LMLExplore) on the new modules, docBlame included: no findings.lake exe axioms: duplicate and axiom audit, no duplicates, only the three standard axioms.lake exe module-system.tauceti-tools script:check_source_options.py,check-imports.py,lint-dot-notation.pyandlint-style.sh(headers and text linters).Nothing is removed or renamed.
Roadmap: EValues
Paper: RemyDegenne/evalues_research
Item: R7
🤖 Generated with Claude Code
https://claude.ai/code/session_0196ftMVbgjSJzPQEwdek3kM