lean4-htt/tests/lean/run/grind_12390.lean
Leonardo de Moura 14b595e952
feat: better support for eta expanded terms in grind (#12415)
This PR improves the support for eta expanded terms in `grind` patterns.

Closes #12390
2026-02-10 19:46:00 +00:00

24 lines
667 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

variable {α β : Type}
axiom foo (f : α → β) : β
axiom fooProp : β → Prop
axiom fooProp_foo {f : α → β} : fooProp (foo (fun x ↦ f x))
axiom fooProp_foo' {f : α → β} : fooProp (foo f)
attribute [grind ←] fooProp_foo -- should work
example {f : α → β} : fooProp (foo f) := by grind -- succeeds, using `fooProp_foo`
/--
info: Try these:
[apply] grind only [← fooProp_foo]
[apply] grind => instantiate only [← fooProp_foo]
-/
#guard_msgs in
example {f : α → β} : fooProp (foo f) := by grind? -- succeeds, using `fooProp_foo`
attribute [grind ←] fooProp_foo' -- succeeds
example {f : α → β} : fooProp (foo f) := by grind