proposition: Lemma ler_sum_predU [P Q : pred I] (F : I -> R) : (forall i : I, P i -> Q i -> 0 <= F i) -> \sum_(i <- r | (predU P Q) i) F i <= \sum_(i <- r | P i) F i + \sum_(i <- r | Q i) F i.
proof: Proof. move=> F0. under eq_bigr => i _. rewrite (_ : F i = if Q i then F i else F i); last by case: ifP. over. rewrite big_if /=. under eq_bigl do rewrite orbC orbK. rewrite addrC; apply: lerD => //. apply: ler_suml=> // i; rewrite andb_orl andbN orbF; last by case/andP. by move=> /[dup] /F0 /[swap] -> /[!andTb] /[!negbK]. Qed.
imports: mathcomp(all_ssreflect ssralg ssrnum matrix) logb ssr_ext ssralg_ext