lean4-htt/tests/lean/run/grind_clear_error.lean
jrr6 34bd6e8bfd
feat: improve split error messages (#9424)
This PR improves the error messages produced by the `split` tactic,
including suggesting syntax fixes and related tactics with which it
might be confused.

Note that, to avoid clashing with the new error message styling
conventions used in these messages, this PR also updates the formatting
of the message produced by `throwTacticEx`.

Closes #6224
2025-07-18 22:36:10 +00:00

16 lines
542 B
Text

reset_grind_attrs%
attribute [grind] List.not_mem_nil
/--
error: Tactic `grind` failed: the goal mentions the declaration `incList`, which is being defined. To avoid circular reasoning, try rewriting the goal to eliminate `incList` before using `grind`.
as✝ : List Nat
a : Nat
as : List Nat
⊢ ∀ (a : Nat), a ∈ (incList as).val → a > 0
-/
#guard_msgs (error) in
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⟩