law all_filter
import bend-mathlib@0.8.1.0/list.bend as Listimport Base
1450# All over a filter checks q only where p holds: all q (filter p xs) = all (not p or q) xs.
1451law all_filter:
1452 for ~A: Data
1453 for ~p: A -> Bool
1454 for ~q: A -> Bool
1455 for xs: List<&2, A>
1456 {List.all(~&2, ~A, ~q, List.filter(~A, ~p, xs)) == List.all(~&2, ~A, ~(+x => Bool.or(Bool.not(p(x)), q(x))), xs) : Bool}