induction ls; intuition; simpl in *.
unfold sumList.
simpl.
intuition.
case_eq (P a); intuition.
rewrite sumList_cons.
rewrite filter_app.
rewrite sumList_app.
eapply ratAdd_eqRat_compat; intuition.
rewrite filter_all_true.
eapply sumList_map.
intuition.
apply in_map_iff in H0.
destruct H0.
intuition.
subst.
simpl.
trivial.
rewrite filter_app.
rewrite sumList_app.
symmetry.
rewrite ratAdd_0_l.
symmetry.
eapply ratAdd_eqRat_compat; intuition.
eapply sumList_0; intuition.
apply filter_In in H0.
intuition.
apply in_map_iff in H1.
destruct H1.
intuition.
subst.
simpl in *.
congruence.
Qed.

Lemma filter_cons :
forall (A : Set)(P : A -> bool)(ls : list A) a,
filter P (a :: ls) =
if (P a) then (a :: (filter P ls)) else (filter P ls).