proposition: Lemma monoid_fold_left_head: forall {f} {Proper_f: Proper (equiv ==> equiv ==> equiv) f} (e: A) a l, (forall x, f e x === x) -> (forall x, f x e === x) -> (forall x y z, f (f x y) z === f x (f y z)) -> fold_left f (a :: l) e === f a (fold_left f l e).
proof: Proof. intros. simpl. pose proof (proper_fold_left f). rewrite H. revert a; induction l; intros; simpl. + symmetry; auto. + rewrite (IHl (f a0 a)), H, (IHl a). rewrite H1. reflexivity. Qed.
imports: Coq.Classes.Morphisms CertiGraph.lib.Relation_ext CertiGraph.lib.Equivalence_ext Coq.Lists.List