# Integral over an interval #

In this file we define ∫ x in a..b, f x ∂μ to be ∫ x in Ioc a b, f x ∂μ if a ≤ b and -∫ x in Ioc b a, f x ∂μ if b ≤ a.

## Implementation notes #

### Avoiding if, min, and max#

In order to avoid ifs in the definition, we define IntervalIntegrable f μ a b as IntegrableOn f (Ioc a b) μ ∧ IntegrableOn f (Ioc b a) μ. For any a, b one of these intervals is empty and the other coincides with Set.uIoc a b = Set.Ioc (min a b) (max a b).

Similarly, we define ∫ x in a..b, f x ∂μ to be ∫ x in Ioc a b, f x ∂μ - ∫ x in Ioc b a, f x ∂μ. Again, for any a, b one of these integrals is zero, and the other gives the expected result.

This way some properties can be translated from integrals over sets without dealing with the cases a ≤ b and b ≤ a separately.

### Choice of the interval #

We use integral over Set.uIoc a b = Set.Ioc (min a b) (max a b) instead of one of the other three possible intervals with the same endpoints for two reasons:

• this way ∫ x in a..b, f x ∂μ + ∫ x in b..c, f x ∂μ = ∫ x in a..c, f x ∂μ holds whenever f is integrable on each interval; in particular, it works even if the measure μ has an atom at b; this rules out Set.Ioo and Set.Icc intervals;
• with this definition for a probability measure μ, the integral ∫ x in a..b, 1 ∂μ equals the difference $F_μ(b)-F_μ(a)$, where $F_μ(a)=μ(-∞, a]$ is the cumulative distribution function of μ.

## Tags #

integral

### Integrability on an interval #

def IntervalIntegrable {E : Type u_3} (f : E) (μ : ) (a : ) (b : ) :

A function f is called interval integrable with respect to a measure μ on an unordered interval a..b if it is integrable on both intervals (a, b] and (b, a]. One of these intervals is always empty, so this property is equivalent to f being integrable on (min a b, max a b].

Equations
Instances For

## Basic iff's for IntervalIntegrable#

theorem intervalIntegrable_iff {E : Type u_3} {f : E} {a : } {b : } {μ : } :

A function is interval integrable with respect to a given measure μ on a..b if and only if it is integrable on uIoc a b with respect to μ. This is an equivalent definition of IntervalIntegrable.

theorem IntervalIntegrable.def' {E : Type u_3} {f : E} {a : } {b : } {μ : } (h : ) :

If a function is interval integrable with respect to a given measure μ on a..b then it is integrable on uIoc a b with respect to μ.

theorem intervalIntegrable_iff_integrableOn_Ioc_of_le {E : Type u_3} {f : E} {a : } {b : } {μ : } (hab : a b) :
theorem intervalIntegrable_iff' {E : Type u_3} {f : E} {a : } {b : } {μ : } :
theorem intervalIntegrable_iff_integrableOn_Icc_of_le {E : Type u_3} {f : E} {a : } {b : } (hab : a b) {μ : } :
theorem intervalIntegrable_iff_integrableOn_Ico_of_le {E : Type u_3} {f : E} {a : } {b : } {μ : } (hab : a b) :
theorem intervalIntegrable_iff_integrableOn_Ioo_of_le {E : Type u_3} {f : E} {a : } {b : } {μ : } (hab : a b) :
theorem MeasureTheory.Integrable.intervalIntegrable {E : Type u_3} {f : E} {a : } {b : } {μ : } (hf : ) :

If a function is integrable with respect to a given measure μ then it is interval integrable with respect to μ on uIcc a b.

theorem MeasureTheory.IntegrableOn.intervalIntegrable {E : Type u_3} {f : E} {a : } {b : } {μ : } (hf : ) :
theorem intervalIntegrable_const_iff {E : Type u_3} {a : } {b : } {μ : } {c : E} :
IntervalIntegrable (fun (x : ) => c) μ a b c = 0 μ (Ι a b) <
@[simp]
theorem intervalIntegrable_const {E : Type u_3} {a : } {b : } {μ : } {c : E} :
IntervalIntegrable (fun (x : ) => c) μ a b

## Basic properties of interval integrability #

• interval integrability is symmetric, reflexive, transitive
• monotonicity and strong measurability of the interval integral
• if f is interval integrable, so are its absolute value and norm
• arithmetic properties
theorem IntervalIntegrable.symm {E : Type u_3} {f : E} {a : } {b : } {μ : } (h : ) :
@[simp]
theorem IntervalIntegrable.refl {E : Type u_3} {f : E} {a : } {μ : } :
theorem IntervalIntegrable.trans {E : Type u_3} {f : E} {μ : } {a : } {b : } {c : } (hab : ) (hbc : ) :
theorem IntervalIntegrable.trans_iterate_Ico {E : Type u_3} {f : E} {μ : } {a : } {m : } {n : } (hmn : m n) (hint : kSet.Ico m n, IntervalIntegrable f μ (a k) (a (k + 1))) :
IntervalIntegrable f μ (a m) (a n)
theorem IntervalIntegrable.trans_iterate {E : Type u_3} {f : E} {μ : } {a : } {n : } (hint : k < n, IntervalIntegrable f μ (a k) (a (k + 1))) :
IntervalIntegrable f μ (a 0) (a n)
theorem IntervalIntegrable.neg {E : Type u_3} {f : E} {a : } {b : } {μ : } (h : ) :
theorem IntervalIntegrable.norm {E : Type u_3} {f : E} {a : } {b : } {μ : } (h : ) :
IntervalIntegrable (fun (x : ) => f x) μ a b
theorem IntervalIntegrable.intervalIntegrable_norm_iff {E : Type u_3} {f : E} {μ : } {a : } {b : } (hf : MeasureTheory.AEStronglyMeasurable f (μ.restrict (Ι a b))) :
IntervalIntegrable (fun (t : ) => f t) μ a b
theorem IntervalIntegrable.abs {a : } {b : } {μ : } {f : } (h : ) :
IntervalIntegrable (fun (x : ) => |f x|) μ a b
theorem IntervalIntegrable.mono {E : Type u_3} {f : E} {a : } {b : } {c : } {d : } {μ : } {ν : } (hf : ) (h1 : Set.uIcc c d Set.uIcc a b) (h2 : μ ν) :
theorem IntervalIntegrable.mono_measure {E : Type u_3} {f : E} {a : } {b : } {μ : } {ν : } (hf : ) (h : μ ν) :
theorem IntervalIntegrable.mono_set {E : Type u_3} {f : E} {a : } {b : } {c : } {d : } {μ : } (hf : ) (h : Set.uIcc c d Set.uIcc a b) :
theorem IntervalIntegrable.mono_set_ae {E : Type u_3} {f : E} {a : } {b : } {c : } {d : } {μ : } (hf : ) (h : Ι c d ≤ᵐ[μ] Ι a b) :
theorem IntervalIntegrable.mono_set' {E : Type u_3} {f : E} {a : } {b : } {c : } {d : } {μ : } (hf : ) (hsub : Ι c d Ι a b) :
theorem IntervalIntegrable.mono_fun {E : Type u_3} {F : Type u_4} {f : E} {a : } {b : } {μ : } {g : F} (hf : ) (hgm : MeasureTheory.AEStronglyMeasurable g (μ.restrict (Ι a b))) (hle : (fun (x : ) => g x) ≤ᵐ[μ.restrict (Ι a b)] fun (x : ) => f x) :
theorem IntervalIntegrable.mono_fun' {E : Type u_3} {f : E} {a : } {b : } {μ : } {g : } (hg : ) (hfm : MeasureTheory.AEStronglyMeasurable f (μ.restrict (Ι a b))) (hle : (fun (x : ) => f x) ≤ᵐ[μ.restrict (Ι a b)] g) :
theorem IntervalIntegrable.aestronglyMeasurable {E : Type u_3} {f : E} {a : } {b : } {μ : } (h : ) :
theorem IntervalIntegrable.aestronglyMeasurable' {E : Type u_3} {f : E} {a : } {b : } {μ : } (h : ) :
theorem IntervalIntegrable.smul {𝕜 : Type u_2} {E : Type u_3} [] [] {f : E} {a : } {b : } {μ : } (h : ) (r : 𝕜) :
IntervalIntegrable (r f) μ a b
@[simp]
theorem IntervalIntegrable.add {E : Type u_3} {f : E} {g : E} {a : } {b : } {μ : } (hf : ) (hg : ) :
IntervalIntegrable (fun (x : ) => f x + g x) μ a b
@[simp]
theorem IntervalIntegrable.sub {E : Type u_3} {f : E} {g : E} {a : } {b : } {μ : } (hf : ) (hg : ) :
IntervalIntegrable (fun (x : ) => f x - g x) μ a b
theorem IntervalIntegrable.sum {ι : Type u_1} {E : Type u_3} {a : } {b : } {μ : } (s : ) {f : ιE} (h : is, IntervalIntegrable (f i) μ a b) :
IntervalIntegrable (∑ is, f i) μ a b
theorem IntervalIntegrable.mul_continuousOn {A : Type u_5} [] {a : } {b : } {μ : } {f : A} {g : A} (hf : ) (hg : ContinuousOn g (Set.uIcc a b)) :
IntervalIntegrable (fun (x : ) => f x * g x) μ a b
theorem IntervalIntegrable.continuousOn_mul {A : Type u_5} [] {a : } {b : } {μ : } {f : A} {g : A} (hf : ) (hg : ContinuousOn g (Set.uIcc a b)) :
IntervalIntegrable (fun (x : ) => g x * f x) μ a b
@[simp]
theorem IntervalIntegrable.const_mul {A : Type u_5} [] {a : } {b : } {μ : } {f : A} (hf : ) (c : A) :
IntervalIntegrable (fun (x : ) => c * f x) μ a b
@[simp]
theorem IntervalIntegrable.mul_const {A : Type u_5} [] {a : } {b : } {μ : } {f : A} (hf : ) (c : A) :
IntervalIntegrable (fun (x : ) => f x * c) μ a b
@[simp]
theorem IntervalIntegrable.div_const {a : } {b : } {μ : } {𝕜 : Type u_6} {f : 𝕜} [] (h : ) (c : 𝕜) :
IntervalIntegrable (fun (x : ) => f x / c) μ a b
theorem IntervalIntegrable.comp_mul_left {E : Type u_3} {f : E} {a : } {b : } (hf : IntervalIntegrable f MeasureTheory.volume a b) (c : ) :
IntervalIntegrable (fun (x : ) => f (c * x)) MeasureTheory.volume (a / c) (b / c)
theorem IntervalIntegrable.comp_mul_left_iff {E : Type u_3} {f : E} {a : } {b : } {c : } (hc : c 0) :
IntervalIntegrable (fun (x : ) => f (c * x)) MeasureTheory.volume (a / c) (b / c) IntervalIntegrable f MeasureTheory.volume a b
theorem IntervalIntegrable.comp_mul_right {E : Type u_3} {f : E} {a : } {b : } (hf : IntervalIntegrable f MeasureTheory.volume a b) (c : ) :
IntervalIntegrable (fun (x : ) => f (x * c)) MeasureTheory.volume (a / c) (b / c)
theorem IntervalIntegrable.comp_add_right {E : Type u_3} {f : E} {a : } {b : } (hf : IntervalIntegrable f MeasureTheory.volume a b) (c : ) :
IntervalIntegrable (fun (x : ) => f (x + c)) MeasureTheory.volume (a - c) (b - c)
theorem IntervalIntegrable.comp_add_left {E : Type u_3} {f : E} {a : } {b : } (hf : IntervalIntegrable f MeasureTheory.volume a b) (c : ) :
IntervalIntegrable (fun (x : ) => f (c + x)) MeasureTheory.volume (a - c) (b - c)
theorem IntervalIntegrable.comp_sub_right {E : Type u_3} {f : E} {a : } {b : } (hf : IntervalIntegrable f MeasureTheory.volume a b) (c : ) :
IntervalIntegrable (fun (x : ) => f (x - c)) MeasureTheory.volume (a + c) (b + c)
theorem IntervalIntegrable.iff_comp_neg {E : Type u_3} {f : E} {a : } {b : } :
IntervalIntegrable f MeasureTheory.volume a b IntervalIntegrable (fun (x : ) => f (-x)) MeasureTheory.volume (-a) (-b)
theorem IntervalIntegrable.comp_sub_left {E : Type u_3} {f : E} {a : } {b : } (hf : IntervalIntegrable f MeasureTheory.volume a b) (c : ) :
IntervalIntegrable (fun (x : ) => f (c - x)) MeasureTheory.volume (c - a) (c - b)

## Continuous functions are interval integrable #

theorem ContinuousOn.intervalIntegrable {E : Type u_3} {μ : } {u : E} {a : } {b : } (hu : ContinuousOn u (Set.uIcc a b)) :
theorem ContinuousOn.intervalIntegrable_of_Icc {E : Type u_3} {μ : } {u : E} {a : } {b : } (h : a b) (hu : ContinuousOn u (Set.Icc a b)) :
theorem Continuous.intervalIntegrable {E : Type u_3} {μ : } {u : E} (hu : ) (a : ) (b : ) :

A continuous function on ℝ is IntervalIntegrable with respect to any locally finite measure ν on ℝ.

## Monotone and antitone functions are integral integrable #

theorem MonotoneOn.intervalIntegrable {E : Type u_3} {μ : } [] {u : E} {a : } {b : } (hu : MonotoneOn u (Set.uIcc a b)) :
theorem AntitoneOn.intervalIntegrable {E : Type u_3} {μ : } [] {u : E} {a : } {b : } (hu : AntitoneOn u (Set.uIcc a b)) :
theorem Monotone.intervalIntegrable {E : Type u_3} {μ : } [] {u : E} {a : } {b : } (hu : ) :
theorem Antitone.intervalIntegrable {E : Type u_3} {μ : } [] {u : E} {a : } {b : } (hu : ) :
theorem Filter.Tendsto.eventually_intervalIntegrable_ae {ι : Type u_1} {E : Type u_3} {f : E} {μ : } {l : } {l' : } (hfm : ) [Filter.TendstoIxxClass Set.Ioc l l'] [l'.IsMeasurablyGenerated] (hμ : μ.FiniteAtFilter l') {c : E} (hf : Filter.Tendsto f (l' ) (nhds c)) {u : ι} {v : ι} {lt : } (hu : Filter.Tendsto u lt l) (hv : Filter.Tendsto v lt l) :
∀ᶠ (t : ι) in lt, IntervalIntegrable f μ (u t) (v t)

Let l' be a measurably generated filter; let l be a of filter such that each s ∈ l' eventually includes Ioc u v as both u and v tend to l. Let μ be a measure finite at l'.

Suppose that f : ℝ → E has a finite limit at l' ⊓ ae μ. Then f is interval integrable on u..v provided that both u and v tend to l.

Typeclass instances allow Lean to find l' based on l but not vice versa, so apply Tendsto.eventually_intervalIntegrable_ae will generate goals Filter ℝ and TendstoIxxClass Ioc ?m_1 l'.

theorem Filter.Tendsto.eventually_intervalIntegrable {ι : Type u_1} {E : Type u_3} {f : E} {μ : } {l : } {l' : } (hfm : ) [Filter.TendstoIxxClass Set.Ioc l l'] [l'.IsMeasurablyGenerated] (hμ : μ.FiniteAtFilter l') {c : E} (hf : Filter.Tendsto f l' (nhds c)) {u : ι} {v : ι} {lt : } (hu : Filter.Tendsto u lt l) (hv : Filter.Tendsto v lt l) :
∀ᶠ (t : ι) in lt, IntervalIntegrable f μ (u t) (v t)

Let l' be a measurably generated filter; let l be a of filter such that each s ∈ l' eventually includes Ioc u v as both u and v tend to l. Let μ be a measure finite at l'.

Suppose that f : ℝ → E has a finite limit at l. Then f is interval integrable on u..v provided that both u and v tend to l.

Typeclass instances allow Lean to find l' based on l but not vice versa, so apply Tendsto.eventually_intervalIntegrable will generate goals Filter ℝ and TendstoIxxClass Ioc ?m_1 l'.

### Interval integral: definition and basic properties #

In this section we define ∫ x in a..b, f x ∂μ as ∫ x in Ioc a b, f x ∂μ - ∫ x in Ioc b a, f x ∂μ and prove some basic properties.

def intervalIntegral {E : Type u_3} [] (f : E) (a : ) (b : ) (μ : ) :
E

The interval integral ∫ x in a..b, f x ∂μ is defined as ∫ x in Ioc a b, f x ∂μ - ∫ x in Ioc b a, f x ∂μ. If a ≤ b, then it equals ∫ x in Ioc a b, f x ∂μ, otherwise it equals -∫ x in Ioc b a, f x ∂μ.

Equations
Instances For
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
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
@[simp]
theorem intervalIntegral.integral_zero {E : Type u_3} [] {a : } {b : } {μ : } :
∫ (x : ) in a..b, 0μ = 0
theorem intervalIntegral.integral_of_le {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (h : a b) :
∫ (x : ) in a..b, f xμ = ∫ (x : ) in Set.Ioc a b, f xμ
@[simp]
theorem intervalIntegral.integral_same {E : Type u_3} [] {a : } {f : E} {μ : } :
∫ (x : ) in a..a, f xμ = 0
theorem intervalIntegral.integral_symm {E : Type u_3} [] {f : E} {μ : } (a : ) (b : ) :
∫ (x : ) in b..a, f xμ = -∫ (x : ) in a..b, f xμ
theorem intervalIntegral.integral_of_ge {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (h : b a) :
∫ (x : ) in a..b, f xμ = -∫ (x : ) in Set.Ioc b a, f xμ
theorem intervalIntegral.intervalIntegral_eq_integral_uIoc {E : Type u_3} [] (f : E) (a : ) (b : ) (μ : ) :
∫ (x : ) in a..b, f xμ = (if a b then 1 else -1) ∫ (x : ) in Ι a b, f xμ
theorem intervalIntegral.norm_intervalIntegral_eq {E : Type u_3} [] (f : E) (a : ) (b : ) (μ : ) :
∫ (x : ) in a..b, f xμ = ∫ (x : ) in Ι a b, f xμ
theorem intervalIntegral.abs_intervalIntegral_eq (f : ) (a : ) (b : ) (μ : ) :
|∫ (x : ) in a..b, f xμ| = |∫ (x : ) in Ι a b, f xμ|
theorem intervalIntegral.integral_cases {E : Type u_3} [] {μ : } (f : E) (a : ) (b : ) :
∫ (x : ) in a..b, f xμ {∫ (x : ) in Ι a b, f xμ, -∫ (x : ) in Ι a b, f xμ}
theorem intervalIntegral.integral_undef {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (h : ¬) :
∫ (x : ) in a..b, f xμ = 0
theorem intervalIntegral.intervalIntegrable_of_integral_ne_zero {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (h : ∫ (x : ) in a..b, f xμ 0) :
theorem intervalIntegral.integral_non_aestronglyMeasurable {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (hf : ¬MeasureTheory.AEStronglyMeasurable f (μ.restrict (Ι a b))) :
∫ (x : ) in a..b, f xμ = 0
theorem intervalIntegral.integral_non_aestronglyMeasurable_of_le {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (h : a b) (hf : ¬MeasureTheory.AEStronglyMeasurable f (μ.restrict (Set.Ioc a b))) :
∫ (x : ) in a..b, f xμ = 0
theorem intervalIntegral.norm_integral_min_max {E : Type u_3} [] {a : } {b : } {μ : } (f : E) :
∫ (x : ) in min a b..max a b, f xμ = ∫ (x : ) in a..b, f xμ
theorem intervalIntegral.norm_integral_eq_norm_integral_Ioc {E : Type u_3} [] {a : } {b : } {μ : } (f : E) :
∫ (x : ) in a..b, f xμ = ∫ (x : ) in Ι a b, f xμ
theorem intervalIntegral.abs_integral_eq_abs_integral_uIoc {a : } {b : } {μ : } (f : ) :
|∫ (x : ) in a..b, f xμ| = |∫ (x : ) in Ι a b, f xμ|
theorem intervalIntegral.norm_integral_le_integral_norm_Ioc {E : Type u_3} [] {a : } {b : } {f : E} {μ : } :
∫ (x : ) in a..b, f xμ ∫ (x : ) in Ι a b, f xμ
theorem intervalIntegral.norm_integral_le_abs_integral_norm {E : Type u_3} [] {a : } {b : } {f : E} {μ : } :
∫ (x : ) in a..b, f xμ |∫ (x : ) in a..b, f xμ|
theorem intervalIntegral.norm_integral_le_integral_norm {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (h : a b) :
∫ (x : ) in a..b, f xμ ∫ (x : ) in a..b, f xμ
theorem intervalIntegral.norm_integral_le_of_norm_le {E : Type u_3} [] {a : } {b : } {f : E} {μ : } {g : } (h : ∀ᵐ (t : ) ∂μ.restrict (Ι a b), f t g t) (hbound : ) :
∫ (t : ) in a..b, f tμ |∫ (t : ) in a..b, g tμ|
theorem intervalIntegral.norm_integral_le_of_norm_le_const_ae {E : Type u_3} [] {a : } {b : } {C : } {f : E} (h : ∀ᵐ (x : ), x Ι a bf x C) :
∫ (x : ) in a..b, f x C * |b - a|
theorem intervalIntegral.norm_integral_le_of_norm_le_const {E : Type u_3} [] {a : } {b : } {C : } {f : E} (h : xΙ a b, f x C) :
∫ (x : ) in a..b, f x C * |b - a|
@[simp]
theorem intervalIntegral.integral_add {E : Type u_3} [] {a : } {b : } {f : E} {g : E} {μ : } (hf : ) (hg : ) :
∫ (x : ) in a..b, f x + g xμ = ∫ (x : ) in a..b, f xμ + ∫ (x : ) in a..b, g xμ
theorem intervalIntegral.integral_finset_sum {E : Type u_3} [] {a : } {b : } {μ : } {ι : Type u_6} {s : } {f : ιE} (h : is, IntervalIntegrable (f i) μ a b) :
∫ (x : ) in a..b, is, f i xμ = is, ∫ (x : ) in a..b, f i xμ
@[simp]
theorem intervalIntegral.integral_neg {E : Type u_3} [] {a : } {b : } {f : E} {μ : } :
∫ (x : ) in a..b, -f xμ = -∫ (x : ) in a..b, f xμ
@[simp]
theorem intervalIntegral.integral_sub {E : Type u_3} [] {a : } {b : } {f : E} {g : E} {μ : } (hf : ) (hg : ) :
∫ (x : ) in a..b, f x - g xμ = ∫ (x : ) in a..b, f xμ - ∫ (x : ) in a..b, g xμ
@[simp]
theorem intervalIntegral.integral_smul {E : Type u_3} [] {a : } {b : } {μ : } {𝕜 : Type u_6} [] [] (r : 𝕜) (f : E) :
∫ (x : ) in a..b, r f xμ = r ∫ (x : ) in a..b, f xμ
@[simp]
theorem intervalIntegral.integral_smul_const {E : Type u_3} [] [] {a : } {b : } {μ : } {𝕜 : Type u_6} [] [] (f : 𝕜) (c : E) :
∫ (x : ) in a..b, f x cμ = (∫ (x : ) in a..b, f xμ) c
@[simp]
theorem intervalIntegral.integral_const_mul {a : } {b : } {μ : } {𝕜 : Type u_6} [] (r : 𝕜) (f : 𝕜) :
∫ (x : ) in a..b, r * f xμ = r * ∫ (x : ) in a..b, f xμ
@[simp]
theorem intervalIntegral.integral_mul_const {a : } {b : } {μ : } {𝕜 : Type u_6} [] (r : 𝕜) (f : 𝕜) :
∫ (x : ) in a..b, f x * rμ = (∫ (x : ) in a..b, f xμ) * r
@[simp]
theorem intervalIntegral.integral_div {a : } {b : } {μ : } {𝕜 : Type u_6} [] (r : 𝕜) (f : 𝕜) :
∫ (x : ) in a..b, f x / rμ = (∫ (x : ) in a..b, f xμ) / r
theorem intervalIntegral.integral_const' {E : Type u_3} [] [] {a : } {b : } {μ : } (c : E) :
∫ (x : ) in a..b, cμ = ((μ (Set.Ioc a b)).toReal - (μ (Set.Ioc b a)).toReal) c
@[simp]
theorem intervalIntegral.integral_const {E : Type u_3} [] [] {a : } {b : } (c : E) :
∫ (x : ) in a..b, c = (b - a) c
theorem intervalIntegral.integral_smul_measure {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (c : ENNReal) :
∫ (x : ) in a..b, f xc μ = c.toReal ∫ (x : ) in a..b, f xμ
theorem RCLike.intervalIntegral_ofReal {𝕜 : Type u_6} [] {a : } {b : } {μ : } {f : } :
∫ (x : ) in a..b, (f x)μ = (∫ (x : ) in a..b, f xμ)
@[deprecated RCLike.intervalIntegral_ofReal]
theorem intervalIntegral.RCLike.interval_integral_ofReal {𝕜 : Type u_6} [] {a : } {b : } {μ : } {f : } :
∫ (x : ) in a..b, (f x)μ = (∫ (x : ) in a..b, f xμ)

Alias of RCLike.intervalIntegral_ofReal.

theorem intervalIntegral.integral_ofReal {a : } {b : } {μ : } {f : } :
∫ (x : ) in a..b, (f x)μ = (∫ (x : ) in a..b, f xμ)
theorem ContinuousLinearMap.intervalIntegral_apply {𝕜 : Type u_2} {E : Type u_3} {F : Type u_4} [] {μ : } [] [] [] {a : } {b : } {φ : F →L[𝕜] E} (hφ : ) (v : F) :
(∫ (x : ) in a..b, φ xμ) v = ∫ (x : ) in a..b, (φ x) vμ
theorem ContinuousLinearMap.intervalIntegral_comp_comm {𝕜 : Type u_2} {E : Type u_3} {F : Type u_4} [] [] {a : } {b : } {μ : } {f : E} [] [] [] [] [] (L : E →L[𝕜] F) (hf : ) :
∫ (x : ) in a..b, L (f x)μ = L (∫ (x : ) in a..b, f xμ)

## Basic arithmetic #

Includes addition, scalar multiplication and affine transformations.

Porting note: some @[simp] attributes in this section were removed to make the simpNF linter happy. TODO: find out if these lemmas are actually good or bad simp lemmas.

@[simp]
theorem intervalIntegral.integral_comp_mul_right {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) :
∫ (x : ) in a..b, f (x * c) = c⁻¹ ∫ (x : ) in a * c..b * c, f x
@[simp]
theorem intervalIntegral.smul_integral_comp_mul_right {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) :
c ∫ (x : ) in a..b, f (x * c) = ∫ (x : ) in a * c..b * c, f x
@[simp]
theorem intervalIntegral.integral_comp_mul_left {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) :
∫ (x : ) in a..b, f (c * x) = c⁻¹ ∫ (x : ) in c * a..c * b, f x
@[simp]
theorem intervalIntegral.smul_integral_comp_mul_left {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) :
c ∫ (x : ) in a..b, f (c * x) = ∫ (x : ) in c * a..c * b, f x
@[simp]
theorem intervalIntegral.integral_comp_div {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) :
∫ (x : ) in a..b, f (x / c) = c ∫ (x : ) in a / c..b / c, f x
@[simp]
theorem intervalIntegral.inv_smul_integral_comp_div {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) :
c⁻¹ ∫ (x : ) in a..b, f (x / c) = ∫ (x : ) in a / c..b / c, f x
@[simp]
theorem intervalIntegral.integral_comp_add_right {E : Type u_3} [] {a : } {b : } (f : E) (d : ) :
∫ (x : ) in a..b, f (x + d) = ∫ (x : ) in a + d..b + d, f x
@[simp]
theorem intervalIntegral.integral_comp_add_left {E : Type u_3} [] {a : } {b : } (f : E) (d : ) :
∫ (x : ) in a..b, f (d + x) = ∫ (x : ) in d + a..d + b, f x
@[simp]
theorem intervalIntegral.integral_comp_mul_add {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (c * x + d) = c⁻¹ ∫ (x : ) in c * a + d..c * b + d, f x
@[simp]
theorem intervalIntegral.smul_integral_comp_mul_add {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c ∫ (x : ) in a..b, f (c * x + d) = ∫ (x : ) in c * a + d..c * b + d, f x
@[simp]
theorem intervalIntegral.integral_comp_add_mul {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (d + c * x) = c⁻¹ ∫ (x : ) in d + c * a..d + c * b, f x
theorem intervalIntegral.smul_integral_comp_add_mul {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c ∫ (x : ) in a..b, f (d + c * x) = ∫ (x : ) in d + c * a..d + c * b, f x
theorem intervalIntegral.integral_comp_div_add {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (x / c + d) = c ∫ (x : ) in a / c + d..b / c + d, f x
theorem intervalIntegral.inv_smul_integral_comp_div_add {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c⁻¹ ∫ (x : ) in a..b, f (x / c + d) = ∫ (x : ) in a / c + d..b / c + d, f x
theorem intervalIntegral.integral_comp_add_div {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (d + x / c) = c ∫ (x : ) in d + a / c..d + b / c, f x
theorem intervalIntegral.inv_smul_integral_comp_add_div {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c⁻¹ ∫ (x : ) in a..b, f (d + x / c) = ∫ (x : ) in d + a / c..d + b / c, f x
theorem intervalIntegral.integral_comp_mul_sub {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (c * x - d) = c⁻¹ ∫ (x : ) in c * a - d..c * b - d, f x
theorem intervalIntegral.smul_integral_comp_mul_sub {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c ∫ (x : ) in a..b, f (c * x - d) = ∫ (x : ) in c * a - d..c * b - d, f x
theorem intervalIntegral.integral_comp_sub_mul {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (d - c * x) = c⁻¹ ∫ (x : ) in d - c * b..d - c * a, f x
theorem intervalIntegral.smul_integral_comp_sub_mul {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c ∫ (x : ) in a..b, f (d - c * x) = ∫ (x : ) in d - c * b..d - c * a, f x
theorem intervalIntegral.integral_comp_div_sub {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (x / c - d) = c ∫ (x : ) in a / c - d..b / c - d, f x
theorem intervalIntegral.inv_smul_integral_comp_div_sub {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c⁻¹ ∫ (x : ) in a..b, f (x / c - d) = ∫ (x : ) in a / c - d..b / c - d, f x
theorem intervalIntegral.integral_comp_sub_div {E : Type u_3} [] {a : } {b : } {c : } (f : E) (hc : c 0) (d : ) :
∫ (x : ) in a..b, f (d - x / c) = c ∫ (x : ) in d - b / c..d - a / c, f x
theorem intervalIntegral.inv_smul_integral_comp_sub_div {E : Type u_3} [] [] {a : } {b : } (f : E) (c : ) (d : ) :
c⁻¹ ∫ (x : ) in a..b, f (d - x / c) = ∫ (x : ) in d - b / c..d - a / c, f x
theorem intervalIntegral.integral_comp_sub_right {E : Type u_3} [] {a : } {b : } (f : E) (d : ) :
∫ (x : ) in a..b, f (x - d) = ∫ (x : ) in a - d..b - d, f x
theorem intervalIntegral.integral_comp_sub_left {E : Type u_3} [] {a : } {b : } (f : E) (d : ) :
∫ (x : ) in a..b, f (d - x) = ∫ (x : ) in d - b..d - a, f x
theorem intervalIntegral.integral_comp_neg {E : Type u_3} [] {a : } {b : } (f : E) :
∫ (x : ) in a..b, f (-x) = ∫ (x : ) in -b..-a, f x

### Integral is an additive function of the interval #

In this section we prove that ∫ x in a..b, f x ∂μ + ∫ x in b..c, f x ∂μ = ∫ x in a..c, f x ∂μ as well as a few other identities trivially equivalent to this one. We also prove that ∫ x in a..b, f x ∂μ = ∫ x, f x ∂μ provided that support f ⊆ Ioc a b.

theorem intervalIntegral.integral_congr {E : Type u_3} [] {f : E} {g : E} {μ : } {a : } {b : } (h : Set.EqOn f g (Set.uIcc a b)) :
∫ (x : ) in a..b, f xμ = ∫ (x : ) in a..b, g xμ

If two functions are equal in the relevant interval, their interval integrals are also equal.

theorem intervalIntegral.integral_add_adjacent_intervals_cancel {E : Type u_3} [] {a : } {b : } {c : } {f : E} {μ : } (hab : ) (hbc : ) :
∫ (x : ) in a..b, f xμ + ∫ (x : ) in b..c, f xμ + ∫ (x : ) in c..a, f xμ = 0
theorem intervalIntegral.integral_add_adjacent_intervals {E : Type u_3} [] {a : } {b : } {c : } {f : E} {μ : } (hab : ) (hbc : ) :
∫ (x : ) in a..b, f xμ + ∫ (x : ) in b..c, f xμ = ∫ (x : ) in a..c, f xμ
theorem intervalIntegral.sum_integral_adjacent_intervals_Ico {E : Type u_3} [] {f : E} {μ : } {a : } {m : } {n : } (hmn : m n) (hint : kSet.Ico m n, IntervalIntegrable f μ (a k) (a (k + 1))) :
k, ∫ (x : ) in a k..a (k + 1), f xμ = ∫ (x : ) in a m..a n, f xμ
theorem intervalIntegral.sum_integral_adjacent_intervals {E : Type u_3} [] {f : E} {μ : } {a : } {n : } (hint : k < n, IntervalIntegrable f μ (a k) (a (k + 1))) :
k, ∫ (x : ) in a k..a (k + 1), f xμ = ∫ (x : ) in a 0 ..a n, f xμ
theorem intervalIntegral.integral_interval_sub_left {E : Type u_3} [] {a : } {b : } {c : } {f : E} {μ : } (hab : ) (hac : ) :
∫ (x : ) in a..b, f xμ - ∫ (x : ) in a..c, f xμ = ∫ (x : ) in c..b, f xμ
theorem intervalIntegral.integral_interval_add_interval_comm {E : Type u_3} [] {a : } {b : } {c : } {d : } {f : E} {μ : } (hab : ) (hcd : ) (hac : ) :
∫ (x : ) in a..b, f xμ + ∫ (x : ) in c..d, f xμ = ∫ (x : ) in a..d, f xμ + ∫ (x : ) in c..b, f xμ
theorem intervalIntegral.integral_interval_sub_interval_comm {E : Type u_3} [] {a : } {b : } {c : } {d : } {f : E} {μ : } (hab : ) (hcd : ) (hac : ) :
∫ (x : ) in a..b, f xμ - ∫ (x : ) in c..d, f xμ = ∫ (x : ) in a..c, f xμ - ∫ (x : ) in b..d, f xμ
theorem intervalIntegral.integral_interval_sub_interval_comm' {E : Type u_3} [] {a : } {b : } {c : } {d : } {f : E} {μ : } (hab : ) (hcd : ) (hac : ) :
∫ (x : ) in a..b, f xμ - ∫ (x : ) in c..d, f xμ = ∫ (x : ) in d..b, f xμ - ∫ (x : ) in c..a, f xμ
theorem intervalIntegral.integral_Iic_sub_Iic {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (ha : ) (hb : ) :
∫ (x : ) in , f xμ - ∫ (x : ) in , f xμ = ∫ (x : ) in a..b, f xμ
theorem intervalIntegral.integral_Iic_add_Ioi {E : Type u_3} [] {b : } {f : E} {μ : } (h_left : ) (h_right : ) :
∫ (x : ) in , f xμ + ∫ (x : ) in , f xμ = ∫ (x : ), f xμ
theorem intervalIntegral.integral_Iio_add_Ici {E : Type u_3} [] {b : } {f : E} {μ : } (h_left : ) (h_right : ) :
∫ (x : ) in , f xμ + ∫ (x : ) in , f xμ = ∫ (x : ), f xμ
theorem intervalIntegral.integral_const_of_cdf {E : Type u_3} [] [] {a : } {b : } {μ : } (c : E) :
∫ (x : ) in a..b, cμ = ((μ (Set.Iic b)).toReal - (μ (Set.Iic a)).toReal) c

If μ is a finite measure then ∫ x in a..b, c ∂μ = (μ (Iic b) - μ (Iic a)) • c.

theorem intervalIntegral.integral_eq_integral_of_support_subset {E : Type u_3} [] {f : E} {μ : } {a : } {b : } (h : Set.Ioc a b) :
∫ (x : ) in a..b, f xμ = ∫ (x : ), f xμ
theorem intervalIntegral.integral_congr_ae' {E : Type u_3} [] {a : } {b : } {f : E} {g : E} {μ : } (h : ∀ᵐ (x : ) ∂μ, x Set.Ioc a bf x = g x) (h' : ∀ᵐ (x : ) ∂μ, x Set.Ioc b af x = g x) :
∫ (x : ) in a..b, f xμ = ∫ (x : ) in a..b, g xμ
theorem intervalIntegral.integral_congr_ae {E : Type u_3} [] {a : } {b : } {f : E} {g : E} {μ : } (h : ∀ᵐ (x : ) ∂μ, x Ι a bf x = g x) :
∫ (x : ) in a..b, f xμ = ∫ (x : ) in a..b, g xμ
theorem intervalIntegral.integral_zero_ae {E : Type u_3} [] {a : } {b : } {f : E} {μ : } (h : ∀ᵐ (x : ) ∂μ, x Ι a bf x = 0) :
∫ (x : ) in a..b, f xμ = 0
theorem intervalIntegral.integral_indicator {E : Type u_3} [] {f : E} {μ : } {a₁ : } {a₂ : } {a₃ : } (h : a₂ Set.Icc a₁ a₃) :
∫ (x : ) in a₁..a₃, {x : | x a₂}.indicator f xμ = ∫ (x : ) in a₁..a₂, f xμ
theorem intervalIntegral.integral_eq_zero_iff_of_le_of_nonneg_ae {f : } {a : } {b : } {μ : } (hab : a b) (hf : 0 ≤ᵐ[μ.restrict (Set.Ioc a b)] f) (hfi : ) :
∫ (x : ) in a..b, f xμ = 0 f =ᵐ[μ.restrict (Set.Ioc a b)] 0
theorem intervalIntegral.integral_eq_zero_iff_of_nonneg_ae {f : } {a : } {b : } {μ : } (hf : 0 ≤ᵐ[μ.restrict (Set.Ioc a b Set.Ioc b a)] f) (hfi : ) :
∫ (x : ) in a..b, f xμ = 0 f =ᵐ[μ.restrict (Set.Ioc a b Set.Ioc b a)] 0
theorem intervalIntegral.integral_pos_iff_support_of_nonneg_ae' {f : } {a : } {b : } {μ : } (hf : 0 ≤ᵐ[μ.restrict (Ι a b)] f) (hfi : ) :
0 < ∫ (x : ) in a..b, f xμ a < b 0 < μ ( Set.Ioc a b)

If f is nonnegative and integrable on the unordered interval Set.uIoc a b, then its integral over a..b is positive if and only if a < b and the measure of Function.support f ∩ Set.Ioc a b is positive.

theorem intervalIntegral.integral_pos_iff_support_of_nonneg_ae {f : } {a : } {b : } {μ : } (hf : 0 ≤ᵐ[μ] f) (hfi : ) :
0 < ∫ (x : ) in a..b, f xμ a < b 0 < μ ( Set.Ioc a b)

If f is nonnegative a.e.-everywhere and it is integrable on the unordered interval Set.uIoc a b, then its integral over a..b is positive if and only if a < b and the measure of Function.support f ∩ Set.Ioc a b is positive.

theorem intervalIntegral.intervalIntegral_pos_of_pos_on {f : } {a : } {b : } (hfi : IntervalIntegrable f MeasureTheory.volume a b) (hpos : xSet.Ioo a b, 0 < f x) (hab : a < b) :
0 < ∫ (x : ) in a..b, f x

If f : ℝ → ℝ is integrable on (a, b] for real numbers a < b, and positive on the interior of the interval, then its integral over a..b is strictly positive.

theorem intervalIntegral.intervalIntegral_pos_of_pos {f : } {a : } {b : } (hfi : IntervalIntegrable f MeasureTheory.volume a b) (hpos : ∀ (x : ), 0 < f x) (hab : a < b) :
0 < ∫ (x : ) in a..b, f x

If f : ℝ → ℝ is strictly positive everywhere, and integrable on (a, b] for real numbers a < b, then its integral over a..b is strictly positive. (See intervalIntegral_pos_of_pos_on for a version only assuming positivity of f on (a, b) rather than everywhere.)

theorem intervalIntegral.integral_lt_integral_of_ae_le_of_measure_setOf_lt_ne_zero {f : } {g : } {a : } {b : } {μ : } (hab : a b) (hfi : ) (hgi : ) (hle : f ≤ᵐ[μ.restrict (Set.Ioc a b)] g) (hlt : (μ.restrict (Set.Ioc a b)) {x : | f x < g x} 0) :
∫ (x : ) in a..b, f xμ < ∫ (x : ) in a..b, g xμ

If f and g are two functions that are interval integrable on a..b, a ≤ b, f x ≤ g x for a.e. x ∈ Set.Ioc a b, and f x < g x on a subset of Set.Ioc a b of nonzero measure, then ∫ x in a..b, f x ∂μ < ∫ x in a..b, g x ∂μ.

theorem intervalIntegral.integral_lt_integral_of_continuousOn_of_le_of_exists_lt {f : } {g : } {a : } {b : } (hab : a < b) (hfc : ContinuousOn f (Set.Icc a b)) (hgc : ContinuousOn g (Set.Icc a b)) (hle : xSet.Ioc a b, f x g x) (hlt : cSet.Icc a b, f c < g c) :
∫ (x : ) in a..b, f x < ∫ (x : ) in a..b, g x

If f and g are continuous on [a, b], a < b, f x ≤ g x on this interval, and f c < g c at some point c ∈ [a, b], then ∫ x in a..b, f x < ∫ x in a..b, g x.

theorem intervalIntegral.integral_nonneg_of_ae_restrict {f : } {a : } {b : } {μ : } (hab : a b) (hf : 0 ≤ᵐ[μ.restrict (Set.Icc a b)] f) :
0 ∫ (u : ) in a..b, f uμ
theorem intervalIntegral.integral_nonneg_of_ae {f : } {a : } {b : } {μ : } (hab : a b) (hf : 0 ≤ᵐ[μ] f) :
0 ∫ (u : ) in a..b, f uμ
theorem intervalIntegral.integral_nonneg_of_forall {f : } {a : } {b : } {μ : } (hab : a b) (hf : ∀ (u : ), 0 f u) :
0 ∫ (u : ) in a..b, f uμ
theorem intervalIntegral.integral_nonneg {f : } {a : } {b : } {μ : } (hab : a b) (hf : uSet.Icc a b, 0 f u) :
0 ∫ (u : ) in a..b, f uμ
theorem intervalIntegral.abs_integral_le_integral_abs {f : } {a : } {b : } {μ : } (hab : a b) :
|∫ (x : ) in a..b, f xμ| ∫ (x : ) in a..b, |f x|μ
theorem intervalIntegral.integral_mono_ae_restrict {f : } {g : } {a : } {b : } {μ : } (hab : a b) (hf : ) (hg : ) (h : f ≤ᵐ[μ.restrict (Set.Icc a b)] g) :
∫ (u : ) in a..b, f uμ ∫ (u : ) in a..b, g uμ
theorem intervalIntegral.integral_mono_ae {f : } {g : } {a : } {b : } {μ : } (hab : a b) (hf : ) (hg : ) (h : f ≤ᵐ[μ] g) :
∫ (u : ) in a..b, f uμ ∫ (u : ) in a..b, g uμ
theorem intervalIntegral.integral_mono_on {f : } {g : } {a : } {b : } {μ : } (hab : a b) (hf : ) (hg : ) (h : xSet.Icc a b, f x g x) :
∫ (u : ) in a..b, f uμ ∫ (u : ) in a..b, g uμ
theorem intervalIntegral.integral_mono {f : } {g : } {a : } {b : } {μ : } (hab : a b) (hf : ) (hg : ) (h : f g) :
∫ (u : ) in a..b, f uμ ∫ (u : ) in a..b, g uμ
theorem intervalIntegral.integral_mono_interval {f : } {a : } {b : } {μ : } {c : } {d : } (hca : c a) (hab : a b) (hbd : b d) (hf : 0 ≤ᵐ[μ.restrict (Set.Ioc c d)] f) (hfi : ) :
∫ (x : ) in a..b, f xμ ∫ (x : ) in c..d, f xμ
theorem intervalIntegral.abs_integral_mono_interval {f : } {a : } {b : } {μ : } {c : } {d : } (h : Ι a b Ι c d) (hf : 0 ≤ᵐ[μ.restrict (Ι c d)] f) (hfi : ) :
|∫ (x : ) in a..b, f xμ| |∫ (x : ) in c..d, f xμ|
theorem MeasureTheory.Integrable.hasSum_intervalIntegral {E : Type u_3} [] {μ : } {f : E} (hfi : ) (y : ) :
HasSum (fun (n : ) => ∫ (x : ) in y + n..y + n + 1, f xμ) (∫ (x : ), f xμ)
theorem MeasureTheory.Integrable.hasSum_intervalIntegral_comp_add_int {E : Type u_3} [] {f : E} (hfi : MeasureTheory.Integrable f MeasureTheory.volume) :
HasSum (fun (n : ) => ∫ (x : ) in 0 ..1, f (x + n)) (∫ (x : ), f x)