proposition: Lemma ge0_integralE D f : (forall x, D x -> 0 <= f x) -> \int_(x in D) f x = nnintegral mu (f \_ D).
proof: Proof. move=> f0; rewrite /integral funeneg_restrict funepos_restrict. have /eq_restrictP-> := ge0_funeposE f0. have /eq_restrictP-> := ge0_funenegE f0. by rewrite erestrict0 nnintegral0 sube0. Qed.
imports: HB(structures) mathcomp(all_ssreflect ssralg ssrnum ssrint interval finmap) mathcomp(mathcomp_extra boolp classical_sets functions) mathcomp(cardinality fsbigop ) signed reals ereal topology normedtype sequences real_interval esum measure lebesgue_measure numfun