Skip to content

Commit 309ff7a

Browse files
hoheinzollernArthur Djevahirdjian
andcommitted
generalize SimpleFun codomain from realType to sigmaRingType
Co-authored-by: Arthur Djevahirdjian <arthur.djevahirdjian@ens-lyon.fr>
1 parent 723425a commit 309ff7a

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

CHANGELOG_UNRELEASED.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@
254254

255255
- in `simple_functions.v`:
256256
+ lemmas `fctD`, `fctN`, `fctM`, `fctZ`
257+
+ structure `SimpleFun` (and notation `{sfun aT >-> _}`): codomain
258+
generalized from `realType` to `sigmaRingType d'`, adding a display parameter `d'`;
257259

258260
### Deprecated
259261

theories/lebesgue_integral_theory/simple_functions.v

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,46 +72,47 @@ Local Open Scope ring_scope.
7272

7373
Module HBSimple.
7474

75-
HB.structure Definition SimpleFun d (aT : sigmaRingType d) (rT : realType) :=
76-
{f of @isMeasurableFun d _ aT rT f & @FiniteImage aT rT f}.
75+
HB.structure Definition SimpleFun d d' (aT : sigmaRingType d)
76+
(bT : sigmaRingType d') :=
77+
{f of @isMeasurableFun d d' aT bT f & @FiniteImage aT bT f}.
7778

7879
End HBSimple.
7980

80-
Notation "{ 'sfun' aT >-> T }" := (@HBSimple.SimpleFun.type _ aT T) : form_scope.
81+
Notation "{ 'sfun' aT >-> T }" := (@HBSimple.SimpleFun.type _ _ aT T) : form_scope.
8182
Notation "[ 'sfun' 'of' f ]" := [the {sfun _ >-> _} of f] : form_scope.
8283

8384
Module HBNNSimple.
8485
Import HBSimple.
8586

8687
HB.structure Definition NonNegSimpleFun
8788
d (aT : sigmaRingType d) (rT : realType) :=
88-
{f of @SimpleFun d _ _ f & @NonNegFun aT rT f}.
89+
{f of @SimpleFun d _ _ _ f & @NonNegFun aT rT f}.
8990

9091
End HBNNSimple.
9192

9293
Notation "{ 'nnsfun' aT >-> T }" := (@HBNNSimple.NonNegSimpleFun.type _ aT%type T) : form_scope.
9394
Notation "[ 'nnsfun' 'of' f ]" := [the {nnsfun _ >-> _} of f] : form_scope.
9495

9596
Section sfun_pred.
96-
Context {d} {aT : sigmaRingType d} {rT : realType}.
97-
Definition sfun : {pred _ -> _} := [predI @mfun _ _ aT rT & fimfun].
97+
Context {d d'} {aT : sigmaRingType d} {bT : sigmaRingType d'}.
98+
Definition sfun : {pred _ -> _} := [predI @mfun _ _ aT bT & fimfun].
9899
Definition sfun_key : pred_key sfun. Proof. exact. Qed.
99100
Canonical sfun_keyed := KeyedPred sfun_key.
100101
Lemma sub_sfun_mfun : {subset sfun <= mfun}. Proof. by move=> x /andP[]. Qed.
101102
Lemma sub_sfun_fimfun : {subset sfun <= fimfun}. Proof. by move=> x /andP[]. Qed.
102103
End sfun_pred.
103104

104105
Section sfun.
105-
Context {d} {aT : measurableType d} {rT : realType}.
106-
Notation T := {sfun aT >-> rT}.
107-
Notation sfun := (@sfun _ aT rT).
106+
Context {d d'} {aT : measurableType d} {bT : sigmaRingType d'}.
107+
Notation T := {sfun aT >-> bT}.
108+
Notation sfun := (@sfun _ _ aT bT).
108109
Section Sub.
109-
Context (f : aT -> rT) (fP : f \in sfun).
110+
Context (f : aT -> bT) (fP : f \in sfun).
110111
Definition sfun_Sub1_subproof :=
111-
@isMeasurableFun.Build d _ aT rT f (set_mem (sub_sfun_mfun fP)).
112+
@isMeasurableFun.Build d d' aT bT f (set_mem (sub_sfun_mfun fP)).
112113
#[local] HB.instance Definition _ := sfun_Sub1_subproof.
113114
Definition sfun_Sub2_subproof :=
114-
@FiniteImage.Build aT rT f (set_mem (sub_sfun_fimfun fP)).
115+
@FiniteImage.Build aT bT f (set_mem (sub_sfun_fimfun fP)).
115116

116117
Import HBSimple.
117118

@@ -135,15 +136,15 @@ Proof. by []. Qed.
135136

136137
HB.instance Definition _ := isSub.Build _ _ T sfun_rect sfun_valP.
137138

138-
Lemma sfuneqP (f g : {sfun aT >-> rT}) : f = g <-> f =1 g.
139+
Lemma sfuneqP (f g : {sfun aT >-> bT}) : f = g <-> f =1 g.
139140
Proof. by split=> [->//|fg]; apply/val_inj/funext. Qed.
140141

141-
HB.instance Definition _ := [Choice of {sfun aT >-> rT} by <:].
142+
HB.instance Definition _ := [Choice of {sfun aT >-> bT} by <:].
142143

143144
(* NB: already in cardinality.v *)
144-
HB.instance Definition _ x : @FImFun aT rT (cst x) := FImFun.on (cst x).
145+
HB.instance Definition _ x : @FImFun aT bT (cst x) := FImFun.on (cst x).
145146

146-
Definition cst_sfun x : {sfun aT >-> rT} := cst x.
147+
Definition cst_sfun x : {sfun aT >-> bT} := cst x.
147148

148149
Lemma cst_sfunE x : @cst_sfun x =1 cst x. Proof. by []. Qed.
149150

@@ -165,7 +166,7 @@ Definition fctWE := (fctD, fctN, fctM, fctZ).
165166
Section ring.
166167
Context d (aT : measurableType d) (rT : realType).
167168

168-
Lemma sfun_subring_closed : subring_closed (@sfun d aT rT).
169+
Lemma sfun_subring_closed : subring_closed (@sfun d _ aT rT).
169170
Proof.
170171
by split=> [|f g|f g]; rewrite ?inE/= ?rpred1//;
171172
move=> /andP[/= mf ff] /andP[/= mg fg]; rewrite !(rpredB, rpredM).

0 commit comments

Comments
 (0)