Skip to content

Commit 1fd5752

Browse files
author
adjevahi
committed
generalized display from reals to normed modules
1 parent 7d7f34f commit 1fd5752

2 files changed

Lines changed: 83 additions & 41 deletions

File tree

CHANGELOG_UNRELEASED.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,15 @@
238238
+ module `MeasurableRocitv`
239239
+ definition `open_type`
240240
+ notations `.-open`, `.-open.-measurable`
241-
+ module `MeasurableRopen`
241+
+ module `MeasurableOpen`
242+
* definition `measurableTypeO`
243+
+ definition `borel_display`
244+
* definition `measurableO`
242245
* definition `measurableTypeR`
243246
+ definition `lebesgue_display`
244247
* definition `measurableR`
245248
+ lemmas `measurable_set1`, `measurable_itv` (also declared as hints)
249+
+ lemma `measurable_ball_norm`
246250
+ definition `ocitv_measure`, lemma `ocitv_measure_ext`
247251
+ module `MeasurableR`
248252
+ module `RGenOpenSets`

theories/lebesgue_stieltjes_measure.v

Lines changed: 78 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22
From HB Require Import structures.
33
From mathcomp Require Import all_ssreflect_compat finmap ssralg ssrnum ssrint interval.
4-
From mathcomp Require Import archimedean.
4+
From mathcomp Require Import archimedean algebra.
55
#[warning="-warn-library-file-internal-analysis"]
66
From mathcomp Require Import unstable.
77
From mathcomp Require Import boolp classical_sets functions fsbigop cardinality.
@@ -465,85 +465,129 @@ Qed.
465465
End rgenopensets.
466466
End RGenOpenSets.
467467

468+
(* Could be moved elsewhere and generalized to metric spaces *)
469+
Section normed_lemmas.
470+
Context {R : realType} {N : normedModType R}.
471+
472+
Lemma set1_bigcap_ball (x : N) : [set x] = \bigcap_n ball x n.+1%:R^-1.
473+
Proof.
474+
rewrite eqEsubset/bigcap; split=> [y -> n _ | y /= bn]/=.
475+
by apply: ballxx; rewrite invr_gt0.
476+
apply: close_eq _=>//; rewrite ball_close=> e0; rewrite ball_symE.
477+
apply: (le_ball _ (bn (truncn e0%:num^-1) I)). rewrite invf_ple ?posrE//.
478+
exact: (ltW (truncnS_gt _)).
479+
Qed.
480+
481+
End normed_lemmas.
482+
483+
(* Should be moved to a more general file *)
468484
Section open.
469-
Context {R : realType}.
485+
Context {R : realType} {N : normedModType R}.
470486

471-
Definition open_type : Type := R.
487+
Definition open_type : Type := N.
472488

473489
HB.instance Definition _ := Pointed.on open_type.
474490

475-
Let measurable : set_system R := @measurable _ (g_sigma_algebraType (@open R)).
491+
Let measurable : set_system N := @measurable _ (g_sigma_algebraType (@open N)).
476492

477493
Let measurable0 : measurable set0. Proof. exact: measurable0. Qed.
478494

479495
Let measurableC A : measurable A -> measurable (~` A).
480496
Proof. by move=> /measurableC. Qed.
481497

482-
Let measurable_bigcup (F : (set R)^nat) : (forall i, measurable (F i)) ->
498+
Let measurable_bigcup (F : (set N)^nat) : (forall i, measurable (F i)) ->
483499
measurable (\bigcup_i (F i)).
484500
Proof. move=> mF; exact: bigcupT_measurable. Qed.
485501

486502
HB.instance Definition _ :=
487-
@isMeasurable.Build (sigma_display (@open R))
503+
@isMeasurable.Build (sigma_display (@open N))
488504
open_type measurable measurable0 measurableC measurable_bigcup.
489505

490506
End open.
491507

492-
Notation "R .-open" := (sigma_display (@open R)) : measure_display_scope.
493-
Notation "R .-open.-measurable" := (measurable : set_system (@open_type R)) :
508+
Notation "N .-open" := (sigma_display (@open N)) : measure_display_scope.
509+
Notation "N .-open.-measurable" := (measurable : set_system (@open_type _ N)) :
494510
classical_set_scope.
495511

496-
Module MeasurableRopen.
497-
Section measurableRopen.
498-
Context {R : realType}.
512+
Module MeasurableOpen.
513+
Section measurableOpen.
514+
Context {R : realType} {N : normedModType R}.
499515

500-
Definition measurableTypeR := g_sigma_algebraType (@open R).
516+
Definition measurableTypeO := g_sigma_algebraType (@open N).
501517

502-
Definition lebesgue_display : measure_display := R.-open.
518+
Definition borel_display : measure_display := N.-open.
503519

504-
Definition measurableR : set_system R := R.-open.-measurable.
520+
Definition measurableO : set_system N := N.-open.-measurable.
505521

506-
HB.instance Definition _ : Measurable lebesgue_display measurableTypeR :=
507-
Measurable.on measurableTypeR.
522+
HB.instance Definition _ : Measurable borel_display measurableTypeO :=
523+
Measurable.on measurableTypeO.
508524
(* Presumably it is safe to use NFI here because morally R is unique
509525
and nothing else can be used here *)
510526
#[non_forgetful_inheritance]
511-
HB.instance Definition _ := Measurable.copy R measurableTypeR.
527+
HB.instance Definition _ := Measurable.copy N measurableTypeO.
512528

513-
Lemma measurable_set1 (r : R) : measurable [set r].
529+
Lemma measurable_set1 (x : N) : measurable [set x].
514530
Proof.
515-
rewrite set1_bigcap_oo; apply: bigcap_measurable => // k _.
516-
exact: sub_sigma_algebra.
531+
rewrite set1_bigcap_ball; apply: bigcap_measurable => // k _.
532+
apply: sub_sigma_algebra; exact: ball_open.
517533
Qed.
518534
#[local] Hint Resolve measurable_set1 : core.
519535

520-
Lemma measurable_itv (i : interval R) : measurable [set` i].
521-
Proof.
522-
have := MeasurableRocitv.measurable_itv i.
523-
rewrite /MeasurableRocitv.lebesgue_display.
524-
by rewrite RGenOpenSets.measurableE.
525-
Qed.
536+
Lemma measurable_ball_norm (x : N) e : measurable (ball x e).
537+
Proof. by apply: (sub_sigma_algebra (ball_open _ _)). Qed.
526538

527-
End measurableRopen.
528-
Arguments measurableTypeR : clear implicits.
539+
End measurableOpen.
540+
Arguments measurableTypeO : clear implicits.
529541
#[global]
530542
Hint Extern 0 (measurable (_ @^-1` [set _])) =>
531543
solve [apply: measurable_funPTI; exact: measurable_set1] : core.
532544
#[global]
533545
Hint Extern 0 (measurable [set _]) => solve [apply: measurable_set1] : core.
534-
#[global]
535-
Hint Extern 0 (measurable [set` _] ) => exact: measurable_itv : core.
546+
(* #[global] causes some bugs bc it used to not be auto
547+
Hint Extern 0 (measurable (ball _ _) ) => exact: measurable_ball_norm : core. *)
536548

537-
Lemma measurable_funP1 {d} {aT : measurableType d} {rT : realType}
538-
(f : {mfun aT >-> rT}) D (y : rT) :
539-
measurable D -> measurable (D `&` f @^-1` [set y]).
549+
Lemma measurable_funP1 {d} {aT : measurableType d} {rT : realType}
550+
{nT : normedModType rT} (f : {mfun aT >-> nT}) D (z : nT) :
551+
measurable D -> measurable (D `&` f @^-1` [set z]).
540552
Proof. by move=> /(measurable_funP f); exact. Qed.
541553
#[deprecated(since="mathcomp-analysis 1.13.0", use=measurable_funP1)]
542554
Notation measurable_sfun_inP := measurable_funP1 (only parsing).
543555
#[global] Hint Extern 0 (measurable (_ `&` _ @^-1` [set _])) =>
544556
solve [apply: measurable_funP1; assumption] : core.
545557

558+
Section measurableReal.
559+
Context {R : realType}.
560+
Import numFieldNormedType.Exports.
561+
562+
Definition measurableTypeR := @measurableTypeO R R.
563+
564+
Definition lebesgue_display : measure_display := @borel_display R R.
565+
566+
Definition measurableR := @measurableO R R.
567+
(* Shouldn't be needing ideally... *)
568+
HB.instance Definition _ := Measurable.copy R measurableTypeR.
569+
570+
Lemma measurable_itv (i : interval R) : measurable [set` i].
571+
Proof.
572+
have := MeasurableRocitv.measurable_itv i.
573+
rewrite /MeasurableRocitv.lebesgue_display.
574+
by rewrite RGenOpenSets.measurableE.
575+
Qed.
576+
577+
End measurableReal.
578+
Arguments measurableTypeR : clear implicits.
579+
#[global]
580+
Hint Extern 0 (measurable [set` _] ) => exact: measurable_itv : core.
581+
582+
End MeasurableOpen.
583+
584+
Module MeasurableR.
585+
Export numFieldNormedType.Exports.
586+
Export MeasurableOpen.
587+
End MeasurableR.
588+
546589
Section ocitv_measure.
590+
Import MeasurableR.
547591
Context {R : realType} (mu : measure (measurableTypeR R) R).
548592

549593
Definition ocitv_measure : set (MeasurableRocitv.measurableTypeR R) -> \bar R :=
@@ -570,12 +614,6 @@ Lemma ocitv_measure_ext A : ocitv_measure A = mu A. Proof. by []. Qed.
570614

571615
End ocitv_measure.
572616

573-
End MeasurableRopen.
574-
575-
Module MeasurableR.
576-
Export MeasurableRopen.
577-
End MeasurableR.
578-
579617
(** The construction of the Lebesgue-Stieltjes measure actually starts here. *)
580618

581619
Section wlength.
@@ -961,7 +999,7 @@ by rewrite RGenOpenSets.measurableE.
961999
Qed.
9621000

9631001
Lemma lebesgue_stieltjes_measure_unique
964-
(mu : {measure set (MeasurableRopen.measurableTypeR R) -> \bar R}) :
1002+
(mu : {measure set (measurableTypeR R) -> \bar R}) :
9651003
(forall X, ocitv X -> lebesgue_stieltjes_measure f X = mu X) ->
9661004
forall A : set R, measurable A -> lebesgue_stieltjes_measure f A = mu A.
9671005
Proof.

0 commit comments

Comments
 (0)