lean4-htt/tests/lean/run/grind_eta.lean
Leonardo de Moura 6683d1eb91
chore: add module keyword to grind tests (#10036)
This PR also fixes missing `@[expose]` in grind support definitions.
2025-08-21 22:02:08 +00:00

14 lines
511 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.

module
reset_grind_attrs%
example {l : List α} {f : β → α → β} {b : β} :
l.foldl f b = l.reverse.foldr (fun x y => f y x) b := by
grind [List.foldr_reverse]
/-
The following example doesn't work yet. `grind` doesn't have a mechanism
for inferring that `fun x y => g y x` is equal to `f` given
the equality `g = (f x y => f y x)`
-/
-- example {l : List α} {f : β → α → β} {b : β} :
-- g = (fun x y => f y x) → l.foldl f b = l.reverse.foldr g b := by
-- grind [List.foldr_reverse]