Repository navigation
feat: conditional Bernoulli domination of [0, 1]-valued variables and GC11 Theorem 10 along a filtration - #394
Merged
lmlexplore-automation[bot] merged 2 commits intoNov 14, 2026
Conversation
… GC11 Theorem 10 along a filtration A variable with values in [0, 1] whose conditional mean is at most (at least) q has its conditional moment generating function bounded by that of Ber(q) on [0, ∞) (on (-∞, 0]) [GC11, Lemma 9]. Along a filtration this gives the self-normalized deviations in relative-entropy form and the time-uniform coverage of the KL-UCB confidence levels for selected rewards with bounded conditional means. Co-Authored-By: Claude Code <noreply@github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RemyDegenne
commented
Nov 14, 2026
RemyDegenne
commented
Nov 14, 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 |
…lli proofs Address the api-design and proof-quality review findings: - add `hasCondMGFBound_cgf_of_ae_mgfDominatedOn` (MGF/Bound): domination under almost every conditional law gives the conditional bound by the cgf, and derive both conditional Bernoulli dominations from it; - add `ae_trim_ae_condExpKernel` (Kernel/Condexp) and use Mathlib's `condExp_ae_eq_trim_integral_condExpKernel` for the mean identity, removing the private `ae_trim_ae_mem_Icc_and_condExp_eq`; - replace the private `nonneg_of_condExp_le` / `le_one_of_le_condExp` by the general public `le_of_ae_le_of_condExp_le` / `le_of_le_condExp_of_ae_le` (MeasureTheory/Function/ConditionalExpectation/Real); - replace the private `sum_mul_div_sum_mem_Icc` by Mathlib's `Convex.centerMass_mem`; - factor the shared tail of the two filtration theorems into one helper. Co-Authored-By: Claude Code <noreply@github.com>
Merged
via the queue into
LeanMachineLearning:main
with commit Nov 14, 2026
290c3cf
23 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 bounded instance of conditional MGF domination asked for in the Bandits roadmap, Layer 1.4 (Chernoff bounds in rate-function form): "a random variable with values in$[0,1]$ whose conditional mean given a σ-algebra is at most (at least) $m$ is conditionally dominated by $\mathcal B(m)$ on $[0,\infty)$ (on $(-\infty,0]$ ) [GC11, Lemma 9; LS, Note 10.3.1]". It then feeds the result into the existing filtration-level self-normalized deviations ($[0,1]$ -valued rewards with bounded conditional means and adapted selection indicators, without independence.
Probability/Martingale/RateFunction.lean). That gives [GC11, Theorem 10] forRoadmap: Bandits
The new file is
LMLExplore/Probability/Martingale/KLChernoff.lean(288 lines, namespaceLMLExplore). It is the conditional companion ofProbability/Moments/KLChernoff.lean, just asMartingale/RateFunction.leanis toMoments/RateFunction.lean.Main declarations:
hasCondMGFBound_Ici_cgf_bernoulliMeasure,hasCondMGFBound_Iic_cgf_bernoulliMeasure: for a measurableX ∈ [0, 1]a.s. withμ[X | m] ≤ q(resp.q ≤ μ[X | m]) a.s.,HasCondMGFBound m hm X (cgf id Ber((1 : ℝ), 0, q)) (Set.Ici 0) μ(resp.Set.Iic 0). The proof applies the existing unconditionalmgfDominatedOn_Ici_bernoulliMeasure/mgfDominatedOn_Iic_bernoulliMeasureto the conditional expectation kernel at almost every point.measure_exists_gt_and_le_mul_klBer_le_of_condExp_le,measure_exists_lt_and_le_mul_klBer_le_of_le_condExp: forX k ∈ [0, 1]that areℱ (k + 1)-measurable withE[X k | ℱ k] ≤ m(resp.≥ m), and adapted selection indicatorsw k ∈ {0, 1}:P(∃ t, 1 ≤ N t ≤ n, m < μ̂ t, x ≤ N t d(μ̂ t, m)) ≤ e ⌈x log n⌉ exp (-x), and the same belowm. These consume the two domination theorems throughmeasure_exists_gt_and_le_mul_rateFunction_le/measure_exists_lt_and_le_mul_rateFunction_leandrateFunction_id_bernoulliMeasure.measure_exists_klUpper_lt_le_of_le_condExp,measure_exists_lt_klLower_le_of_condExp_le: the time-uniform coverage of the KL-UCB upper and lower confidence levelsU(μ̂ t, x / N t)andL(μ̂ t, x / N t)along a filtration.General supporting lemmas (public, in their canonical homes; added after review):
LMLExplore.hasCondMGFBound_cgf_of_ae_mgfDominatedOn(Probability/Moments/MGF/Bound.lean): ifexp (t X)is integrable and, under almost every conditional lawcondExpKernel μ m ω',Xis dominated byYunderQonΛ(MGFDominatedOn), thenHasCondMGFBound m hm X (cgf Y Q) (Λ ∩ integrableExpSet Y Q) μ. This is the conditional analogue ofmgfDominatedOn_iff_hasMGFBound, and both Bernoulli dominations are derived from it.LMLExplore.ae_trim_ae_condExpKernel(Probability/Kernel/Condexp.lean): aμ-a.e. property holds a.e. undercondExpKernel μ m ωforμ.trim hm-a.e.ω. The kernel-mean identity is Mathlib'scondExp_ae_eq_trim_integral_condExpKernel.LMLExplore.le_of_ae_le_of_condExp_le,LMLExplore.le_of_le_condExp_of_ae_le(newMeasureTheory/Function/ConditionalExpectation/Real.lean): under a nonzero finite measure,a ≤ fa.e. andμ[f | m] ≤ ca.e. givea ≤ c;c ≤ μ[f | m]a.e. andf ≤ ba.e. givec ≤ b.[0, 1]-valued rewards lying in[0, 1]uses Mathlib'sConvex.centerMass_meminstead of a local lemma.Consumers and dependency edge: the roadmap's Layer 1.4 names this instance as the bounded case of the Identification roadmap's Layer 4.2 conditional domination ($[0,1]$ -valued variables by Bernoulli laws is the Bandits roadmap's Layer 1.4". The existing
HasCondMGFBound, its exponential supermartingales and the self-normalized deviations [GC11, Theorem 10], all already onmain). The Identification README's Layer 4.2 bullet on exponential-family cumulant generating functions likewise says "the domination ofiIndepFunbounds inMoments/KLChernoff.leanare the independent, every-variable-selected case.What remains of Layer 1.4 after this PR: nothing in its statement. The i.i.d. consequences [LS, Lemma 10.3, Corollary 10.4] were already merged in
Moments/KLChernoff.lean. The only gap is that the upper-tail boundmeasureReal_sum_ge_le_exp_klBerRealstill assumes a meanm > 0.No declarations are removed or renamed, and no Mathlib material is vendored. Sources are credited in the module docstring: Garivier and Cappé, The KL-UCB algorithm for bounded stochastic bandits and beyond (COLT 2011), Lemma 9 and Theorem 10; Lattimore and Szepesvári, Bandit Algorithms, Note 10.3.1.
Reuse checks: I grepped Mathlib, Tau Ceti, LML and
LMLExplore/for conditional Bernoulli or[0, 1]MGF bounds. Every existingHasCondMGFBoundinstance is Gaussian, sub-exponential or comes from independence. The only Bernoulli dominations are the unconditionalmgfDominatedOn_I{ci,ic}_bernoulliMeasure, which this PR reuses.SequentialLearning/BernoulliDeviation.leanis a different argument: a Krichevsky–Trofimov mixture for Bernoulli bandits.Local checks (not CI):
tauceti-local-checks verify --policy ordinarypassed, withscope: scoped: against dca76852a43d553a35fb2afa9d31ae4b37501ddeandlocal-axioms: checked 4 changed module(s), 76 declaration(s); 0 violation(s). The fulllake buildpassed, along with the module-system, header-style and environment-lint checks.🤖 Prepared with Claude Code