# mathlib3documentation

measure_theory.integral.interval_integral

# Integral over an interval #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

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 `if`s in the definition, we define `interval_integrable f μ a b` as `integrable_on f (Ioc a b) μ ∧ integrable_on 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 interval_integrable {E : Type u_3} (f : E) (a b : ) :
Prop

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
theorem interval_integrable_iff {E : Type u_3} {f : E} {a b : }  :
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 `interval_integrable`.

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

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 interval_integrable_iff_integrable_Ioc_of_le {E : Type u_3} {f : E} {a b : } (hab : a b) :
a b μ
theorem interval_integrable_iff' {E : Type u_3} {f : E} {a b : }  :
a b μ
theorem interval_integrable_iff_integrable_Icc_of_le {E : Type u_3} {f : E} {a b : } (hab : a b)  :
a b μ
theorem measure_theory.integrable.interval_integrable {E : Type u_3} {f : E} {a b : } (hf : μ) :
a b

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

theorem measure_theory.integrable_on.interval_integrable {E : Type u_3} {f : E} {a b : } (hf : μ) :
a b
theorem interval_integrable_const_iff {E : Type u_3} {a b : } {c : E} :
interval_integrable (λ (_x : ), c) μ a b c = 0 μ (set.uIoc a b) <
@[simp]
theorem interval_integrable_const {E : Type u_3} {a b : } {c : E} :
interval_integrable (λ (_x : ), c) μ a b
@[symm]
theorem interval_integrable.symm {E : Type u_3} {f : E} {a b : } (h : a b) :
b a
@[refl]
theorem interval_integrable.refl {E : Type u_3} {f : E} {a : }  :
a a
@[trans]
theorem interval_integrable.trans {E : Type u_3} {f : E} {a b c : } (hab : a b) (hbc : b c) :
a c
theorem interval_integrable.trans_iterate_Ico {E : Type u_3} {f : E} {a : } {m n : } (hmn : m n) (hint : (k : ), k n (a k) (a (k + 1))) :
(a m) (a n)
theorem interval_integrable.trans_iterate {E : Type u_3} {f : E} {a : } {n : } (hint : (k : ), k < n (a k) (a (k + 1))) :
(a 0) (a n)
theorem interval_integrable.neg {E : Type u_3} {f : E} {a b : } (h : a b) :
μ a b
theorem interval_integrable.norm {E : Type u_3} {f : E} {a b : } (h : a b) :
interval_integrable (λ (x : ), f x) μ a b
theorem interval_integrable.interval_integrable_norm_iff {E : Type u_3} {f : E} {a b : } (hf : (μ.restrict (set.uIoc a b))) :
interval_integrable (λ (t : ), f t) μ a b a b
theorem interval_integrable.abs {a b : } {f : } (h : a b) :
interval_integrable (λ (x : ), |f x|) μ a b
theorem interval_integrable.mono {E : Type u_3} {f : E} {a b c d : } {μ ν : measure_theory.measure } (hf : a b) (h1 : d b) (h2 : μ ν) :
c d
theorem interval_integrable.mono_measure {E : Type u_3} {f : E} {a b : } {μ ν : measure_theory.measure } (hf : a b) (h : μ ν) :
a b
theorem interval_integrable.mono_set {E : Type u_3} {f : E} {a b c d : } (hf : a b) (h : d b) :
c d
theorem interval_integrable.mono_set_ae {E : Type u_3} {f : E} {a b c d : } (hf : a b) (h : d ≤ᵐ[μ] b) :
c d
theorem interval_integrable.mono_set' {E : Type u_3} {f : E} {a b c d : } (hf : a b) (hsub : d b) :
c d
theorem interval_integrable.mono_fun {E : Type u_3} {F : Type u_4} {f : E} {a b : } {g : F} (hf : a b) (hgm : (μ.restrict (set.uIoc a b))) (hle : (λ (x : ), g x) ≤ᵐ[μ.restrict (set.uIoc a b)] λ (x : ), f x) :
a b
theorem interval_integrable.mono_fun' {E : Type u_3} {f : E} {a b : } {g : } (hg : a b) (hfm : (μ.restrict (set.uIoc a b))) (hle : (λ (x : ), f x) ≤ᵐ[μ.restrict (set.uIoc a b)] g) :
a b
@[protected]
theorem interval_integrable.ae_strongly_measurable {E : Type u_3} {f : E} {a b : } (h : a b) :
(μ.restrict (set.Ioc a b))
@[protected]
theorem interval_integrable.ae_strongly_measurable' {E : Type u_3} {f : E} {a b : } (h : a b) :
(μ.restrict (set.Ioc b a))
theorem interval_integrable.smul {𝕜 : Type u_2} {E : Type u_3} [normed_field 𝕜] [ E] {f : E} {a b : } (h : a b) (r : 𝕜) :
@[simp]
theorem interval_integrable.add {E : Type u_3} {f g : E} {a b : } (hf : a b) (hg : a b) :
interval_integrable (λ (x : ), f x + g x) μ a b
@[simp]
theorem interval_integrable.sub {E : Type u_3} {f g : E} {a b : } (hf : a b) (hg : a b) :
interval_integrable (λ (x : ), f x - g x) μ a b
theorem interval_integrable.sum {ι : Type u_1} {E : Type u_3} {a b : } (s : finset ι) {f : ι E} (h : (i : ι), i s interval_integrable (f i) μ a b) :
interval_integrable (s.sum (λ (i : ι), f i)) μ a b
theorem interval_integrable.mul_continuous_on {A : Type u_5} [normed_ring A] {a b : } {f g : A} (hf : a b) (hg : (set.uIcc a b)) :
interval_integrable (λ (x : ), f x * g x) μ a b
theorem interval_integrable.continuous_on_mul {A : Type u_5} [normed_ring A] {a b : } {f g : A} (hf : a b) (hg : (set.uIcc a b)) :
interval_integrable (λ (x : ), g x * f x) μ a b
@[simp]
theorem interval_integrable.const_mul {A : Type u_5} [normed_ring A] {a b : } {f : A} (hf : a b) (c : A) :
interval_integrable (λ (x : ), c * f x) μ a b
@[simp]
theorem interval_integrable.mul_const {A : Type u_5} [normed_ring A] {a b : } {f : A} (hf : a b) (c : A) :
interval_integrable (λ (x : ), f x * c) μ a b
@[simp]
theorem interval_integrable.div_const {a b : } {𝕜 : Type u_1} {f : 𝕜} [normed_field 𝕜] (h : a b) (c : 𝕜) :
interval_integrable (λ (x : ), f x / c) μ a b
theorem interval_integrable.comp_mul_left {E : Type u_3} {f : E} {a b : } (c : ) :
theorem interval_integrable.comp_mul_right {E : Type u_3} {f : E} {a b : } (c : ) :
theorem interval_integrable.comp_add_right {E : Type u_3} {f : E} {a b : } (c : ) :
theorem interval_integrable.comp_add_left {E : Type u_3} {f : E} {a b : } (c : ) :
theorem interval_integrable.comp_sub_right {E : Type u_3} {f : E} {a b : } (c : ) :
theorem interval_integrable.comp_sub_left {E : Type u_3} {f : E} {a b : } (c : ) :
theorem continuous_on.interval_integrable {E : Type u_3} {u : E} {a b : } (hu : (set.uIcc a b)) :
a b
theorem continuous_on.interval_integrable_of_Icc {E : Type u_3} {u : E} {a b : } (h : a b) (hu : (set.Icc a b)) :
a b
theorem continuous.interval_integrable {E : Type u_3} {u : E} (hu : continuous u) (a b : ) :
a b

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

theorem monotone_on.interval_integrable {E : Type u_3} {u : E} {a b : } (hu : (set.uIcc a b)) :
a b
theorem antitone_on.interval_integrable {E : Type u_3} {u : E} {a b : } (hu : (set.uIcc a b)) :
a b
theorem monotone.interval_integrable {E : Type u_3} {u : E} {a b : } (hu : monotone u) :
a b
theorem antitone.interval_integrable {E : Type u_3} {u : E} {a b : } (hu : antitone u) :
a b
theorem filter.tendsto.eventually_interval_integrable_ae {ι : Type u_1} {E : Type u_3} {f : E} {l l' : filter } (hfm : μ) (hμ : μ.finite_at_filter l') {c : E} (hf : (l' μ.ae) (nhds c)) {u v : ι } {lt : filter ι} (hu : lt l) (hv : lt l) :
∀ᶠ (t : ι) in lt, (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_interval_integrable_ae` will generate goals `filter ℝ` and `tendsto_Ixx_class Ioc ?m_1 l'`.

theorem filter.tendsto.eventually_interval_integrable {ι : Type u_1} {E : Type u_3} {f : E} {l l' : filter } (hfm : μ) (hμ : μ.finite_at_filter l') {c : E} (hf : l' (nhds c)) {u v : ι } {lt : filter ι} (hu : lt l) (hv : lt l) :
∀ᶠ (t : ι) in lt, (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_interval_integrable_ae` will generate goals `filter ℝ` and `tendsto_Ixx_class 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.

noncomputable def interval_integral {E : Type u_3} [ E] (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
@[simp]
theorem interval_integral.integral_zero {E : Type u_3} [ E] {a b : }  :
(x : ) in a..b, 0 μ = 0
theorem interval_integral.integral_of_le {E : Type u_3} [ E] {a b : } {f : E} (h : a b) :
(x : ) in a..b, f x μ = (x : ) in b, f x μ
@[simp]
theorem interval_integral.integral_same {E : Type u_3} [ E] {a : } {f : E}  :
(x : ) in a..a, f x μ = 0
theorem interval_integral.integral_symm {E : Type u_3} [ E] {f : E} (a b : ) :
(x : ) in b..a, f x μ = - (x : ) in a..b, f x μ
theorem interval_integral.integral_of_ge {E : Type u_3} [ E] {a b : } {f : E} (h : b a) :
(x : ) in a..b, f x μ = - (x : ) in a, f x μ
theorem interval_integral.interval_integral_eq_integral_uIoc {E : Type u_3} [ E] (f : E) (a b : )  :
(x : ) in a..b, f x μ = ite (a b) 1 (-1) (x : ) in b, f x μ
theorem interval_integral.norm_interval_integral_eq {E : Type u_3} [ E] (f : E) (a b : )  :
(x : ) in a..b, f x μ = (x : ) in b, f x μ
theorem interval_integral.abs_interval_integral_eq (f : ) (a b : )  :
| (x : ) in a..b, f x μ| = | (x : ) in b, f x μ|
theorem interval_integral.integral_cases {E : Type u_3} [ E] (f : E) (a b : ) :
(x : ) in a..b, f x μ { (x : ) in b, f x μ, - (x : ) in b, f x μ}
theorem interval_integral.integral_undef {E : Type u_3} [ E] {a b : } {f : E} (h : ¬ a b) :
(x : ) in a..b, f x μ = 0
theorem interval_integral.interval_integrable_of_integral_ne_zero {E : Type u_3} [ E] {a b : } {f : E} (h : (x : ) in a..b, f x μ 0) :
a b
theorem interval_integral.integral_non_ae_strongly_measurable {E : Type u_3} [ E] {a b : } {f : E} (hf : ¬) :
(x : ) in a..b, f x μ = 0
theorem interval_integral.integral_non_ae_strongly_measurable_of_le {E : Type u_3} [ E] {a b : } {f : E} (h : a b) (hf : ¬ (μ.restrict (set.Ioc a b))) :
(x : ) in a..b, f x μ = 0
theorem interval_integral.norm_integral_min_max {E : Type u_3} [ E] {a b : } (f : E) :
(x : ) in .., f x μ = (x : ) in a..b, f x μ
theorem interval_integral.norm_integral_eq_norm_integral_Ioc {E : Type u_3} [ E] {a b : } (f : E) :
(x : ) in a..b, f x μ = (x : ) in b, f x μ
theorem interval_integral.abs_integral_eq_abs_integral_uIoc {a b : } (f : ) :
| (x : ) in a..b, f x μ| = | (x : ) in b, f x μ|
theorem interval_integral.norm_integral_le_integral_norm_Ioc {E : Type u_3} [ E] {a b : } {f : E}  :
(x : ) in a..b, f x μ (x : ) in b, f x μ
theorem interval_integral.norm_integral_le_abs_integral_norm {E : Type u_3} [ E] {a b : } {f : E}  :
(x : ) in a..b, f x μ | (x : ) in a..b, f x μ|
theorem interval_integral.norm_integral_le_integral_norm {E : Type u_3} [ E] {a b : } {f : E} (h : a b) :
(x : ) in a..b, f x μ (x : ) in a..b, f x μ
theorem interval_integral.norm_integral_le_of_norm_le {E : Type u_3} [ E] {a b : } {f : E} {g : } (h : ∀ᵐ (t : ) μ.restrict (set.uIoc a b), f t g t) (hbound : a b) :
(t : ) in a..b, f t μ | (t : ) in a..b, g t μ|
theorem interval_integral.norm_integral_le_of_norm_le_const_ae {E : Type u_3} [ E] {a b C : } {f : E} (h : ∀ᵐ (x : ), x b f x C) :
(x : ) in a..b, f x C * |b - a|
theorem interval_integral.norm_integral_le_of_norm_le_const {E : Type u_3} [ E] {a b C : } {f : E} (h : (x : ), x b f x C) :
(x : ) in a..b, f x C * |b - a|
@[simp]
theorem interval_integral.integral_add {E : Type u_3} [ E] {a b : } {f g : E} (hf : a b) (hg : a b) :
(x : ) in a..b, f x + g x μ = (x : ) in a..b, f x μ + (x : ) in a..b, g x μ
theorem interval_integral.integral_finset_sum {E : Type u_3} [ E] {a b : } {ι : Type u_1} {s : finset ι} {f : ι E} (h : (i : ι), i s interval_integrable (f i) μ a b) :
(x : ) in a..b, s.sum (λ (i : ι), f i x) μ = s.sum (λ (i : ι), (x : ) in a..b, f i x μ)
@[simp]
theorem interval_integral.integral_neg {E : Type u_3} [ E] {a b : } {f : E}  :
(x : ) in a..b, -f x μ = - (x : ) in a..b, f x μ
@[simp]
theorem interval_integral.integral_sub {E : Type u_3} [ E] {a b : } {f g : E} (hf : a b) (hg : a b) :
(x : ) in a..b, f x - g x μ = (x : ) in a..b, f x μ - (x : ) in a..b, g x μ
@[simp]
theorem interval_integral.integral_smul {E : Type u_3} [ E] {a b : } {𝕜 : Type u_1} [ E] [ E] (r : 𝕜) (f : E) :
(x : ) in a..b, r f x μ = r (x : ) in a..b, f x μ
@[simp]
theorem interval_integral.integral_smul_const {E : Type u_3} [ E] {a b : } {𝕜 : Type u_1} [is_R_or_C 𝕜] [ E] (f : 𝕜) (c : E) :
(x : ) in a..b, f x c μ = ( (x : ) in a..b, f x μ) c
@[simp]
theorem interval_integral.integral_const_mul {a b : } {𝕜 : Type u_1} [is_R_or_C 𝕜] (r : 𝕜) (f : 𝕜) :
(x : ) in a..b, r * f x μ = r * (x : ) in a..b, f x μ
@[simp]
theorem interval_integral.integral_mul_const {a b : } {𝕜 : Type u_1} [is_R_or_C 𝕜] (r : 𝕜) (f : 𝕜) :
(x : ) in a..b, f x * r μ = (x : ) in a..b, f x μ * r
@[simp]
theorem interval_integral.integral_div {a b : } {𝕜 : Type u_1} [is_R_or_C 𝕜] (r : 𝕜) (f : 𝕜) :
(x : ) in a..b, f x / r μ = (x : ) in a..b, f x μ / r
theorem interval_integral.integral_const' {E : Type u_3} [ E] {a b : } (c : E) :
(x : ) in a..b, c μ = ((μ (set.Ioc a b)).to_real - (μ (set.Ioc b a)).to_real) c
@[simp]
theorem interval_integral.integral_const {E : Type u_3} [ E] {a b : } (c : E) :
(x : ) in a..b, c = (b - a) c
theorem interval_integral.integral_smul_measure {E : Type u_3} [ E] {a b : } {f : E} (c : ennreal) :
(x : ) in a..b, f x c μ = c.to_real (x : ) in a..b, f x μ
theorem interval_integral.integral_of_real {a b : } {f : } :
(x : ) in a..b, (f x) μ = (x : ) in a..b, f x μ
theorem continuous_linear_map.interval_integral_apply {𝕜 : Type u_2} {E : Type u_3} {F : Type u_4} [ E] [is_R_or_C 𝕜] [ E] [ F] {a b : } {φ : (F →L[𝕜] E)} (hφ : a b) (v : F) :
( (x : ) in a..b, φ x μ) v = (x : ) in a..b, (φ x) v μ
theorem continuous_linear_map.interval_integral_comp_comm {𝕜 : Type u_2} {E : Type u_3} {F : Type u_4} [ E] {a b : } {f : E} [is_R_or_C 𝕜] [ E] [ F] [ F] (L : E →L[𝕜] F) (hf : a b) :
(x : ) in a..b, L (f x) μ = L ( (x : ) in a..b, f x μ)
@[simp]
theorem interval_integral.integral_comp_mul_right {E : Type u_3} [ E] {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 interval_integral.smul_integral_comp_mul_right {E : Type u_3} [ E] {a b : } (f : E) (c : ) :
c (x : ) in a..b, f (x * c) = (x : ) in a * c..b * c, f x
@[simp]
theorem interval_integral.integral_comp_mul_left {E : Type u_3} [ E] {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 interval_integral.smul_integral_comp_mul_left {E : Type u_3} [ E] {a b : } (f : E) (c : ) :
c (x : ) in a..b, f (c * x) = (x : ) in c * a..c * b, f x
@[simp]
theorem interval_integral.integral_comp_div {E : Type u_3} [ E] {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 interval_integral.inv_smul_integral_comp_div {E : Type u_3} [ E] {a b : } (f : E) (c : ) :
c⁻¹ (x : ) in a..b, f (x / c) = (x : ) in a / c..b / c, f x
@[simp]
theorem interval_integral.integral_comp_add_right {E : Type u_3} [ E] {a b : } (f : E) (d : ) :
(x : ) in a..b, f (x + d) = (x : ) in a + d..b + d, f x
@[simp]
theorem interval_integral.integral_comp_add_left {E : Type u_3} [ E] {a b : } (f : E) (d : ) :
(x : ) in a..b, f (d + x) = (x : ) in d + a..d + b, f x
@[simp]
theorem interval_integral.integral_comp_mul_add {E : Type u_3} [ E] {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 interval_integral.smul_integral_comp_mul_add {E : Type u_3} [ E] {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 interval_integral.integral_comp_add_mul {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.smul_integral_comp_add_mul {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.integral_comp_div_add {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.inv_smul_integral_comp_div_add {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.integral_comp_add_div {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.inv_smul_integral_comp_add_div {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.integral_comp_mul_sub {E : Type u_3} [ E] {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 interval_integral.smul_integral_comp_mul_sub {E : Type u_3} [ E] {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 interval_integral.integral_comp_sub_mul {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.smul_integral_comp_sub_mul {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.integral_comp_div_sub {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.inv_smul_integral_comp_div_sub {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.integral_comp_sub_div {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.inv_smul_integral_comp_sub_div {E : Type u_3} [ E] {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
@[simp]
theorem interval_integral.integral_comp_sub_right {E : Type u_3} [ E] {a b : } (f : E) (d : ) :
(x : ) in a..b, f (x - d) = (x : ) in a - d..b - d, f x
@[simp]
theorem interval_integral.integral_comp_sub_left {E : Type u_3} [ E] {a b : } (f : E) (d : ) :
(x : ) in a..b, f (d - x) = (x : ) in d - b..d - a, f x
@[simp]
theorem interval_integral.integral_comp_neg {E : Type u_3} [ E] {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 interval_integral.integral_congr {E : Type u_3} [ E] {f g : E} {a b : } (h : 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 interval_integral.integral_add_adjacent_intervals_cancel {E : Type u_3} [ E] {a b c : } {f : E} (hab : a b) (hbc : b c) :
(x : ) in a..b, f x μ + (x : ) in b..c, f x μ + (x : ) in c..a, f x μ = 0
theorem interval_integral.integral_add_adjacent_intervals {E : Type u_3} [ E] {a b c : } {f : E} (hab : a b) (hbc : b c) :
(x : ) in a..b, f x μ + (x : ) in b..c, f x μ = (x : ) in a..c, f x μ
theorem interval_integral.sum_integral_adjacent_intervals_Ico {E : Type u_3} [ E] {f : E} {a : } {m n : } (hmn : m n) (hint : (k : ), k n (a k) (a (k + 1))) :
n).sum (λ (k : ), (x : ) in a k..a (k + 1), f x μ) = (x : ) in a m..a n, f x μ
theorem interval_integral.sum_integral_adjacent_intervals {E : Type u_3} [ E] {f : E} {a : } {n : } (hint : (k : ), k < n (a k) (a (k + 1))) :
(finset.range n).sum (λ (k : ), (x : ) in a k..a (k + 1), f x μ) = (x : ) in a 0..a n, f x μ
theorem interval_integral.integral_interval_sub_left {E : Type u_3} [ E] {a b c : } {f : E} (hab : a b) (hac : a c) :
(x : ) in a..b, f x μ - (x : ) in a..c, f x μ = (x : ) in c..b, f x μ
theorem interval_integral.integral_interval_add_interval_comm {E : Type u_3} [ E] {a b c d : } {f : E} (hab : a b) (hcd : c d) (hac : a c) :
(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 interval_integral.integral_interval_sub_interval_comm {E : Type u_3} [ E] {a b c d : } {f : E} (hab : a b) (hcd : c d) (hac : a c) :
(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 interval_integral.integral_interval_sub_interval_comm' {E : Type u_3} [ E] {a b c d : } {f : E} (hab : a b) (hcd : c d) (hac : a c) :
(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 interval_integral.integral_Iic_sub_Iic {E : Type u_3} [ E] {a b : } {f : E} (ha : μ) (hb : μ) :
(x : ) in , f x μ - (x : ) in , f x μ = (x : ) in a..b, f x μ
theorem interval_integral.integral_const_of_cdf {E : Type u_3} [ E] {a b : } (c : E) :
(x : ) in a..b, c μ = ((μ (set.Iic b)).to_real - (μ (set.Iic a)).to_real) c

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

theorem interval_integral.integral_eq_integral_of_support_subset {E : Type u_3} [ E] {f : E} {a b : } (h : b) :
(x : ) in a..b, f x μ = (x : ), f x μ
theorem interval_integral.integral_congr_ae' {E : Type u_3} [ E] {a b : } {f g : E} (h : ∀ᵐ (x : ) μ, x b f x = g x) (h' : ∀ᵐ (x : ) μ, x a f x = g x) :
(x : ) in a..b, f x μ = (x : ) in a..b, g x μ
theorem interval_integral.integral_congr_ae {E : Type u_3} [ E] {a b : } {f g : E} (h : ∀ᵐ (x : ) μ, x b f x = g x) :
(x : ) in a..b, f x μ = (x : ) in a..b, g x μ
theorem interval_integral.integral_zero_ae {E : Type u_3} [ E] {a b : } {f : E} (h : ∀ᵐ (x : ) μ, x b f x = 0) :
(x : ) in a..b, f x μ = 0
theorem interval_integral.integral_indicator {E : Type u_3} [ E] {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 interval_integral.tendsto_integral_filter_of_dominated_convergence {E : Type u_3} [ E] {a b : } {f : E} {ι : Type u_1} {l : filter ι} {F : ι E} (bound : ) (hF_meas : ∀ᶠ (n : ι) in l, (μ.restrict (set.uIoc a b))) (h_bound : ∀ᶠ (n : ι) in l, ∀ᵐ (x : ) μ, x b F n x bound x) (bound_integrable : interval_integrable bound μ a b) (h_lim : ∀ᵐ (x : ) μ, x b filter.tendsto (λ (n : ι), F n x) l (nhds (f x))) :
filter.tendsto (λ (n : ι), (x : ) in a..b, F n x μ) l (nhds ( (x : ) in a..b, f x μ))

Lebesgue dominated convergence theorem for filters with a countable basis

theorem interval_integral.has_sum_integral_of_dominated_convergence {E : Type u_3} [ E] {a b : } {f : E} {ι : Type u_1} [countable ι] {F : ι E} (bound : ι ) (hF_meas : (n : ι), (μ.restrict (set.uIoc a b))) (h_bound : (n : ι), ∀ᵐ (t : ) μ, t b F n t bound n t) (bound_summable : ∀ᵐ (t : ) μ, t b summable (λ (n : ι), bound n t)) (bound_integrable : interval_integrable (λ (t : ), ∑' (n : ι), bound n t) μ a b) (h_lim : ∀ᵐ (t : ) μ, t b has_sum (λ (n : ι), F n t) (f t)) :
has_sum (λ (n : ι), (t : ) in a..b, F n t μ) ( (t : ) in a..b, f t μ)

Lebesgue dominated convergence theorem for series.

theorem interval_integral.has_sum_interval_integral_of_summable_norm {ι : Type u_1} {E : Type u_3} [ E] {a b : } [countable ι] {f : ι } (hf_sum : summable (λ (i : ι), continuous_map.restrict {carrier := b, is_compact' := _} (f i))) :
has_sum (λ (i : ι), (x : ) in a..b, (f i) x) ( (x : ) in a..b, ∑' (i : ι), (f i) x)

Interval integrals commute with countable sums, when the supremum norms are summable (a special case of the dominated convergence theorem).

theorem interval_integral.tsum_interval_integral_eq_of_summable_norm {ι : Type u_1} {E : Type u_3} [ E] {a b : } [countable ι] {f : ι } (hf_sum : summable (λ (i : ι), continuous_map.restrict {carrier := b, is_compact' := _} (f i))) :
∑' (i : ι), (x : ) in a..b, (f i) x = (x : ) in a..b, ∑' (i : ι), (f i) x
theorem interval_integral.continuous_within_at_of_dominated_interval {E : Type u_3} [ E] {X : Type u_6} {F : X E} {x₀ : X} {bound : } {a b : } {s : set X} (hF_meas : ∀ᶠ (x : X) in s, (μ.restrict (set.uIoc a b))) (h_bound : ∀ᶠ (x : X) in s, ∀ᵐ (t : ) μ, t b F x t bound t) (bound_integrable : interval_integrable bound μ a b) (h_cont : ∀ᵐ (t : ) μ, t b continuous_within_at (λ (x : X), F x t) s x₀) :
continuous_within_at (λ (x : X), (t : ) in a..b, F x t μ) s x₀

Continuity of interval integral with respect to a parameter, at a point within a set. Given `F : X → ℝ → E`, assume `F x` is ae-measurable on `[a, b]` for `x` in a neighborhood of `x₀` within `s` and at `x₀`, and assume it is bounded by a function integrable on `[a, b]` independent of `x` in a neighborhood of `x₀` within `s`. If `(λ x, F x t)` is continuous at `x₀` within `s` for almost every `t` in `[a, b]` then the same holds for `(λ x, ∫ t in a..b, F x t ∂μ) s x₀`.

theorem interval_integral.continuous_at_of_dominated_interval {E : Type u_3} [ E] {X : Type u_6} {F : X E} {x₀ : X} {bound : } {a b : } (hF_meas : ∀ᶠ (x : X) in nhds x₀, (μ.restrict (set.uIoc a b))) (h_bound : ∀ᶠ (x : X) in nhds x₀, ∀ᵐ (t : ) μ, t b F x t bound t) (bound_integrable : interval_integrable bound μ a b) (h_cont : ∀ᵐ (t : ) μ, t b continuous_at (λ (x : X), F x t) x₀) :
continuous_at (λ (x : X), (t : ) in a..b, F x t μ) x₀

Continuity of interval integral with respect to a parameter at a point. Given `F : X → ℝ → E`, assume `F x` is ae-measurable on `[a, b]` for `x` in a neighborhood of `x₀`, and assume it is bounded by a function integrable on `[a, b]` independent of `x` in a neighborhood of `x₀`. If `(λ x, F x t)` is continuous at `x₀` for almost every `t` in `[a, b]` then the same holds for `(λ x, ∫ t in a..b, F x t ∂μ) s x₀`.

theorem interval_integral.continuous_of_dominated_interval {E : Type u_3} [ E] {X : Type u_6} {F : X E} {bound : } {a b : } (hF_meas : (x : X), (μ.restrict (set.uIoc a b))) (h_bound : (x : X), ∀ᵐ (t : ) μ, t b F x t bound t) (bound_integrable : interval_integrable bound μ a b) (h_cont : ∀ᵐ (t : ) μ, t b continuous (λ (x : X), F x t)) :
continuous (λ (x : X), (t : ) in a..b, F x t μ)

Continuity of interval integral with respect to a parameter. Given `F : X → ℝ → E`, assume each `F x` is ae-measurable on `[a, b]`, and assume it is bounded by a function integrable on `[a, b]` independent of `x`. If `(λ x, F x t)` is continuous for almost every `t` in `[a, b]` then the same holds for `(λ x, ∫ t in a..b, F x t ∂μ) s x₀`.

theorem interval_integral.continuous_within_at_primitive {E : Type u_3} [ E] {a b₀ b₁ b₂ : } {f : E} (hb₀ : μ {b₀} = 0) (h_int : b₁) b₂)) :
continuous_within_at (λ (b : ), (x : ) in a..b, f x μ) (set.Icc b₁ b₂) b₀
theorem interval_integral.continuous_on_primitive {E : Type u_3} [ E] {a b : } {f : E} (h_int : μ) :
continuous_on (λ (x : ), (t : ) in x, f t μ) (set.Icc a b)
theorem interval_integral.continuous_on_primitive_Icc {E : Type u_3} [ E] {a b : } {f : E} (h_int : μ) :
continuous_on (λ (x : ), (t : ) in x, f t μ) (set.Icc a b)
theorem interval_integral.continuous_on_primitive_interval' {E : Type u_3} [ E] {a b₁ b₂ : } {f : E} (h_int : b₁ b₂) (ha : a set.uIcc b₁ b₂) :
continuous_on (λ (b : ), (x : ) in a..b, f x μ) (set.uIcc b₁ b₂)

Note: this assumes that `f` is `interval_integrable`, in contrast to some other lemmas here.

theorem interval_integral.continuous_on_primitive_interval {E : Type u_3} [ E] {a b : } {f : E} (h_int : μ) :
continuous_on (λ (x : ), (t : ) in a..x, f t μ) (set.uIcc a b)
theorem interval_integral.continuous_on_primitive_interval_left {E : Type u_3} [ E] {a b : } {f : E} (h_int : μ) :
continuous_on (λ (x : ), (t : ) in x..b, f t μ) (set.uIcc a b)
theorem interval_integral.continuous_primitive {E : Type u_3} [ E] {f : E} (h_int : (a b : ), a b) (a : ) :
continuous (λ (b : ), (x : ) in a..b, f x μ)
theorem measure_theory.integrable.continuous_primitive {E : Type u_3} [ E] {f : E} (h_int : μ) (a : ) :
continuous (λ (b : ), (x : ) in a..b, f x μ)
theorem interval_integral.integral_eq_zero_iff_of_le_of_nonneg_ae {f : } {a b : } (hab : a b) (hf : 0 ≤ᵐ[μ.restrict (set.Ioc a b)] f) (hfi : a b) :
(x : ) in a..b, f x μ = 0 f =ᵐ[μ.restrict (set.Ioc a b)] 0
theorem interval_integral.integral_eq_zero_iff_of_nonneg_ae {f : } {a b : } (hf : 0 ≤ᵐ[μ.restrict (set.Ioc a b a)] f) (hfi : a b) :
(x : ) in a..b, f x μ = 0 f =ᵐ[μ.restrict (set.Ioc a b a)] 0
theorem interval_integral.integral_pos_iff_support_of_nonneg_ae' {f : } {a b : } (hf : 0 ≤ᵐ[μ.restrict (set.uIoc a b)] f) (hfi : a b) :
0 < (x : ) in a..b, f x μ a < b 0 < μ 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 interval_integral.integral_pos_iff_support_of_nonneg_ae {f : } {a b : } (hf : 0 ≤ᵐ[μ] f) (hfi : a b) :
0 < (x : ) in a..b, f x μ a < b 0 < μ 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 interval_integral.interval_integral_pos_of_pos_on {f : } {a b : } (hpos : (x : ), x 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 interval_integral.interval_integral_pos_of_pos {f : } {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 `interval_integral_pos_of_pos_on` for a version only assuming positivity of `f` on `(a, b)` rather than everywhere.)

theorem interval_integral.integral_lt_integral_of_ae_le_of_measure_set_of_lt_ne_zero {f g : } {a b : } (hab : a b) (hfi : a b) (hgi : a b) (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 interval_integral.integral_lt_integral_of_continuous_on_of_le_of_exists_lt {f g : } {a b : } (hab : a < b) (hfc : (set.Icc a b)) (hgc : (set.Icc a b)) (hle : (x : ), x b f x g x) (hlt : (c : ) (H : c 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 interval_integral.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 interval_integral.integral_nonneg_of_ae {f : } {a b : } (hab : a b) (hf : 0 ≤ᵐ[μ] f) :
0 (u : ) in a..b, f u μ
theorem interval_integral.integral_nonneg_of_forall {f : } {a b : } (hab : a b) (hf : (u : ), 0 f u) :
0 (u : ) in a..b, f u μ
theorem interval_integral.integral_nonneg {f : } {a b : } (hab : a b) (hf : (u : ), u b 0 f u) :
0 (u : ) in a..b, f u μ
theorem interval_integral.abs_integral_le_integral_abs {f : } {a b : } (hab : a b) :
| (x : ) in a..b, f x μ| (x : ) in a..b, |f x| μ
theorem interval_integral.integral_mono_ae_restrict {f g : } {a b : } (hab : a b) (hf : a b) (hg : a b) (h : f ≤ᵐ[μ.restrict (set.Icc a b)] g) :
(u : ) in a..b, f u μ (u : ) in a..b, g u μ
theorem interval_integral.integral_mono_ae {f g : } {a b : } (hab : a b) (hf : a b) (hg : a b) (h : f ≤ᵐ[μ] g) :
(u : ) in a..b, f u μ (u : ) in a..b, g u μ
theorem interval_integral.integral_mono_on {f g : } {a b : } (hab : a b) (hf : a b) (hg : a b) (h : (x : ), x b f x g x) :
(u : ) in a..b, f u μ (u : ) in a..b, g u μ
theorem interval_integral.integral_mono {f g : } {a b : } (hab : a b) (hf : a b) (hg : a b) (h : f g) :
(u : ) in a..b, f u μ (u : ) in a..b, g u μ
theorem interval_integral.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 : c d) :
(x : ) in a..b, f x μ (x : ) in c..d, f x μ
theorem interval_integral.abs_integral_mono_interval {f : } {a b : } {c d : } (h : b d) (hf : 0 ≤ᵐ[μ.restrict (set.uIoc c d)] f) (hfi : c d) :
| (x : ) in a..b, f x μ| | (x : ) in c..d, f x μ|
theorem measure_theory.integrable.has_sum_interval_integral {E : Type u_3} [ E] {f : E} (hfi : μ) (y : ) :
has_sum (λ (n : ), (x : ) in y + n..y + n + 1, f x μ) ( (x : ), f x μ)
theorem measure_theory.integrable.has_sum_interval_integral_comp_add_int {E : Type u_3} [ E] {f : E}  :
has_sum (λ (n : ), (x : ) in 0..1, f (x + n)) ( (x : ), f x)