End MapFoldResults.
Section MapFoldDistr.
Variable A : Type.
Variable M : Type.
Variable neutral : M.
Variable op : M -> M -> M.
Variable M' : Type.
Variable neutral' : M'.
Variable op' : M' -> M' -> M'.
Variable N : Type.
Variable times : M -> N -> M'.
Variable absorb : forall c:N, times neutral c = neutral'.
Variable
distr :
forall (a b:M) (c:N), times (op a b) c = op' (times a c) (times b c).

Lemma MapFold_distr_r_1 :
forall (f:ad -> A -> M) (m:Map A) (c:N) (pf:ad -> ad),
times (MapFold1 A M neutral op f pf m) c =
MapFold1 A M' neutral' op' (fun (a:ad) (y:A) => times (f a y) c) pf m.