# mathlibdocumentation

measure_theory.constructions.prod

# The product measure #

In this file we define and prove properties about the binary product measure. If `α` and `β` have σ-finite measures `μ` resp. `ν` then `α × β` can be equipped with a σ-finite measure `μ.prod ν` that satisfies `(μ.prod ν) s = ∫⁻ x, ν {y | (x, y) ∈ s} ∂μ`. We also have `(μ.prod ν) (s ×ˢ t) = μ s * ν t`, i.e. the measure of a rectangle is the product of the measures of the sides.

We also prove Tonelli's theorem and Fubini's theorem.

## Main definition #

• `measure_theory.measure.prod`: The product of two measures.

## Main results #

• `measure_theory.measure.prod_apply` states `μ.prod ν s = ∫⁻ x, ν {y | (x, y) ∈ s} ∂μ` for measurable `s`. `measure_theory.measure.prod_apply_symm` is the reversed version.
• `measure_theory.measure.prod_prod` states `μ.prod ν (s ×ˢ t) = μ s * ν t` for measurable sets `s` and `t`.
• `measure_theory.lintegral_prod`: Tonelli's theorem. It states that for a measurable function `α × β → ℝ≥0∞` we have `∫⁻ z, f z ∂(μ.prod ν) = ∫⁻ x, ∫⁻ y, f (x, y) ∂ν ∂μ`. The version for functions `α → β → ℝ≥0∞` is reversed, and called `lintegral_lintegral`. Both versions have a variant with `_symm` appended, where the order of integration is reversed. The lemma `measurable.lintegral_prod_right'` states that the inner integral of the right-hand side is measurable.
• `measure_theory.integrable_prod_iff` states that a binary function is integrable iff both
• `y ↦ f (x, y)` is integrable for almost every `x`, and
• the function `x ↦ ∫ ‖f (x, y)‖ dy` is integrable.
• `measure_theory.integral_prod`: Fubini's theorem. It states that for a integrable function `α × β → E` (where `E` is a second countable Banach space) we have `∫ z, f z ∂(μ.prod ν) = ∫ x, ∫ y, f (x, y) ∂ν ∂μ`. This theorem has the same variants as Tonelli's theorem. The lemma `measure_theory.integrable.integral_prod_right` states that the inner integral of the right-hand side is integrable.

## Implementation Notes #

Many results are proven twice, once for functions in curried form (`α → β → γ`) and one for functions in uncurried form (`α × β → γ`). The former often has an assumption `measurable (uncurry f)`, which could be inconvenient to discharge, but for the latter it is more common that the function has to be given explicitly, since Lean cannot synthesize the function by itself. We name the lemmas about the uncurried form with a prime. Tonelli's theorem and Fubini's theorem have a different naming scheme, since the version for the uncurried version is reversed.

## Tags #

product measure, Fubini's theorem, Tonelli's theorem, Fubini-Tonelli theorem

theorem is_pi_system.prod {α : Type u_1} {β : Type u_3} {C : set (set α)} {D : set (set β)} (hC : is_pi_system C) (hD : is_pi_system D) :

Rectangles formed by π-systems form a π-system.

theorem is_countably_spanning.prod {α : Type u_1} {β : Type u_3} {C : set (set α)} {D : set (set β)} (hC : is_countably_spanning C) (hD : is_countably_spanning D) :

Rectangles of countably spanning sets are countably spanning.

### Measurability #

Before we define the product measure, we can talk about the measurability of operations on binary functions. We show that if `f` is a binary measurable function, then the function that integrates along one of the variables (using either the Lebesgue or Bochner integral) is measurable.

theorem generate_from_prod_eq {α : Type u_1} {β : Type u_2} {C : set (set α)} {D : set (set β)} (hC : is_countably_spanning C) (hD : is_countably_spanning D) :

The product of generated σ-algebras is the one generated by rectangles, if both generating sets are countably spanning.

theorem generate_from_eq_prod {α : Type u_1} {β : Type u_3} {C : set (set α)} {D : set (set β)} (hC : = _inst_1) (hD : = _inst_3) (h2C : is_countably_spanning C) (h2D : is_countably_spanning D) :

If `C` and `D` generate the σ-algebras on `α` resp. `β`, then rectangles formed by `C` and `D` generate the σ-algebra on `α × β`.

theorem generate_from_prod {α : Type u_1} {β : Type u_3}  :

The product σ-algebra is generated from boxes, i.e. `s ×ˢ t` for sets `s : set α` and `t : set β`.

theorem is_pi_system_prod {α : Type u_1} {β : Type u_3}  :
is_pi_system {s : set α | {t : set β |

Rectangles form a π-system.

theorem measurable_measure_prod_mk_left_finite {α : Type u_1} {β : Type u_3} {ν : measure_theory.measure β} {s : set × β)} (hs : measurable_set s) :
measurable (λ (x : α), ν (prod.mk x ⁻¹' s))

If `ν` is a finite measure, and `s ⊆ α × β` is measurable, then `x ↦ ν { y | (x, y) ∈ s }` is a measurable function. `measurable_measure_prod_mk_left` is strictly more general.

theorem measurable_measure_prod_mk_left {α : Type u_1} {β : Type u_3} {ν : measure_theory.measure β} {s : set × β)} (hs : measurable_set s) :
measurable (λ (x : α), ν (prod.mk x ⁻¹' s))

If `ν` is a σ-finite measure, and `s ⊆ α × β` is measurable, then `x ↦ ν { y | (x, y) ∈ s }` is a measurable function.

theorem measurable_measure_prod_mk_right {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {s : set × β)} (hs : measurable_set s) :
measurable (λ (y : β), μ ((λ (x : α), (x, y)) ⁻¹' s))

If `μ` is a σ-finite measure, and `s ⊆ α × β` is measurable, then `y ↦ μ { x | (x, y) ∈ s }` is a measurable function.

theorem measurable.map_prod_mk_left {α : Type u_1} {β : Type u_3} {ν : measure_theory.measure β}  :
measurable (λ (x : α),
theorem measurable.map_prod_mk_right {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α}  :
measurable (λ (y : β), measure_theory.measure.map (λ (x : α), (x, y)) μ)
theorem measurable.lintegral_prod_right' {α : Type u_1} {β : Type u_3} {ν : measure_theory.measure β} {f : α × β ennreal} (hf : measurable f) :
measurable (λ (x : α), ∫⁻ (y : β), f (x, y) ν)

The Lebesgue integral is measurable. This shows that the integrand of (the right-hand-side of) Tonelli's theorem is measurable.

theorem measurable.lintegral_prod_right {α : Type u_1} {β : Type u_3} {ν : measure_theory.measure β} {f : α } (hf : measurable ) :
measurable (λ (x : α), ∫⁻ (y : β), f x y ν)

The Lebesgue integral is measurable. This shows that the integrand of (the right-hand-side of) Tonelli's theorem is measurable. This version has the argument `f` in curried form.

theorem measurable.lintegral_prod_left' {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {f : α × β ennreal} (hf : measurable f) :
measurable (λ (y : β), ∫⁻ (x : α), f (x, y) μ)

The Lebesgue integral is measurable. This shows that the integrand of (the right-hand-side of) the symmetric version of Tonelli's theorem is measurable.

theorem measurable.lintegral_prod_left {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {f : α } (hf : measurable ) :
measurable (λ (y : β), ∫⁻ (x : α), f x y μ)

The Lebesgue integral is measurable. This shows that the integrand of (the right-hand-side of) the symmetric version of Tonelli's theorem is measurable. This version has the argument `f` in curried form.

theorem measurable_set_integrable {α : Type u_1} {β : Type u_3} {E : Type u_6} {ν : measure_theory.measure β} ⦃f : α β E  :
measurable_set {x : α | ν}
theorem measure_theory.strongly_measurable.integral_prod_right {α : Type u_1} {β : Type u_3} {E : Type u_6} {ν : measure_theory.measure β} [ E] ⦃f : α β E  :
measure_theory.strongly_measurable (λ (x : α), (y : β), f x y ν)

The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of) Fubini's theorem is measurable. This version has `f` in curried form.

theorem measure_theory.strongly_measurable.integral_prod_right' {α : Type u_1} {β : Type u_3} {E : Type u_6} {ν : measure_theory.measure β} [ E] ⦃f : α × β E⦄  :
measure_theory.strongly_measurable (λ (x : α), (y : β), f (x, y) ν)

The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of) Fubini's theorem is measurable.

theorem measure_theory.strongly_measurable.integral_prod_left {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} [ E] ⦃f : α β E  :
measure_theory.strongly_measurable (λ (y : β), (x : α), f x y μ)

The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of) the symmetric version of Fubini's theorem is measurable. This version has `f` in curried form.

theorem measure_theory.strongly_measurable.integral_prod_left' {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} [ E] ⦃f : α × β E⦄  :
measure_theory.strongly_measurable (λ (y : β), (x : α), f (x, y) μ)

The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of) the symmetric version of Fubini's theorem is measurable.

### The product measure #

@[protected, irreducible]
noncomputable def measure_theory.measure.prod {α : Type u_1} {β : Type u_3} (μ : measure_theory.measure α) (ν : measure_theory.measure β) :

The binary product of measures. They are defined for arbitrary measures, but we basically prove all properties under the assumption that at least one of them is σ-finite.

Equations
Instances for `measure_theory.measure.prod`
@[protected, instance]
noncomputable def measure_theory.measure.prod.measure_space {α : Type u_1} {β : Type u_2}  :
Equations
theorem measure_theory.measure.prod_apply {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {s : set × β)} (hs : measurable_set s) :
(μ.prod ν) s = ∫⁻ (x : α), ν (prod.mk x ⁻¹' s) μ
@[simp]
theorem measure_theory.measure.prod_prod {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (s : set α) (t : set β) :
(μ.prod ν) (s ×ˢ t) = μ s * ν t

The product measure of the product of two sets is the product of their measures. Note that we do not need the sets to be measurable.

@[protected, instance]
@[protected, instance]
@[protected, instance]
theorem measure_theory.measure.ae_measure_lt_top {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {s : set × β)} (hs : measurable_set s) (h2s : (μ.prod ν) s ) :
∀ᵐ (x : α) μ, ν (prod.mk x ⁻¹' s) <
theorem measure_theory.measure.integrable_measure_prod_mk_left {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {s : set × β)} (hs : measurable_set s) (h2s : (μ.prod ν) s ) :
measure_theory.integrable (λ (x : α), (ν (prod.mk x ⁻¹' s)).to_real) μ
theorem measure_theory.measure.measure_prod_null {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {s : set × β)} (hs : measurable_set s) :
(μ.prod ν) s = 0 (λ (x : α), ν (prod.mk x ⁻¹' s)) =ᵐ[μ] 0

Note: the assumption `hs` cannot be dropped. For a counterexample, see Walter Rudin Real and Complex Analysis, example (c) in section 8.9.

theorem measure_theory.measure.measure_ae_null_of_prod_null {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {s : set × β)} (h : (μ.prod ν) s = 0) :
(λ (x : α), ν (prod.mk x ⁻¹' s)) =ᵐ[μ] 0

Note: the converse is not true without assuming that `s` is measurable. For a counterexample, see Walter Rudin Real and Complex Analysis, example (c) in section 8.9.

theorem measure_theory.measure.absolutely_continuous.prod {α : Type u_1} {β : Type u_3} {μ μ' : measure_theory.measure α} {ν ν' : measure_theory.measure β} (h1 : μ.absolutely_continuous μ') (h2 : ν.absolutely_continuous ν') :
(μ.prod ν).absolutely_continuous (μ'.prod ν')
theorem measure_theory.measure.ae_ae_of_ae_prod {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {p : α × β Prop} (h : ∀ᵐ (z : α × β) μ.prod ν, p z) :
∀ᵐ (x : α) μ, ∀ᵐ (y : β) ν, p (x, y)

Note: the converse is not true. For a counterexample, see Walter Rudin Real and Complex Analysis, example (c) in section 8.9.

`μ.prod ν` has finite spanning sets in rectangles of finite spanning sets.

Equations
@[protected, instance]
theorem measure_theory.measure.prod_eq_generate_from {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {C : set (set α)} {D : set (set β)} (hC : = _inst_1) (hD : = _inst_3) (h2C : is_pi_system C) (h2D : is_pi_system D) (h3C : μ.finite_spanning_sets_in C) (h3D : ν.finite_spanning_sets_in D) {μν : measure_theory.measure × β)} (h₁ : (s : set α), s C (t : set β), t D μν (s ×ˢ t) = μ s * ν t) :
μ.prod ν = μν

A measure on a product space equals the product measure if they are equal on rectangles with as sides sets that generate the corresponding σ-algebras.

theorem measure_theory.measure.prod_eq {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {μν : measure_theory.measure × β)} (h : (s : set α) (t : set β), μν (s ×ˢ t) = μ s * ν t) :
μ.prod ν = μν

A measure on a product space equals the product measure if they are equal on rectangles.

theorem measure_theory.measure.prod_swap {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β}  :
= ν.prod μ
theorem measure_theory.measure.prod_apply_symm {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {s : set × β)} (hs : measurable_set s) :
(μ.prod ν) s = ∫⁻ (y : β), μ ((λ (x : α), (x, y)) ⁻¹' s) ν
theorem measure_theory.measure.prod_assoc_prod {α : Type u_1} {β : Type u_3} {γ : Type u_5} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {τ : measure_theory.measure γ}  :
= μ.prod (ν.prod τ)

### The product of specific measures #

theorem measure_theory.measure.prod_restrict {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (s : set α) (t : set β) :
(μ.restrict s).prod (ν.restrict t) = (μ.prod ν).restrict (s ×ˢ t)
theorem measure_theory.measure.restrict_prod_eq_prod_univ {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (s : set α) :
(μ.restrict s).prod ν = (μ.prod ν).restrict (s ×ˢ set.univ)
theorem measure_theory.measure.prod_dirac {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} (y : β) :
= measure_theory.measure.map (λ (x : α), (x, y)) μ
theorem measure_theory.measure.dirac_prod {α : Type u_1} {β : Type u_3} {ν : measure_theory.measure β} (x : α) :
theorem measure_theory.measure.dirac_prod_dirac {α : Type u_1} {β : Type u_3} {x : α} {y : β} :
theorem measure_theory.measure.prod_sum {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ι : Type u_2} [finite ι] (ν : ι ) [ (i : ι), ] :
= measure_theory.measure.sum (λ (i : ι), μ.prod (ν i))
theorem measure_theory.measure.sum_prod {α : Type u_1} {β : Type u_3} {ν : measure_theory.measure β} {ι : Type u_2} [finite ι] (μ : ι ) [ (i : ι), ] :
= measure_theory.measure.sum (λ (i : ι), (μ i).prod ν)
theorem measure_theory.measure.prod_add {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (ν' : measure_theory.measure β)  :
μ.prod + ν') = μ.prod ν + μ.prod ν'
theorem measure_theory.measure.add_prod {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (μ' : measure_theory.measure α)  :
+ μ').prod ν = μ.prod ν + μ'.prod ν
@[simp]
theorem measure_theory.measure.zero_prod {α : Type u_1} {β : Type u_3} (ν : measure_theory.measure β) :
0.prod ν = 0
@[simp]
theorem measure_theory.measure.prod_zero {α : Type u_1} {β : Type u_3} (μ : measure_theory.measure α) :
μ.prod 0 = 0
theorem measure_theory.measure.map_prod_map {α : Type u_1} {β : Type u_3} {γ : Type u_5} {δ : Type u_2} {f : α β} {g : γ δ} {μa : measure_theory.measure α} {μc : measure_theory.measure γ} (hfa : measure_theory.sigma_finite ) (hgc : measure_theory.sigma_finite ) (hf : measurable f) (hg : measurable g) :
.prod = (μa.prod μc)
theorem measure_theory.measure_preserving.skew_product {α : Type u_1} {β : Type u_3} {γ : Type u_5} {δ : Type u_7} {μa : measure_theory.measure α} {μb : measure_theory.measure β} {μc : measure_theory.measure γ} {μd : measure_theory.measure δ} {f : α β} (hf : μb) {g : α γ δ} (hgm : measurable ) (hg : ∀ᵐ (x : α) μa, μc = μd) :
measure_theory.measure_preserving (λ (p : α × γ), (f p.fst, g p.fst p.snd)) (μa.prod μc) (μb.prod μd)
@[protected]
theorem measure_theory.measure_preserving.prod {α : Type u_1} {β : Type u_3} {γ : Type u_5} {δ : Type u_7} {μa : measure_theory.measure α} {μb : measure_theory.measure β} {μc : measure_theory.measure γ} {μd : measure_theory.measure δ} {f : α β} {g : γ δ} (hf : μb) (hg : μd) :
(μa.prod μc) (μb.prod μd)

If `f : α → β` sends the measure `μa` to `μb` and `g : γ → δ` sends the measure `μc` to `μd`, then `prod.map f g` sends `μa.prod μc` to `μb.prod μd`.

theorem measure_theory.quasi_measure_preserving.prod_of_right {α : Type u_1} {β : Type u_3} {γ : Type u_5} {f : α × β γ} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {τ : measure_theory.measure γ} (hf : measurable f) (h2f : ∀ᵐ (x : α) μ, measure_theory.measure.quasi_measure_preserving (λ (y : β), f (x, y)) ν τ) :
theorem measure_theory.quasi_measure_preserving.prod_of_left {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : α × β γ} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {τ : measure_theory.measure γ} (hf : measurable f) (h2f : ∀ᵐ (y : β) ν, measure_theory.measure.quasi_measure_preserving (λ (x : α), f (x, y)) μ τ) :
theorem ae_measurable.prod_swap {α : Type u_1} {β : Type u_3} {γ : Type u_5} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {f : β × α γ} (hf : (ν.prod μ)) :
ae_measurable (λ (z : α × β), f z.swap) (μ.prod ν)
theorem measure_theory.ae_strongly_measurable.prod_swap {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {γ : Type u_2} {f : β × α γ} (hf : (ν.prod μ)) :
measure_theory.ae_strongly_measurable (λ (z : α × β), f z.swap) (μ.prod ν)
theorem ae_measurable.fst {α : Type u_1} {β : Type u_3} {γ : Type u_5} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {f : α γ} (hf : μ) :
ae_measurable (λ (z : α × β), f z.fst) (μ.prod ν)
theorem ae_measurable.snd {α : Type u_1} {β : Type u_3} {γ : Type u_5} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {f : β γ} (hf : ν) :
ae_measurable (λ (z : α × β), f z.snd) (μ.prod ν)
theorem measure_theory.ae_strongly_measurable.fst {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {γ : Type u_2} {f : α γ}  :
measure_theory.ae_strongly_measurable (λ (z : α × β), f z.fst) (μ.prod ν)
theorem measure_theory.ae_strongly_measurable.snd {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {γ : Type u_2} {f : β γ}  :
measure_theory.ae_strongly_measurable (λ (z : α × β), f z.snd) (μ.prod ν)
theorem measure_theory.ae_strongly_measurable.integral_prod_right' {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
measure_theory.ae_strongly_measurable (λ (x : α), (y : β), f (x, y) ν) μ

The Bochner integral is a.e.-measurable. This shows that the integrand of (the right-hand-side of) Fubini's theorem is a.e.-measurable.

theorem measure_theory.ae_strongly_measurable.prod_mk_left {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {γ : Type u_2} {f : α × β γ} (hf : (μ.prod ν)) :
∀ᵐ (x : α) μ, measure_theory.ae_strongly_measurable (λ (y : β), f (x, y)) ν

### The Lebesgue integral on a product #

theorem measure_theory.lintegral_prod_swap {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (f : α × β ennreal) (hf : (μ.prod ν)) :
∫⁻ (z : β × α), f z.swap ν.prod μ = ∫⁻ (z : α × β), f z μ.prod ν
theorem measure_theory.lintegral_prod_of_measurable {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (f : α × β ennreal) (hf : measurable f) :
∫⁻ (z : α × β), f z μ.prod ν = ∫⁻ (x : α), ∫⁻ (y : β), f (x, y) ν μ

Tonelli's Theorem: For `ℝ≥0∞`-valued measurable functions on `α × β`, the integral of `f` is equal to the iterated integral.

theorem measure_theory.lintegral_prod {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (f : α × β ennreal) (hf : (μ.prod ν)) :
∫⁻ (z : α × β), f z μ.prod ν = ∫⁻ (x : α), ∫⁻ (y : β), f (x, y) ν μ

Tonelli's Theorem: For `ℝ≥0∞`-valued almost everywhere measurable functions on `α × β`, the integral of `f` is equal to the iterated integral.

theorem measure_theory.lintegral_prod_symm {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (f : α × β ennreal) (hf : (μ.prod ν)) :
∫⁻ (z : α × β), f z μ.prod ν = ∫⁻ (y : β), ∫⁻ (x : α), f (x, y) μ ν

The symmetric verion of Tonelli's Theorem: For `ℝ≥0∞`-valued almost everywhere measurable functions on `α × β`, the integral of `f` is equal to the iterated integral, in reverse order.

theorem measure_theory.lintegral_prod_symm' {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} (f : α × β ennreal) (hf : measurable f) :
∫⁻ (z : α × β), f z μ.prod ν = ∫⁻ (y : β), ∫⁻ (x : α), f (x, y) μ ν

The symmetric verion of Tonelli's Theorem: For `ℝ≥0∞`-valued measurable functions on `α × β`, the integral of `f` is equal to the iterated integral, in reverse order.

theorem measure_theory.lintegral_lintegral {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α (hf : (μ.prod ν)) :
∫⁻ (x : α), ∫⁻ (y : β), f x y ν μ = ∫⁻ (z : α × β), f z.fst z.snd μ.prod ν

The reversed version of Tonelli's Theorem. In this version `f` is in curried form, which makes it easier for the elaborator to figure out `f` automatically.

theorem measure_theory.lintegral_lintegral_symm {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α (hf : (μ.prod ν)) :
∫⁻ (x : α), ∫⁻ (y : β), f x y ν μ = ∫⁻ (z : β × α), f z.snd z.fst ν.prod μ

The reversed version of Tonelli's Theorem (symmetric version). In this version `f` is in curried form, which makes it easier for the elaborator to figure out `f` automatically.

theorem measure_theory.lintegral_lintegral_swap {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α (hf : (μ.prod ν)) :
∫⁻ (x : α), ∫⁻ (y : β), f x y ν μ = ∫⁻ (y : β), ∫⁻ (x : α), f x y μ ν

Change the order of Lebesgue integration.

theorem measure_theory.lintegral_prod_mul {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {f : α ennreal} {g : β ennreal} (hf : μ) (hg : ν) :
∫⁻ (z : α × β), f z.fst * g z.snd μ.prod ν = ∫⁻ (x : α), f x μ * ∫⁻ (y : β), g y ν

### Integrability on a product #

theorem measure_theory.integrable.swap {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
(ν.prod μ)
theorem measure_theory.integrable_swap_iff {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ :
(ν.prod μ) (μ.prod ν)
theorem measure_theory.has_finite_integral_prod_iff {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄  :
(∀ᵐ (x : α) μ, measure_theory.has_finite_integral (λ (y : β), f (x, y)) ν) measure_theory.has_finite_integral (λ (x : α), (y : β), f (x, y) ν) μ
theorem measure_theory.has_finite_integral_prod_iff' {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (h1f : (μ.prod ν)) :
(∀ᵐ (x : α) μ, measure_theory.has_finite_integral (λ (y : β), f (x, y)) ν) measure_theory.has_finite_integral (λ (x : α), (y : β), f (x, y) ν) μ
theorem measure_theory.integrable_prod_iff {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (h1f : (μ.prod ν)) :
(μ.prod ν) (∀ᵐ (x : α) μ, measure_theory.integrable (λ (y : β), f (x, y)) ν) measure_theory.integrable (λ (x : α), (y : β), f (x, y) ν) μ

A binary function is integrable if the function `y ↦ f (x, y)` is integrable for almost every `x` and the function `x ↦ ∫ ‖f (x, y)‖ dy` is integrable.

theorem measure_theory.integrable_prod_iff' {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (h1f : (μ.prod ν)) :
(μ.prod ν) (∀ᵐ (y : β) ν, measure_theory.integrable (λ (x : α), f (x, y)) μ) measure_theory.integrable (λ (y : β), (x : α), f (x, y) μ) ν

A binary function is integrable if the function `x ↦ f (x, y)` is integrable for almost every `y` and the function `y ↦ ∫ ‖f (x, y)‖ dx` is integrable.

theorem measure_theory.integrable.prod_left_ae {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
∀ᵐ (y : β) ν, measure_theory.integrable (λ (x : α), f (x, y)) μ
theorem measure_theory.integrable.prod_right_ae {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
∀ᵐ (x : α) μ, measure_theory.integrable (λ (y : β), f (x, y)) ν
theorem measure_theory.integrable.integral_norm_prod_left {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
measure_theory.integrable (λ (x : α), (y : β), f (x, y) ν) μ
theorem measure_theory.integrable.integral_norm_prod_right {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
measure_theory.integrable (λ (y : β), (x : α), f (x, y) μ) ν
theorem measure_theory.integrable_prod_mul {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {L : Type u_2} [is_R_or_C L] {f : α L} {g : β L} (hf : μ) (hg : ν) :
measure_theory.integrable (λ (z : α × β), f z.fst * g z.snd) (μ.prod ν)
theorem measure_theory.integrable.integral_prod_left {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
measure_theory.integrable (λ (x : α), (y : β), f (x, y) ν) μ
theorem measure_theory.integrable.integral_prod_right {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f : α × β E⦄ (hf : (μ.prod ν)) :
measure_theory.integrable (λ (y : β), (x : α), f (x, y) μ) ν

### The Bochner integral on a product #

theorem measure_theory.integral_prod_swap {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] (f : α × β E) (hf : (μ.prod ν)) :
(z : β × α), f z.swap ν.prod μ = (z : α × β), f z μ.prod ν

Some rules about the sum/difference of double integrals. They follow from `integral_add`, but we separate them out as separate lemmas, because they involve quite some steps.

theorem measure_theory.integral_fn_integral_add {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] {E' : Type u_7} [complete_space E'] [ E'] ⦃f g : α × β E⦄ (F : E E') (hf : (μ.prod ν)) (hg : (μ.prod ν)) :
(x : α), F ( (y : β), f (x, y) + g (x, y) ν) μ = (x : α), F ( (y : β), f (x, y) ν + (y : β), g (x, y) ν) μ

Integrals commute with addition inside another integral. `F` can be any function.

theorem measure_theory.integral_fn_integral_sub {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] {E' : Type u_7} [complete_space E'] [ E'] ⦃f g : α × β E⦄ (F : E E') (hf : (μ.prod ν)) (hg : (μ.prod ν)) :
(x : α), F ( (y : β), f (x, y) - g (x, y) ν) μ = (x : α), F ( (y : β), f (x, y) ν - (y : β), g (x, y) ν) μ

Integrals commute with subtraction inside another integral. `F` can be any measurable function.

theorem measure_theory.lintegral_fn_integral_sub {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f g : α × β E⦄ (F : E ennreal) (hf : (μ.prod ν)) (hg : (μ.prod ν)) :
∫⁻ (x : α), F ( (y : β), f (x, y) - g (x, y) ν) μ = ∫⁻ (x : α), F ( (y : β), f (x, y) ν - (y : β), g (x, y) ν) μ

Integrals commute with subtraction inside a lower Lebesgue integral. `F` can be any function.

theorem measure_theory.integral_integral_add {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f g : α × β E⦄ (hf : (μ.prod ν)) (hg : (μ.prod ν)) :
(x : α), (y : β), f (x, y) + g (x, y) ν μ = (x : α), (y : β), f (x, y) ν μ + (x : α), (y : β), g (x, y) ν μ

theorem measure_theory.integral_integral_add' {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f g : α × β E⦄ (hf : (μ.prod ν)) (hg : (μ.prod ν)) :
(x : α), (y : β), (f + g) (x, y) ν μ = (x : α), (y : β), f (x, y) ν μ + (x : α), (y : β), g (x, y) ν μ

Double integrals commute with addition. This is the version with `(f + g) (x, y)` (instead of `f (x, y) + g (x, y)`) in the LHS.

theorem measure_theory.integral_integral_sub {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f g : α × β E⦄ (hf : (μ.prod ν)) (hg : (μ.prod ν)) :
(x : α), (y : β), f (x, y) - g (x, y) ν μ = (x : α), (y : β), f (x, y) ν μ - (x : α), (y : β), g (x, y) ν μ

Double integrals commute with subtraction.

theorem measure_theory.integral_integral_sub' {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f g : α × β E⦄ (hf : (μ.prod ν)) (hg : (μ.prod ν)) :
(x : α), (y : β), (f - g) (x, y) ν μ = (x : α), (y : β), f (x, y) ν μ - (x : α), (y : β), g (x, y) ν μ

Double integrals commute with subtraction. This is the version with `(f - g) (x, y)` (instead of `f (x, y) - g (x, y)`) in the LHS.

theorem measure_theory.continuous_integral_integral {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E]  :
continuous (λ (f : (μ.prod ν))), (x : α), (y : β), f (x, y) ν μ)

The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous.

theorem measure_theory.integral_prod {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] (f : α × β E) (hf : (μ.prod ν)) :
(z : α × β), f z μ.prod ν = (x : α), (y : β), f (x, y) ν μ

Fubini's Theorem: For integrable functions on `α × β`, the Bochner integral of `f` is equal to the iterated Bochner integral. `integrable_prod_iff` can be useful to show that the function in question in integrable. `measure_theory.integrable.integral_prod_right` is useful to show that the inner integral of the right-hand side is integrable.

theorem measure_theory.integral_prod_symm {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] (f : α × β E) (hf : (μ.prod ν)) :
(z : α × β), f z μ.prod ν = (y : β), (x : α), f (x, y) μ ν

Symmetric version of Fubini's Theorem: For integrable functions on `α × β`, the Bochner integral of `f` is equal to the iterated Bochner integral. This version has the integrals on the right-hand side in the other order.

theorem measure_theory.integral_integral {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] {f : α β E} (hf : (μ.prod ν)) :
(x : α), (y : β), f x y ν μ = (z : α × β), f z.fst z.snd μ.prod ν

Reversed version of Fubini's Theorem.

theorem measure_theory.integral_integral_symm {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] {f : α β E} (hf : (μ.prod ν)) :
(x : α), (y : β), f x y ν μ = (z : β × α), f z.snd z.fst ν.prod μ

Reversed version of Fubini's Theorem (symmetric version).

theorem measure_theory.integral_integral_swap {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] ⦃f : α β E (hf : (μ.prod ν)) :
(x : α), (y : β), f x y ν μ = (y : β), (x : α), f x y μ ν

Change the order of Bochner integration.

theorem measure_theory.set_integral_prod {α : Type u_1} {β : Type u_3} {E : Type u_6} {μ : measure_theory.measure α} {ν : measure_theory.measure β} [ E] (f : α × β E) {s : set α} {t : set β} (hf : (s ×ˢ t) (μ.prod ν)) :
(z : α × β) in s ×ˢ t, f z μ.prod ν = (x : α) in s, (y : β) in t, f (x, y) ν μ

Fubini's Theorem for set integrals.

theorem measure_theory.integral_prod_mul {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {L : Type u_2} [is_R_or_C L] (f : α L) (g : β L) :
(z : α × β), f z.fst * g z.snd μ.prod ν = (x : α), f x μ * (y : β), g y ν
theorem measure_theory.set_integral_prod_mul {α : Type u_1} {β : Type u_3} {μ : measure_theory.measure α} {ν : measure_theory.measure β} {L : Type u_2} [is_R_or_C L] (f : α L) (g : β L) (s : set α) (t : set β) :
(z : α × β) in s ×ˢ t, f z.fst * g z.snd μ.prod ν = (x : α) in s, f x μ * (y : β) in t, g y ν