proposition: Lemma pr_inE' (X : {RV P -> A}) (E : {set A}) : `Pr[ X \in E ] = Pr `p_X E.
proof: Proof. rewrite pr_eq_setE /Pr partition_big_preimset /=. by apply eq_bigr => a aE; rewrite /dist_of_RV fdistmapE. Qed.
imports: mathcomp(all_ssreflect ssralg ssrnum matrix) mathcomp(Rstruct reals) Reals Lra ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext fdist