proposition: Lemma fold_left_assoc {A} (f : A -> A -> A) (f_assoc : forall x y z, f x (f y z) = f (f x y) z) (a0 a1 : A) (ls : list A) : fold_left f ls (f a0 a1) = f a0 (fold_left f ls a1).
proof: Proof. revert a0 a1; induction ls as [|?? IHls]; simpl in *; intros; [ reflexivity | rewrite <- f_assoc, <- IHls ]. reflexivity. 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