Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lebesgue measure and integral #371

Closed
wants to merge 6 commits into from
Closed

Conversation

affeldt-aist
Copy link
Member

@affeldt-aist affeldt-aist commented May 3, 2021

Merged as #543

A formalization of the Lebesgue measure and integral.

Fixes #368 .

@affeldt-aist affeldt-aist changed the base branch from master to sums_over_general_sets May 3, 2021 15:48
Base automatically changed from sums_over_general_sets to master May 4, 2021 15:06
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 2 times, most recently from 8a707a8 to 4e2af2c Compare May 6, 2021 10:04
@affeldt-aist affeldt-aist mentioned this pull request May 9, 2021
@pi8027
Copy link
Member

pi8027 commented May 26, 2021

Here is a patch I propose (context: math-comp/math-comp#732 (comment)):

From 46158eb46e2ab033884151726c6dbbd9233b1e24 Mon Sep 17 00:00:00 2001
From: Kazuhiko Sakaguchi <[email protected]>
Date: Wed, 26 May 2021 14:37:16 +0900
Subject: [PATCH] normrzE

---
 theories/measure_wip.v | 29 +++++++++++------------------
 1 file changed, 11 insertions(+), 18 deletions(-)

diff --git a/theories/measure_wip.v b/theories/measure_wip.v
index 5f94173..e7e507f 100644
--- a/theories/measure_wip.v
+++ b/theories/measure_wip.v
@@ -63,17 +63,8 @@ Definition uncurry {A B C:Type} (f:A -> B -> C)
   (p:A * B) : C := match p with (x, y) => f x y end.
 
 (* NB: PR to MathComp in progress *)
-Lemma gez0_norm (R : numDomainType) (i : int) : 0 <= i -> `|i|%:R = i%:~R :> R.
-Proof. by move/gez0_abs => <-. Qed.
-
-Lemma gtz0_norm (R : numDomainType) (i : int) : 0 < i -> `|i|%:R = i%:~R :> R.
-Proof. by move/gtz0_abs => <-. Qed.
-
-Lemma ltz0_norm (R : numDomainType) (i : int) : i < 0 -> `|i|%:R = - i%:~R :> R.
-Proof.
-move/ltz0_abs/eqP; rewrite -eqr_oppLR => /eqP <-.
-by rewrite abszN absz_id mulrNz opprK.
-Qed.
+Lemma normrzE (R : numDomainType) i : `|i|%:R = `|i|%:~R :> R.
+Proof. by rewrite -abszE. Qed.
 (* END NB: PR to MathComp in progress *)
 
 Section eseries.
@@ -3570,10 +3561,11 @@ exists (set_of_itv \o ccitv).
   rewrite predeqE => /= r; split => // _; have [r0|r0] := leP 0 r.
   - exists (absz (ceil r)) => //; apply/set_of_itv_mem.
     rewrite itv_boundlr/= 2!lte_bnd (le_trans _ r0)/= ?oppr_le0 ?ler0n//.
-    by rewrite gez0_norm ?ceil_ge0 // ler_ceil.
+    by rewrite normrzE ger0_norm ?ceil_ge0 // ler_ceil.
   - exists (absz (floor r)) => //; apply/set_of_itv_mem.
     rewrite itv_boundlr /= 2!lte_bnd (le_trans (ltW r0)) ?ler0n// andbT.
-    by rewrite ler_oppl ltz0_norm ?floor_lt0// ler_oppl opprK ler_floor.
+    rewrite ler_oppl normrzE ltr0_norm ?floor_lt0//.
+    by rewrite mulrNz ler_opp2 ler_floor.
 move=> n; split.
   by exists [fset (ccitv n)]%fset; rewrite ssetE /= big_seq_fset1.
 by rewrite length_itv hlength_itv /=; case: ifPn; rewrite lte_pinfty.
@@ -3965,7 +3957,8 @@ have len_iIN_dvg : forall M, M > 0 -> exists N, (N >= 1)%N /\ (M%:E < length (iI
     have ? : (0 < `|ceil M|)%N by rewrite absz_gt0 gt_eqF // ceil_gt0.
     exists `|ceil M|%N; split=> //; rewrite /iIN ioo set_of_itvE setTI.
     rewrite length_ccitv lte_fin (le_lt_trans (ler_ceil _)) //.
-    by rewrite -gtz0_norm ?ceil_gt0// ltr_nat -addnn -ltn_subLR // subnn.
+    rewrite -[c in c%:~R]gtr0_norm ?ceil_gt0//.
+    by rewrite -normrzE ltr_nat -addnn -add1n leq_add2r.
   rewrite /iIN.
   wlog : i {ij iIN} b r {iroo} / i = Interval -oo%O (BSide b r).
     move=> h; move: iroo => [->|iroo]; first exact: h.
@@ -3978,7 +3971,7 @@ have len_iIN_dvg : forall M, M > 0 -> exists N, (N >= 1)%N /\ (M%:E < length (iI
     rewrite ltr_oppl opprK.
     case: ifPn => [rrM|].
       rewrite meet_l ?(le_trans r0) // lte_fin mulrSr.
-      rewrite gez0_norm ?ceil_ge0// ?(addr_ge0 _ (ltW _))//.
+      rewrite normrzE ger0_norm ?ceil_ge0// ?(addr_ge0 _ (ltW _))//.
       rewrite -ltr_subl_addl (@le_lt_trans _ _ (`|r| + M)) // ?ler_addr//.
         by rewrite ler0_norm // addrC.
       rewrite (@lt_le_trans _ _ (`|r| + M + 1)) // ?ltr_addl // ler_add2r.
@@ -3986,7 +3979,7 @@ have len_iIN_dvg : forall M, M > 0 -> exists N, (N >= 1)%N /\ (M%:E < length (iI
     move=> /negP; apply: absurd.
     rewrite -(ler0_norm r0) mulrSr ltr_spaddr //.
     rewrite (@le_trans _ _ (`|r| + M)) // ?ler_addl //; first exact/ltW.
-    by rewrite gez0_norm ?ceil_ge0// ?(addr_ge0 _ (ltW _))// ler_ceil.
+    by rewrite normrzE (ger0_norm (ceil_ge0 _)) ?addr_ge0 ?ler_ceil // ltW.
   have crM : (0 < `|ceil (`|r| + M)|)%N.
     by rewrite absz_gt0 gt_eqF // ceil_gt0 // -(addr0 0) ler_lt_add.
   exists (`|ceil (`| r | + M)|%N); split => //.
@@ -3994,10 +3987,10 @@ have len_iIN_dvg : forall M, M > 0 -> exists N, (N >= 1)%N /\ (M%:E < length (iI
   rewrite opprK andbT.
   case: ifPn => [_|].
     rewrite meet_l; last first.
-      rewrite gez0_norm ?ceil_ge0// ?(addr_ge0 _ (ltW _))// gtr0_norm//.
+      rewrite normrzE ger0_norm ?ceil_ge0// ?(addr_ge0 _ (ltW _))// gtr0_norm//.
       by rewrite (le_trans (ler_ceil _)) // ler_int ceil_le // ler_addl ltW.
     rewrite lte_fin -{1}(add0r M) ltr_le_add //.
-    rewrite gez0_norm ?ceil_ge0// ?(addr_ge0 _ (ltW _))// gtr0_norm//.
+    rewrite normrzE ger0_norm ?ceil_ge0// ?(addr_ge0 _ (ltW _))// gtr0_norm//.
     by rewrite (le_trans (ler_ceil _)) // ler_int ceil_le // ler_addr ltW.
   move/negP; apply: absurd.
   rewrite -(@ltr_nat R) in crM.
-- 
2.20.1

@affeldt-aist
Copy link
Member Author

affeldt-aist commented May 26, 2021

@pi8027 I have replayed the proofs in the spirit of your patch. Maybe that's good enough with only one lemma.
I modify the mathcomp PR accordingly. Thanks for your time!

@affeldt-aist affeldt-aist mentioned this pull request Jun 17, 2021
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 2 times, most recently from 91ca1ca to d3b98f0 Compare July 2, 2021 04:12
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 2 times, most recently from 2836328 to a1cdb62 Compare August 21, 2021 07:01
@affeldt-aist affeldt-aist mentioned this pull request Sep 2, 2021
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 2 times, most recently from 4080012 to fba5815 Compare September 6, 2021 13:37
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 2 times, most recently from e1e9799 to 7c210f5 Compare September 18, 2021 10:48
affeldt-aist added a commit that referenced this pull request Nov 12, 2021
- from PR #371

Co-authored-by: Cyril Cohen <[email protected]>
@affeldt-aist affeldt-aist mentioned this pull request Nov 12, 2021
affeldt-aist added a commit that referenced this pull request Nov 26, 2021
- from PR #371

Co-authored-by: Cyril Cohen <[email protected]>
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 3 times, most recently from f928521 to f60354b Compare November 30, 2021 09:39
affeldt-aist added a commit that referenced this pull request Dec 3, 2021
- from PR #371

Co-authored-by: Cyril Cohen <[email protected]>
affeldt-aist added a commit that referenced this pull request Dec 4, 2021
- from PR #371

Co-authored-by: Cyril Cohen <[email protected]>
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 2 times, most recently from 2207aec to 27678e7 Compare December 14, 2021 04:57
affeldt-aist added a commit that referenced this pull request Dec 21, 2021
- from PR #371

Co-authored-by: Cyril Cohen <[email protected]>
@affeldt-aist affeldt-aist force-pushed the lebesgue_measure branch 2 times, most recently from 0ea3437 to 6ee8e06 Compare January 17, 2022 09:11
@affeldt-aist affeldt-aist changed the title Lebesgue measure Lebesgue measure and integral Jan 18, 2022
CohenCyril and others added 4 commits February 11, 2022 00:41
- does not cover new files
  + `mathcomp_extra.v`
  + `fsbigop.v`
  + `set_interval.v`
  + `lebesgue_measure.v`
  + `lebesgue_integral.v`
  + `functions`
- for `functions.v`, `mathcomp_extra.v`, `fsbig.v`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove MathComp duplicate
3 participants