law all_filter_sym
import bend-mathlib@0.8.1.0/list.bend as Listimport Base
2766# All over a filter checks q only where p holds: all q (filter p xs) = all (not p or q) xs, reversed to rewrite toward the simple side.
2767law all_filter_sym:
2768 for ~A: Data
2769 for ~p: A -> Bool
2770 for ~q: A -> Bool
2771 for xs: List<&2, A>
2772 {List.all(~&2, ~A, ~(+x => Bool.or(Bool.not(p(x)), q(x))), xs) == List.all(~&2, ~A, ~q, List.filter(~A, ~p, xs)) : Bool}
Uses (8)
Used by (0)
No other definition uses this definition.