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 :
forall (f:ad -> A -> M) (m:Map A) (c:N),
times (MapFold A M neutral op f m) c =
MapFold A M' neutral' op' (fun (a:ad) (y:A) => times (f a y) c) m.