(* Use of this source code is governed by the license described	* * in the LICENSE file at the root of the source tree.		*)
Set Implicit Arguments.
(* stuff that needs to go somewhere else *)
intuition.
apply (ratAdd_leRat_compat_l r3) in H1.
assert (ratSubtract r1 r3 + r3 == r1).
rewrite ratAdd_comm.
eapply ratSubtract_ratAdd_inverse_2; intuition.
rewrite <- H2.
rewrite H1.
rewrite ratAdd_comm.
eapply eqRat_impl_leRat.
apply ratSubtract_ratAdd_inverse_2; intuition.
Qed.

Theorem sumList_filter_complement :
forall (A : Set){eqd : EqDec A}(c : Comp A)(a : A),
well_formed_comp c ->
sumList (filter (fun x => negb (eqb a x)) (getSupport c)) (evalDist c) ==
ratSubtract 1 (evalDist c a).