proposition: Lemma cdiv1_ge0 z : 0 <= cdiv1 z.
proof: Proof. have [z0|z0] := eqVneq (PQR`2 z) 0. apply/RleP/sumr_ge0 => -[a b] _; apply/RleP. by rewrite {1}/jcPr setX1 Pr_set1 (dom_by_fdist_snd _ z0) div0R mul0R. have Hc : (fdistX PQR)`1 z != 0 by rewrite fdistX1. have Hc1 : (fdistX (fdist_proj13 PQR))`1 z != 0. by rewrite fdistX1 fdist_proj13_snd. have Hc2 : (fdistX (fdist_proj23 PQR))`1 z != 0. by rewrite fdistX1 fdist_proj23_snd. rewrite cdiv1_is_div //; apply div_ge0. apply/dominatesP => -[a b]. rewrite fdist_prodE !jfdist_condE //= mulR_eq0 => -[|]. - rewrite /jcPr !setX1 !Pr_set1 !mulR_eq0 => -[|]. rewrite !fdistXI. by move/fdist_proj13_domin => ->; left. rewrite !fdistXI. by rewrite fdist_proj13_snd /Rdiv => ->; right. - rewrite /jcPr !setX1 !Pr_set1 !mulR_eq0 => -[|]. rewrite !fdistXI. by move/fdist_proj23_domin => ->; left. by rewrite !fdistXI fdist_proj23_snd => ->; right. Qed.
imports: mathcomp(all_ssreflect all_algebra fingroup perm matrix) Reals mathcomp(Rstruct) ssrR Reals_ext realType_ext ssr_ext ssralg_ext bigop_ext logb ln_facts fdist jfdist_cond proba binary_entropy_function divergence