induction 1; intuition.
inversion H0; clear H0; subst.
rewrite H.
rewrite H2.
intuition.
inversion H2; clear H2; subst.
rewrite H1.
rewrite H9.
eapply ratAdd_eqRat_compat;
eauto.
Qed.

(* Specifications: *)
Lemma sumList_partition : forall (A : Set)(P : A -> bool)(ls : list A)(f : A -> Rat),
sumList ls f ==
sumList ls (fun a => (f a) * (if (P a) then 1 else 0)) +
sumList ls (fun a => (f a) * (if (P a) then 0 else 1)).