lean4-htt/tests/lean/run/grind_list_issue.lean
Leonardo de Moura 2979830120
fix: Bool disequality propagation in grind (#7781)
This PR adds a new propagation rule for `Bool` disequalities to `grind`.
It now propagates `x = true` (`x = false`) from the disequality `x =
false` (`x = true`). It ensures we don't have to perform case analysis
on `x` to learn this fact. See tests.
2025-04-01 22:12:20 +00:00

9 lines
275 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.

reset_grind_attrs%
open List Nat
attribute [grind] List.filter_nil List.filter_cons
attribute [grind] List.any_nil List.any_cons
@[simp] theorem any_filter {l : List α} {p q : α → Bool} :
(filter p l).any q = l.any fun a => p a && q a := by
induction l <;> grind