intuition.
simpl.
eapply trans.
2:{
eapply rel_sumList_compat;
intuition.
eapply mult_proper.
eapply refl.
eapply eqRat_refl.
eapply H1.
trivial.
}
specialize (rel_sumList_factor_r_r (evalDist c) (getSupport c) v H); intuition.
eapply trans.
2:{
eapply H2.
}
eapply refl.
rewrite evalDist_lossless.
symmetry.
eapply ratMult_1_l.
trivial.
Qed.

(* Specifications: *)
Theorem evalDist_iso :
forall rel (A B C D : Set) (f : C -> D) (f_inv : D -> C)
(d : Comp D) (c : Comp C) (f1 : D -> Comp B)
(f2 : C -> Comp A) (a : A) (b : B),
RatRel rel ->
(forall x : D, In x (getSupport d) -> f (f_inv x) = x) ->
(forall x : C, In x (getSupport c) -> f_inv (f x) = x) ->
(forall x : D, In x (getSupport d) -> In (f_inv x) (getSupport c)) ->
(forall x : C, In x (getSupport c) -> evalDist d (f x) == evalDist c x) ->
(forall x : C,
In x (getSupport c) -> rel (evalDist (f1 (f x)) b) (evalDist (f2 x) a)) ->
rel (evalDist (x <-$ d; f1 x) b) (evalDist (x <-$ c; f2 x) a).