induction ls; intuition.
unfold filter.
unfold compMap.
comp_simp.
simpl.
intuition.
rewrite filter_cons.
case_eq (P a); intuition.
unfold compMap.
fold compMap.
inline_first.
comp_skip.
comp_simp.
eapply eqRat_trans.
comp_skip.
eapply eqRat_refl.
inline_first.
comp_skip.
comp_simp.
dist_compute.
unfold compMap.
fold compMap.
inline_first.
comp_irr_r.
comp_simp.
rewrite IHls.
inline_first.
comp_skip.
comp_simp.
dist_compute.
intuition.
Qed.

Theorem prob_sum_le :
forall (A : Set)(ls : list A)(c : A -> Comp bool),
Pr
[compFold _ (fun b a => x <-$ c a; ret (b || x)) false ls] <=
sumList ls (fun a => Pr [c a]).