law any_filter_sym
import bend-mathlib@0.8.1.0/list.bend as Listimport Base
2777# Any over a filter looks for q only where p holds: any q (filter p xs) = any (p and q) xs, reversed to rewrite toward the simple side.
2778law any_filter_sym:
2779 for ~A: Data
2780 for ~p: A -> Bool
2781 for ~q: A -> Bool
2782 for xs: List<&2, A>
2783 {List.any(~&2, ~A, ~(+x => Bool.and(p(x), q(x))), xs) == List.any(~&2, ~A, ~q, List.filter(~A, ~p, xs)) : Bool}
Uses (7)
Used by (0)
No other definition uses this definition.