bump Lean to v4.30.0-rc2 + mathlib v4.30.0-rc2#17
Merged
Conversation
Bumps the toolchain from v4.27.0-rc1 to v4.30.0-rc2 and the mathlib pin to the matching tag. No source changes in this commit; build fixups for breakage introduced by the bump follow in subsequent tier commits. - lean-toolchain: leanprover/lean4:v4.27.0-rc1 -> v4.30.0-rc2 - lakefile.toml: mathlib rev v4.27.0-rc1 -> v4.30.0-rc2 - lake-manifest.json: regenerated via `lake update mathlib`
`comap_shift_eq_iSup_comap_coords` no longer closes via `congr 1; ext k; rw [MeasurableSpace.comap_comp]` at v4.30.0-rc2: after the rewrite a residual `comap ((eval k) ∘ shift n) inst = comap (eval (n+k)) inst` is left, which is definitionally true but not closed by `congr` alone. Use `iSup_congr (fun k => ?_)` for the supremum, then `rw [MeasurableSpace.comap_comp]; rfl`. - Exchangeability/Tail/TailSigma.lean: replace `congr 1; ext k` step
mathlib renamed `Adapted` -> `StronglyAdapted` on 2026-01-13 (see Mathlib/Probability/Process/Adapted.lean header note); the new `Adapted` requires plain `Measurable`, while the pre-rename `Adapted` (which the local proofs target) is now `StronglyAdapted`. The body `stronglyMeasurable_condExp.mono (h_le n)` already produces `StronglyMeasurable`, so only the annotation needs the rename. - Exchangeability/Probability/Martingale/Crossings.lean: rename two `have h_adapted : Adapted ℱ ...` annotations to `StronglyAdapted ℱ ...` (lines 594 and 621).
Mathlib API renames between v4.27.0-rc1 and v4.30.0-rc2: - `integral_mul_left` -> `integral_const_mul` (ViaKoopman/ContractableFactorization.lean:752, ViaL2/AlphaConvergence.lean:320, ViaL2/MoreL2Helpers.lean:1386, ViaL2/DirectingMeasureIntegral.lean:1933) - `Set.indicator_of_not_mem` -> `Set.indicator_of_notMem` `Set.not_mem_compl_iff` -> `Set.notMem_compl_iff` (15 occurrences in ViaL2/DirectingMeasureIntegral.lean) - `hasFiniteIntegral_of_bounded` -> `HasFiniteIntegral.of_bounded` (ViaL2/MoreL2Helpers.lean:1307) - `Ne.lt_or_lt` -> `Ne.lt_or_gt` (signature renamed) (ViaL2/CesaroConvergence.lean:376) - `StrictAnti.lt_iff_lt` -> `StrictAnti.lt_iff_gt` (ViaL2/AlphaIicCE.lean:438) - `le_of_not_lt` -> `not_lt.mp` (generic lemma removed; use `not_lt` iff) (ViaL2/CesaroConvergence.lean:1526) Two `simp only` calls on `def`s no longer make progress at v4.30 (simp no longer auto-unfolds opaque `def`s). Replace with `show` of the unfolded form: - `simp only [futureFiltration]` -> `show … comap (shiftRV …) _` (ViaMartingale/FutureFiltration.lean:130) - `simp only [TailSigma.tailFamily]` -> `show … iSup (fun j => …)` (ViaL2/CesaroConvergence.lean:1995) One `calc` step LHS no longer matches the goal LHS after `simp only [ξ, p, q]` (different normal form in v4.30); collapse the three pure-`ring` calc steps into one bridging step from the new goal LHS form: - ViaL2/CesaroConvergence.lean:1119
cameronfreer
added a commit
that referenced
this pull request
May 18, 2026
Two open-coded initial-segment inclusions are replaced with the mathlib spelling `Fin.castLE`. Both substitutions are in let-bindings inside proof bodies (statements unchanged): - Exchangeability/Contractability.lean:470 — `contractable_of_exchangeable` call site: `let ι := fun i => ⟨i.val, Nat.lt_of_lt_of_le i.isLt hmn⟩` -> `let ι := Fin.castLE hmn`. Existing `simpa [ι]` and `simp [..., ι]` unfold the new RHS the same way; no other proof changes needed. - Exchangeability/Util/FinsetHelpers.lean:32 — `filter_val_lt_card`: same substitution; the inline `hf_inj` proof collapses to `Fin.castLE_injective h`, and the `Finset.image` branch's `simp only [f]` steps simplify directly via `Fin.ext rfl` / `rintro ⟨j, rfl⟩`. (`Contractability.lean:408` was deliberately left alone — that `let` is inside a lemma statement, not the proof body, and the agreed scope is proof-body-only churn.) README.md:51 was still claiming `lean-toolchain` was pinned to 4.27.0-rc1; the v4.30.0-rc2 bump (#17) missed updating it. Rather than re-pin and re-drift, point at the file itself: "(see `lean-toolchain` for the pinned version)".
cameronfreer
added a commit
that referenced
this pull request
May 18, 2026
After the v4.30.0-rc2 bump (#17) the project had a few dozen deprecation warnings sitting in the build output. This sweep zeroes them out. Tactic rename: - push_neg at h -> push Not at h (25 sites across 10 files) Deprecated import path: - Mathlib.Probability.Independence.Kernel -> Mathlib.Probability.Independence.Kernel.IndepFun (Exchangeability/DeFinetti/ViaKoopman/InfraCore.lean:12). The old path was a `deprecated_module` stub that just re-imported the new one, so this is a transparent swap. Theorem name renames: - eLpNorm_eq_lintegral_rpow_enorm -> eLpNorm_eq_lintegral_rpow_enorm_toReal (Exchangeability/Probability/LpNormHelpers.lean:71). Same signature. - Fin.lt_iff_val_lt_val -> Fin.lt_def (Exchangeability/DeFinetti/ViaMartingale/FutureRectangles.lean:57). - Nat.lt_succ removed from a simp arg in Exchangeability/DeFinetti/ViaKoopman/CesaroL2ToL1.lean:284 — was both deprecated and (per the linter) unused; surrounding `omega` closes the goal regardless. - measureReal_univ_eq_one -> probReal_univ (6 sites, all in Exchangeability/DeFinetti/ViaL2/DirectingMeasureIntegral.lean). Not in the original audit list but the same character of fix; folded in so this PR is a complete deprecation sweep. After this change: `lake build` is clean and produces zero "has been deprecated" warnings (verified by grep over the build log). Build remains 3527 jobs (one fewer than baseline, because the deprecated `Independence.Kernel` stub is no longer pulled in). Statements, axioms, sorries all unchanged.
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.
Summary
Bumps the toolchain from
leanprover/lean4:v4.27.0-rc1toleanprover/lean4:v4.30.0-rc2and themathlib pin to the matching tag.
Scope: bump + minimal source changes needed to compile. No refactors, no linting cleanup, no proof
golfing. Refactor-against-new-mathlib-APIs work (
stieltjesOfMeasurableRat,IsCondKernelCDF.toKernel,Equiv.Perm.exists_extending_pair,condExpKernel,Kernel.IndepFun.comp) will land as a stream of small targeted PRs on top of this baseline.Commits
chore(bump)lean-toolchain+lakefile.tomlmathlib rev +lake-manifest.jsonfix(bump): tier 0-1Tail/TailSigma.leanfix(bump): tier 2Probability/Martingale/Crossings.leanfix(bump): tier 4,DeFinetti/ViaMartingale/FutureFiltration.lean`,DeFinetti/ViaKoopman/ContractableFactorization.leanTier 3 (CommonEnding / Ergodic / Contractability) skipped — nothing broke there.
Mathlib breakage clusters
Renames:
Adapted→StronglyAdapted(mathlib renamed on 2026-01-13; the newAdaptedrequires plainMeasurable, while the pre-renameAdaptedis nowStronglyAdapted)integral_mul_left→integral_const_mulSet.indicator_of_not_mem→Set.indicator_of_notMem;Set.not_mem_compl_iff→Set.notMem_compl_iffhasFiniteIntegral_of_bounded→HasFiniteIntegral.of_boundedNe.lt_or_lt→Ne.lt_or_gtStrictAnti.lt_iff_lt→StrictAnti.lt_iff_gtle_of_not_lt(generic) removed; usenot_lt.mpBehavior changes:
simp only [name]no longer unfolds opaquedefs reliably; two call sites replaced withshow-of-the-unfolded-form. Affected:futureFiltrationandTailSigma.tailFamily.simp only [ξ, p, q]produces a different normal form, so acalcLHS no longer matches;collapsed three pure-
ringcalc steps into one bridging step (CesaroConvergence.lean:1119).congr 1; ext k; rw [MeasurableSpace.comap_comp]no longer closes; replaced withiSup_congr-driven step plusrfl(TailSigma.lean).Verification
lake buildpropext,Quot.sound,Classical.choice)Exchangeability+ForMathlib)*.lean)Notes for review
Probability/CondExpExtras.lean:1842(brokensufficessyntax) and an unsolvedcondExp_project_of_condIndepFunat line 354; it stays parked as a mined-suggestion source. This bump branch does not touchCondExpExtras.leanbecause the bump itself did not require it.MeasurableStieltjes/CondCDF/CDFToKernel,Adapted/StronglyAdaptedcleanup, permutation extension viaEquiv.Perm.exists_extending_pair(mathlib #34599) — are out of scope here. They are the planned follow-up PRs.Test plan
lake buildis clean on a fresh clone of this branch.StronglyAdaptedrename's semantic consequences inCrossings.lean).