proposition: Lemma fold_left_app {A B A' B'} (f : A -> B -> A) (ls : list B) (init : A) (g : A' -> B' -> A') (ha : A -> A') (hb : B -> B') (H : forall x y, g (ha x) (hb y) = ha (f x y)) : List.fold_left g (List.map hb ls) (ha init) = ha (List.fold_left f ls init).
proof: Proof. revert init; induction ls as [|x xs IHxs]; simpl; [ reflexivity | ]; intros. rewrite <- IHxs, H; reflexivity. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Coq.Classes.Morphisms Fiat.Parsers.Reflective.Syntax Fiat.Parsers.Reflective.Semantics Fiat.Parsers.Reflective.PartialUnfold Fiat.Parsers.Reflective.SyntaxEquivalence Fiat.Parsers.Reflective.Morphisms Fiat.Common.List.ListFacts Fiat.Common.Equality