Changelog

leanprover/lean4 · · 4 commits

Name resolution and recursion fixes land

Lean improves auxiliary-name lookup and fixes structural recursion on match discriminants, alongside a stage0 refresh.

Auxiliary declarations now resolve like their globals (Kha2f17203)

Name resolution now treats auxiliary local declarations from let rec and where like the global names they stand for, competing by longest matching prefix and winning ties. This fixes subtle dotted-name misresolutions and makes lookup semantics more consistent and faster.

Structural recursion now handles recursive match discriminants (nomeata136fe94)

Lean now translates recursive calls that appear in match discriminants as well as in alternatives, avoiding a kernel unknown constant failure and preserving structural recursion fallback behavior under async elaboration. A regression test was added for the affected pattern.

Other misc changes

  • Refactored internal error utilities to live under Lean.Internal.ErrorUtils and updated imports/open namespaces across elaborator modules (robsimmons690baab).
  • Updated stage0 artifacts and flipped the CI stage2/update-stage0 checkbox state (1e3f1c9).