Documentation

Mathlib.MeasureTheory.Integral.Average

Integral average of a function #

In this file we define MeasureTheory.average μ f (notation: ⨍ x, f x ∂μ) to be the average value of f with respect to measure μ. It is defined as ∫ x, f x ∂((μ univ)⁻¹ • μ), so it is equal to zero if f is not integrable or if μ is an infinite measure. If μ is a probability measure, then the average of any function is equal to its integral.

For the average on a set, we use ⨍ x in s, f x ∂μ (notation for ⨍ x, f x ∂(μ.restrict s)). For average w.r.t. the volume, one can omit ∂volume.

Both have a version for the Lebesgue integral rather than Bochner.

We prove several version of the first moment method: An integrable function is below/above its average on a set of positive measure.

Implementation notes #

The average is defined as an integral over (μ univ)⁻¹ • μ so that all theorems about Bochner integrals work for the average without modifications. For theorems that require integrability of a function, we provide a convenience lemma MeasureTheory.Integrable.to_average.

TODO #

Provide the first moment method for the Lebesgue integral as well. A draft is available on branch first_moment_lintegral in mathlib3 repository.

Tags #

integral, center mass, average value

Average value of a function w.r.t. a measure #

The (Bochner, Lebesgue) average value of a function f w.r.t. a measure μ (notation: ⨍ x, f x ∂μ, ⨍⁻ x, f x ∂μ) is defined as the (Bochner, Lebesgue) integral divided by the total measure, so it is equal to zero if μ is an infinite measure, and (typically) equal to infinity if f is not integrable. If μ is a probability measure, then the average of any function is equal to its integral.

noncomputable def MeasureTheory.laverage {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) (f : αENNReal) :

Average value of an ℝ≥0∞-valued function f w.r.t. a measure μ, denoted ⨍⁻ x, f x ∂μ.

It is equal to (μ univ)⁻¹ * ∫⁻ x, f x ∂μ, so it takes value zero if μ is an infinite measure. If μ is a probability measure, then the average of any function is equal to its integral.

For the average on a set, use ⨍⁻ x in s, f x ∂μ, defined as ⨍⁻ x, f x ∂(μ.restrict s). For the average w.r.t. the volume, one can omit ∂volume.

Equations
Instances For

    Pretty printer defined by notation3 command.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Average value of an ℝ≥0∞-valued function f w.r.t. a measure μ.

      It is equal to (μ univ)⁻¹ * ∫⁻ x, f x ∂μ, so it takes value zero if μ is an infinite measure. If μ is a probability measure, then the average of any function is equal to its integral.

      For the average on a set, use ⨍⁻ x in s, f x ∂μ, defined as ⨍⁻ x, f x ∂(μ.restrict s). For the average w.r.t. the volume, one can omit ∂volume.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Average value of an ℝ≥0∞-valued function f w.r.t. to the standard measure.

        It is equal to (volume univ)⁻¹ * ∫⁻ x, f x, so it takes value zero if the space has infinite measure. In a probability space, the average of any function is equal to its integral.

        For the average on a set, use ⨍⁻ x in s, f x, defined as ⨍⁻ x, f x ∂(volume.restrict s).

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Pretty printer defined by notation3 command.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Pretty printer defined by notation3 command.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Average value of an ℝ≥0∞-valued function f w.r.t. a measure μ on a set s.

              It is equal to (μ s)⁻¹ * ∫⁻ x, f x ∂μ, so it takes value zero if s has infinite measure. If s has measure 1, then the average of any function is equal to its integral.

              For the average w.r.t. the volume, one can omit ∂volume.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                Average value of an ℝ≥0∞-valued function f w.r.t. to the standard measure on a set s.

                It is equal to (volume s)⁻¹ * ∫⁻ x, f x, so it takes value zero if s has infinite measure. If s has measure 1, then the average of any function is equal to its integral.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  @[simp]
                  theorem MeasureTheory.laverage_zero {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) :
                  ⨍⁻ (_x : α), 0μ = 0
                  @[simp]
                  theorem MeasureTheory.laverage_zero_measure {α : Type u_1} {m0 : MeasurableSpace α} (f : αENNReal) :
                  ⨍⁻ (x : α), f x0 = 0
                  theorem MeasureTheory.laverage_eq' {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) (f : αENNReal) :
                  ⨍⁻ (x : α), f xμ = ∫⁻ (x : α), f x(μ Set.univ)⁻¹ μ
                  theorem MeasureTheory.laverage_eq {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) (f : αENNReal) :
                  ⨍⁻ (x : α), f xμ = (∫⁻ (x : α), f xμ) / μ Set.univ
                  theorem MeasureTheory.laverage_eq_lintegral {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) [MeasureTheory.IsProbabilityMeasure μ] (f : αENNReal) :
                  ⨍⁻ (x : α), f xμ = ∫⁻ (x : α), f xμ
                  @[simp]
                  theorem MeasureTheory.measure_mul_laverage {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] (f : αENNReal) :
                  μ Set.univ * ⨍⁻ (x : α), f xμ = ∫⁻ (x : α), f xμ
                  theorem MeasureTheory.setLaverage_eq {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) (f : αENNReal) (s : Set α) :
                  ⨍⁻ (x : α) in s, f xμ = (∫⁻ (x : α) in s, f xμ) / μ s
                  theorem MeasureTheory.setLaverage_eq' {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) (f : αENNReal) (s : Set α) :
                  ⨍⁻ (x : α) in s, f xμ = ∫⁻ (x : α), f x(μ s)⁻¹ MeasureTheory.Measure.restrict μ s
                  theorem MeasureTheory.laverage_congr {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} {g : αENNReal} (h : f =ᶠ[MeasureTheory.Measure.ae μ] g) :
                  ⨍⁻ (x : α), f xμ = ⨍⁻ (x : α), g xμ
                  theorem MeasureTheory.setLaverage_congr {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {t : Set α} {f : αENNReal} (h : s =ᶠ[MeasureTheory.Measure.ae μ] t) :
                  ⨍⁻ (x : α) in s, f xμ = ⨍⁻ (x : α) in t, f xμ
                  theorem MeasureTheory.setLaverage_congr_fun {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} {g : αENNReal} (hs : MeasurableSet s) (h : ∀ᵐ (x : α) ∂μ, x sf x = g x) :
                  ⨍⁻ (x : α) in s, f xμ = ⨍⁻ (x : α) in s, g xμ
                  theorem MeasureTheory.laverage_lt_top {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} (hf : ∫⁻ (x : α), f xμ ) :
                  ⨍⁻ (x : α), f xμ <
                  theorem MeasureTheory.setLaverage_lt_top {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} :
                  ∫⁻ (x : α) in s, f xμ ⨍⁻ (x : α) in s, f xμ <
                  theorem MeasureTheory.laverage_add_measure {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {ν : MeasureTheory.Measure α} {f : αENNReal} :
                  ⨍⁻ (x : α), f x(μ + ν) = μ Set.univ / (μ Set.univ + ν Set.univ) * ⨍⁻ (x : α), f xμ + ν Set.univ / (μ Set.univ + ν Set.univ) * ⨍⁻ (x : α), f xν
                  theorem MeasureTheory.measure_mul_setLaverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} (f : αENNReal) (h : μ s ) :
                  μ s * ⨍⁻ (x : α) in s, f xμ = ∫⁻ (x : α) in s, f xμ
                  theorem MeasureTheory.laverage_union {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {t : Set α} {f : αENNReal} (hd : MeasureTheory.AEDisjoint μ s t) (ht : MeasureTheory.NullMeasurableSet t) :
                  ⨍⁻ (x : α) in s t, f xμ = μ s / (μ s + μ t) * ⨍⁻ (x : α) in s, f xμ + μ t / (μ s + μ t) * ⨍⁻ (x : α) in t, f xμ
                  theorem MeasureTheory.laverage_union_mem_openSegment {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {t : Set α} {f : αENNReal} (hd : MeasureTheory.AEDisjoint μ s t) (ht : MeasureTheory.NullMeasurableSet t) (hs₀ : μ s 0) (ht₀ : μ t 0) (hsμ : μ s ) (htμ : μ t ) :
                  ⨍⁻ (x : α) in s t, f xμ openSegment ENNReal (⨍⁻ (x : α) in s, f xμ) (⨍⁻ (x : α) in t, f xμ)
                  theorem MeasureTheory.laverage_union_mem_segment {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {t : Set α} {f : αENNReal} (hd : MeasureTheory.AEDisjoint μ s t) (ht : MeasureTheory.NullMeasurableSet t) (hsμ : μ s ) (htμ : μ t ) :
                  ⨍⁻ (x : α) in s t, f xμ segment ENNReal (⨍⁻ (x : α) in s, f xμ) (⨍⁻ (x : α) in t, f xμ)
                  theorem MeasureTheory.laverage_mem_openSegment_compl_self {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} [MeasureTheory.IsFiniteMeasure μ] (hs : MeasureTheory.NullMeasurableSet s) (hs₀ : μ s 0) (hsc₀ : μ s 0) :
                  ⨍⁻ (x : α), f xμ openSegment ENNReal (⨍⁻ (x : α) in s, f xμ) (⨍⁻ (x : α) in s, f xμ)
                  @[simp]
                  theorem MeasureTheory.laverage_const {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] [h : NeZero μ] (c : ENNReal) :
                  ⨍⁻ (_x : α), cμ = c
                  theorem MeasureTheory.setLaverage_const {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} (hs₀ : μ s 0) (hs : μ s ) (c : ENNReal) :
                  ⨍⁻ (_x : α) in s, cμ = c
                  theorem MeasureTheory.laverage_one {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} [MeasureTheory.IsFiniteMeasure μ] [NeZero μ] :
                  ⨍⁻ (_x : α), 1μ = 1
                  theorem MeasureTheory.setLaverage_one {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} (hs₀ : μ s 0) (hs : μ s ) :
                  ⨍⁻ (_x : α) in s, 1μ = 1
                  theorem MeasureTheory.lintegral_laverage {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] (f : αENNReal) :
                  ∫⁻ (_x : α), ⨍⁻ (a : α), f aμμ = ∫⁻ (x : α), f xμ
                  theorem MeasureTheory.setLintegral_setLaverage {α : Type u_1} {m0 : MeasurableSpace α} (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] (f : αENNReal) (s : Set α) :
                  ∫⁻ (_x : α) in s, ⨍⁻ (a : α) in s, f aμμ = ∫⁻ (x : α) in s, f xμ
                  noncomputable def MeasureTheory.average {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) (f : αE) :
                  E

                  Average value of a function f w.r.t. a measure μ, denoted ⨍ x, f x ∂μ.

                  It is equal to (μ univ).toReal⁻¹ • ∫ x, f x ∂μ, so it takes value zero if f is not integrable or if μ is an infinite measure. If μ is a probability measure, then the average of any function is equal to its integral.

                  For the average on a set, use ⨍ x in s, f x ∂μ, defined as ⨍ x, f x ∂(μ.restrict s). For the average w.r.t. the volume, one can omit ∂volume.

                  Equations
                  Instances For

                    Pretty printer defined by notation3 command.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Average value of a function f w.r.t. a measure μ.

                      It is equal to (μ univ).toReal⁻¹ • ∫ x, f x ∂μ, so it takes value zero if f is not integrable or if μ is an infinite measure. If μ is a probability measure, then the average of any function is equal to its integral.

                      For the average on a set, use ⨍ x in s, f x ∂μ, defined as ⨍ x, f x ∂(μ.restrict s). For the average w.r.t. the volume, one can omit ∂volume.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Average value of a function f w.r.t. to the standard measure.

                        It is equal to (volume univ).toReal⁻¹ * ∫ x, f x, so it takes value zero if f is not integrable or if the space has infinite measure. In a probability space, the average of any function is equal to its integral.

                        For the average on a set, use ⨍ x in s, f x, defined as ⨍ x, f x ∂(volume.restrict s).

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Pretty printer defined by notation3 command.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Pretty printer defined by notation3 command.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              Average value of a function f w.r.t. a measure μ on a set s.

                              It is equal to (μ s).toReal⁻¹ * ∫ x, f x ∂μ, so it takes value zero if f is not integrable on s or if s has infinite measure. If s has measure 1, then the average of any function is equal to its integral.

                              For the average w.r.t. the volume, one can omit ∂volume.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Pretty printer defined by notation3 command.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  Average value of a function f w.r.t. to the standard measure on a set s.

                                  It is equal to (volume s).toReal⁻¹ * ∫ x, f x, so it takes value zero f is not integrable on s or if s has infinite measure. If s has measure 1, then the average of any function is equal to its integral.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    @[simp]
                                    theorem MeasureTheory.average_zero {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) :
                                    ⨍ (x : α), 0μ = 0
                                    @[simp]
                                    theorem MeasureTheory.average_zero_measure {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (f : αE) :
                                    ⨍ (x : α), f x0 = 0
                                    @[simp]
                                    theorem MeasureTheory.average_neg {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) (f : αE) :
                                    ⨍ (x : α), -f xμ = -⨍ (x : α), f xμ
                                    theorem MeasureTheory.average_eq' {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) (f : αE) :
                                    ⨍ (x : α), f xμ = ∫ (x : α), f x(μ Set.univ)⁻¹ μ
                                    theorem MeasureTheory.average_eq {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) (f : αE) :
                                    ⨍ (x : α), f xμ = (ENNReal.toReal (μ Set.univ))⁻¹ ∫ (x : α), f xμ
                                    theorem MeasureTheory.average_eq_integral {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) [MeasureTheory.IsProbabilityMeasure μ] (f : αE) :
                                    ⨍ (x : α), f xμ = ∫ (x : α), f xμ
                                    @[simp]
                                    theorem MeasureTheory.measure_smul_average {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] (f : αE) :
                                    ENNReal.toReal (μ Set.univ) ⨍ (x : α), f xμ = ∫ (x : α), f xμ
                                    theorem MeasureTheory.setAverage_eq {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) (f : αE) (s : Set α) :
                                    ⨍ (x : α) in s, f xμ = (ENNReal.toReal (μ s))⁻¹ ∫ (x : α) in s, f xμ
                                    theorem MeasureTheory.setAverage_eq' {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] (μ : MeasureTheory.Measure α) (f : αE) (s : Set α) :
                                    ⨍ (x : α) in s, f xμ = ∫ (x : α), f x(μ s)⁻¹ MeasureTheory.Measure.restrict μ s
                                    theorem MeasureTheory.average_congr {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} {f : αE} {g : αE} (h : f =ᶠ[MeasureTheory.Measure.ae μ] g) :
                                    ⨍ (x : α), f xμ = ⨍ (x : α), g xμ
                                    theorem MeasureTheory.setAverage_congr {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} {s : Set α} {t : Set α} {f : αE} (h : s =ᶠ[MeasureTheory.Measure.ae μ] t) :
                                    ⨍ (x : α) in s, f xμ = ⨍ (x : α) in t, f xμ
                                    theorem MeasureTheory.setAverage_congr_fun {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} {s : Set α} {f : αE} {g : αE} (hs : MeasurableSet s) (h : ∀ᵐ (x : α) ∂μ, x sf x = g x) :
                                    ⨍ (x : α) in s, f xμ = ⨍ (x : α) in s, g xμ
                                    theorem MeasureTheory.average_add_measure {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} [MeasureTheory.IsFiniteMeasure μ] {ν : MeasureTheory.Measure α} [MeasureTheory.IsFiniteMeasure ν] {f : αE} (hμ : MeasureTheory.Integrable f) (hν : MeasureTheory.Integrable f) :
                                    ⨍ (x : α), f x(μ + ν) = (ENNReal.toReal (μ Set.univ) / (ENNReal.toReal (μ Set.univ) + ENNReal.toReal (ν Set.univ))) ⨍ (x : α), f xμ + (ENNReal.toReal (ν Set.univ) / (ENNReal.toReal (μ Set.univ) + ENNReal.toReal (ν Set.univ))) ⨍ (x : α), f xν
                                    theorem MeasureTheory.average_pair {α : Type u_1} {E : Type u_2} {F : Type u_3} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] [NormedAddCommGroup F] [NormedSpace F] [CompleteSpace F] {μ : MeasureTheory.Measure α} {f : αE} {g : αF} (hfi : MeasureTheory.Integrable f) (hgi : MeasureTheory.Integrable g) :
                                    ⨍ (x : α), (f x, g x)μ = (⨍ (x : α), f xμ, ⨍ (x : α), g xμ)
                                    theorem MeasureTheory.measure_smul_setAverage {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} (f : αE) {s : Set α} (h : μ s ) :
                                    ENNReal.toReal (μ s) ⨍ (x : α) in s, f xμ = ∫ (x : α) in s, f xμ
                                    theorem MeasureTheory.average_union {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} {f : αE} {s : Set α} {t : Set α} (hd : MeasureTheory.AEDisjoint μ s t) (ht : MeasureTheory.NullMeasurableSet t) (hsμ : μ s ) (htμ : μ t ) (hfs : MeasureTheory.IntegrableOn f s) (hft : MeasureTheory.IntegrableOn f t) :
                                    ⨍ (x : α) in s t, f xμ = (ENNReal.toReal (μ s) / (ENNReal.toReal (μ s) + ENNReal.toReal (μ t))) ⨍ (x : α) in s, f xμ + (ENNReal.toReal (μ t) / (ENNReal.toReal (μ s) + ENNReal.toReal (μ t))) ⨍ (x : α) in t, f xμ
                                    theorem MeasureTheory.average_union_mem_openSegment {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} {f : αE} {s : Set α} {t : Set α} (hd : MeasureTheory.AEDisjoint μ s t) (ht : MeasureTheory.NullMeasurableSet t) (hs₀ : μ s 0) (ht₀ : μ t 0) (hsμ : μ s ) (htμ : μ t ) (hfs : MeasureTheory.IntegrableOn f s) (hft : MeasureTheory.IntegrableOn f t) :
                                    ⨍ (x : α) in s t, f xμ openSegment (⨍ (x : α) in s, f xμ) (⨍ (x : α) in t, f xμ)
                                    theorem MeasureTheory.average_union_mem_segment {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} {f : αE} {s : Set α} {t : Set α} (hd : MeasureTheory.AEDisjoint μ s t) (ht : MeasureTheory.NullMeasurableSet t) (hsμ : μ s ) (htμ : μ t ) (hfs : MeasureTheory.IntegrableOn f s) (hft : MeasureTheory.IntegrableOn f t) :
                                    ⨍ (x : α) in s t, f xμ segment (⨍ (x : α) in s, f xμ) (⨍ (x : α) in t, f xμ)
                                    theorem MeasureTheory.average_mem_openSegment_compl_self {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] {μ : MeasureTheory.Measure α} [MeasureTheory.IsFiniteMeasure μ] {f : αE} {s : Set α} (hs : MeasureTheory.NullMeasurableSet s) (hs₀ : μ s 0) (hsc₀ : μ s 0) (hfi : MeasureTheory.Integrable f) :
                                    ⨍ (x : α), f xμ openSegment (⨍ (x : α) in s, f xμ) (⨍ (x : α) in s, f xμ)
                                    @[simp]
                                    theorem MeasureTheory.average_const {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] [h : NeZero μ] (c : E) :
                                    ⨍ (_x : α), cμ = c
                                    theorem MeasureTheory.setAverage_const {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] {μ : MeasureTheory.Measure α} {s : Set α} (hs₀ : μ s 0) (hs : μ s ) (c : E) :
                                    ⨍ (x : α) in s, cμ = c
                                    theorem MeasureTheory.integral_average {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] (f : αE) :
                                    ∫ (x : α), ⨍ (a : α), f aμμ = ∫ (x : α), f xμ
                                    theorem MeasureTheory.setIntegral_setAverage {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] (f : αE) (s : Set α) :
                                    ∫ (x : α) in s, ⨍ (a : α) in s, f aμμ = ∫ (x : α) in s, f xμ
                                    theorem MeasureTheory.integral_sub_average {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] (μ : MeasureTheory.Measure α) [MeasureTheory.IsFiniteMeasure μ] (f : αE) :
                                    ∫ (x : α), f x - ⨍ (a : α), f aμμ = 0
                                    theorem MeasureTheory.setAverage_sub_setAverage {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] {μ : MeasureTheory.Measure α} {s : Set α} (hs : μ s ) (f : αE) :
                                    ∫ (x : α) in s, f x - ⨍ (a : α) in s, f aμμ = 0
                                    theorem MeasureTheory.integral_average_sub {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] {μ : MeasureTheory.Measure α} {f : αE} [MeasureTheory.IsFiniteMeasure μ] (hf : MeasureTheory.Integrable f) :
                                    ∫ (x : α), ⨍ (a : α), f aμ - f xμ = 0
                                    theorem MeasureTheory.setIntegral_setAverage_sub {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] {μ : MeasureTheory.Measure α} {s : Set α} {f : αE} (hs : μ s ) (hf : MeasureTheory.IntegrableOn f s) :
                                    ∫ (x : α) in s, ⨍ (a : α) in s, f aμ - f xμ = 0
                                    theorem MeasureTheory.ofReal_average {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} (hf : MeasureTheory.Integrable f) (hf₀ : 0 ≤ᶠ[MeasureTheory.Measure.ae μ] f) :
                                    ENNReal.ofReal (⨍ (x : α), f xμ) = (∫⁻ (x : α), ENNReal.ofReal (f x)μ) / μ Set.univ
                                    theorem MeasureTheory.ofReal_setAverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : α} (hf : MeasureTheory.IntegrableOn f s) (hf₀ : 0 ≤ᶠ[MeasureTheory.Measure.ae (MeasureTheory.Measure.restrict μ s)] f) :
                                    ENNReal.ofReal (⨍ (x : α) in s, f xμ) = (∫⁻ (x : α) in s, ENNReal.ofReal (f x)μ) / μ s
                                    theorem MeasureTheory.toReal_laverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} (hf : AEMeasurable f) (hf' : ∀ᵐ (x : α) ∂μ, f x ) :
                                    ENNReal.toReal (⨍⁻ (x : α), f xμ) = ⨍ (x : α), ENNReal.toReal (f x)μ
                                    theorem MeasureTheory.toReal_setLaverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} (hf : AEMeasurable f) (hf' : ∀ᵐ (x : α) ∂MeasureTheory.Measure.restrict μ s, f x ) :
                                    ENNReal.toReal (⨍⁻ (x : α) in s, f xμ) = ⨍ (x : α) in s, ENNReal.toReal (f x)μ

                                    First moment method #

                                    theorem MeasureTheory.measure_le_setAverage_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : α} (hμ : μ s 0) (hμ₁ : μ s ) (hf : MeasureTheory.IntegrableOn f s) :
                                    0 < μ {x : α | x s f x ⨍ (a : α) in s, f aμ}

                                    First moment method. An integrable function is smaller than its mean on a set of positive measure.

                                    theorem MeasureTheory.measure_setAverage_le_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : α} (hμ : μ s 0) (hμ₁ : μ s ) (hf : MeasureTheory.IntegrableOn f s) :
                                    0 < μ {x : α | x s ⨍ (a : α) in s, f aμ f x}

                                    First moment method. An integrable function is greater than its mean on a set of positive measure.

                                    theorem MeasureTheory.exists_le_setAverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : α} (hμ : μ s 0) (hμ₁ : μ s ) (hf : MeasureTheory.IntegrableOn f s) :
                                    ∃ x ∈ s, f x ⨍ (a : α) in s, f aμ

                                    First moment method. The minimum of an integrable function is smaller than its mean.

                                    theorem MeasureTheory.exists_setAverage_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : α} (hμ : μ s 0) (hμ₁ : μ s ) (hf : MeasureTheory.IntegrableOn f s) :
                                    ∃ x ∈ s, ⨍ (a : α) in s, f aμ f x

                                    First moment method. The maximum of an integrable function is greater than its mean.

                                    theorem MeasureTheory.measure_le_average_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : MeasureTheory.Integrable f) :
                                    0 < μ {x : α | f x ⨍ (a : α), f aμ}

                                    First moment method. An integrable function is smaller than its mean on a set of positive measure.

                                    theorem MeasureTheory.measure_average_le_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : MeasureTheory.Integrable f) :
                                    0 < μ {x : α | ⨍ (a : α), f aμ f x}

                                    First moment method. An integrable function is greater than its mean on a set of positive measure.

                                    theorem MeasureTheory.exists_le_average {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : MeasureTheory.Integrable f) :
                                    ∃ (x : α), f x ⨍ (a : α), f aμ

                                    First moment method. The minimum of an integrable function is smaller than its mean.

                                    theorem MeasureTheory.exists_average_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : MeasureTheory.Integrable f) :
                                    ∃ (x : α), ⨍ (a : α), f aμ f x

                                    First moment method. The maximum of an integrable function is greater than its mean.

                                    theorem MeasureTheory.exists_not_mem_null_le_average {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : α} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : MeasureTheory.Integrable f) (hN : μ N = 0) :
                                    ∃ x ∉ N, f x ⨍ (a : α), f aμ

                                    First moment method. The minimum of an integrable function is smaller than its mean, while avoiding a null set.

                                    theorem MeasureTheory.exists_not_mem_null_average_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : α} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : MeasureTheory.Integrable f) (hN : μ N = 0) :
                                    ∃ x ∉ N, ⨍ (a : α), f aμ f x

                                    First moment method. The maximum of an integrable function is greater than its mean, while avoiding a null set.

                                    theorem MeasureTheory.measure_le_integral_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] (hf : MeasureTheory.Integrable f) :
                                    0 < μ {x : α | f x ∫ (a : α), f aμ}

                                    First moment method. An integrable function is smaller than its integral on a set of positive measure.

                                    theorem MeasureTheory.measure_integral_le_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] (hf : MeasureTheory.Integrable f) :
                                    0 < μ {x : α | ∫ (a : α), f aμ f x}

                                    First moment method. An integrable function is greater than its integral on a set of positive measure.

                                    theorem MeasureTheory.exists_le_integral {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] (hf : MeasureTheory.Integrable f) :
                                    ∃ (x : α), f x ∫ (a : α), f aμ

                                    First moment method. The minimum of an integrable function is smaller than its integral.

                                    theorem MeasureTheory.exists_integral_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] (hf : MeasureTheory.Integrable f) :
                                    ∃ (x : α), ∫ (a : α), f aμ f x

                                    First moment method. The maximum of an integrable function is greater than its integral.

                                    theorem MeasureTheory.exists_not_mem_null_le_integral {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] (hf : MeasureTheory.Integrable f) (hN : μ N = 0) :
                                    ∃ x ∉ N, f x ∫ (a : α), f aμ

                                    First moment method. The minimum of an integrable function is smaller than its integral, while avoiding a null set.

                                    theorem MeasureTheory.exists_not_mem_null_integral_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : α} [MeasureTheory.IsProbabilityMeasure μ] (hf : MeasureTheory.Integrable f) (hN : μ N = 0) :
                                    ∃ x ∉ N, ∫ (a : α), f aμ f x

                                    First moment method. The maximum of an integrable function is greater than its integral, while avoiding a null set.

                                    theorem MeasureTheory.measure_le_setLaverage_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} (hμ : μ s 0) (hμ₁ : μ s ) (hf : AEMeasurable f) :
                                    0 < μ {x : α | x s f x ⨍⁻ (a : α) in s, f aμ}

                                    First moment method. A measurable function is smaller than its mean on a set of positive measure.

                                    theorem MeasureTheory.measure_setLaverage_le_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} (hμ : μ s 0) (hs : MeasureTheory.NullMeasurableSet s) (hint : ∫⁻ (a : α) in s, f aμ ) :
                                    0 < μ {x : α | x s ⨍⁻ (a : α) in s, f aμ f x}

                                    First moment method. A measurable function is greater than its mean on a set of positive measure.

                                    theorem MeasureTheory.exists_le_setLaverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} (hμ : μ s 0) (hμ₁ : μ s ) (hf : AEMeasurable f) :
                                    ∃ x ∈ s, f x ⨍⁻ (a : α) in s, f aμ

                                    First moment method. The minimum of a measurable function is smaller than its mean.

                                    theorem MeasureTheory.exists_setLaverage_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {s : Set α} {f : αENNReal} (hμ : μ s 0) (hs : MeasureTheory.NullMeasurableSet s) (hint : ∫⁻ (a : α) in s, f aμ ) :
                                    ∃ x ∈ s, ⨍⁻ (a : α) in s, f aμ f x

                                    First moment method. The maximum of a measurable function is greater than its mean.

                                    theorem MeasureTheory.measure_laverage_le_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} (hμ : μ 0) (hint : ∫⁻ (a : α), f aμ ) :
                                    0 < μ {x : α | ⨍⁻ (a : α), f aμ f x}

                                    First moment method. A measurable function is greater than its mean on a set of positive measure.

                                    theorem MeasureTheory.exists_laverage_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} (hμ : μ 0) (hint : ∫⁻ (a : α), f aμ ) :
                                    ∃ (x : α), ⨍⁻ (a : α), f aμ f x

                                    First moment method. The maximum of a measurable function is greater than its mean.

                                    theorem MeasureTheory.exists_not_mem_null_laverage_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : αENNReal} (hμ : μ 0) (hint : ∫⁻ (a : α), f aμ ) (hN : μ N = 0) :
                                    ∃ x ∉ N, ⨍⁻ (a : α), f aμ f x

                                    First moment method. The maximum of a measurable function is greater than its mean, while avoiding a null set.

                                    theorem MeasureTheory.measure_le_laverage_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : AEMeasurable f) :
                                    0 < μ {x : α | f x ⨍⁻ (a : α), f aμ}

                                    First moment method. A measurable function is smaller than its mean on a set of positive measure.

                                    theorem MeasureTheory.exists_le_laverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : AEMeasurable f) :
                                    ∃ (x : α), f x ⨍⁻ (a : α), f aμ

                                    First moment method. The minimum of a measurable function is smaller than its mean.

                                    theorem MeasureTheory.exists_not_mem_null_le_laverage {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : αENNReal} [MeasureTheory.IsFiniteMeasure μ] (hμ : μ 0) (hf : AEMeasurable f) (hN : μ N = 0) :
                                    ∃ x ∉ N, f x ⨍⁻ (a : α), f aμ

                                    First moment method. The minimum of a measurable function is smaller than its mean, while avoiding a null set.

                                    theorem MeasureTheory.measure_le_lintegral_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} [MeasureTheory.IsProbabilityMeasure μ] (hf : AEMeasurable f) :
                                    0 < μ {x : α | f x ∫⁻ (a : α), f aμ}

                                    First moment method. A measurable function is smaller than its integral on a set f positive measure.

                                    theorem MeasureTheory.measure_lintegral_le_pos {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} [MeasureTheory.IsProbabilityMeasure μ] (hint : ∫⁻ (a : α), f aμ ) :
                                    0 < μ {x : α | ∫⁻ (a : α), f aμ f x}

                                    First moment method. A measurable function is greater than its integral on a set f positive measure.

                                    theorem MeasureTheory.exists_le_lintegral {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} [MeasureTheory.IsProbabilityMeasure μ] (hf : AEMeasurable f) :
                                    ∃ (x : α), f x ∫⁻ (a : α), f aμ

                                    First moment method. The minimum of a measurable function is smaller than its integral.

                                    theorem MeasureTheory.exists_lintegral_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {f : αENNReal} [MeasureTheory.IsProbabilityMeasure μ] (hint : ∫⁻ (a : α), f aμ ) :
                                    ∃ (x : α), ∫⁻ (a : α), f aμ f x

                                    First moment method. The maximum of a measurable function is greater than its integral.

                                    theorem MeasureTheory.exists_not_mem_null_le_lintegral {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : αENNReal} [MeasureTheory.IsProbabilityMeasure μ] (hf : AEMeasurable f) (hN : μ N = 0) :
                                    ∃ x ∉ N, f x ∫⁻ (a : α), f aμ

                                    First moment method. The minimum of a measurable function is smaller than its integral, while avoiding a null set.

                                    theorem MeasureTheory.exists_not_mem_null_lintegral_le {α : Type u_1} {m0 : MeasurableSpace α} {μ : MeasureTheory.Measure α} {N : Set α} {f : αENNReal} [MeasureTheory.IsProbabilityMeasure μ] (hint : ∫⁻ (a : α), f aμ ) (hN : μ N = 0) :
                                    ∃ x ∉ N, ∫⁻ (a : α), f aμ f x

                                    First moment method. The maximum of a measurable function is greater than its integral, while avoiding a null set.

                                    theorem MeasureTheory.tendsto_integral_smul_of_tendsto_average_norm_sub {α : Type u_1} {E : Type u_2} {m0 : MeasurableSpace α} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] {μ : MeasureTheory.Measure α} {ι : Type u_4} {a : ιSet α} {l : Filter ι} {f : αE} {c : E} {g : ια} (K : ) (hf : Filter.Tendsto (fun (i : ι) => ⨍ (y : α) in a i, f y - cμ) l (nhds 0)) (f_int : ∀ᶠ (i : ι) in l, MeasureTheory.IntegrableOn f (a i)) (hg : Filter.Tendsto (fun (i : ι) => ∫ (y : α), g i yμ) l (nhds 1)) (g_supp : ∀ᶠ (i : ι) in l, Function.support (g i) a i) (g_bound : ∀ᶠ (i : ι) in l, ∀ (x : α), |g i x| K / ENNReal.toReal (μ (a i))) :
                                    Filter.Tendsto (fun (i : ι) => ∫ (y : α), g i y f yμ) l (nhds c)

                                    If the average of a function f along a sequence of sets aₙ converges to c (more precisely, we require that ⨍ y in a i, ‖f y - c‖ ∂μ tends to 0), then the integral of gₙ • f also tends to c if gₙ is supported in aₙ, has integral converging to one and supremum at most K / μ aₙ.