Repository navigation
refactor: redefine eLpNorm at p = 0 - #39311
felixpernegger wants to merge 35 commits into
Conversation
|
-t-measure-probability |
PR summary 4783221ee1
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.MeasureTheory.Function.LpSpace.Basic | 1994 | 1996 | +2 (+0.10%) |
| Mathlib.MeasureTheory.Function.LpSpace.ContinuousFunctions | 2009 | 2011 | +2 (+0.10%) |
Import changes for all files
| Files | Import difference |
|---|---|
Mathlib.MeasureTheory.Function.LpSpace.Basic Mathlib.MeasureTheory.Function.LpSpace.ContinuousFunctions |
2 |
Declarations diff (regex)
+ IsFiniteMeasure.memLp_exponent_zero
+ _root_.ENNReal.ne_zero_of_ge_one
+ _root_.Function.support_enorm
+ _root_.Function.support_enorm'
+ _root_.support_congr_of_ae_eq
+ aestronglyMeasurable_of_memLp_zero
+ eLpNorm_exponent_zero_mono_of_ae_zero
+ eLpNorm_exponent_zero_smul_le_left
+ eLpNorm_exponent_zero_smul_le_right
+ eLpNorm_zero_le_of_ae_le
+ eLpNorm_zero_piecewise
+ eLpNorm_zero_piecewise_le
+ measure_support_mono
+ measure_support_mono'
+ memLp_zero_iff_aestronglyMeasurable_and_volume_support_lt_top
+ stronglyMeasurable_rpow
+ toLp_exponent_zero
+ volume_support_le_of_ae_le
+ volume_support_lt_top_of_memLp_zero
+ zero_of_zero_left
+ zero_of_zero_right
+--+ memLp
- lpNorm_exponent_zero
- memLp_zero
- memLp_zero_iff_aestronglyMeasurable
-++- memLp_exp_mul
-+-+ toLp
--++ norm_compLp_le
You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.
Declarations diff (Lean)
✅ Lean-aware diff — post-build, computed from the Lean environment (commit
4783221).
- +22 new declarations
- −3 removed declarations
+ENNReal.HolderTriple.zero_of_zero_left
+ENNReal.HolderTriple.zero_of_zero_right
+ENNReal.ne_zero_of_ge_one
+Function.support_enorm
+Function.support_enorm'
+MeasureTheory.IsFiniteMeasure.memLp_exponent_zero
-MeasureTheory.SimpleFunc.memLp_zero
+MeasureTheory.aestronglyMeasurable_of_memLp_zero
+MeasureTheory.eLpNorm_exponent_zero_mono_of_ae_zero
+MeasureTheory.eLpNorm_exponent_zero_smul_le_left
+MeasureTheory.eLpNorm_exponent_zero_smul_le_right
+MeasureTheory.eLpNorm_zero_le_of_ae_le
+MeasureTheory.eLpNorm_zero_piecewise
+MeasureTheory.eLpNorm_zero_piecewise_le
-MeasureTheory.lpNorm_exponent_zero
+MeasureTheory.measure_support_mono
+MeasureTheory.measure_support_mono'
-MeasureTheory.memLp_zero_iff_aestronglyMeasurable
+MeasureTheory.memLp_zero_iff_aestronglyMeasurable_and_volume_support_lt_top
+MeasureTheory.stronglyMeasurable_rpow
+MeasureTheory.volume_support_le_of_ae_le
+MeasureTheory.volume_support_lt_top_of_memLp_zero
+SchwartzMap.mkCLMtoNormedSpace.congr_simp
+SchwartzMap.toLp_exponent_zero
+support_congr_of_ae_eqNo changes to strong technical debt.
No changes to weak technical debt.
Current commit 4783221ee1
Reference commit be883716af
This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
- The
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
sgouezel
left a comment
There was a problem hiding this comment.
Thanks a lot for doing this, this is very much appreciated!
I haven't gone through the whole PR yet, but for now I have two main comments:
- In distributions, you should use junk values for
toLp, to avoid having a proof argument to carry around, which is sometimes cumbersome - You should construct some API for the L^0 norm, to discharge proofs instead of redoing the same kind of things all the time. Notably, you need a lemma saying that, if for almost every x, g x =0 -> f x = 0, then the L^0 norm of
fis bounded by that ofg.
Also, don't hesitate to use the filter_upwards tactic more, it is very handy.
Co-authored-by: Sebastien Gouezel <[email protected]>
Co-authored-by: Felix Pernegger <[email protected]>
|
-awaiting-author |
|
This pull request has conflicts, please merge |
|
I am afraid there is going to be an issue with this PR. As we discussed in Zulip (see for instance my message at #mathlib4 > eLpNorm junk value @ 💬), the endgoal of the refactor could be the following:
What your refactor is doing is changing some part of the current A tentative plan to get the refactor done while not doing everything at once could be: As you can see, your PR would be perfect for (3'), but I'm not sure the library is ready for it now, because we haven't implemented (1) or (2). Note that this is just a tentative plan, and I'm not sure of anything here. So definitely worth discussing, here on the PR or maybe preferably on Zulip. |
Alright, this is quite unfortunate. In any case; hopefully we can at least use this for some p=0 proofs (or lemmas which do not hold for p = 0) :/ |
|
awaiting-zulip |
|
This pull request has conflicts, please merge |
|
This pull request is now in draft mode. No active bors state needed cleanup. While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like |
For Zulip discussion see https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/eLpNorm.20junk.20value/with/576356442. In partuclar this change is suggestion 2 in #mathlib4 > eLpNorm junk value @ 💬
This redefined MeasureTheory.eLpNorm at
p = 0. Previously it was always0but now it is the measure of the support of the function (technical detail: In order to avoid having to add additional arguments toeLpNorm, we define it as the measure of the support of the norm of the function, but this is almost always the same)The motivation for this comes from the counting measure, in particular this then unifies with https://leanprover-community.github.io/mathlib4_docs/Mathlib/Analysis/Normed/Lp/lpSpace.html#Mem%E2%84%93p. In any case, it is "closer" to the actual mathematical definition
Unfortunately, since
eLpNormis widely used, the diff is very large and a lot of theorems break (i.e. now requirep != 0). Oftentimesp != 0is still not required (sometimes with nontrivial arguments), I tried to avoid adding extra hypothesis whenever I could but I almost certainly missed some.There now may also be places where we dont need
p != 0as a hypothesis anymore (i.e. for[Memℓp](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Analysis/Normed/Lp/lpSpace.html#Mem%E2%84%93p)), but this is not included in this PR.