proposition: Lemma fold_map : forall {A B C} seq f g init, @List.fold_left C A (fun acc x => f acc (g x)) seq init = @List.fold_left C B (fun acc x => f acc ( x)) (@List.map A B g seq) init.
proof: Proof. induction seq; simpl; intros; trivial; try rewrite IHseq; intuition. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Coq.Lists.List Coq.Lists.SetoidList Coq.Bool.Bool Fiat.Common Fiat.Common.List.Operations Fiat.Common.Equality Fiat.Common.List.FlattenList Fiat.Common.LogicFacts