Changelog

leanprover/lean4 · · 10 commits

Lean gets an arithmetic simproc and safer RC runtime

Big math automation lands alongside RC overflow fixes, a DiscrTree refactor, and a few smaller ergonomics tweaks.

Arithmetic normalization now handles relations and Sym.simp (leodemoura33bb0aa)

Sym.Arith.normalize? now normalizes =, ≤, and < over commutative rings and semirings, moving terms to one side and simplifying to polynomial normal form. That lets the arith simproc close goals when both sides reduce to the same polynomial, and extends Sym.simp with an opt-in arithmetic pre-simproc.

Runtime RC overflow handling is hardened (Kha2b21d8b, vincentqb8546083)

The runtime now distinguishes ordinary sticky counts from counts that overflowed out of the single-threaded range, and treats both as unshared where appropriate. This closes a potential undefined-behavior hole in sharing/deletion cascades by ensuring children of overflowed objects are also marked thread-shared or preserved correctly.

Discrimination trees gain a single-child chain form (robsimmonsfbfa241)

DiscrTree now represents no-value single-child nodes with a dedicated .chain branch instead of a full node. This is a memory-optimized refactor that also touches insertion, matching, and pretty-printing, so it should reduce overhead in common trie-heavy uses like simplification.

Deprecated tactic warnings are deduplicated per call (sgraf8123baf820)

Deprecated tactics now warn at most once per invocation, even if the tactic expands into multiple deprecated uses internally. This cuts noisy repeated warnings for expansions like mintro a b c while preserving the deprecation signal.

Other misc changes

  • Grove data regenerated and invalidated facts updated (TwoFX0a25df2)
  • instSMulOfMul priority adjusted (kim-em3fd252f)
  • Error/messages switched to backtick quoting in elaborator tactics (alok033def3)
  • Removed several redundant instances (cppio28fb510)