intuition.
destruct (in_dec (EqDec_dec eqd) a (getSupport c)).
simpl.
eapply eqRat_trans.
eapply sumList_exactly_one.
eapply getSupport_NoDup.
eauto.
intuition.
destruct (EqDec_dec eqd b a).
subst.
intuition.
eapply ratMult_0_r.
destruct (EqDec_dec eqd a a).
eapply ratMult_1_r.
congruence.
simpl.
eapply eqRat_trans.
eapply sumList_0.
intuition.
destruct (EqDec_dec eqd a0 a).
subst.
intuition.
eapply ratMult_0_r.
symmetry.
eapply getSupport_not_In_evalDist.
trivial.
Qed.

(* Specifications: *)
Theorem fundamental_lemma : forall (A B : Set)(eqda : EqDec A)(eqdb : EqDec B)(c1 c2 : Comp A)(badness : A -> bool)(proj : A -> B),
Pr [a <-$ c1; ret (badness a)] == Pr[a <-$ c2; ret (badness a)] ->
(forall x, evalDist (a <-$ c1; ret (proj a, badness a)) (x, false) == evalDist (a <-$ c2; ret (proj a, badness a)) (x, false)) ->
forall x,
| (evalDist (a <-$ c1; ret (proj a)) x)  - (evalDist (a <-$ c2; ret (proj a)) x) | <=
Pr [a <-$ c1; ret (badness a)].