proposition: Lemma rsum_disjoints_set h : \sum_(a in [set : 'I_Nmax.+1]) h a = \sum_(a in [set x | PN x == 0]) h a + \sum_(a in [set x | PN x != 0]) h a.
proof: Proof. rewrite -big_union //; last first. rewrite disjoints_subset. rewrite (_ : ~: [set x | PN x == 0] = [set x | PN x != 0])//. by apply/setP => i; rewrite !inE. by apply eq_bigl => i; rewrite !inE orbN. Qed.
imports: mathcomp(all_ssreflect ssralg ssrnum matrix) Reals mathcomp(Rstruct) ssrR Reals_ext realType_ext logb ssr_ext ssralg_ext bigop_ext fdist proba entropy divergence log_sum source_code