law any_map
import bend-mathlib@0.8.1.0/list.bend as Listimport Base
1522# Any over a map checks the composed predicate: any p (map f xs) = any (p . f) xs.
1523law any_map:
1524 for ~A: Type
1525 for ~B: Type
1526 for ~f: A -> B
1527 for ~p: B -> Bool
1528 for xs: List<A>
1529 {List.any(~&1, ~B, ~p, List.map(~A, ~B, ~f, xs)) == List.any(~&1, ~A, ~(x => p(f(x))), xs) : Bool}