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.
13 lines
350 B
Text
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⟩
|