intuition.
despec; intuition.
exists (p <-$ x; ret (snd p, fst p)).
intuition.
eapply eqRat_trans; eauto.
unfold marginal_r, marginal_l.
dist_inline_first.
dist_skip.
dist_compute.
eapply eqRat_trans; eauto.
unfold marginal_r, marginal_l.
dist_inline_first.
dist_skip.
dist_compute.
repeat simp_in_support.
simpl.
eauto.
Qed.

(* completeness theorems *)
Theorem eq_impl_comp_spec :
forall (A B : Set){eqda : EqDec A}{eqdb : EqDec B}(c1 : Comp A)(c2 : Comp B) x y,
well_formed_comp c1 ->
well_formed_comp c2 ->
evalDist c1 x == evalDist c2 y ->
comp_spec (fun a b => a = x <-> b = y) c1 c2.