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.

Theorem sumList_perm : forall (ls1 ls2 : list A)(f1 f2 : A -> Rat),
Permutation ls1 ls2 ->
(forall b, (f1 b) == (f2 b)) ->
(sumList ls1 f1) == (sumList ls2 f2).