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