Repository navigation
feat: require Statlib, bump Mathlib to 2ddf59c - #298
Merged
Merged
Conversation
Require Statlib (at b1c8cb5, on the same Mathlib) and move Mathlib from 6135ffb to 2ddf59c, the commit Tau Ceti's main pins. Statlib is required before Verso so that Verso's `subverso` pin wins. Fixes for Mathlib changes: `EventuallyEqSet` (mathlib4#45712) and the `enorm` → `eNorm` rename (mathlib4#45735). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
`Submartingale.ae_tendsto_limitProcess` now takes `⨆ n, eLpNorm (f n) 1 μ < ∞`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
LML and Statlib declared the same names, so they could not be imported together. - Remove `InformationTheory.klDiv_map_measurableEmbedding` and `InformationTheory.klDiv_comp_le_compProd`, which Statlib provides with the same statements, and `InformationTheory.klDiv_le_compProd`, which is Statlib's `InformationTheory.le_klDiv_compProd`. - Rename `MeasureTheory.Measure.rnDeriv_restrict_restrict` to `rnDeriv_restrict_restrict'`: it generalizes Statlib's lemma of that name (`μ.HaveLebesgueDecomposition ν` instead of `SigmaFinite μ`). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
- `klDiv_eq_iSup_map`: the 130-line proof (Lévy's upward theorem and Fatou) becomes a corollary of Statlib's approximation of f-divergences along a generating sequence of maps (`tendsto_fDiv_map_of_iSup_comap_eq`). - `klDiv_restrict_add_restrict_compl`: a corollary of Statlib's `klDiv_eq_klDiv_restrict_add_klDiv_restrict_compl`. - Remove `InformationTheory.klDiv_smul_add_smul_le`, which duplicates Statlib's `ProbabilityTheory.klDiv_smul_add_smul_le`: with both namespaces open, the short name was ambiguous. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
…xity Bump Statlib to af34969 (stat-lib/statlib#81), which provides LML's measurable space on kernels, `klDiv_compProd_left_of_ae`, the convexity of `klDiv` for finite mixtures and the generality of `rnDeriv_restrict_restrict`, and delete LML's copies: - `LeanMachineLearning.ForMathlib.Probability.Kernel.MeasurableSpace`: the same declarations are in `Statlib.ForMathlib.Probability.Kernel.MeasurableSpace`. - `LeanMachineLearning.ForMathlib.InformationTheory.KullbackLeibler.ChainRule`: `measurable_klDiv_kernel` is `ProbabilityTheory.measurable_klDiv`, `klDiv_compProd_right_eq_lintegral` is `ProbabilityTheory.condKL_eq_lintegral` (`condKL κ η μ` is `klDiv (μ ⊗ₘ κ) (μ ⊗ₘ η)`), `klDiv_compProd_eq_add_lintegral` follows from `klDiv_compProd_eq_add_condKL`, and `klDiv_compProd_left_of_ae` keeps its name. - `LeanMachineLearning.ForMathlib.InformationTheory.KullbackLeibler.Convex`: the lemmas are in Statlib, in the `ProbabilityTheory` namespace. - `MeasureTheory.Measure.rnDeriv_restrict_restrict'`: Statlib's `rnDeriv_restrict_restrict` now has the same generality. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
RemyDegenne
marked this pull request as ready for review
November 13, 2026 10:25
Drop the direct Mathlib requirement: Mathlib now comes through Statlib, at the commit Statlib pins (still 2ddf59c), so that LML always builds against the Mathlib that Statlib was tested with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
LML now gets Mathlib through Statlib, so the scheduled updater bumps Statlib to its latest `main` (which moves Mathlib to Statlib's pin), builds LML and its tutorial with `--wfail`, and opens or updates a pull request on the `statlib-bump` branch. The downstream-reports Mathlib bump and incompatibility jobs are removed: they act on a direct Mathlib requirement, which LML no longer has, and Mathlib incompatibilities are tracked on Statlib. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
RemyDegenne
added a commit
to LeanMachineLearning/LMLExplore
that referenced
this pull request
Nov 13, 2026
…tatlib Pins: Tau Ceti 4d91513 (main, prebuilt files published), Mathlib 2ddf59c (Tau Ceti's), LML edad3c0 (LeanMachineLearning/LML#298, on the same Mathlib), and Statlib af34969, which LML requires. Repairs: - Mathlib: `EventuallyEqSet` and `EventuallySubset` (mathlib4#45712), `enorm` → `eNorm` and `nnnorm` → `nnNorm` renames, and two more deprecations. - Tau Ceti: `TotalVariation` and `Kernel.Matrix` became directories; `TauCeti.Probability.measurable_bernoulliMeasure` is now `Measurable.bernoulliMeasure`; `TauCeti.lowerSemicontinuous_iInf_of_compactSpace` is now `LowerSemicontinuous.iInf_of_compactSpace`. - LML: its chain rule and kernel modules moved to Statlib. - Duplicates with the new dependencies, found by the axioms audit: remove `EReal.toENNReal_inv` (and `LMLExplore.Data.EReal.Inv`), now Statlib's, and `ProbabilityTheory.Kernel.Invariant.pow`, now Tau Ceti's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
RemyDegenne
added a commit
to LeanMachineLearning/LMLExplore
that referenced
this pull request
Nov 13, 2026
LML is now pinned at 86a0ab0, the merge of LeanMachineLearning/LML#298 (same tree as the previous pin edad3c0 plus LML's CI and lakefile changes). Two files that landed on main during the sync used names that the new pins change: - `KullbackLeibler/Bernoulli.lean` imported LML's `KullbackLeibler.Convex`, which moved to Statlib: it now imports `Statlib.Divergence.KullbackLeibler.Basic` for `ProbabilityTheory.klDiv_smul_add_smul_le`. - `ExponentialFamily/Bernoulli.lean`: Tau Ceti's `map_withDensity_abs_deriv_mul` no longer takes a measurability hypothesis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
RemyDegenne
added a commit
to LeanMachineLearning/LMLExplore
that referenced
this pull request
Nov 13, 2026
…tatlib (#315) * chore: sync Tau Ceti 4d91513, Mathlib 2ddf59c and LML, which brings Statlib Pins: Tau Ceti 4d91513 (main, prebuilt files published), Mathlib 2ddf59c (Tau Ceti's), LML edad3c0 (LeanMachineLearning/LML#298, on the same Mathlib), and Statlib af34969, which LML requires. Repairs: - Mathlib: `EventuallyEqSet` and `EventuallySubset` (mathlib4#45712), `enorm` → `eNorm` and `nnnorm` → `nnNorm` renames, and two more deprecations. - Tau Ceti: `TotalVariation` and `Kernel.Matrix` became directories; `TauCeti.Probability.measurable_bernoulliMeasure` is now `Measurable.bernoulliMeasure`; `TauCeti.lowerSemicontinuous_iInf_of_compactSpace` is now `LowerSemicontinuous.iInf_of_compactSpace`. - LML: its chain rule and kernel modules moved to Statlib. - Duplicates with the new dependencies, found by the axioms audit: remove `EReal.toENNReal_inv` (and `LMLExplore.Data.EReal.Inv`), now Statlib's, and `ProbabilityTheory.Kernel.Invariant.pow`, now Tau Ceti's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo * docs: Statlib as a dependency, and the sync policy Statlib comes through LML: list it with the other dependencies (agent instructions, README, overlap scan, CI comments) and give it an `[[upstreams]]` entry in `tauceti.toml`, so that the overlap scan covers it. The sync policy now pins Tau Ceti at a `main` commit whose prebuilt files are published (usually its release tag), and LML and Statlib on the same Mathlib. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo * chore: pin LML at the merge of LML#298, and repair main's new code LML is now pinned at 86a0ab0, the merge of LeanMachineLearning/LML#298 (same tree as the previous pin edad3c0 plus LML's CI and lakefile changes). Two files that landed on main during the sync used names that the new pins change: - `KullbackLeibler/Bernoulli.lean` imported LML's `KullbackLeibler.Convex`, which moved to Statlib: it now imports `Statlib.Divergence.KullbackLeibler.Basic` for `ProbabilityTheory.klDiv_smul_add_smul_le`. - `ExponentialFamily/Bernoulli.lean`: Tau Ceti's `map_withDensity_abs_deriv_mul` no longer takes a measurability hypothesis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Makes LML depend on Statlib, and get Mathlib through it (now
2ddf59c, the commit Tau Ceti'smainpins). LML's copies of Statlib material are replaced with Statlib's.With Statlib, we gain access to many properties of klDiv and other information divergences. No Statlib definition is added to the dependencies of the LML definitions.
Dependencies
af34969.subverso(892d6dc).6135ffb→2ddf59c. The fixes for Mathlib changes are theEventuallyEqSetrefactor ([Merged by Bors] - refactor: change the definition ofEventuallyEqSetleanprover-community/mathlib4#45712), theenorm→eNormrename ([Merged by Bors] - chore: renameenormtoeNormleanprover-community/mathlib4#45735), and the new hypothesis ofSubmartingale.ae_tendsto_limitProcessin the martingale tutorial page.Using Statlib
stat-lib/statlib#81 moved into Statlib the LML material that Statlib lacked or had in less generality: the measurable space on kernels,
klDiv_compProd_left_of_ae, the convexity ofklDivfor finite mixtures, and the generality ofrnDeriv_restrict_restrict. LML now uses Statlib's versions, and removes its copies together with the material that duplicated Statlib:LeanMachineLearning.ForMathlib.Probability.Kernel.MeasurableSpace,LeanMachineLearning.ForMathlib.InformationTheory.KullbackLeibler.ChainRuleandLeanMachineLearning.ForMathlib.InformationTheory.KullbackLeibler.Convex.klDiv_eq_iSup_map: the 130-line proof (Lévy's upward theorem and Fatou) becomes a 4-line corollary of Statlib'stendsto_fDiv_map_of_iSup_comap_eq.klDiv_restrict_add_restrict_compl: now a corollary of Statlib'sklDiv_eq_klDiv_restrict_add_klDiv_restrict_compl.Before this PR, LML and Statlib declared some of the same names, two instances of
MeasurableSpace (Kernel α β)that are not definitionally equal, and aklDiv_smul_add_smul_lein two namespaces. None of these remain.Removed or renamed declarations
ProbabilityTheory.instMeasurableSpaceKernel,ProbabilityTheory.measurable_kernel_iff,ProbabilityTheory.Kernel.measurable_constInformationTheory.klDiv_map_measurableEmbedding,InformationTheory.klDiv_comp_le_compProd,InformationTheory.klDiv_compProd_left_of_aeMeasureTheory.Measure.rnDeriv_restrict_restrictInformationTheory.klDiv_le_compProdInformationTheory.le_klDiv_compProdInformationTheory.klDiv_smul_add_smul_leProbabilityTheory.klDiv_smul_add_smul_leInformationTheory.measurable_klDiv_kernelProbabilityTheory.measurable_klDivInformationTheory.klDiv_compProd_right_eq_lintegralProbabilityTheory.condKL_eq_lintegral, wherecondKL κ η μisklDiv (μ ⊗ₘ κ) (μ ⊗ₘ η)(rewrite with← condKLfirst)InformationTheory.klDiv_compProd_eq_add_lintegralProbabilityTheory.klDiv_compProd_eq_add_condKL, thencondKL_eq_lintegralInformationTheory.klDiv_finsetSum_smul_le,klDiv_sum_smul_le,klDiv_finsetSum_smul_left_le,klDiv_sum_smul_left_le,klDiv_finsetSum_smul_right_le,klDiv_sum_smul_right_leProbabilityTheory, from StatlibAutomatic updates
update.ymlnow bumps Statlib instead of Mathlib. Every six hours it does the following:lake update Statlib. This moves Statlib to its latestmainand Mathlib to the commit Statlib pins; I checked this locally from an older Statlib pin.--wfail.statlib-bumpbranch.Pull requests opened with the workflow token do not trigger the Build workflow, so the job builds before opening one.
The two downstream-reports jobs are removed (
bump-to-latestandtrack-incompatibility). They act on a direct Mathlib requirement, which LML no longer has. Statlib's own updater keeps it close to Mathlib master and tracks the incompatibilities there.LML's entry in downstream-reports' inventory (
ci/inventory/downstreams.json, withdependency_name: "mathlib") assumes a direct Mathlib requirement, so it should probably be disabled there.🤖 Generated with Claude Code
https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo