lean4-htt/tests/lean/run/998.lean
jrr6 e337129108
fix: move auxDeclToFullName to LocalContext to fix name (un)resolution (#7075)
This PR ensures that names suggested by tactics like `simp?` are not
shadowed by auxiliary declarations in the local context and that names
of `let rec` and `where` declarations are correctly resolved in tactic
blocks.

This PR contains the following potentially breaking changes:
* Moves the `auxDeclToFullName` map from `TermElab.Context` to
`LocalContext`.
* Refactors `Lean.Elab.Term.resolveLocalName : Name → TermElabM …` to
`Lean.resolveLocalName [MonadResolveName m] [MonadEnv m] [MonadLCtx m] :
Name → m …`.
* Refactors the `TermElabM` action `Lean.Elab.Term.withAuxDecl` to a
monad-polymorphic action `Lean.Meta.withAuxDecl`.
* Adds an optional `filter` argument to `Lean.unresolveNameGlobal`.

Closes #6706, closes #7073.
2025-03-03 16:10:54 +00:00

13 lines
460 B
Text

import Lean
set_option maxHeartbeats 100000
attribute [simp] Array.findIdx?.loop
attribute [simp] Lean.expandExplicitBindersAux.loop
attribute [simp] Lean.resolveLocalName.loop
-- Mathlib
-- attribute [simp] BinaryHeap.heapifyDown
-- attribute [simp] ByteSlice.forIn.loop
-- attribute [simp] Lean.Export.exportName -- Fixed see 998Export.lean
-- attribute [simp] Lean.Export.exportLevel -- Fixed see 998Export.lean
-- attribute [simp] Array.heapSort.loop