law foldr_map_sym
import bend-mathlib@0.8.1.0/list.bend as Listimport Base
2688# A right fold over a map folds with the mapped function: foldr g z (map f xs) = foldr (g . f) z xs, reversed to rewrite toward the simple side.
2689law foldr_map_sym:
2690 for ~A: Type
2691 for ~B: Type
2692 for ~C: Type
2693 for ~f: A -> B
2694 for ~g: B -> C -> C
2695 for xs: List<A>
2696 for -z: C
2697 {List.foldr(~&1, ~A, ~C, ~(x => y => g(f(x), y)), xs, z) == List.foldr(~&1, ~B, ~C, ~g, List.map(~A, ~B, ~f, xs), z) : C}
Uses (5)
Used by (0)
No other definition uses this definition.