Section SumList.
Variable A : Set.
Definition sumList(ls : list A)(f : A -> Rat) := fold_left (fun a b => a + (f b)) ls 0.
(* Facts about sumList *)
Abort.
Abort.

Lemma fold_add_init : forall (ls : list A)(f : A -> Rat) init1 init2,
fold_left (fun (r : Rat) (a : A) => r + (f a)) ls (init1 + init2) ==
init1 + (fold_left (fun (r : Rat) (a : A) => r + (f a)) ls init2).