Skip to content

Commit 3e0fffb

Browse files
committed
feat: lemmas on the volume on I applied to intervals (#27513)
- `instance : NoAtoms (volume : Measure I)` - `(volume : Measure I) s = volume (Subtype.val '' s)` - `(volume : Measure I) (Icc x y) = ENNReal.ofReal (y - x)` - `(volume : Measure I) (Ico x y) = ENNReal.ofReal (y - x)` - `(volume : Measure I) (Ioc x y) = ENNReal.ofReal (y - x)` - `(volume : Measure I) (Ioo x y) = ENNReal.ofReal (y - x)` - `(volume : Measure I) (Iic x) = ENNReal.ofReal x` - `(volume : Measure I) (Ici x) = ENNReal.ofReal (1 - x)` - `(volume : Measure I) (Iio x) = ENNReal.ofReal x` - `(volume : Measure I) (Ioi x) = ENNReal.ofReal (1 - x)` - `(volume : Measure I) (uIcc x y) = edist y x` - `(volume : Measure I) (uIoc x y) = edist y x` - `(volume : Measure I) (uIoo x y) = edist y x` Co-authored-by: Rémy Degenne <remy.degenne@inria.fr> Co-authored-by: Gaëtan Serré <56162277+gaetanserre@users.noreply.github.com>
1 parent 2ca6438 commit 3e0fffb

1 file changed

Lines changed: 70 additions & 2 deletions

File tree

Mathlib/MeasureTheory/Constructions/UnitInterval.lean

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/-
22
Copyright (c) 2024 Eric Wieser. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Eric Wieser
4+
Authors: Eric Wieser, Gaëtan Serré
55
-/
66
import Mathlib.Topology.UnitInterval
77
import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
@@ -12,7 +12,9 @@ import Mathlib.MeasureTheory.Measure.Lebesgue.Basic
1212
# The canonical measure on the unit interval
1313
1414
This file provides a `MeasureTheory.MeasureSpace` instance on `unitInterval`,
15-
and shows it is a probability measure.
15+
and shows it is a probability measure with no atoms.
16+
17+
It also contains some basic results on the volume of various interval sets.
1618
-/
1719
open scoped unitInterval
1820
open MeasureTheory
@@ -28,7 +30,73 @@ instance : IsProbabilityMeasure (volume : Measure I) where
2830
rw [Measure.Subtype.volume_univ nullMeasurableSet_Icc, Real.volume_Icc, sub_zero,
2931
ENNReal.ofReal_one]
3032

33+
lemma measurableEmbedding_coe : MeasurableEmbedding ((↑) : I → ℝ) where
34+
injective := Subtype.val_injective
35+
measurable := measurable_subtype_coe
36+
measurableSet_image' _ := measurableSet_Icc.subtype_image
37+
38+
lemma volume_apply {s : Set I} : volume s = volume (Subtype.val '' s) :=
39+
measurableEmbedding_coe.comap_apply ..
40+
41+
instance : NoAtoms (volume : Measure I) where
42+
measure_singleton x := by simp only [volume_apply, Set.image_singleton, measure_singleton]
43+
3144
@[measurability]
3245
theorem measurable_symm : Measurable symm := continuous_symm.measurable
3346

47+
open Set
48+
49+
variable (x : I)
50+
51+
@[simp]
52+
lemma volume_Iic : volume (Iic x) = .ofReal x := by
53+
simp only [volume_apply, image_subtype_val_Icc_Iic, Real.volume_Icc, sub_zero]
54+
55+
@[simp]
56+
lemma volume_Iio : volume (Iio x) = .ofReal x := by
57+
simp only [← volume_image_subtype_coe measurableSet_Icc, image_subtype_val_Icc_Iio,
58+
Real.volume_Ico, sub_zero]
59+
60+
@[simp]
61+
lemma volume_Ici : volume (Ici x) = .ofReal (1 - x) := by
62+
simp only [volume_apply, image_subtype_val_Icc_Ici, Real.volume_Icc]
63+
64+
@[simp]
65+
lemma volume_Ioi : volume (Ioi x) = .ofReal (1 - x) := by
66+
simp only [volume_apply, image_subtype_val_Icc_Ioi, Real.volume_Ioc]
67+
68+
variable (y : I)
69+
70+
@[simp]
71+
lemma volume_Icc : volume (Icc x y) = .ofReal (y - x) := by
72+
simp only [volume_apply, image_subtype_val_Icc, Real.volume_Icc]
73+
74+
@[simp]
75+
lemma volume_uIcc : volume (uIcc x y) = edist y x := by
76+
simp only [uIcc, volume_apply, image_subtype_val_Icc, Icc.coe_inf, Icc.coe_sup, Real.volume_Icc,
77+
max_sub_min_eq_abs, edist_dist, Subtype.dist_eq, Real.dist_eq]
78+
79+
@[simp]
80+
lemma volume_Ico : volume (Ico x y) = .ofReal (y - x) := by
81+
simp only [volume_apply, image_subtype_val_Ico, Real.volume_Ico]
82+
83+
@[simp]
84+
lemma volume_Ioc : volume (Ioc x y) = .ofReal (y - x) := by
85+
simp only [volume_apply, image_subtype_val_Ioc, Real.volume_Ioc]
86+
87+
@[simp]
88+
lemma volume_uIoc : volume (uIoc x y) = edist y x := by
89+
simp only [uIoc, volume_apply, image_subtype_val_Ioc, Icc.coe_inf, Icc.coe_sup, Real.volume_Ioc,
90+
max_sub_min_eq_abs, edist_dist, Subtype.dist_eq, Real.dist_eq]
91+
92+
93+
@[simp]
94+
lemma volume_Ioo : volume (Ioo x y) = .ofReal (y - x) := by
95+
simp only [volume_apply, image_subtype_val_Ioo, Real.volume_Ioo]
96+
97+
@[simp]
98+
lemma volume_uIoo : volume (uIoo x y) = edist y x := by
99+
simp only [uIoo, volume_apply, image_subtype_val_Ioo, Icc.coe_inf, Icc.coe_sup, Real.volume_Ioo,
100+
max_sub_min_eq_abs, edist_dist, Subtype.dist_eq, Real.dist_eq]
101+
34102
end unitInterval

0 commit comments

Comments
 (0)