Lean 4.26.0-rc1 (2025-11-19)
For this release, 264 changes landed. In addition to the 84 feature additions and 73 fixes listed below there were 10 refactoring changes, 7 documentation improvements, 13 performance improvements, 8 improvements to the test suite and 69 other changes.
Language
-
#10763 improves match compilation: Branch on variables in the order suggested by the first remaining alternative, and do not branch when the first remaining alternative does not require it. This fixes https://github.com/leanprover/lean4/issues/10749. With
set_option backwards.match.rowMajor falsethe old behavior can be turned on. -
#10823 lets the match compilation procedure use sparse case analysis when the patterns only match on some but not all constructors of an inductive type. This way, less code is produce. Before, code handling each of the other cases was then optimized and commoned-up by later compilation pipeline, but that is wasteful to do.
-
#10826 fixes the location of the “deprecated constant” and similar error messages on field notation (
e.f,(e).f,e |>. f). Fixes #10821. -
#10851 lets match compilation use exfalso as soon as no alternatives are left. This way, the compiler does not have to look at subsequent case splits.
-
#10865 makes the spec
Std.Do.Spec.forIn'_listand friends more universe polymorphic. -
#10872 improves the performance of
mvcgenby an optimized implementation fortry (mpure_intro; trivial). This tactic sequence is used to eagerly discharge VCs and in the process instantiates schematic variables. -
#10926 topologically sorts abstracted vars in
Meta.Closure.mkValueTypeClosureif MVars are being abstracted. Fixes #10705 -
#10931 strips the
Expr.mdatathatWF.Fixuses to associate goal with recursive calls from the goal presented to the tactics. Fixes #10895. -
#10944 runs enableRealizationsForConst on sizeOf declarations. Fixes #10573.
-
#10980 tries to preserve names of pattern variables in match alternatives in
decreasing_by, by telescoping into the concrete alternative rather than the type of the matcher's alt. Fixes #10976. -
#11011 extracts some refactorings from #10763, including dropping dead code and not failing in
inaccessibleAsCtor, which leadas to (slightly) better error messages, and also on the grounds that the failing alternative may actually be unreachable. -
#11024 lets
Boolhave.ctorIdxlike any other inductive. -
#11068 removes the
verifyEnumfunctions from the bv_decide frontend. These functions looked at the implementation of matchers to see if they really do the matching that they claim to do. This breaks that abstraction barrier, and should not be necessary, as only functions with aMatcherInfoenv entry are considered here, which should all play nicely. -
#11072 adds “sparse casesOn” constructions. They are similar to
.casesOn, but have arms only for some constructors and a catch-all (providingt.ctorIdx ≠ 42assumptions). The compiler has native support for these constructors and now (because of the similarity) also the per-constructor elimination principles. -
#11094 makes workspaceSymbol benchmarks
modules, so that they are less sensitive to additions of private symbols in the standard library. -
#11095 makes use of
hasIndepIndices. That function was unused since commit 54f6517ca36b237b40e02aac62ea36dbd4179758, but it seems it should be used. -
#11107 tests the missing cases error.
-
#11122 fixes a problem for structures with diamond inheritance: rather than copying doc-strings (which are not available unless
.server.oleanis loaded), we link to them. Adds tests. -
#11125 adds a filter for premise selectors to ensure deprecated theorems are not returned.
-
#11132 adds support for
grind +suggestionsandsimp_all? +suggestionsintry?. It outputsgrind only [X, Y, Z]orsimp_all only [X, Y, Z]suggestions (rather than just+suggestions). -
#11146 fixes a bug in #11125. Added a test this time ...
-
#11150 adds a new, inactive and unused
doElem_elabattribute that will allow users to register custom elaborators fordoElems in the form of the new typeDoElab. The olddoelaborator is active by default but can be switched off by disabling the new optionbackward.do.legacy. -
#11161 adds getEntry/getEntry?/getEntry!/getEntryD operation on DTreeMap.
-
#11184 modifies the error message that is returned when more than one synthetic metavariable can't be resolved.
-
#11190 avoids running into an “unknown free variable” when printing the “Failed to compile pattern matching” error. Fixes #11186.
-
#11191 makes sure that inside a
realizeConstthemaxHeartbeatoption is effective.
Library
-
#9515 adds a missing lemma for the
ListAPI. -
#10739 adds two missing
NeZeroinstances forn^0wheren : Natandn : Int. -
#10743 renames theorems that use
sortedin their name to instead usepairwise. -
#10765 extends the
all/anyfunctions from hash sets to hash maps and dependent hash maps and verifies them. -
#10769 adds a
find?consumer in analogy toList.find?and variants thereof. -
#10776 adds iterators and slices for
DTreeMap/TreeMap/TreeSetbased on zippers and provides basic lemmas about them. -
#10820 shows that the iterators returned by
String.Slice.splitandString.Slice.splitInclusiveare finite as long as the forward matcher iterator for the pattern is finite (which we already know for all of our patterns). -
#10852 renames
String.RangetoLean.Syntax.Range, to reflect that it is not part of the standard library. -
#10853 renames
String.endPostoString.rawEndPos, as in a future release the nameString.endPoswill be taken by the function that is currently calledString.endValidPos. -
#10854 fixes the IPv4 address encoding from libuv to lean
-
#10865 makes the spec
Std.Do.Spec.forIn'_listand friends more universe polymorphic. -
#10896 adds union operations on DTreeMap/TreeMap/TreeSet and their raw variants and provides lemmas about union operations.
-
#10933 adds the basic infrastructure to perform termination proofs about
String.ValidPosandString.Slice.Pos. -
#10941 removes a redundant instance requirement from
Std.instIrreflLtOfIsPreorderOfLawfulOrderLT. -
#10946 adds union operation on ExtDHashMap/ExtHashMap/ExtHashSet nd provides lemmas about union operations.
-
#10952 replaces
Iter(M).sizewith theIter(M).count. While the former used a specialIteratorSizetype class, the latter relies onIteratorLoop. TheIteratorSizeclass is deprecated. The PR also renames lemmas about ranges be replacing_Rccwith_rcc,_Rcowith_roo(and so on) in names, in order to be more consistent with the naming convention. -
#10966 fixes some mis-stated lemmas which should have been about the
.Rawvariants of maps. -
#10986 defines
String.Slice.replaceand redefinesString.replaceto use theSliceversion. -
#10993 allows
grindto work extensionally on extensional maps/sets. -
#11006 removes the duplicate lemmas
Std.Do.SPred.{and_pure,or_pure,imp_pure,entails_pure_intro}. -
#11008 inlines several Decidable instances for performance reasons.
-
#11017 establishes
String.ofListandString.toListas the preferred method for converting between strings and lists of characters and deprecates the alternativesString.mk,List.asStringandString.data. -
#11019 introduces slices of lists that are available via slice notation (e.g.,
xs[1...5]). -
#11021 adds more theory about
Splitsfor strings and deduces the first user-facingStringlemma,String.toList_map. -
#11058 changes
Nat.bleby joining the twoNat.ble Nat.zero _cases into one, allowingdecide (0 <= x) = trueanddecide (0 < succ x) = trueto be solvable byrfl. -
#11060 add list
minandmaxoperations to complementmin?andmax?ones in the same vain ashead?andhead. -
#11070 adds union operation on ExtDHashMap/ExtHashMap/ExtHashSet nd provides lemmas about union operations.
-
#11076 adds
getEntry/getEntry?/getEntry!/getEntryDoperation on DHashMap. -
#11100 adds
theorem Int.ediv_pow {a b : Int} {n : Nat} (hab : b ∣ a) : (a / b) ^ n = a ^ n / b ^ nand related lemmas. -
#11102 adds some annotations missing in the Array bootstrapping files.
-
#11113 adds some small missing lemmas.
-
#11123 adds theorems about folds over flatMaps, for
List/Array/Vector. -
#11127 removes all uses of
String.Iteratorfrom core, preferringString.ValidPosinstead. -
#11138 adds a
csimplemma for faster runtime evaluation ofInt.powin terms ofNat.pow. -
#11139 replaces #11138, which just added a
@[csimp]lemma forInt.pow, this time actually replacing the definition. This means we not only get fast runtime behaviour, but take advantage of the special kernel support forNat.pow. -
#11150 adds a new, inactive and unused
doElem_elabattribute that will allow users to register custom elaborators fordoElems in the form of the new typeDoElab. The olddoelaborator is active by default but can be switched off by disabling the new optionbackward.do.legacy. -
#11152 renames
String.IteratortoString.Legacy.Iterator. -
#11154 renames
SubstringtoSubstring.Raw. -
#11159 adds lemmas about the sizes of ranges of Ints, analogous to the Nat lemmas in
Init.Data.Range.Polymorphic.NatLemmas. See also https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/Reasonning.20about.20PRange.20sizes.20.28with.20.60Int.60.29/with/546466339.
Tactics
-
#10848 fixes an issue where adding a missing case name after the pipe in
inductionwould not remove the now-obsolete error message. -
#10858 improves the
donetactic ingrindinteractive mode. It now displays thegrindstate diagnostics for all unsolved subgoals. -
#10859 fixes auto-completion for
set_optioningrindinteractive mode. -
#10862 implements the
show_termcombinator ingrindinteractive mode. -
#10874 uses the correct context for elaborating the
grindstate filter. -
#10877 fixes theory propagation issue in
grind order. -
#10881 fixes a proof instability source in
grind. -
#10887 uses the new
TermInfo.isDisplayableTermwhen hovering overcasestactic anchors in thegrindinteractive mode. -
#10890 adds a
+laxconfiguration option forgrind, causing it to ignore parameters referring to non-existent theorems, or to theorems for which we can't generate a pattern. This allows throwing large sets of theorems (e.g. from a premise selection enginre) intogrindto see what happens. -
#10899 ensures the generated
instantiatetactic instantiates the theorems using the same order used byfinish? -
#10916 implements parameter optimization for the generated
instantiatetactics produced byfinish?. We use a simple parameter optimizer that takes two sets as input: the lower and upper bounds. The lower bound consists of the theorems actually used in the proof term, while the upper bound includes all the theorems instantiated in a particular theorem instantiation step. The lower bound is often sufficient to replay the proof, but in some cases, additional theorems must be included because a theorem instantiation may contribute to the proof by providing terms and many not be present in the final proof term. -
#10919 implements the
have <ident>? : <prop>tactic for thegrindinteractive mode. The proposition is proved using the defaultgrindsearch strategy. This tactic is also useful for inspecting or querying the currentgrindstate. -
#10920 adds support for
grind +premises, calling the currently configured premise selection algorithm and including the results as parameters togrind. (Recall that there is not currently a default premise selector provided by Lean4: you need a downstream premise selector to make use of this.) -
#10936 fixes issues in
grind => finish?that were preventing generatedgrindtactic scripts from being successfully replayed. -
#10937 fixes a missing counter reset at the
casestactic ingrindinteractive mode. -
#10938 ensures solver
grindtactics (e.g.,ac,ring,lia, etc) process pending facts after making progress. -
#10939 fixes another instance of the “default parameter value in constructor” footgun, which was affecting the
casestactic in thegrindinteractive mode. -
#10948 ensures that
finish?produces partial tactic scripts containingsorrys. We may add an option to disable this feature in the future. It is enabled by default because it provides a useful way to debuggrindfailures. -
#10949 ensures that solver propagation steps are necessary in the generated tactic script to close the goal.
-
#10950 adds the
mbtctactic to thegrindinteractive mode. It implements model-based theory combination. It also ensuresfinish?is capable of generating it. -
#10951 fixes a bug in the
cutsatincremental model construction. The model was not being reset when new (unsatisfied) equalities were asserted. -
#10955 fixes a regression in the
grind ordermodule introduced by -
#10956 fixes a bug in the equality propagation procedure in
grind.order. Specifically, it affects the procedure that asserts equalities in thegrindcore state that are implied by (ring) inequalities in thegrind.ordermodule. -
#10960 fixes a bug in the
grind linarithmodel/counterexample construction. -
#10961 adds support for scientific literals for
Ratingrind.grinddoes not yet add support for this kind of literal in arbitrary fields. -
#10962 fixes a spurious warning message in
grind. -
#10964 adds a propagator for
a^(n+m)and removes its normalizer. This change was motivated by issue #10661 -
#10965 ensures that model-based theory combination in
grind cutsatconsiders nonlinear terms. Nonlinear multiplications such asx * yare treated as uninterpreted symbols incutsat. -
#10971 adds a
LawfulOfScientificclass, providing compatibility with aLean.Grind.Fieldstructure. -
#10975 adds the combinator
· t_1 ... t_nto thegrindinteractive mode. Thefinish?tactic now generates scripts using this combinator to conform to Mathlib coding standards. The new format is also more compact. Example:/-- info: Try this: [apply] ⏎ instantiate only [= mem_indices_of_mem, insert, = getElem_def] instantiate only [= getElem?_neg, = getElem?_pos] cases #f590 · cases #ffdf · instantiate only instantiate only [= Array.getElem_set] · instantiate only instantiate only [size, = HashMap.mem_insert, = HashMap.getElem_insert, = Array.getElem_push] · instantiate only [= mem_indices_of_mem, = getElem_def] instantiate only [usr getElem_indices_lt] instantiate only [size] cases #ffdf · instantiate only [=_ WF] instantiate only [= getElem?_neg, = getElem?_pos, = Array.getElem_set] instantiate only [WF'] · instantiate only instantiate only [= HashMap.mem_insert, = HashMap.getElem_insert, = Array.getElem_push] -/ #guard_msgs in example (m : IndexMap α β) (a a' : α) (b : β) (h : a' ∈ m.insert a b) : (m.insert a b)[a'] = if h' : a' == a then b else m[a'] := by grind => finish? -
#10978 implements the following
grindimprovements:-
set_optioncan now be used to setgrindconfiguration options in the interactive mode. -
Fixes a bug in the repeated theorem instantiation detection.
-
Adds the macro
use [...]as a shorthand forinstantiate only [...].
-
-
#10990 adds the
set_configtactic for settinggrindconfiguration options. It uses the same syntax used for setting configuration options in thegrindmain tactic. -
#10991 renames
cutsatin configuration options and trace messages tolia. -
#10992 ensures that
grind +premisessilently drops warnings and errors about bad suggestions. -
#10997 adds support for configuration options at
finishandfinish?. -
#11003 adds support for specifying anchors to restrict the search space in
grindwhen usinggrind only. Anchors can limit which case splits are performed and which local lemmas are instantiated. -
#11012 ensures the
grindtacticsfinishandfinish?can take parameters. -
#11026 fixes a nontermination and missing propagation bug in
grind order. It also register relevant case-splits for arithmetic. -
#11028 ensures that
grind? +premisesremoves+premisesfrom the "Try this" suggestion. -
#11029 changes the terminology used from "premise selection" to "library suggestions". This will be more understandable to users (we don't assume anyone is familiar with the premise selection literature), and avoids a conflict with the existing use of "premise" in Lean terminology (e.g. "major premise" in induction, as well as generally the synonym for "hypothesis"/"argument").
-
#11030 adds a library suggestion engine for local theorems. To be useful, I still need to write more combinators to re-rank and combine suggestions from multiple engines.
-
#11032 implements
simp? +suggestions, which uses the configured library suggestion engine to add relevant theorems to thesimpcall.simp +suggestionswithout the?prints a message requiring adding the?. -
#11034 adds a new suggestion to
finish?. It now generates thegrindtactic script as before, and afinish onlytactic. Example:/-- info: Try these: [apply] ⏎ instantiate only [findIdx, insert, = mem_indices_of_mem] instantiate only [= getElem?_neg, = getElem?_pos] cases #1bba · instantiate only [findIdx] · instantiate only instantiate only [= HashMap.mem_insert, = HashMap.getElem_insert] [apply] finish only [findIdx, insert, = mem_indices_of_mem, = getElem?_neg, = getElem?_pos, = HashMap.mem_insert, = HashMap.getElem_insert, #1bba] -/ example (m : IndexMap α β) (a : α) (b : β) : (m.insert a b).findIdx a = if h : a ∈ m then m.findIdx a else m.size := by grind => finish? -
#11039 fixes the
grindinvalid universe level regression reported in #11036 -
#11040 fixes a panic that occurred during the processing of generalized E-matching patterns in
grind. -
#11047 implements (nested term) equality propagation in
grind order. That is, it propagates implied equalities fromgrind orderback to thegrindcore. Examples:open Lean Grind Std
-
#11049 implements equality propagation for
Natingrind order.grind ordersupports offset equalities for rings, but it has an adapter forNat. Example:example (a b : Nat) (f : Nat → Int) : a ≤ b + 1 → b + 1 ≤ a → f (1 + a) = f (1 + b + 1) := by grind -offset -mbtc -lia -linarith (splits := 0)
-
#11050 fixes equality propagation for
Natingrind order. -
#11051 removes the
grind offsetmodule because it is (now) subsumed bygrind order. -
#11057 implements
grind?using the newgrind => finish?infrastructure. -
#11061 fixes a deep recursion issue in the kernel when type-checking a proof term produced by
grind. -
#11071 ensures that the
denotefunctions used to implement proof-by-reflection terms ingrindare abbreviations. This change eliminates the need for thewithAbstractAtomsgadget. -
#11075 updates
simp? +suggestionsso that if a name is ambiguous (because of namespaces) all alternatives are used, rather than erroring. -
#11077 fixes the anchor values produced by
grind? -
#11080 fixes a panic during equality propagation in the
grind ringmodule. If the maximum number of steps has been reached, the polynomials may not be fully simplified. -
#11084 fixes a stack overflow that occurs when constructing a proof term in
grind. -
#11087 enables
grindto case bash onSumandPSum. -
#11092 ensures that
grind acdenotation functions used in proof by reflection are marked asabbrev. -
#11098 updates the
suggestionstactic so the printed message includes hoverable type information (and displays scores and flags when relevant). -
#11099 improves the support for universe-metavariables in
grind. -
#11101 fixes an initialization issue for local
Function.Injective fhypotheses. -
#11126 ensures
grinddoes not fail when applyinginjectionto a hypothesis that cannot be cleared because of forward dependencies. -
#11133 fixes disequality propagation for constructor applications in
grind. The equivalence class representatives may be distinct constructor applications, but we must ensure they have the same type. Examples that were panic'ing before this PR:example (a b : List Nat) : a ≍ ([] : List Int) → b ≍ ([1] : List Int) → a = b ∨ p → p := by grind -
#11135 ensures that
checkExpis used ingrind lia(formerly known asgrind cutsat) andgrind ringto prevent stack overflows. -
#11136 adds support for
try?to use induction; it will only perform induction on inductive types defined in the current namespace and/or module; so in particular for now it will not induct on built-in inductives such asNatorList. -
#11137 fixes a stackoverflow during proof construction in
grind. -
#11145 fixes a bug in
isMatchCondCandidateused ingrind. The missing condition was causing a "not internalized term"grindinternal error. -
#11147 refactors the implementation of the symmetric equality congruence rule used in
grind. -
#11148 addst the
cases_nexttactic to thegrindinteractive mode. -
#11149 adds a user-extension mechanism for the
try?tactic. You can either use the@[try_suggestion]attribute on a declaration with signatureMVarId -> Try.Info -> MetaM (Array (TSyntax `tactic))to produce suggestions, or theregister_try?_tactic <stx>command with a fixed piece of syntax. User-extensions are only tried after the built-in try strategies have been tried and failed. -
#11157 implements the
#grind_lintcommand, a diagnostic tool for analyzing the behavior of theorems annotated for theorem instantiation. The command helps identify problematic theorems that produce excessive or unbounded instance generation during E-matching, which can lead to performance issues. The main entry point is:#grind_lint check
which analyzes all theorems marked with the
@[grind]attribute. For each theorem, it creates an artificial goal and runsgrind, collecting statistics about the number of instances produced. Results are summarized using info messages, and detailed breakdowns are shown for lemmas exceeding a configurable threshold. Additional subcommands are provided for targeted inspection and control:-
#grind_lint inspect thm: analyzes one or more specific theorems in detail -
#grind_lint mute thm: excludes a theorem from instantiation during analysis -
#grind_lint skip thm: omits a theorem from being analyzed by#grind_lint check
-
-
#11166 implements the following improvements to the
#grind_lintcommand:-
More informative messages when the number of instances exceeds the minimum threshold.
-
A code action for
#grind_lint inspectthat insertsset_option trace.grind.ematch.instance truewhenever the number of instances exceeds the minimum threshold. -
Displaying doc strings for
grindconfiguration options in#grind_lint. -
Improve doc strings for
#grind_lint inspectand#grind_lint check.
-
-
#11167 implements support for
#grind_lint check in module <module>. Mathlib does not use namespaces, so we need to restrict the#grind_lintsearch space using module (prefix) names. Example:/-- info: instantiating `Array.filterMap_some` triggers more than 100 additional `grind` theorem instantiations --- info: Array.filterMap_some [thm] instances [thm] Array.filterMap_filterMap ↦ 94 [thm] Array.size_filterMap_le ↦ 5 [thm] Array.filterMap_some ↦ 1 --- info: instantiating `Array.range_succ` triggers 22 additional `grind` theorem instantiations -/ #guard_msgs in #grind_lint check (min := 20) in module Init.Data.Array
-
#11168 changes the default library suggestions (e.g. for
grind +suggestionsor `simp_all? +suggestions) to include the theorems from the current file in addition to the output of Sine Qua Non. -
#11170 adds tactic and term mode macros for
∎(typed\qed) which expand totry?. The term mode version captures any produced suggestions and prependsby. -
#11171 ensures that tactics using library suggestions set the caller field, so the premise selection engine has access to this. We'll later use this to filter out some modules for grind, which we know have already been fully annotated.
-
#11172 removes
simp_all? +suggestionsfromtry?for now. It's really slow out in Mathlib; too often the suggestions causesimpto loop. Until we have the ability fortry?to move past a timeing-out tactic (or maybe even until we have parallelism), it needs to be removed. -
#11174 modifies the
try?framework, so each subsidiary tactic runs with a separatemaxHeartbeatsbudget. -
#11187 adds syntax for specifying
grind_patternconstraints and extends theEMatchTheoremobject. -
#11189 implements
grind_patternconstraints. They are useful for controlling theorem instantiation ingrind. As an example, consider the following two theorems:theorem extract_empty {start stop : Nat} : (#[] : Array α).extract start stop = #[] := … -
#11193 uses the new
grind_patternconstraints to fix cases where an unbounded number of theorem instantiations would be generated for certain theorems in the standard library. -
#11194 the redundant
grindparameter warning message. It now checks thegrindtheorem instantiation constraints too. -
#11197 implements
try?using the newfinish?infrastructure. It also removes the old tracing infrastructure, which is now obsolete. Example:/-- info: Try these: [apply] grind [apply] grind only [findIdx, insert, = mem_indices_of_mem, = getElem?_neg, = getElem?_pos, = HashMap.mem_insert, = HashMap.getElem_insert, #1bba] [apply] grind only [findIdx, insert, = mem_indices_of_mem, = getElem?_neg, = getElem?_pos, = HashMap.mem_insert, = HashMap.getElem_insert] [apply] grind => instantiate only [findIdx, insert, = mem_indices_of_mem] instantiate only [= getElem?_neg, = getElem?_pos] cases #1bba · instantiate only [findIdx] · instantiate only instantiate only [= HashMap.mem_insert, = HashMap.getElem_insert] -/ #guard_msgs in example (m : IndexMap α β) (a : α) (b : β) : (m.insert a b).findIdx a = if h : a ∈ m then m.findIdx a else m.size := by try? -
#11203 fixes a few minor issues in the new
Actionframework used ingrind. The goal is to eventually delete the oldSearchMinfrastructure. The mainsolvefunction used bygrindis now based on theActionframework. The PR also deletes dead code inSearchM. -
#11204 has
#grind_list checkproduce a "Try this:" suggestion with#grind_list inspectcommands, as this is usually the next step in dealing with problematic cases. We also fix the grind pattern for one theorem, as part of testing the workflow. More to follow.
Compiler
-
#10625 implements zero cost
BaseIOby erasing theIO.RealWorldparameter from argument lists and structures. This is a major breaking change for FFI. -
#10727 fixes name mangling to be unambiguous / injective by adding
00for disambiguation where necessary. Additionally, the inverse function,Lean.Name.unmanglehas been added which can be used to unmangle a mangled identifier. This unmangler has been added to demonstrate the injectivity but also to allow unmangling identifiers e.g. for debugging purposes. -
#10856 performs more widening in ElimDeadBranches in an attempt to improve performance in situations with a lot of local precision.
-
#10864 reduces the amount of symbols in our DLLs by cutting open a linking cycle of the shape:
Environment -> Compiler -> Meta -> Environment -
#10982 changes the closure allocator to use the general allocator instead of the small object one. This is because users may create closures with a gigantic amount of closed variables which in turn boost the size of the closure beyond the small object threshold.
-
#11000 fixes a memleak caused by the Lean based
IO.waitAnyimplementation by reverting it. -
#11010 makes the eager lambda lifting heuristic more predictable by blocking it from lifting from any kind of inlineable function, not just
@[inline]. It also adapts the doc-string to describe what is actually going on. -
#11020 improves the detection of situations where we branch multiple times on the same value in the code generator. Previously this would only consider repeated branching on function arguments, now on arbitrary values.
-
#11042 fixes a case of overeager constant folding on UInts where the compiler would mistakenly assume
0 - x = x. -
#11043 fixes a case of overeager constant folding on Nat where the compiler would mistakenly assume
0 - x = x(see also #11042 for the same bug on UInts). -
#11044 enforces users of the constant folder API to provide proofs of their algebraic properties, thus hopefully avoiding bugs such as #11042 and #11043 in the future.
-
#11056 fixes
ST.Ref.ptrEqto act as described in the docs. This fixes two bugs:-
The recent
IO.RealWorldelimination PR overlooked this function (afaik this is the only one), causing its return value to be generally wrong. -
The implementation of
ptrEqwould previously always consider two different cells with pointer equivalent value to be pointer equal. However, the function is supposed to check whether twoRefare the same cell, not whether the contained elements are.
-
-
#11151 fixes some details in the Markdown renderings of Verso docstrings, and adds tests to keep them correct. Also adds tests for Verso docstring metadata.
Documentation
-
#11179 removes most cases where an error message explained that it was "probably due to metavariables," giving more explanation and a hint.
Server
Lake
-
#10861 fixes
input_dirtracking to also recurse through subdirectories. Thefilterof aninput_dirwill be applied to each file in the directory tree (the path names of directories will not be checked). -
#10883 fixes a bug with Lake's cache where revisions were stored at the incorrect path. Revisions were stored at
<rev>/<pkg>.jsonlrather than the correct<pkg>/<rev>.jsonl. -
#10959 enables Lake users to require Reservoir dependencies by a semantic version range. On a
lake update, Lake will fetch the package's version information from Reservoir and select the newest version of the package that satisfies the range. -
#11062 changes Lake's debug build type to use
-O0instead of-Ogwhen compiling C code.-Ogwas found to be insufficient for debugging compiled Lean code -- relevant code was stilled optimized out. -
#11063 changes the
mathandmath-laxtemplates forlake newandlake initto use the version of Mathlib corresponding to the current Lean toolchain. Thus,lake +x.y.z new <pkg> mathwill use the Mathlib for Leanx.y.z. On the other hand,lake updateon such packages will no longer update Mathlib automatically. Users will need to change the Mathlib revision in the configuration file before updating. -
#11117 fixes a bug where Lake ignored
moreLinkObjsandmoreLinkLibson alean_exe. -
#11118 adds
Job.syncas a standard way of declaring a synchronous job. -
#11169 changes all module build keys in Lake to be scoped by their package. This enables building modules with the same name in different packages (something previously only well-supported for executable roots).
Other
-
#11074 adds a
.claude/claude.md, with basic development instructions for Claude Code to operate in this repository.