lean4-htt/tests/lean/run/grind_9899.lean
Leonardo de Moura 2e991d3b10
fix: panic at invalid pattern in grind (#9902)
This PR fixes a panic when an invalid pattern is provided to `grind`.

closes #9899
2025-08-14 02:25:37 +00:00

6 lines
274 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.

namespace List
-- Should not panic
#guard_msgs (drop error) in
theorem countP_filterMap' {p : β → Bool} {f : α → Option β} {l : List α} :
countP p (filterMap f l) = countP (fun a => ((f a).map p).getD false) l := by
induction l with grind [=_ Option.getD_map]