Repository navigation
chore: update Lean to v4.33.1 - #83
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EtMSetYxzZp7ujYcd3RiAN
Collaborator
|
Thanks Kim! |
markusdemedeiros
approved these changes
Aug 27, 2026
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 updates the toolchain from
leanprover/lean4:v4.29.0toleanprover/lean4:v4.33.1, moving Mathlib and doc-gen4 to their matching releases.lake buildandlake testboth pass, and nosorryis introduced.Four Lean changes account for most of the churn.
rw [d]on a Prop-valued definition no longer finds its equation lemmas, sozCDPBound,ACNeighbour,PureDPandDP_singletonunfold withsimp onlyinstead;unfold probWhileCutlikewise becomessimp only [probWhileCut]. Amatchno longer infers a non-dependent motive unaided, andsimpis stronger in ways that make a number of rewrites,convnavigations and their successors redundant — those are dropped rather than repaired.The Mathlib side is mostly renames and signature changes:
Int.natAbs_ofNat'becomesInt.natAbs_natCast,List.foldl_eq_of_comm'becomes the instance-basedList.foldl_cons_eq_apply_foldl(which brings aRightCommutativeinstance and an import ofMathlib.Data.List.Fold), andzero_le,DFunLike.coe_injective'andENNReal.ofReal_powall changed arity or field name.gauss_term_ℂbecomes adef: its return typeC(ℝ, ℂ)is not a class, so it was never usable as an instance, and Lean now rejects it.Three proofs are restated rather than patched.
ereal_smul_le_leftno longer degrades↑sinto rawsome (some s)and back, which was what broke it.UniformSample_applymerges two rewrites into one, sincesimpnow reaches the combined form directly, cutting 48 lines to 6.AboveThreshgains three small lemmas —sv4_probWhileCut_succ,sv4_probWhileCut_succ_falseandtsum_indicator_pure— that state the loop's one-step unrolling and the mass of a point distribution once, where the inline versions had been repeated and were sensitive to howsv1_stateandsv4_statedisplay.🤖 Prepared with Claude Code