@@ -6,6 +6,7 @@ From mathcomp Require Import mathcomp_extra boolp classical_sets functions.
66From mathcomp Require Import cardinality reals fsbigop ereal topology tvs.
77From mathcomp Require Import normedtype sequences real_interval esum measure.
88From mathcomp Require Import lebesgue_measure numfun realfun measurable_realfun.
9+ From mathcomp Require Import borel_hierarchy.
910
1011(**md************************************************************************* *)
1112(* # Simple functions *)
@@ -216,6 +217,55 @@ Definition scale_sfun k f : {sfun aT >-> rT} := k \o* f.
216217End ring.
217218Arguments indic_sfun {d aT rT} _.
218219
220+ Section sfun_lmodType.
221+ Context d (aT : measurableType d) (R : realType).
222+ Import HBSimple.
223+
224+ HB.instance Definition _ (V : normedModType R) := GRing.Lmodule.on (borel_type V).
225+
226+ Lemma sfun_op (U V W : normedModType R)
227+ (f : {sfun aT >-> borel_type U}) (g : {sfun aT >-> borel_type V})
228+ (h : U * V -> W) :
229+ (fun x => h (f x, g x)) \in @sfun _ _ aT (borel_type W).
230+ Proof .
231+ rewrite inE; apply/andP; split; rewrite inE/=.
232+ move=> _ Y mY; rewrite setTI.
233+ rewrite (_ : _ @^-1` Y =
234+ \bigcup_(a in range f) (\bigcup_(b in range g)
235+ ((f @^-1` [set a] `&` g @^-1` [set b]) `&` [set _ | Y (h (a, b))]))).
236+ apply/seteqP; split=> [x/= Yfg|x [a _] [b _] [[/= <- <-]]//].
237+ by exists (f x); [exists x|exists (g x); [exists x|split]].
238+ apply: fin_bigcup_measurable; first exact: fimfunP.
239+ move=> a _; apply: fin_bigcup_measurable; first exact: fimfunP.
240+ move=> b _; apply: measurableI; last first.
241+ have [Yhab|Yhab] := pselect (Y (h (a, b))).
242+ by rewrite (_ : [set _ | _] = setT);
243+ [apply/seteqP; split|exact: measurableT].
244+ rewrite (_ : [set _ | _] = set0); last exact: measurable0.
245+ by apply/seteqP; split.
246+ apply: measurableI.
247+ exact: (measurable_funPTI f (measurable1 a)).
248+ exact: (measurable_funPTI g (measurable1 b)).
249+ apply: (sub_finite_set (B := h @` (range f `*` range g))).
250+ by move=> _ [x _ <-]/=; exists (f x, g x) => //; split; exists x.
251+ by apply: finite_image; apply: finite_setX; exact: fimfunP.
252+ Qed .
253+
254+ Lemma sfun_submod_closed (V : normedModType R) :
255+ submod_closed (@sfun _ _ aT (borel_type V)).
256+ Proof .
257+ split=> [|k f g sf sg]; first exact: (valP (cst_sfun (0 : borel_type V))).
258+ exact: (sfun_op (sfun_Sub sf) (sfun_Sub sg) (fun t => k *: t.1 + t.2)).
259+ Qed .
260+
261+ HB.instance Definition _ (V : normedModType R) :=
262+ GRing.isSubmodClosed.Build _ _ (@sfun _ _ aT (borel_type V))
263+ (sfun_submod_closed V).
264+ HB.instance Definition _ (V : normedModType R) :=
265+ [SubChoice_isSubLmodule of {sfun aT >-> borel_type V} by <:].
266+
267+ End sfun_lmodType.
268+
219269Lemma preimage_nnfun0 T (R : realDomainType) (f : {nnfun T >-> R}) t :
220270 t < 0 -> f @^-1` [set t] = set0.
221271Proof .
0 commit comments