Section fold.
Variables (A : Type) (B : Type).
Variable f : A -> B -> A.
Variable g : B -> A -> A.
Variable h : A -> A.
Variable eqA_dec : forall a b : A, {a = b} + {a <> b}.
Proof using.
intros a l1; generalize a; elim l1; simpl in |- *; auto; clear a l1.
Qed.
Proof using.
intros l; elim l; simpl in |- *; auto.
intros a l0 H a0 f1 H0.
rewrite H0; auto.
Qed.
Proof using.
intros C a l k; generalize a; elim l; simpl in |- *; auto.
Qed.
Proof using.
intros a l1; generalize a; elim l1; simpl in |- *; auto; clear a l1.
intros a l H a0 l2; rewrite H; auto.
Qed.

Theorem fold_left_init :
(forall (a : A) (b : B), h (f a b) = f (h a) b) ->
forall (a : A) (l : list B), fold_left f l (h a) = h (fold_left f l a).