proposition: Lemma measurable_maxe D (f g : T -> \bar R) : measurable_fun D f -> measurable_fun D g -> measurable_fun D (fun x => maxe (f x) (g x)).
proof: Proof. move=> mf mg mD; apply: (measurability (ErealGenCInfty.measurableE R)) => //. move=> _ [_ [x ->] <-]; rewrite [X in measurable X](_ : _ = (D `&` f @^-1` `[x%:E, +oo[) `|` (D `&` g @^-1` `[x%:E, +oo[)); last first. rewrite predeqE => t /=; split. by rewrite !/= /= !in_itv /= !andbT le_maxr => -[Dx /orP[|]]; tauto. by move=> [|]; rewrite !/= /= !in_itv/= !andbT le_maxr; move=> [Dx ->]//; rewrite orbT. by apply: measurableU; [exact/mf/emeasurable_itv| exact/mg/emeasurable_itv]. Qed.
imports: mathcomp(all_ssreflect ssralg ssrnum ssrint interval) mathcomp(finmap fingroup perm rat) mathcomp(mathcomp_extra boolp classical_sets functions) mathcomp(cardinality fsbigop) reals ereal signed topology numfun normedtype HB(structures) sequences esum measure real_interval realfun exp lebesgue_stieltjes_measure