lean4-htt/tests/lean/run/grind_clear_error.lean
Leonardo de Moura ce56e2139e
feat: support for incrementally processing hypotheses in grind (#11787)
This PR adds support for incrementally processing local declarations in
`grind`. Instead of processing all hypotheses at once during goal
initialization, `grind` now tracks which local declarations have been
processed via `Goal.nextDeclIdx` and provides APIs to process new
hypotheses incrementally.
This feature will be used by the new `SymM` monad for efficient symbolic
simulation.
2025-12-24 02:50:22 +00:00

13 lines
350 B
Text

module
reset_grind_attrs%
attribute [grind] List.not_mem_nil
/-!
Note: the following definition used to fail because the goal mentions the
declaration `incList` being defined.
-/
def incList (as : List Nat) : { as : List Nat // ∀ a, a ∈ as → a > 0 } :=
match as with
| [] => ⟨[], by grind⟩
| a::as => ⟨(incList as).1, by grind⟩