law foldl_reverse_sym
import bend-mathlib@0.8.1.0/list.bend as Listimport Base
3065# A left fold over the reverse is a right fold with the arguments flipped, reversed to rewrite toward the simple side.
3066law foldl_reverse_sym:
3067 for ~a: Quant
3068 for ~A: Kind(a)
3069 for ~B: Type
3070 for ~f: B -> A -> B
3071 for xs: List<a, A>
3072 for -z: B
3073 {List.foldr(~a, ~A, ~B, ~(x => y => f(y, x)), xs, z) == List.foldl(~a, ~A, ~B, ~f, List.reverse(a, A, xs), z) : B}
Uses (6)
Used by (0)
No other definition uses this definition.