The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V18. Measure and integration

Mathlib.MeasureTheory.Measure.Lebesgue.Basic

76 declarations and 1 deprecated aliases. Mathlib docs · Source

Lebesgue measure on the real line and on ℝⁿ

We show that the Lebesgue measure on the real line (constructed as a particular case of additive Haar measure on inner product spaces) coincides with the Stieltjes measure associated to the function x ↦ x. We deduce properties of this measure on ℝ, and then of the product Lebesgue measure on ℝⁿ. In particular, we prove that they are translation invariant.

We show that, on ℝⁿ, a linear map acts on Lebesgue measure by rescaling it through the absolute value of its determinant, in Real.map_linearMap_volume_pi_eq_smul_volume_pi.

More properties of the Lebesgue measure are deduced from this in Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean, where they are proved more generally for any additive Haar measure on a finite-dimensional real vector space.

Definition of the Lebesgue measure and lengths of intervals

Volume of a box in ℝⁿ

Images of the Lebesgue measure under multiplication in ℝ

Images of the Lebesgue measure under translation/linear maps in ℝⁿ

theorem MeasureTheory.Measure.addHaarMeasure.congr_simp E1 #

∀ {G : Type u_1} [inst : AddGroup G] [inst_1 : TopologicalSpace G] [inst_2 : IsTopologicalAddGroup G]
  [inst_3 : MeasurableSpace G] [inst_4 : BorelSpace G] (K₀ K₀_1 : TopologicalSpace.PositiveCompacts G),
  K₀ = K₀_1 → MeasureTheory.Measure.addHaarMeasure K₀ = MeasureTheory.Measure.addHaarMeasure K₀_1

theorem Real.volume_eq_stieltjes_id E1 #

MeasureTheory.volume = StieltjesFunction.id.measure

The volume on the real line (as a particular case of the volume on a finite-dimensional inner product space) coincides with the Stieltjes measure coming from the identity function.

theorem Real.volume_val E0 #

∀ (s : Set ℝ), MeasureTheory.volume s = StieltjesFunction.id.measure s

theorem Real.volume_Ico E0 #

∀ {a b : ℝ}, MeasureTheory.volume (Set.Ico a b) = ENNReal.ofReal (b - a)

theorem Real.volume_real_Ico E0 #

∀ {a b : ℝ}, MeasureTheory.volume.real (Set.Ico a b) = max (b - a) 0

theorem Real.volume_real_Ico_of_le E1 #

∀ {a b : ℝ}, a ≤ b → MeasureTheory.volume.real (Set.Ico a b) = b - a

theorem Real.volume_Icc E0 #

∀ {a b : ℝ}, MeasureTheory.volume (Set.Icc a b) = ENNReal.ofReal (b - a)

theorem Real.volume_real_Icc E0 #

∀ {a b : ℝ}, MeasureTheory.volume.real (Set.Icc a b) = max (b - a) 0

theorem Real.volume_real_Icc_of_le E1 #

∀ {a b : ℝ}, a ≤ b → MeasureTheory.volume.real (Set.Icc a b) = b - a

theorem Real.volume_Ioo E0 #

∀ {a b : ℝ}, MeasureTheory.volume (Set.Ioo a b) = ENNReal.ofReal (b - a)

theorem Real.volume_uIoo E0 #

∀ {a b : ℝ}, MeasureTheory.volume (Set.uIoo a b) = ENNReal.ofReal |b - a|

theorem Real.volume_real_Ioo E0 #

∀ {a b : ℝ}, MeasureTheory.volume.real (Set.Ioo a b) = max (b - a) 0

theorem Real.volume_real_Ioo_of_le E1 #

∀ {a b : ℝ}, a ≤ b → MeasureTheory.volume.real (Set.Ioo a b) = b - a

theorem Real.volume_Ioc E0 #

∀ {a b : ℝ}, MeasureTheory.volume (Set.Ioc a b) = ENNReal.ofReal (b - a)

theorem Real.volume_uIoc E0 #

∀ {a b : ℝ}, MeasureTheory.volume (Set.uIoc a b) = ENNReal.ofReal |b - a|

theorem Real.volume_real_Ioc E0 #

∀ {a b : ℝ}, MeasureTheory.volume.real (Set.Ioc a b) = max (b - a) 0

theorem Real.volume_real_Ioc_of_le E1 #

∀ {a b : ℝ}, a ≤ b → MeasureTheory.volume.real (Set.Ioc a b) = b - a

theorem Real.volume_singleton E1 #

∀ {a : ℝ}, MeasureTheory.volume {a} = 0

theorem Real.volume_univ E1 #

MeasureTheory.volume Set.univ = ⊤

theorem Real.volume_ball E0 #

∀ (a r : ℝ), MeasureTheory.volume (Metric.ball a r) = ENNReal.ofReal (2 * r)

theorem Real.volume_real_ball E0 #

∀ {a r : ℝ}, 0 ≤ r → MeasureTheory.volume.real (Metric.ball a r) = 2 * r

theorem Real.volume_closedBall E0 #

∀ (a r : ℝ), MeasureTheory.volume (Metric.closedBall a r) = ENNReal.ofReal (2 * r)

theorem Real.volume_real_closedBall E0 #

∀ {a r : ℝ}, 0 ≤ r → MeasureTheory.volume.real (Metric.closedBall a r) = 2 * r

theorem Real.volume_eball E0 #

∀ (a : ℝ) (r : ENNReal), MeasureTheory.volume (Metric.eball a r) = 2 * r

theorem Real.volume_closedEBall E0 #

∀ (a : ℝ) (r : ENNReal), MeasureTheory.volume (Metric.closedEBall a r) = 2 * r

instance Real.nullSingletonClass_volume E0 #

MeasureTheory.NullSingletonClass MeasureTheory.volume

theorem Real.volume_interval E0 #

∀ {a b : ℝ}, MeasureTheory.volume (Set.uIcc a b) = ENNReal.ofReal |b - a|

theorem Real.volume_real_interval E0 #

∀ {a b : ℝ}, MeasureTheory.volume.real (Set.uIcc a b) = |b - a|

theorem Real.volume_Ioi E0 #

∀ {a : ℝ}, MeasureTheory.volume (Set.Ioi a) = ⊤

theorem Real.volume_Ici E0 #

∀ {a : ℝ}, MeasureTheory.volume (Set.Ici a) = ⊤

theorem Real.volume_Iio E0 #

∀ {a : ℝ}, MeasureTheory.volume (Set.Iio a) = ⊤

theorem Real.volume_Iic E0 #

∀ {a : ℝ}, MeasureTheory.volume (Set.Iic a) = ⊤

instance Real.locallyFinite_volume E0 #

MeasureTheory.IsLocallyFiniteMeasure MeasureTheory.volume

instance Real.isFiniteMeasure_restrict_Icc E0 #

∀ (x y : ℝ), MeasureTheory.IsFiniteMeasure (MeasureTheory.volume.restrict (Set.Icc x y))

instance Real.isFiniteMeasure_restrict_Ico E0 #

∀ (x y : ℝ), MeasureTheory.IsFiniteMeasure (MeasureTheory.volume.restrict (Set.Ico x y))

instance Real.isFiniteMeasure_restrict_Ioc E0 #

∀ (x y : ℝ), MeasureTheory.IsFiniteMeasure (MeasureTheory.volume.restrict (Set.Ioc x y))

instance Real.isFiniteMeasure_restrict_Ioo E0 #

∀ (x y : ℝ), MeasureTheory.IsFiniteMeasure (MeasureTheory.volume.restrict (Set.Ioo x y))

theorem Real.volume_le_diam E1 #

∀ (s : Set ℝ), MeasureTheory.volume s ≤ Metric.ediam s

theorem Filter.Eventually.volume_pos_of_nhds_real E1 #

∀ {p : ℝ → Prop} {a : ℝ}, (∀ᶠ (x : ℝ) in nhds a, p x) → 0 < MeasureTheory.volume {x | p x}

theorem Real.volume_Icc_pi E1 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ}, MeasureTheory.volume (Set.Icc a b) = ∏ i, ENNReal.ofReal (b i - a i)

theorem Real.volume_Icc_pi_toReal E0 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ},
  a ≤ b → (MeasureTheory.volume (Set.Icc a b)).toReal = ∏ i, (b i - a i)

theorem Real.volume_pi_Ioo E1 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ},
  MeasureTheory.volume (Set.univ.pi fun i ↦ Set.Ioo (a i) (b i)) = ∏ i, ENNReal.ofReal (b i - a i)

theorem Real.volume_pi_Ioo_toReal E0 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ},
  a ≤ b → (MeasureTheory.volume (Set.univ.pi fun i ↦ Set.Ioo (a i) (b i))).toReal = ∏ i, (b i - a i)

theorem Real.volume_pi_Ioc E1 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ},
  MeasureTheory.volume (Set.univ.pi fun i ↦ Set.Ioc (a i) (b i)) = ∏ i, ENNReal.ofReal (b i - a i)

theorem Real.volume_pi_Ioc_toReal E0 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ},
  a ≤ b → (MeasureTheory.volume (Set.univ.pi fun i ↦ Set.Ioc (a i) (b i))).toReal = ∏ i, (b i - a i)

theorem Real.volume_pi_Ico E1 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ},
  MeasureTheory.volume (Set.univ.pi fun i ↦ Set.Ico (a i) (b i)) = ∏ i, ENNReal.ofReal (b i - a i)

theorem Real.volume_pi_Ico_toReal E0 #

∀ {ι : Type u_1} [inst : Fintype ι] {a b : ι → ℝ},
  a ≤ b → (MeasureTheory.volume (Set.univ.pi fun i ↦ Set.Ico (a i) (b i))).toReal = ∏ i, (b i - a i)

theorem Real.volume_pi_ball E0 #

∀ {ι : Type u_1} [inst : Fintype ι] (a : ι → ℝ) {r : ℝ},
  0 < r → MeasureTheory.volume (Metric.ball a r) = ENNReal.ofReal ((2 * r) ^ Fintype.card ι)

theorem Real.volume_pi_closedBall E0 #

∀ {ι : Type u_1} [inst : Fintype ι] (a : ι → ℝ) {r : ℝ},
  0 ≤ r → MeasureTheory.volume (Metric.closedBall a r) = ENNReal.ofReal ((2 * r) ^ Fintype.card ι)

theorem Real.volume_pi_le_prod_diam E1 #

∀ {ι : Type u_1} [inst : Fintype ι] (s : Set (ι → ℝ)), MeasureTheory.volume s ≤ ∏ i, Metric.ediam (Function.eval i '' s)

theorem Real.volume_pi_le_diam_pow E1 #

∀ {ι : Type u_1} [inst : Fintype ι] (s : Set (ι → ℝ)), MeasureTheory.volume s ≤ Metric.ediam s ^ Fintype.card ι

theorem Real.smul_map_volume_mul_left E1 #

∀ {a : ℝ},
  a ≠ 0 → ENNReal.ofReal |a| • MeasureTheory.Measure.map (fun x ↦ a * x) MeasureTheory.volume = MeasureTheory.volume

theorem Real.map_volume_mul_left E0 #

∀ {a : ℝ},
  a ≠ 0 → MeasureTheory.Measure.map (fun x ↦ a * x) MeasureTheory.volume = ENNReal.ofReal |a⁻¹| • MeasureTheory.volume

theorem Real.volume_preimage_mul_left E0 #

∀ {a : ℝ},
  a ≠ 0 → ∀ (s : Set ℝ), MeasureTheory.volume ((fun x ↦ a * x) ⁻¹' s) = ENNReal.ofReal |a⁻¹| * MeasureTheory.volume s

theorem Real.smul_map_volume_mul_right E1 #

∀ {a : ℝ},
  a ≠ 0 → ENNReal.ofReal |a| • MeasureTheory.Measure.map (fun x ↦ x * a) MeasureTheory.volume = MeasureTheory.volume

theorem Real.map_volume_mul_right E0 #

∀ {a : ℝ},
  a ≠ 0 → MeasureTheory.Measure.map (fun x ↦ x * a) MeasureTheory.volume = ENNReal.ofReal |a⁻¹| • MeasureTheory.volume

theorem Real.volume_preimage_mul_right E0 #

∀ {a : ℝ},
  a ≠ 0 → ∀ (s : Set ℝ), MeasureTheory.volume ((fun x ↦ x * a) ⁻¹' s) = ENNReal.ofReal |a⁻¹| * MeasureTheory.volume s

theorem Real.smul_map_diagonal_volume_pi E1 #

∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {D : ι → ℝ},
  (Matrix.diagonal D).det ≠ 0 →
    ENNReal.ofReal |(Matrix.diagonal D).det| •
        MeasureTheory.Measure.map (⇑(Matrix.toLin' (Matrix.diagonal D))) MeasureTheory.volume =
      MeasureTheory.volume

A diagonal matrix rescales Lebesgue according to its determinant. This is a special case of Real.map_matrix_volume_pi_eq_smul_volume_pi, that one should use instead (and whose proof uses this particular case).

theorem Real.volume_preserving_transvectionStruct E1 #

∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] (t : Matrix.TransvectionStruct ι ℝ),
  MeasureTheory.MeasurePreserving (⇑(Matrix.toLin' t.toMatrix)) MeasureTheory.volume MeasureTheory.volume

A transvection preserves Lebesgue measure.

theorem Real.map_matrix_volume_pi_eq_smul_volume_pi E0 #

∀ {ι : Type u_1} [inst : Fintype ι] [inst_1 : DecidableEq ι] {M : Matrix ι ι ℝ},
  M.det ≠ 0 →
    MeasureTheory.Measure.map (⇑(Matrix.toLin' M)) MeasureTheory.volume =
      ENNReal.ofReal |M.det⁻¹| • MeasureTheory.volume

Any invertible matrix rescales Lebesgue measure through the absolute value of its determinant.

theorem Real.map_linearMap_volume_pi_eq_smul_volume_pi E0 #

∀ {ι : Type u_1} [inst : Fintype ι] {f : (ι → ℝ) →ₗ[ℝ] ι → ℝ},
  LinearMap.det f ≠ 0 →
    MeasureTheory.Measure.map (⇑f) MeasureTheory.volume = ENNReal.ofReal |(LinearMap.det f)⁻¹| • MeasureTheory.volume

Any invertible linear map rescales Lebesgue measure through the absolute value of its determinant.

def regionBetween E1 #

{α : Type u_1} → (α → ℝ) → (α → ℝ) → Set α → Set (α × ℝ)

The region between two real-valued functions on an arbitrary set.

theorem regionBetween_subset E1 #

∀ {α : Type u_1} (f g : α → ℝ) (s : Set α), regionBetween f g s ⊆ s ×ˢ Set.univ

theorem measurableSet_regionBetween E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] {f g : α → ℝ} {s : Set α},
  Measurable f → Measurable g → MeasurableSet s → MeasurableSet (regionBetween f g s)

The region between two measurable functions on a measurable set is measurable.

theorem measurableSet_region_between_oc E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] {f g : α → ℝ} {s : Set α},
  Measurable f → Measurable g → MeasurableSet s → MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Ioc (f p.1) (g p.1)}

The region between two measurable functions on a measurable set is measurable; a version for the region together with the graph of the upper function.

theorem measurableSet_region_between_co E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] {f g : α → ℝ} {s : Set α},
  Measurable f → Measurable g → MeasurableSet s → MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Ico (f p.1) (g p.1)}

The region between two measurable functions on a measurable set is measurable; a version for the region together with the graph of the lower function.

theorem measurableSet_region_between_cc E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] {f g : α → ℝ} {s : Set α},
  Measurable f → Measurable g → MeasurableSet s → MeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Icc (f p.1) (g p.1)}

The region between two measurable functions on a measurable set is measurable; a version for the region together with the graphs of both functions.

theorem measurableSet_graph E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] {f : α → ℝ}, Measurable f → MeasurableSet {p | p.2 = f p.1}

The graph of a measurable function is a measurable set.

theorem volume_regionBetween_eq_lintegral' E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] {μ : MeasureTheory.Measure α} {f g : α → ℝ} {s : Set α},
  Measurable f →
    Measurable g →
      MeasurableSet s →
        (μ.prod MeasureTheory.volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ENNReal.ofReal ((g - f) y) ∂μ

theorem volume_regionBetween_eq_lintegral E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] {μ : MeasureTheory.Measure α} {f g : α → ℝ} {s : Set α}
  [MeasureTheory.SFinite μ],
  AEMeasurable f (μ.restrict s) →
    AEMeasurable g (μ.restrict s) →
      MeasurableSet s →
        (μ.prod MeasureTheory.volume) (regionBetween f g s) = ∫⁻ (y : α) in s, ENNReal.ofReal ((g - f) y) ∂μ

The volume of the region between two almost everywhere measurable functions on a measurable set can be represented as a Lebesgue integral.

theorem nullMeasurableSet_regionBetween E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] (μ : MeasureTheory.Measure α) {f g : α → ℝ},
  AEMeasurable f μ →
    AEMeasurable g μ →
      ∀ {s : Set α},
        MeasureTheory.NullMeasurableSet s μ →
          MeasureTheory.NullMeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Ioo (f p.1) (g p.1)} (μ.prod MeasureTheory.volume)

The region between two a.e.-measurable functions on a null-measurable set is null-measurable.

theorem nullMeasurableSet_region_between_oc E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] (μ : MeasureTheory.Measure α) {f g : α → ℝ},
  AEMeasurable f μ →
    AEMeasurable g μ →
      ∀ {s : Set α},
        MeasureTheory.NullMeasurableSet s μ →
          MeasureTheory.NullMeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Ioc (f p.1) (g p.1)} (μ.prod MeasureTheory.volume)

The region between two a.e.-measurable functions on a null-measurable set is null-measurable; a version for the region together with the graph of the upper function.

theorem nullMeasurableSet_region_between_co E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] (μ : MeasureTheory.Measure α) {f g : α → ℝ},
  AEMeasurable f μ →
    AEMeasurable g μ →
      ∀ {s : Set α},
        MeasureTheory.NullMeasurableSet s μ →
          MeasureTheory.NullMeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Ico (f p.1) (g p.1)} (μ.prod MeasureTheory.volume)

The region between two a.e.-measurable functions on a null-measurable set is null-measurable; a version for the region together with the graph of the lower function.

theorem nullMeasurableSet_region_between_cc E1 #

∀ {α : Type u_1} [inst : MeasurableSpace α] (μ : MeasureTheory.Measure α) {f g : α → ℝ},
  AEMeasurable f μ →
    AEMeasurable g μ →
      ∀ {s : Set α},
        MeasureTheory.NullMeasurableSet s μ →
          MeasureTheory.NullMeasurableSet {p | p.1 ∈ s ∧ p.2 ∈ Set.Icc (f p.1) (g p.1)} (μ.prod MeasureTheory.volume)

The region between two a.e.-measurable functions on a null-measurable set is null-measurable; a version for the region together with the graphs of both functions.

theorem ae_restrict_of_ae_restrict_inter_Ioo E1 #

∀ {μ : MeasureTheory.Measure ℝ} [MeasureTheory.NullSingletonClass μ] {s : Set ℝ} {p : ℝ → Prop},
  (∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ.restrict (s ∩ Set.Ioo a b), p x) → ∀ᵐ (x : ℝ) ∂μ.restrict s, p x

Consider a real set s. If a property is true almost everywhere in s ∩ (a, b) for all a, b ∈ s, then it is true almost everywhere in s. Formulated with μ.restrict. See also ae_of_mem_of_ae_of_mem_inter_Ioo.

theorem ae_of_mem_of_ae_of_mem_inter_Ioo E1 #

∀ {μ : MeasureTheory.Measure ℝ} [MeasureTheory.NullSingletonClass μ] {s : Set ℝ} {p : ℝ → Prop},
  (∀ (a b : ℝ), a ∈ s → b ∈ s → a < b → ∀ᵐ (x : ℝ) ∂μ, x ∈ s ∩ Set.Ioo a b → p x) → ∀ᵐ (x : ℝ) ∂μ, x ∈ s → p x

Consider a real set s. If a property is true almost everywhere in s ∩ (a, b) for all a, b ∈ s, then it is true almost everywhere in s. Formulated with bare membership. See also ae_restrict_of_ae_restrict_inter_Ioo.

Deprecated aliases

NameNew nameSince
Real.noAtoms_volumeReal.nullSingletonClass_volume2026-06-09