Weekly

News about Lean, the theorem prover and programming language.

Lean core, page 7

Lean releases, the compiler, tactics, Lake, Verso, libraries, kernels, and checkers. 170 items, newest first.

Lean core

Kim Morrison proposes making Mathlib's OrderDual a structure, prepared with Claude Code

A Mathlib pull request by Kim Morrison changes OrderDual from a type alias to a one-field structure, which prevents defeq abuse between a type and its order dual and requires explicit toDual/ofDual wrapping at type boundaries. The pull request notes it was prepared with Claude Code.

Checked against: mathlib4#35125

Lean core

Leo de Moura merges two Lean core elaborator changes

Leo de Moura merged a pull request stopping isDefEq from raising transparency to .default for implicit arguments, which was creating scalability problems in Mathlib (old behavior: set_option backward.isDefEq.respectTransparency false). A second pull request fixes the type class resolution cache for classes with output parameters.

Checked against: lean4#12179lean4#12286

Lean core

Leo de Moura tests Claude-assisted refactoring of Lean's grind and Sym modules

Leo de Moura opened leanprover/lean4#12448, a pull request that refactors the grind and Sym modules using Claude-assisted code transformations as an experiment in AI-aided code maintenance. The pull request is marked "do not merge".

Checked against: lean4#12448

Lean core

Leo de Moura's Lean change stops simp from simplifying instances by default

The pull request, merged on 2026-02-05, ensures simp does not "simplify" instances by default, since doing so creates non-standard instances that cause problems in Mathlib. The old behavior can be retrieved with simp +instances, and the backward compatibility flag for dsimp also deactivates the change.

Checked against: lean4#12244

Lean core

New leancall library lets Python code call Lean functions directly

A post titled "Calling Lean Functions As Python Functions" introduces leancall, a Python library for Lean-Python interop built on LeanInteract, which gives a Lean REPL as a Python library. Examples include a Lean controller balancing a gym cartpole environment and a Lean ray tracer displayed with Python plotting tools.

Checked against: philipzucker.com

Lean core

Leo de Moura fixes Lean's type class resolution cache

A merged pull request to leanprover/lean4 makes the type class resolution cache properly cache results for type classes containing output parameters. Output parameter arguments, and universe levels that only appear in output parameter types, are erased from the cache key to avoid cache misses.

Checked against: lean4#12286

Lean core

Sebastian Ullrich's merged PR separates meta and non-meta code in Lean binaries

The change lets the module system, in cooperation with the linker, keep tactics used only in proofs out of the final native binary. A simple example using meta import Lean shrinks from 130MB to 1.7MB. As a breaking change, importModules (loadExts := true) must now be preceded by enableInitializersExecution.

Checked against: lean4#12016

Lean core

Leo de Moura merges three Lean core changes to instance handling

Lean now identifies instance parameters by type using isClass? instead of binder syntax, dsimp no longer simplifies instances by default, and isDefEq no longer raises transparency to .default for implicit arguments, a change the PR calls very disruptive. Old behavior is available through backward.* options, and the PRs cite problems in Mathlib.

Checked against: lean4#12172lean4#12195lean4#12179

Lean core

Willem Vanhulle builds a terminal user interface for Lean 4 users

Willem Vanhulle is putting together a TUI (a terminal-only user interface) for Lean4 users, built with Ratatui. The TUI has several display modes with different display styles for on-going mathematical proof development, and documentation is available.

Image: linkedin.com

Checked against: LinkedIn post

Lean core

Lean repository adds SymM symbolic simulation benchmark from Lean@Google Hackathon

A new benchmark in the lean4 test suite, described as a synthetic benchmark from the Lean@Google Hackathon, compares a MetaM tactic solution with SymM solutions, including a "SymM Solution + reusing simplifier cache" variant, on generated command sequences of up to 700 iterations, also timing kernel checking.

Checked against: leanprover/lean4

Lean core

Sebastian Ullrich proposes bundling Lean's Init library into one .olean file

A pull request by Sebastian Ullrich bundles all Init module files into a single file with cross-sharing, reducing cumulative size from 325MB to 264MB and openat calls for import Init on Linux from about 2000 to about 80. The pull request is still open.

Checked against: lean4#11965

Lean core

Leo de Moura removes super-linear kernel overhead in lambda simplification

A merged Lean pull request by Leo de Moura improves the proof term produced by mkFunext, which Sym.simp uses when simplifying lambda expressions. For a 200-lambda benchmark, kernel checking time fell from 148.681 ms to 6.903 ms, and the approach will later come to Meta.simp.

Checked against: lean4#11932

Lean core

Leo de Moura adds benchmarks showing SymM beating MetaM on intros/apply

A merged Lean 4 pull request by Leo de Moura adds performance comparison tests between the new SymM monad and the standard MetaM for intros/apply operations. Results show a 10-20x speedup, rising from 10.8x at size 1000 to 22.0x at size 6000.

Checked against: lean4#11838leanprover/lean4

Lean core

Lean 4.35.0 ships vcgen, lake check, and bundled independent kernels

Lean 4.35.0, published on 2026-10-12, adds vcgen, a faster and more general successor of mvcgen, plus lake check and lake comparator, which check a project with Lean's kernel and optionally several independent kernels now included in the toolchain.

Checked against: v4.35.0 release noteslean4 v4.35.0

Lean core

Lean reference manual documents vcgen, the successor of mvcgen in Lean 4.35

A pull request by Sebastian Graf documents the vcgen tactic and its Std.WP framework, adds the tutorial "Verifying Imperative Programs Using vcgen", and moves the mvcgen chapter and tutorial to their own files. The Kraken project already uses vcgen to prove that FFmpeg's FMA3 dot-product loop, over two arrays that may alias, terminates without faulting.

Checked against: reference-manual#927zrlk/kraken

Lean core

Joachim Breitner and Lean FRO describe the proof behind con-leche checker

con-leche, a checker for Lean 4, comes with a proof in Lean that every environment it accepts has a model in set theory, so no accepted environment holds a proof of False. A new document gives a pen-and-paper account of that argument on a simplified fragment of the checker.

Checked against: leanprover.github.io

Lean core

Sebastian Ullrich removes Lean's 255-object-field limit per constructor

A merged pull request by Sebastian Ullrich removes the limit of 255 object fields per constructor, and thus per structure. When a constructor has more, the compiler keeps the first 254 in the constructor object and stores the rest in a chain of spill objects, with one pointer followed per spill object on access.

Checked against: lean4#15516

Lean core

Julia Markus Himmel reworks order instances across Lean core types

Julia Markus Himmel redefined the order on String as the lexicographic order of its UTF-8 encoding, made Min Float follow the IEEE-754-2019 minimum operation, and added missing order instances for BitVec, List, Array, Vector and ByteArray. Sofia Rodrigues fixed leaks and refactored the libuv bindings.

Checked against: lean4#15581lean4#15257lean4#15274lean4#15304lean4#15329lean4#15175lean4#15545

More news