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.

Theorem fold_right_app :
forall a l1 l2,
fold_right g a (l1 ++ l2) = fold_right g (fold_right g a l2) l1.