intuition.
simpl.
rewrite sumList_body_eq.
2:{
intuition.
rewrite H0 at 1.
eapply eqRat_refl.
trivial.
}
rewrite sumList_factor_constant_r.
rewrite evalDist_lossless.
eapply ratMult_1_l.
trivial.
Qed.

(* Specifications: *)
Lemma sumList_filter : forall (A : Set)(ls : list A)(f : A -> Rat)(P : A -> bool) init,
fold_left (fun r a => r + if (P a) then (f a) else 0) ls init  ==
fold_left (fun r a => r + (f a)) (filter P ls) init.