feat(Counterexamples): the Vitali set is non-measurable#20722
feat(Counterexamples): the Vitali set is non-measurable#20722
Conversation
ctchou
commented
Jan 14, 2025
PR summary c0ec16697f
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.MeasureTheory.Measure.NullMeasurable | 1343 | 1344 | +1 (+0.07%) |
Import changes for all files
| Files | Import difference |
|---|---|
Mathlib.MeasureTheory.Measure.MeasureSpace Mathlib.MeasureTheory.Measure.NullMeasurable |
1 |
Declarations diff
+ Icc_subset_vitaliUnion
+ biUnion_volume
+ measure_union_null
+ not_measurableSet_vitaliSet
+ not_nullMeasurableSet_vitaliSet
+ nullMeasurableSet_image_of_measure_eq
+ nullmeasurable_measurable_null
+ shift_nullmeasurable
+ symmDiff
+ vI_infinite
+ vitaliSet
+ vitaliSet_subset_Icc
+ vitaliSetoid
+ vitaliShift
+ vitaliType
+ vitaliUnion
+ vitaliUnion_subset_Icc
+ vitali_pairwise_disjoint
+ volume_vitaliShift
+ volume_vitaliUnion
+ volume_vitaliUnion_mem
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for script/declarations_diff.sh contains some details about this script.
No changes to technical debt.
You can run this locally as
./scripts/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).
grunweg
left a comment
There was a problem hiding this comment.
Thanks for your pull request, and welcome to mathlib! I took a first look at your PR.
There are a number of places where your code can be written more compactly (i.e., doing the same thing, but being shorter). Such is completely normal for a first pull request. I have left some comments to get you started.
A number of comments occur several times: when addressing it once, please try to go over the file and fix all instances of it. If you're unsure, feel free to ask here (or on zulip)!
| /-- We first derive the measure theoretic results that we need from | ||
| the more general theorems in Mathlib. -/ | ||
|
|
||
| example {a b : ℝ} : volume (Icc a b) = ENNReal.ofReal (b - a) := |
There was a problem hiding this comment.
Do you need this result in the final file? (It's fine if this was helpful during development, but we'd like to merge a polished version into mathlib.) In other words: I think it's better to simply delete this.
There was a problem hiding this comment.
I prefer to enumerate explicitly all the measure theoretic results that are involved, because I want to make clear exactly which properties of measurability and the volume measure are used in the proof. I have updated the comment to make this point.
There was a problem hiding this comment.
Maybe this characterization can be part of the module docs instead? Listing results like this is quite nonconventional.
| example {a b : ℝ} : volume (Icc a b) = ENNReal.ofReal (b - a) := | ||
| volume_Icc | ||
|
|
||
| lemma volume_mono {s t : Set ℝ} (h : s ⊆ t) : volume s ≤ volume t := by |
There was a problem hiding this comment.
You can probably "inline" this lemma (i.e., replace every time you want to you volume_mono h by OuterMeasureclass.measure_mono volume h). Can you do so, please?
There was a problem hiding this comment.
See my reply above.
| lemma volume_mono {s t : Set ℝ} (h : s ⊆ t) : volume s ≤ volume t := by | ||
| exact OuterMeasureClass.measure_mono volume h | ||
|
|
||
| lemma measurable_nullmeasurable {s : Set ℝ} (h : MeasurableSet s) : NullMeasurableSet s volume := |
There was a problem hiding this comment.
A similar comment applies here. (Using dot notation, you can even write h.nullMeasurableSet.)
There was a problem hiding this comment.
See my reply above. I did change to the dot-notation.
| lemma measurable_nullmeasurable {s : Set ℝ} (h : MeasurableSet s) : NullMeasurableSet s volume := | ||
| MeasurableSet.nullMeasurableSet h | ||
|
|
||
| lemma measurable_null_nullmeasurable {s t : Set ℝ} |
There was a problem hiding this comment.
Also inline this one, please.
There was a problem hiding this comment.
See my reply above.
|
Question: as I update the PR, should I collapse my successive commits into a single commit, or keep them separate? I'm keeping them separate for now, but I can also collapse them if that's the convention. |
|
Indeed, different repositories have different conventions on this question. Adding separate comments is exactly right. When merging this pull request at the end, all commits are squashed into one (and the PR description is used to determine the final commit message). |
|
Thanks for replying. I've replied above why I don't want to make certain changes and asked for clarification on some other issues. What's the next step? |
| /-- We first derive the measure theoretic results that we need from | ||
| the more general theorems in Mathlib. -/ | ||
|
|
||
| example {a b : ℝ} : volume (Icc a b) = ENNReal.ofReal (b - a) := |
There was a problem hiding this comment.
Maybe this characterization can be part of the module docs instead? Listing results like this is quite nonconventional.
| (hm : NullMeasurableSet s) (hn : volume t = 0) : NullMeasurableSet (s ∪ t) := | ||
| NullMeasurableSet.union_null hm hn | ||
|
|
||
| lemma nullmeasurable_measurable_null {s : Set ℝ} (h : NullMeasurableSet s volume) : |
There was a problem hiding this comment.
I don't think this result is needed, since t is just the set given by exists_measurable_subset_ae_eq and the conclusions follow from the (I imagine more useful) t =ᵐ[μ] s predicate.
There was a problem hiding this comment.
Sorry, does your comment apply to the lemma measurable_null_nullmeasurable or the lemma nullmeasurable_measurable_null?
There was a problem hiding this comment.
It applies to the latter, though I do agree with the other reviewer that the former shouldn't be duplicated here.
| · exact measure_congr t_eq_s | ||
| · exact ae_le_set.mp t_eq_s.symm.le | ||
|
|
||
| lemma shift_volume (s : Set ℝ) (c : ℝ) : volume ((fun x ↦ x + c) '' s) = volume s := by |
There was a problem hiding this comment.
You can write this as
| lemma shift_volume (s : Set ℝ) (c : ℝ) : volume ((fun x ↦ x + c) '' s) = volume s := by | |
| lemma shift_volume (s : Set ℝ) (c : ℝ) : volume ((· + c) '' s) = volume s := by |
Still, I don't think we need to have this theorem. It can just be inlined, or even replaced by a simp call.
| rw [vitaliSet', shift_volume] | ||
|
|
||
| /-- vI is an infinite set. -/ | ||
| lemma vI_infinite : vI.Infinite := by |
There was a problem hiding this comment.
This should follow more easily from Set.Icc_infinite.
| /-- The following theorems are the main results. | ||
|
|
||
| vitaliSet is not null-measurable. -/ | ||
| theorem vitaliSet_not_nullmeasurable : ¬ (NullMeasurableSet vitaliSet volume) := by |
There was a problem hiding this comment.
I think you can prove (and add to Mathlib) an auxiliary theorem for this: a sum Σ i : I, x for an infinite type I is either 0 or ⊤.
|
I think it's going to be really hard to convince the reviewers to have 30-odd extra lines of code listing specific dependencies of your proof. First of all, you're not even making the formal guarantee that these are sufficient conditions for the theorem to hold (and if you did, you'd likely end up with a much uglier and unwieldy statement). And second, there's no guarantee someone else couldn't come to this file later on and add or switch out these dependencies. The archive is meant as a showcase of good proofs, which doesn't always overlap with a good mathematical presentation. I really don't think we need to go over the basics of measure theory here. |
grunweg
left a comment
There was a problem hiding this comment.
I left a few more comments about how this can be written more concisely.
| (hs : I.Countable) : volume (⋃ i ∈ I, f i) = 0 ↔ ∀ i ∈ I, volume (f i) = 0 := | ||
| measure_biUnion_null_iff hs | ||
|
|
||
| lemma biUnion_volume {ι : Type*} {I : Set ι} {s : ι → Set ℝ} |
There was a problem hiding this comment.
Every measure is countable additive - this result should be in mathlib, right? (If not, can you please add it there?)
There was a problem hiding this comment.
I think the distinction here is that the sets are null-measurable rather than just measurable. I'm not a measure theory expert, but the (outer) measures on both the initial space and its completion coincide, right? If so, then this result should be an easy consequence of that.
There was a problem hiding this comment.
I would be very interested if you can find a simpler proof. I was not able to.
But I suspect the intermediate result:
have h_st : ⋃ i ∈ I, s i = (⋃ i ∈ I, t i) ∪ (⋃ i ∈ I, (s i \ t i))
should have a simpler proof than the monstrosity I produced.
| (hs : I.Countable) : volume (⋃ i ∈ I, f i) = 0 ↔ ∀ i ∈ I, volume (f i) = 0 := | ||
| measure_biUnion_null_iff hs | ||
|
|
||
| lemma biUnion_volume {ι : Type*} {I : Set ι} {s : ι → Set ℝ} |
There was a problem hiding this comment.
I think the distinction here is that the sets are null-measurable rather than just measurable. I'm not a measure theory expert, but the (outer) measures on both the initial space and its completion coincide, right? If so, then this result should be an easy consequence of that.
|
I added the label "please-adopt" to this PR. Please feel free to make modifications needed for inclusion in mathlib. Thanks! Zulip thread: https://leanprover.zulipchat.com/#narrow/channel/116395-maths/topic/The.20nonmeasurability.20of.20the.20Vitali.20set |
|
@vihdzp: In the first version of this proof, I proved only that |
|
Practically speaking, a set is a |
4e77cfd to
450a2be
Compare
|
I'll adopt this PR. I'll leave it as a draft until I've done all the changes I think are appropriate (hopefully in the next few days). |
|
This pull request has conflicts, please merge |
|
Oh darn, I kind of forgot about this. I'm really busy with other Lean stuff, but I'll see if I can come back to this during the week. |