Repository navigation
feat: the self-bounding inequality [MDJKLV21, Lemma 13] with the corrected constant - #287
Conversation
…ected constant Solve `τ ≤ C √(τ (A L + B L²)) + D (A L + E L²)`, `L = log (α τ)`, for `τ`: `Real.le_of_le_sqrt_mul_add` (constant `C₁ = (8/5) log (11 α² (A + E) (C + √D)²)`) and `Real.le_of_le_sqrt_mul_add'` (`(C + D)²`, for `D ≥ 1`), with the root of a quadratic inequality `Real.le_add_sqrt_of_sq_le` and the logarithm bounds `Real.log_le_rpow_div_exp_one_mul`, `Real.log_le_of_le_mul_sq_log`. Co-Authored-By: Claude Code <noreply@github.com>
There was a problem hiding this comment.
🟡 attribution — request_changes claude/claude-opus-5-5
The informal sources [MDJKLV21, Lemma 13] and [EV26, Lemma 29] are credited, but the formalization this PR ports (RemyDegenne/Essakine2026Tight, item R24) is named only in the PR description and in none of the changed files.
LMLExplore/Analysis/SpecialFunctions/Log/SelfBounding.lean:40— The file is a port of Essakine2026Tight/ForLMLExplore/Analysis/SpecialFunctions/Log/SelfBounding.lean (per the PR description), but the module docstring credits only the papers, not this prior formalization. Fix: Add to the docstring: 'The statements and proofs are adapted from the formalization in the paper projectRemyDegenne/Essakine2026Tight(fileForLMLExplore/Analysis/SpecialFunctions/Log/SelfBounding.lean, by Rémy Degenne, Apache 2.0)', with a brief note on the generalisations.LMLExplore/Analysis/SpecialFunctions/Log/Basic.lean:176—Real.log_le_of_le_mul_sq_logandReal.log_le_rpow_div_exp_one_mul(line 162) are ported from the source'sAnalysis/SpecialFunctions/Pow/Real.lean, following its proof plan (exponent 3/16, constant 8/5), but they carry no credit. Fix: CreditRemyDegenne/Essakine2026Tight(ForLMLExplore/Analysis/SpecialFunctions/Pow/Real.lean) in these declarations' docstrings or in 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 · 28s · 77.7k in (52.5k cache read, 25.2k cache write) / 2.5k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 generality — request_changes claude/claude-opus-5-5
Two hypotheses are stronger than their proofs need: 0 < M in Real.log_le_of_le_mul_sq_log follows from the other hypotheses, and 1 < τ in Real.log_le_of_le_sqrt_mul_add can be weakened to 1 ≤ τ. The rest is at the natural level, with the special cases derived from the general lemmas.
LMLExplore/Analysis/SpecialFunctions/Log/Basic.lean:177—hM : 0 < Mis redundant: from1 ≤ y,0 ≤ log yandy ≤ M * log y ^ 2, the caseM ≤ 0would givey ≤ 0, which contradicts1 ≤ y. Fix: DrophMand derive0 < Minside the proof, as in(hy : 1 ≤ y) (h : y ≤ M * log y ^ 2). Then remove thehK0proof thatlog_le_of_le_sqrt_mul_add(SelfBounding.lean:109–111) needs only to supply this argument.LMLExplore/Analysis/SpecialFunctions/Log/SelfBounding.lean:101—hτ : 1 < τis stronger than needed. The proof uses onlyhτ.le(forexp 1 ≤ α * τ) and0 < τ, and both follow from1 ≤ τ. Fix: Change the hypothesis to(hτ : 1 ≤ τ)and passh1.leat the call site on line 140.
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 · 32s · 49.5k in (41.8k cache read, 7.7k cache write) / 3.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 declaration docstrings are accurate, and the counterexample to the printed constant holds when recomputed; one docstring overclaims by calling a bound "sharp" when nothing establishes that.
LMLExplore/Analysis/SpecialFunctions/Log/SelfBounding.lean:120— The docstring ofReal.le_mul_sq_log_add_one_of_le_sqrt_mul_addcalls it "The self-bounding inequality, sharp form". Nothing shows the boundK ((8/5) log M)² + 1is tight; it is only the general form, withMfree, that the two main theorems specialise. Fix: Replace "sharp form" with "general form" (or "for anyM ≥ 4 α K").
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 · 24s · 73.8k in (68k cache read, 5.8k cache write) / 2.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 are readable and robust, but SelfBounding.lean writes out the same block twice: deriving 1 ≤ log(α τ), getting τ ≤ K L² and proving 0 < K.
LMLExplore/Analysis/SpecialFunctions/Log/SelfBounding.lean:130—le_mul_sq_log_add_one_of_le_sqrt_mul_addrepeats the steps oflog_le_of_le_sqrt_mul_add(lines 104-111): the1 ≤ log (α τ)derivation viale_log_iff_exp_le (mul_pos hα0 …), the call tole_mul_sq_of_le_sqrt_mul_add, and theby_contra! hK; nlinarithproof of0 < K. The 'inlined one-liner' is used twice, so it is not a one-off. Fix: Restore a public helper giving1 ≤ log (α * τ)fromexp 1 ≤ αand1 < τ, and factorτ ≤ K L² ∧ 0 < K(for τ > 1) into one lemma used by both theorems.
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 · 49.2k in (42.1k cache read, 7.1k cache write) / 3.2k 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 |
Credit the Essakine2026Tight formalization in the changed files, drop the redundant hypothesis 0 < M of Real.log_le_of_le_mul_sq_log, weaken 1 < τ to 1 ≤ τ in Real.log_le_of_le_sqrt_mul_add, factor the shared 1 ≤ log (α τ) step into a private helper, and say "general form" instead of "sharp form". Co-Authored-By: Claude Code <noreply@github.com>
This PR adds the self-bounding inequality of Ménard et al. [MDJKLV21, Lemma 13], the inversion of the implicit inequality on the stopping time τ: if
τ ≤ C √(τ (A L + B L²)) + D (A L + E L²)withL = log (α τ),α ≥ e,A, B, C, D ≥ 0andB ≤ E, thenτ ≤ C² (A + B) C₁² + (D + 2 √D C) (A + E) C₁² + 1withC₁ = (8/5) log (11 α² (A + E) (C + √D)²)(Real.le_of_le_sqrt_mul_add), or with(C + D)²in place of(C + √D)²whenD ≥ 1(Real.le_of_le_sqrt_mul_add').Roadmap: ReinforcementLearning
The target is ReinforcementLearning Layer 19.2 (RF-Express [MDJKLV21, Theorem 1]), the tool "the inversion of the implicit inequality on τ [MDJKLV21, Lemma 13]". The sample-complexity bound of that milestone,
τ ≤ (H³SA/ε²)(log(3SAH/δ) + S) C₁ + 1, is obtained by applying this lemma to the inequality on τ that the counting argument produces. After this PR, Layer 19.2 still needs its other tools (counts versus pseudo-counts, the KL-to-Bernstein transport, the variance transfers [MDJKLV21, Lemmas 10–12] and∑_t u_{t+1}/max(1, U_t) ≤ 4 log(U_{T+1} + 1)[MDJKLV21, Lemma 9]), then the algorithm and its PAC and sample-complexity theorem.The constant printed in [MDJKLV21, Lemma 13] and [EV26, Lemma 29],
C₁ = (8/5) log (11 α² (A + E) (C + D)), is too small. A counterexample, recorded in the module docstring and checked numerically:α = e,B = E = 1,C = 1000,A = D = 10⁻⁶,τ = 4·10⁸satisfy the hypothesis, while the printed bound gives about3.27·10⁸. Squaring the factorC + Dfixes it. The paper's assumptionsA, B, C, D > 0andB ≥ 1are dropped, and so isτ ≥ 0.New declarations:
LMLExplore/Analysis/SpecialFunctions/Log/SelfBounding.lean(new file):Real.le_mul_sq_of_le_sqrt_mul_add(the quadratic part, for anyL ≥ 1and not onlylog (α τ):τ ≤ K L²withK = C² (A + B) + (D + 2 √D C) (A + E)),Real.log_le_of_le_sqrt_mul_add(log (α τ) ≤ (8/5) log (4 α K)forτ ≥ 1),Real.le_mul_sq_log_add_one_of_le_sqrt_mul_add(τ ≤ K ((8/5) log M)² + 1for everyM ≥ 4 α K),Real.le_of_le_sqrt_mul_addandReal.le_of_le_sqrt_mul_add'. The bound4 α K ≤ 11 α² (A + E) (C + √D)²is a private helper of these last two, and1 ≤ log (α τ)forα ≥ e,τ ≥ 1is a private helper of the second and third.LMLExplore/Analysis/Real/Sqrt.lean:Real.le_add_sqrt_of_sq_le, the root of a quadratic inequality (x² ≤ b x + cwithb, c ≥ 0givesx ≤ b + √c).LMLExplore/Analysis/SpecialFunctions/Log/Basic.lean, next toReal.log_div_rpow_le_exp_neg_one:Real.log_le_rpow_div_exp_one_mul(log y ≤ y^γ / (e γ)fory ≥ 0, which is Mathlib'sReal.log_le_rpow_divsharpened by the factore) andReal.log_le_of_le_mul_sq_log(1 ≤ y ≤ M log² ygiveslog y ≤ (8/5) log (4 M), with no assumption onM).No declaration is removed or renamed.
Source: this PR ports item R24 of the paper project RemyDegenne/Essakine2026Tight, at commit 73a8c16c42ec1c41f8d38c5d2af232f36c2cff15 (Apache-2.0), files
Essakine2026Tight/ForLMLExplore/Analysis/Real/Sqrt.lean,Analysis/SpecialFunctions/Pow/Real.leanandAnalysis/SpecialFunctions/Log/SelfBounding.lean. Changes from the source:L = log (α τ)to anyL ≥ 1.0 ≤ τis dropped from the final bounds, andy > 0is relaxed toy ≥ 0inlog_le_rpow_div_exp_one_mul.1 ≤ log (α τ)helper and the4 α Kbound are now private, and the hypothesisM > 0of the source'slog y ≤ (8/5) log (4 M)is dropped (it follows from the others).Log/Basic.leanrather than a newPow/Real.lean.Local checks (not CI):
lake build --iofailgreen; the local changed-module axiom check found 0 violations in 58 declarations; the local environment lint passed.Paper: RemyDegenne/Essakine2026Tight
Item: R24
🤖 Prepared with Claude Code