proposition: Lemma cpr_eq_pairAr a b c d : `Pr[ TX = a | [% TY, [% TZ, TW]] = (b, (c, d)) ] = `Pr[ TX = a | [% TY, TZ, TW] = (b, c, d) ].
proof: Proof. rewrite 2!cpr_eqE; congr (_ / _). rewrite !pr_eqE; congr Pr. by apply/setP => u; rewrite !inE /= !xpair_eqE !andbA. by rewrite pr_eq_pairA. 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