intuition.
despec; intuition.
exists x; intuition.
rewrite H1.
unfold marginal_l.
dist_skip.
eapply evalDist_ret_eq.
case_eq (eqb (fst x0) r1); intuition.
rewrite eqb_leibniz in H4.
subst.
eapply eqb_refl.
case_eq ( (@eqb A eqda1 (@fst A B x0) r1)); intuition.
rewrite eqb_leibniz in H5.
subst.
rewrite eqb_refl in H4.
intuition.
rewrite H.
unfold marginal_r.
dist_skip.
eapply evalDist_ret_eq.
case_eq (eqb (snd x0) r2); intuition.
rewrite eqb_leibniz in H4.
subst.
eapply eqb_refl.
case_eq ( (@eqb B eqdb1 (@snd A B x0) r2)); intuition.
rewrite eqb_leibniz in H5.
subst.
rewrite eqb_refl in H4.
intuition.
Qed.

Theorem comp_spec_symm :
forall (A B : Set){eqda : EqDec A}{eqdb : EqDec B}(p : A -> B -> Prop) c1 c2,
comp_spec p c1 c2 ->
comp_spec (fun b a => p a b) c2 c1.