List.foldl_map_sym: law of bend-mathlib@0.8.1.0 Import: import bend-mathlib@0.8.1.0/list.bend as List Lines 2702-2711 of bend-mathlib@0.8.1.0/list.bend: https://jend.leeeet.dev/read.txt?path=bend-mathlib@0.8.1.0/list.bend&start_line=2702&end_line=2711 import Base # A left fold over a map folds with the mapped function: foldl g z (map f xs) = foldl (fun acc x => g acc (f x)) z xs, reversed to rewrite toward the simple side. law foldl_map_sym: for ~A: Type for ~B: Type for ~C: Type for ~f: A -> B for ~g: C -> B -> C for xs: List for -z: C {List.foldl(~&1, ~A, ~C, ~(x => y => g(x, f(y))), xs, z) == List.foldl(~&1, ~B, ~C, ~g, List.map(~A, ~B, ~f, xs), z) : C} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.foldl https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.map https://jend.leeeet.dev/definition.txt?path=bend-mathlib@0.8.1.0/list.bend&name=foldl_map