measure_theory.constructions.prod.integralMathlib.MeasureTheory.Constructions.Prod.Integral

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -575,15 +575,15 @@ theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncur
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print MeasureTheory.set_integral_prod /-
+#print MeasureTheory.setIntegral_prod /-
 /-- **Fubini's Theorem** for set integrals. -/
-theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
+theorem setIntegral_prod (f : α × β → E) {s : Set α} {t : Set β}
     (hf : IntegrableOn f (s ×ˢ t) (μ.Prod ν)) :
     ∫ z in s ×ˢ t, f z ∂μ.Prod ν = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ :=
   by
   simp only [← measure.prod_restrict s t, integrable_on] at hf ⊢
   exact integral_prod f hf
-#align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
+#align measure_theory.set_integral_prod MeasureTheory.setIntegral_prod
 -/
 
 #print MeasureTheory.integral_prod_mul /-
@@ -602,11 +602,11 @@ theorem integral_prod_mul {L : Type _} [RCLike L] (f : α → L) (g : β → L)
 -/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print MeasureTheory.set_integral_prod_mul /-
-theorem set_integral_prod_mul {L : Type _} [RCLike L] (f : α → L) (g : β → L) (s : Set α)
+#print MeasureTheory.setIntegral_prod_mul /-
+theorem setIntegral_prod_mul {L : Type _} [RCLike L] (f : α → L) (g : β → L) (s : Set α)
     (t : Set β) : ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.Prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν :=
   by simp only [← measure.prod_restrict s t, integrable_on, integral_prod_mul]
-#align measure_theory.set_integral_prod_mul MeasureTheory.set_integral_prod_mul
+#align measure_theory.set_integral_prod_mul MeasureTheory.setIntegral_prod_mul
 -/
 
 end MeasureTheory
Diff
@@ -351,7 +351,7 @@ theorem Integrable.integral_norm_prod_right [SigmaFinite μ] ⦃f : α × β →
 -/
 
 #print MeasureTheory.Integrable.prod_mul /-
-theorem MeasureTheory.Integrable.prod_mul {L : Type _} [IsROrC L] {f : α → L} {g : β → L}
+theorem MeasureTheory.Integrable.prod_mul {L : Type _} [RCLike L] {f : α → L} {g : β → L}
     (hf : Integrable f μ) (hg : Integrable g ν) :
     Integrable (fun z : α × β => f z.1 * g z.2) (μ.Prod ν) :=
   by
@@ -587,7 +587,7 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
 -/
 
 #print MeasureTheory.integral_prod_mul /-
-theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) :
+theorem integral_prod_mul {L : Type _} [RCLike L] (f : α → L) (g : β → L) :
     ∫ z, f z.1 * g z.2 ∂μ.Prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν :=
   by
   by_cases h : integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν)
@@ -603,7 +603,7 @@ theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L)
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 #print MeasureTheory.set_integral_prod_mul /-
-theorem set_integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
+theorem set_integral_prod_mul {L : Type _} [RCLike L] (f : α → L) (g : β → L) (s : Set α)
     (t : Set β) : ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.Prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν :=
   by simp only [← measure.prod_restrict s t, integrable_on, integral_prod_mul]
 #align measure_theory.set_integral_prod_mul MeasureTheory.set_integral_prod_mul
Diff
@@ -131,7 +131,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
   Fubini's theorem is measurable. -/
 theorem MeasureTheory.StronglyMeasurable.integral_prod_right' [SigmaFinite ν] ⦃f : α × β → E⦄
     (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂ν := by
-  rw [← uncurry_curry f] at hf ; exact hf.integral_prod_right
+  rw [← uncurry_curry f] at hf; exact hf.integral_prod_right
 #align measure_theory.strongly_measurable.integral_prod_right' MeasureTheory.StronglyMeasurable.integral_prod_right'
 -/
 
@@ -173,7 +173,7 @@ theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet
   simp_rw [has_finite_integral, ennnorm_eq_of_real to_real_nonneg]
   convert h2s.lt_top using 1; simp_rw [prod_apply hs]; apply lintegral_congr_ae
   refine' (ae_measure_lt_top hs h2s).mp _; apply eventually_of_forall; intro x hx
-  rw [lt_top_iff_ne_top] at hx ; simp [of_real_to_real, hx]
+  rw [lt_top_iff_ne_top] at hx; simp [of_real_to_real, hx]
 #align measure_theory.measure.integrable_measure_prod_mk_left MeasureTheory.Measure.integrable_measure_prod_mk_left
 -/
 
@@ -190,7 +190,7 @@ section
 #print MeasureTheory.AEStronglyMeasurable.prod_swap /-
 theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type _} [TopologicalSpace γ]
     [SigmaFinite μ] [SigmaFinite ν] {f : β × α → γ} (hf : AEStronglyMeasurable f (ν.Prod μ)) :
-    AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) := by rw [← prod_swap] at hf ;
+    AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) := by rw [← prod_swap] at hf;
   exact hf.comp_measurable measurable_swap
 #align measure_theory.ae_strongly_measurable.prod_swap MeasureTheory.AEStronglyMeasurable.prod_swap
 -/
@@ -394,7 +394,7 @@ variable [SigmaFinite μ]
 theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ.Prod ν)) :
     ∫ z, f z.symm ∂ν.Prod μ = ∫ z, f z ∂μ.Prod ν :=
   by
-  rw [← prod_swap] at hf 
+  rw [← prod_swap] at hf
   rw [← integral_map measurable_swap.ae_measurable hf, prod_swap]
 #align measure_theory.integral_prod_swap MeasureTheory.integral_prod_swap
 -/
Diff
@@ -350,15 +350,16 @@ theorem Integrable.integral_norm_prod_right [SigmaFinite μ] ⦃f : α × β →
 #align measure_theory.integrable.integral_norm_prod_right MeasureTheory.Integrable.integral_norm_prod_right
 -/
 
-#print MeasureTheory.integrable_prod_mul /-
-theorem integrable_prod_mul {L : Type _} [IsROrC L] {f : α → L} {g : β → L} (hf : Integrable f μ)
-    (hg : Integrable g ν) : Integrable (fun z : α × β => f z.1 * g z.2) (μ.Prod ν) :=
+#print MeasureTheory.Integrable.prod_mul /-
+theorem MeasureTheory.Integrable.prod_mul {L : Type _} [IsROrC L] {f : α → L} {g : β → L}
+    (hf : Integrable f μ) (hg : Integrable g ν) :
+    Integrable (fun z : α × β => f z.1 * g z.2) (μ.Prod ν) :=
   by
   refine' (integrable_prod_iff _).2 ⟨_, _⟩
   · exact hf.1.fst.mul hg.1.snd
   · exact eventually_of_forall fun x => hg.const_mul (f x)
   · simpa only [norm_mul, integral_mul_left] using hf.norm.mul_const _
-#align measure_theory.integrable_prod_mul MeasureTheory.integrable_prod_mul
+#align measure_theory.integrable_prod_mul MeasureTheory.Integrable.prod_mul
 -/
 
 end
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
-import Mathbin.MeasureTheory.Constructions.Prod.Basic
-import Mathbin.MeasureTheory.Integral.SetIntegral
+import MeasureTheory.Constructions.Prod.Basic
+import MeasureTheory.Integral.SetIntegral
 
 #align_import measure_theory.constructions.prod.integral from "leanprover-community/mathlib"@"c20927220ef87bb4962ba08bf6da2ce3cf50a6dd"
 
Diff
@@ -505,7 +505,7 @@ theorem continuous_integral_integral :
   simp_rw [← lintegral_prod_of_measurable _ (this _), ← L1.of_real_norm_sub_eq_lintegral, ←
     of_real_zero]
   refine' (continuous_of_real.tendsto 0).comp _
-  rw [← tendsto_iff_norm_tendsto_zero]; exact tendsto_id
+  rw [← tendsto_iff_norm_sub_tendsto_zero]; exact tendsto_id
 #align measure_theory.continuous_integral_integral MeasureTheory.continuous_integral_integral
 -/
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module measure_theory.constructions.prod.integral
-! leanprover-community/mathlib commit c20927220ef87bb4962ba08bf6da2ce3cf50a6dd
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Constructions.Prod.Basic
 import Mathbin.MeasureTheory.Integral.SetIntegral
 
+#align_import measure_theory.constructions.prod.integral from "leanprover-community/mathlib"@"c20927220ef87bb4962ba08bf6da2ce3cf50a6dd"
+
 /-!
 # Integration with respect to the product measure
 
Diff
@@ -67,17 +67,20 @@ along one of the variables (using either the Lebesgue or Bochner integral) is me
 -/
 
 
+#print measurableSet_integrable /-
 theorem measurableSet_integrable [SigmaFinite ν] ⦃f : α → β → E⦄
     (hf : StronglyMeasurable (uncurry f)) : MeasurableSet {x | Integrable (f x) ν} :=
   by
   simp_rw [integrable, hf.of_uncurry_left.ae_strongly_measurable, true_and_iff]
   exact measurableSet_lt (Measurable.lintegral_prod_right hf.ennnorm) measurable_const
 #align measurable_set_integrable measurableSet_integrable
+-/
 
 section
 
 variable [NormedSpace ℝ E] [CompleteSpace E]
 
+#print MeasureTheory.StronglyMeasurable.integral_prod_right /-
 /-- 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. -/
@@ -124,14 +127,18 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
     · simp [f', hfx, integral_undef]
   exact stronglyMeasurable_of_tendsto _ hf' h2f'
 #align measure_theory.strongly_measurable.integral_prod_right MeasureTheory.StronglyMeasurable.integral_prod_right
+-/
 
+#print MeasureTheory.StronglyMeasurable.integral_prod_right' /-
 /-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
   Fubini's theorem is measurable. -/
 theorem MeasureTheory.StronglyMeasurable.integral_prod_right' [SigmaFinite ν] ⦃f : α × β → E⦄
     (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂ν := by
   rw [← uncurry_curry f] at hf ; exact hf.integral_prod_right
 #align measure_theory.strongly_measurable.integral_prod_right' MeasureTheory.StronglyMeasurable.integral_prod_right'
+-/
 
+#print MeasureTheory.StronglyMeasurable.integral_prod_left /-
 /-- 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. -/
@@ -139,13 +146,16 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_left [SigmaFinite μ] ⦃
     (hf : StronglyMeasurable (uncurry f)) : StronglyMeasurable fun y => ∫ x, f x y ∂μ :=
   (hf.comp_measurable measurable_swap).integral_prod_right'
 #align measure_theory.strongly_measurable.integral_prod_left MeasureTheory.StronglyMeasurable.integral_prod_left
+-/
 
+#print MeasureTheory.StronglyMeasurable.integral_prod_left' /-
 /-- 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. -/
 theorem MeasureTheory.StronglyMeasurable.integral_prod_left' [SigmaFinite μ] ⦃f : α × β → E⦄
     (hf : StronglyMeasurable f) : StronglyMeasurable fun y => ∫ x, f (x, y) ∂μ :=
   (hf.comp_measurable measurable_swap).integral_prod_right'
 #align measure_theory.strongly_measurable.integral_prod_left' MeasureTheory.StronglyMeasurable.integral_prod_left'
+-/
 
 end
 
@@ -158,6 +168,7 @@ namespace Measure
 
 variable [SigmaFinite ν]
 
+#print MeasureTheory.Measure.integrable_measure_prod_mk_left /-
 theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet s)
     (h2s : (μ.Prod ν) s ≠ ∞) : Integrable (fun x => (ν (Prod.mk x ⁻¹' s)).toReal) μ :=
   by
@@ -167,6 +178,7 @@ theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet
   refine' (ae_measure_lt_top hs h2s).mp _; apply eventually_of_forall; intro x hx
   rw [lt_top_iff_ne_top] at hx ; simp [of_real_to_real, hx]
 #align measure_theory.measure.integrable_measure_prod_mk_left MeasureTheory.Measure.integrable_measure_prod_mk_left
+-/
 
 end Measure
 
@@ -178,11 +190,13 @@ open MeasureTheory.Measure
 
 section
 
+#print MeasureTheory.AEStronglyMeasurable.prod_swap /-
 theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type _} [TopologicalSpace γ]
     [SigmaFinite μ] [SigmaFinite ν] {f : β × α → γ} (hf : AEStronglyMeasurable f (ν.Prod μ)) :
     AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) := by rw [← prod_swap] at hf ;
   exact hf.comp_measurable measurable_swap
 #align measure_theory.ae_strongly_measurable.prod_swap MeasureTheory.AEStronglyMeasurable.prod_swap
+-/
 
 #print MeasureTheory.AEStronglyMeasurable.fst /-
 theorem MeasureTheory.AEStronglyMeasurable.fst {γ} [TopologicalSpace γ] [SigmaFinite ν] {f : α → γ}
@@ -198,6 +212,7 @@ theorem MeasureTheory.AEStronglyMeasurable.snd {γ} [TopologicalSpace γ] [Sigma
 #align measure_theory.ae_strongly_measurable.snd MeasureTheory.AEStronglyMeasurable.snd
 -/
 
+#print MeasureTheory.AEStronglyMeasurable.integral_prod_right' /-
 /-- 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 MeasureTheory.AEStronglyMeasurable.integral_prod_right' [SigmaFinite ν] [NormedSpace ℝ E]
@@ -206,6 +221,7 @@ theorem MeasureTheory.AEStronglyMeasurable.integral_prod_right' [SigmaFinite ν]
   ⟨fun x => ∫ y, hf.mk f (x, y) ∂ν, hf.stronglyMeasurable_mk.integral_prod_right', by
     filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩
 #align measure_theory.ae_strongly_measurable.integral_prod_right' MeasureTheory.AEStronglyMeasurable.integral_prod_right'
+-/
 
 #print MeasureTheory.AEStronglyMeasurable.prod_mk_left /-
 theorem MeasureTheory.AEStronglyMeasurable.prod_mk_left {γ : Type _} [SigmaFinite ν]
@@ -229,17 +245,22 @@ variable [SigmaFinite ν]
 
 section
 
+#print MeasureTheory.Integrable.swap /-
 theorem Integrable.swap [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     Integrable (f ∘ Prod.swap) (ν.Prod μ) :=
   ⟨hf.AEStronglyMeasurable.prod_swap,
     (lintegral_prod_swap _ hf.AEStronglyMeasurable.ennnorm : _).le.trans_lt hf.HasFiniteIntegral⟩
 #align measure_theory.integrable.swap MeasureTheory.Integrable.swap
+-/
 
+#print MeasureTheory.integrable_swap_iff /-
 theorem integrable_swap_iff [SigmaFinite μ] ⦃f : α × β → E⦄ :
     Integrable (f ∘ Prod.swap) (ν.Prod μ) ↔ Integrable f (μ.Prod ν) :=
   ⟨fun hf => by convert hf.swap; ext ⟨x, y⟩; rfl, fun hf => hf.symm⟩
 #align measure_theory.integrable_swap_iff MeasureTheory.integrable_swap_iff
+-/
 
+#print MeasureTheory.hasFiniteIntegral_prod_iff /-
 theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasurable f) :
     HasFiniteIntegral f (μ.Prod ν) ↔
       (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
@@ -259,7 +280,9 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
     rw [of_real_to_real]; rw [← lt_top_iff_ne_top]; exact hx
   · intro h2f; refine' ae_lt_top _ h2f.ne; exact h1f.ennnorm.lintegral_prod_right'
 #align measure_theory.has_finite_integral_prod_iff MeasureTheory.hasFiniteIntegral_prod_iff
+-/
 
+#print MeasureTheory.hasFiniteIntegral_prod_iff' /-
 theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable f (μ.Prod ν)) :
     HasFiniteIntegral f (μ.Prod ν) ↔
       (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
@@ -277,7 +300,9 @@ theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AEStronglyMe
       integral_congr_ae (eventually_eq.fun_comp hx _)
   · infer_instance
 #align measure_theory.has_finite_integral_prod_iff' MeasureTheory.hasFiniteIntegral_prod_iff'
+-/
 
+#print MeasureTheory.integrable_prod_iff /-
 /-- 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 integrable_prod_iff ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable f (μ.Prod ν)) :
@@ -287,7 +312,9 @@ theorem integrable_prod_iff ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable
   simp [integrable, h1f, has_finite_integral_prod_iff', h1f.norm.integral_prod_right',
     h1f.prod_mk_left]
 #align measure_theory.integrable_prod_iff MeasureTheory.integrable_prod_iff
+-/
 
+#print MeasureTheory.integrable_prod_iff' /-
 /-- 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 integrable_prod_iff' [SigmaFinite μ] ⦃f : α × β → E⦄
@@ -296,27 +323,37 @@ theorem integrable_prod_iff' [SigmaFinite μ] ⦃f : α × β → E⦄
       (∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ) ∧ Integrable (fun y => ∫ x, ‖f (x, y)‖ ∂μ) ν :=
   by convert integrable_prod_iff h1f.prod_swap using 1; rw [integrable_swap_iff]
 #align measure_theory.integrable_prod_iff' MeasureTheory.integrable_prod_iff'
+-/
 
+#print MeasureTheory.Integrable.prod_left_ae /-
 theorem Integrable.prod_left_ae [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     ∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ :=
   ((integrable_prod_iff' hf.AEStronglyMeasurable).mp hf).1
 #align measure_theory.integrable.prod_left_ae MeasureTheory.Integrable.prod_left_ae
+-/
 
+#print MeasureTheory.Integrable.prod_right_ae /-
 theorem Integrable.prod_right_ae [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     ∀ᵐ x ∂μ, Integrable (fun y => f (x, y)) ν :=
   hf.symm.prod_left_ae
 #align measure_theory.integrable.prod_right_ae MeasureTheory.Integrable.prod_right_ae
+-/
 
+#print MeasureTheory.Integrable.integral_norm_prod_left /-
 theorem Integrable.integral_norm_prod_left ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ :=
   ((integrable_prod_iff hf.AEStronglyMeasurable).mp hf).2
 #align measure_theory.integrable.integral_norm_prod_left MeasureTheory.Integrable.integral_norm_prod_left
+-/
 
+#print MeasureTheory.Integrable.integral_norm_prod_right /-
 theorem Integrable.integral_norm_prod_right [SigmaFinite μ] ⦃f : α × β → E⦄
     (hf : Integrable f (μ.Prod ν)) : Integrable (fun y => ∫ x, ‖f (x, y)‖ ∂μ) ν :=
   hf.symm.integral_norm_prod_left
 #align measure_theory.integrable.integral_norm_prod_right MeasureTheory.Integrable.integral_norm_prod_right
+-/
 
+#print MeasureTheory.integrable_prod_mul /-
 theorem integrable_prod_mul {L : Type _} [IsROrC L] {f : α → L} {g : β → L} (hf : Integrable f μ)
     (hg : Integrable g ν) : Integrable (fun z : α × β => f z.1 * g z.2) (μ.Prod ν) :=
   by
@@ -325,11 +362,13 @@ theorem integrable_prod_mul {L : Type _} [IsROrC L] {f : α → L} {g : β → L
   · exact eventually_of_forall fun x => hg.const_mul (f x)
   · simpa only [norm_mul, integral_mul_left] using hf.norm.mul_const _
 #align measure_theory.integrable_prod_mul MeasureTheory.integrable_prod_mul
+-/
 
 end
 
 variable [NormedSpace ℝ E] [CompleteSpace E]
 
+#print MeasureTheory.Integrable.integral_prod_left /-
 theorem Integrable.integral_prod_left ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     Integrable (fun x => ∫ y, f (x, y) ∂ν) μ :=
   Integrable.mono hf.integral_norm_prod_left hf.AEStronglyMeasurable.integral_prod_right' <|
@@ -339,23 +378,28 @@ theorem Integrable.integral_prod_left ⦃f : α × β → E⦄ (hf : Integrable
             integral_nonneg_of_ae <|
               eventually_of_forall fun y => (norm_nonneg (f (x, y)) : _)).symm
 #align measure_theory.integrable.integral_prod_left MeasureTheory.Integrable.integral_prod_left
+-/
 
+#print MeasureTheory.Integrable.integral_prod_right /-
 theorem Integrable.integral_prod_right [SigmaFinite μ] ⦃f : α × β → E⦄
     (hf : Integrable f (μ.Prod ν)) : Integrable (fun y => ∫ x, f (x, y) ∂μ) ν :=
   hf.symm.integral_prod_left
 #align measure_theory.integrable.integral_prod_right MeasureTheory.Integrable.integral_prod_right
+-/
 
 /-! ### The Bochner integral on a product -/
 
 
 variable [SigmaFinite μ]
 
+#print MeasureTheory.integral_prod_swap /-
 theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ.Prod ν)) :
     ∫ z, f z.symm ∂ν.Prod μ = ∫ z, f z ∂μ.Prod ν :=
   by
   rw [← prod_swap] at hf 
   rw [← integral_map measurable_swap.ae_measurable hf, prod_swap]
 #align measure_theory.integral_prod_swap MeasureTheory.integral_prod_swap
+-/
 
 variable {E' : Type _} [NormedAddCommGroup E'] [CompleteSpace E'] [NormedSpace ℝ E']
 
@@ -363,6 +407,7 @@ variable {E' : Type _} [NormedAddCommGroup E'] [CompleteSpace E'] [NormedSpace 
   we separate them out as separate lemmas, because they involve quite some steps. -/
 
 
+#print MeasureTheory.integral_fn_integral_add /-
 /-- Integrals commute with addition inside another integral. `F` can be any function. -/
 theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
@@ -372,7 +417,9 @@ theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf :
   filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
   simp [integral_add h2f h2g]
 #align measure_theory.integral_fn_integral_add MeasureTheory.integral_fn_integral_add
+-/
 
+#print MeasureTheory.integral_fn_integral_sub /-
 /-- Integrals commute with subtraction inside another integral.
   `F` can be any measurable function. -/
 theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.Prod ν))
@@ -383,7 +430,9 @@ theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf :
   filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
   simp [integral_sub h2f h2g]
 #align measure_theory.integral_fn_integral_sub MeasureTheory.integral_fn_integral_sub
+-/
 
+#print MeasureTheory.lintegral_fn_integral_sub /-
 /-- Integrals commute with subtraction inside a lower Lebesgue integral.
   `F` can be any function. -/
 theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f (μ.Prod ν))
@@ -394,7 +443,9 @@ theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0
   filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
   simp [integral_sub h2f h2g]
 #align measure_theory.lintegral_fn_integral_sub MeasureTheory.lintegral_fn_integral_sub
+-/
 
+#print MeasureTheory.integral_integral_add /-
 /-- Double integrals commute with addition. -/
 theorem integral_integral_add ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
@@ -402,7 +453,9 @@ theorem integral_integral_add ⦃f g : α × β → E⦄ (hf : Integrable f (μ.
   (integral_fn_integral_add id hf hg).trans <|
     integral_add hf.integral_prod_left hg.integral_prod_left
 #align measure_theory.integral_integral_add MeasureTheory.integral_integral_add
+-/
 
+#print MeasureTheory.integral_integral_add' /-
 /-- 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 integral_integral_add' ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
@@ -410,7 +463,9 @@ theorem integral_integral_add' ⦃f g : α × β → E⦄ (hf : Integrable f (μ
     ∫ x, ∫ y, (f + g) (x, y) ∂ν ∂μ = ∫ x, ∫ y, f (x, y) ∂ν ∂μ + ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
   integral_integral_add hf hg
 #align measure_theory.integral_integral_add' MeasureTheory.integral_integral_add'
+-/
 
+#print MeasureTheory.integral_integral_sub /-
 /-- Double integrals commute with subtraction. -/
 theorem integral_integral_sub ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
@@ -418,7 +473,9 @@ theorem integral_integral_sub ⦃f g : α × β → E⦄ (hf : Integrable f (μ.
   (integral_fn_integral_sub id hf hg).trans <|
     integral_sub hf.integral_prod_left hg.integral_prod_left
 #align measure_theory.integral_integral_sub MeasureTheory.integral_integral_sub
+-/
 
+#print MeasureTheory.integral_integral_sub' /-
 /-- 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 integral_integral_sub' ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
@@ -426,7 +483,9 @@ theorem integral_integral_sub' ⦃f g : α × β → E⦄ (hf : Integrable f (μ
     ∫ x, ∫ y, (f - g) (x, y) ∂ν ∂μ = ∫ x, ∫ y, f (x, y) ∂ν ∂μ - ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
   integral_integral_sub hf hg
 #align measure_theory.integral_integral_sub' MeasureTheory.integral_integral_sub'
+-/
 
+#print MeasureTheory.continuous_integral_integral /-
 /-- The map that sends an L¹-function `f : α × β → E` to `∫∫f` is continuous. -/
 theorem continuous_integral_integral :
     Continuous fun f : α × β →₁[μ.Prod ν] E => ∫ x, ∫ y, f (x, y) ∂ν ∂μ :=
@@ -451,7 +510,9 @@ theorem continuous_integral_integral :
   refine' (continuous_of_real.tendsto 0).comp _
   rw [← tendsto_iff_norm_tendsto_zero]; exact tendsto_id
 #align measure_theory.continuous_integral_integral MeasureTheory.continuous_integral_integral
+-/
 
+#print MeasureTheory.integral_prod /-
 /-- **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.
@@ -478,7 +539,9 @@ theorem integral_prod :
       apply eventually_of_forall; intro x hfgx
       exact integral_congr_ae (ae_eq_symm hfgx)
 #align measure_theory.integral_prod MeasureTheory.integral_prod
+-/
 
+#print MeasureTheory.integral_prod_symm /-
 /-- 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. -/
@@ -486,6 +549,7 @@ theorem integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.Prod ν))
     ∫ z, f z ∂μ.Prod ν = ∫ y, ∫ x, f (x, y) ∂μ ∂ν := by
   simp_rw [← integral_prod_swap f hf.ae_strongly_measurable]; exact integral_prod _ hf.swap
 #align measure_theory.integral_prod_symm MeasureTheory.integral_prod_symm
+-/
 
 #print MeasureTheory.integral_integral /-
 /-- Reversed version of **Fubini's Theorem**. -/
@@ -513,6 +577,7 @@ theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncur
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print MeasureTheory.set_integral_prod /-
 /-- **Fubini's Theorem** for set integrals. -/
 theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
     (hf : IntegrableOn f (s ×ˢ t) (μ.Prod ν)) :
@@ -521,7 +586,9 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
   simp only [← measure.prod_restrict s t, integrable_on] at hf ⊢
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
+-/
 
+#print MeasureTheory.integral_prod_mul /-
 theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) :
     ∫ z, f z.1 * g z.2 ∂μ.Prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν :=
   by
@@ -534,12 +601,15 @@ theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L)
     exact integrable_prod_mul h.1 h.2
   cases H <;> simp [integral_undef h, integral_undef H]
 #align measure_theory.integral_prod_mul MeasureTheory.integral_prod_mul
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print MeasureTheory.set_integral_prod_mul /-
 theorem set_integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
     (t : Set β) : ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.Prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν :=
   by simp only [← measure.prod_restrict s t, integrable_on, integral_prod_mul]
 #align measure_theory.set_integral_prod_mul MeasureTheory.set_integral_prod_mul
+-/
 
 end MeasureTheory
 
Diff
@@ -351,7 +351,7 @@ theorem Integrable.integral_prod_right [SigmaFinite μ] ⦃f : α × β → E⦄
 variable [SigmaFinite μ]
 
 theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ.Prod ν)) :
-    (∫ z, f z.symm ∂ν.Prod μ) = ∫ z, f z ∂μ.Prod ν :=
+    ∫ z, f z.symm ∂ν.Prod μ = ∫ z, f z ∂μ.Prod ν :=
   by
   rw [← prod_swap] at hf 
   rw [← integral_map measurable_swap.ae_measurable hf, prod_swap]
@@ -366,7 +366,7 @@ variable {E' : Type _} [NormedAddCommGroup E'] [CompleteSpace E'] [NormedSpace 
 /-- Integrals commute with addition inside another integral. `F` can be any function. -/
 theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
-    (∫ x, F (∫ y, f (x, y) + g (x, y) ∂ν) ∂μ) = ∫ x, F ((∫ y, f (x, y) ∂ν) + ∫ y, g (x, y) ∂ν) ∂μ :=
+    ∫ x, F (∫ y, f (x, y) + g (x, y) ∂ν) ∂μ = ∫ x, F (∫ y, f (x, y) ∂ν + ∫ y, g (x, y) ∂ν) ∂μ :=
   by
   refine' integral_congr_ae _
   filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
@@ -377,7 +377,7 @@ theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf :
   `F` can be any measurable function. -/
 theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
-    (∫ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) = ∫ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ :=
+    ∫ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ = ∫ x, F (∫ y, f (x, y) ∂ν - ∫ y, g (x, y) ∂ν) ∂μ :=
   by
   refine' integral_congr_ae _
   filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
@@ -388,8 +388,7 @@ theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf :
   `F` can be any function. -/
 theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0∞) (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
-    (∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) =
-      ∫⁻ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ :=
+    ∫⁻ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ = ∫⁻ x, F (∫ y, f (x, y) ∂ν - ∫ y, g (x, y) ∂ν) ∂μ :=
   by
   refine' lintegral_congr_ae _
   filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
@@ -399,7 +398,7 @@ theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0
 /-- Double integrals commute with addition. -/
 theorem integral_integral_add ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
-    (∫ x, ∫ y, f (x, y) + g (x, y) ∂ν ∂μ) = (∫ x, ∫ y, f (x, y) ∂ν ∂μ) + ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
+    ∫ x, ∫ y, f (x, y) + g (x, y) ∂ν ∂μ = ∫ x, ∫ y, f (x, y) ∂ν ∂μ + ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
   (integral_fn_integral_add id hf hg).trans <|
     integral_add hf.integral_prod_left hg.integral_prod_left
 #align measure_theory.integral_integral_add MeasureTheory.integral_integral_add
@@ -408,14 +407,14 @@ theorem integral_integral_add ⦃f g : α × β → E⦄ (hf : Integrable f (μ.
   (instead of `f (x, y) + g (x, y)`) in the LHS. -/
 theorem integral_integral_add' ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
-    (∫ x, ∫ y, (f + g) (x, y) ∂ν ∂μ) = (∫ x, ∫ y, f (x, y) ∂ν ∂μ) + ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
+    ∫ x, ∫ y, (f + g) (x, y) ∂ν ∂μ = ∫ x, ∫ y, f (x, y) ∂ν ∂μ + ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
   integral_integral_add hf hg
 #align measure_theory.integral_integral_add' MeasureTheory.integral_integral_add'
 
 /-- Double integrals commute with subtraction. -/
 theorem integral_integral_sub ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
-    (∫ x, ∫ y, f (x, y) - g (x, y) ∂ν ∂μ) = (∫ x, ∫ y, f (x, y) ∂ν ∂μ) - ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
+    ∫ x, ∫ y, f (x, y) - g (x, y) ∂ν ∂μ = ∫ x, ∫ y, f (x, y) ∂ν ∂μ - ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
   (integral_fn_integral_sub id hf hg).trans <|
     integral_sub hf.integral_prod_left hg.integral_prod_left
 #align measure_theory.integral_integral_sub MeasureTheory.integral_integral_sub
@@ -424,7 +423,7 @@ theorem integral_integral_sub ⦃f g : α × β → E⦄ (hf : Integrable f (μ.
   (instead of `f (x, y) - g (x, y)`) in the LHS. -/
 theorem integral_integral_sub' ⦃f g : α × β → E⦄ (hf : Integrable f (μ.Prod ν))
     (hg : Integrable g (μ.Prod ν)) :
-    (∫ x, ∫ y, (f - g) (x, y) ∂ν ∂μ) = (∫ x, ∫ y, f (x, y) ∂ν ∂μ) - ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
+    ∫ x, ∫ y, (f - g) (x, y) ∂ν ∂μ = ∫ x, ∫ y, f (x, y) ∂ν ∂μ - ∫ x, ∫ y, g (x, y) ∂ν ∂μ :=
   integral_integral_sub hf hg
 #align measure_theory.integral_integral_sub' MeasureTheory.integral_integral_sub'
 
@@ -460,7 +459,7 @@ theorem continuous_integral_integral :
   of the right-hand side is integrable. -/
 theorem integral_prod :
     ∀ (f : α × β → E) (hf : Integrable f (μ.Prod ν)),
-      (∫ z, f z ∂μ.Prod ν) = ∫ x, ∫ y, f (x, y) ∂ν ∂μ :=
+      ∫ z, f z ∂μ.Prod ν = ∫ x, ∫ y, f (x, y) ∂ν ∂μ :=
   by
   apply integrable.induction
   · intro c s hs h2s
@@ -484,14 +483,14 @@ theorem integral_prod :
   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 integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.Prod ν)) :
-    (∫ z, f z ∂μ.Prod ν) = ∫ y, ∫ x, f (x, y) ∂μ ∂ν := by
+    ∫ z, f z ∂μ.Prod ν = ∫ y, ∫ x, f (x, y) ∂μ ∂ν := by
   simp_rw [← integral_prod_swap f hf.ae_strongly_measurable]; exact integral_prod _ hf.swap
 #align measure_theory.integral_prod_symm MeasureTheory.integral_prod_symm
 
 #print MeasureTheory.integral_integral /-
 /-- Reversed version of **Fubini's Theorem**. -/
 theorem integral_integral {f : α → β → E} (hf : Integrable (uncurry f) (μ.Prod ν)) :
-    (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ z, f z.1 z.2 ∂μ.Prod ν :=
+    ∫ x, ∫ y, f x y ∂ν ∂μ = ∫ z, f z.1 z.2 ∂μ.Prod ν :=
   (integral_prod _ hf).symm
 #align measure_theory.integral_integral MeasureTheory.integral_integral
 -/
@@ -499,7 +498,7 @@ theorem integral_integral {f : α → β → E} (hf : Integrable (uncurry f) (μ
 #print MeasureTheory.integral_integral_symm /-
 /-- Reversed version of **Fubini's Theorem** (symmetric version). -/
 theorem integral_integral_symm {f : α → β → E} (hf : Integrable (uncurry f) (μ.Prod ν)) :
-    (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ z, f z.2 z.1 ∂ν.Prod μ :=
+    ∫ x, ∫ y, f x y ∂ν ∂μ = ∫ z, f z.2 z.1 ∂ν.Prod μ :=
   (integral_prod_symm _ hf.symm).symm
 #align measure_theory.integral_integral_symm MeasureTheory.integral_integral_symm
 -/
@@ -507,7 +506,7 @@ theorem integral_integral_symm {f : α → β → E} (hf : Integrable (uncurry f
 #print MeasureTheory.integral_integral_swap /-
 /-- Change the order of Bochner integration. -/
 theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncurry f) (μ.Prod ν)) :
-    (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ y, ∫ x, f x y ∂μ ∂ν :=
+    ∫ x, ∫ y, f x y ∂ν ∂μ = ∫ y, ∫ x, f x y ∂μ ∂ν :=
   (integral_integral hf).trans (integral_prod_symm _ hf)
 #align measure_theory.integral_integral_swap MeasureTheory.integral_integral_swap
 -/
@@ -517,14 +516,14 @@ theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncur
 /-- **Fubini's Theorem** for set integrals. -/
 theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
     (hf : IntegrableOn f (s ×ˢ t) (μ.Prod ν)) :
-    (∫ z in s ×ˢ t, f z ∂μ.Prod ν) = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ :=
+    ∫ z in s ×ˢ t, f z ∂μ.Prod ν = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ :=
   by
   simp only [← measure.prod_restrict s t, integrable_on] at hf ⊢
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
 
 theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) :
-    (∫ z, f z.1 * g z.2 ∂μ.Prod ν) = (∫ x, f x ∂μ) * ∫ y, g y ∂ν :=
+    ∫ z, f z.1 * g z.2 ∂μ.Prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν :=
   by
   by_cases h : integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν)
   · rw [integral_prod _ h]
@@ -538,9 +537,8 @@ theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L)
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 theorem set_integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
-    (t : Set β) :
-    (∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.Prod ν) = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν := by
-  simp only [← measure.prod_restrict s t, integrable_on, integral_prod_mul]
+    (t : Set β) : ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.Prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν :=
+  by simp only [← measure.prod_restrict s t, integrable_on, integral_prod_mul]
 #align measure_theory.set_integral_prod_mul MeasureTheory.set_integral_prod_mul
 
 end MeasureTheory
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module measure_theory.constructions.prod.integral
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit c20927220ef87bb4962ba08bf6da2ce3cf50a6dd
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.MeasureTheory.Integral.SetIntegral
 /-!
 # Integration with respect to the product measure
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we prove Fubini's theorem.
 
 ## Main results
Diff
@@ -181,15 +181,19 @@ theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type _} [TopologicalS
   exact hf.comp_measurable measurable_swap
 #align measure_theory.ae_strongly_measurable.prod_swap MeasureTheory.AEStronglyMeasurable.prod_swap
 
+#print MeasureTheory.AEStronglyMeasurable.fst /-
 theorem MeasureTheory.AEStronglyMeasurable.fst {γ} [TopologicalSpace γ] [SigmaFinite ν] {f : α → γ}
     (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable (fun z : α × β => f z.1) (μ.Prod ν) :=
   hf.comp_quasiMeasurePreserving quasiMeasurePreserving_fst
 #align measure_theory.ae_strongly_measurable.fst MeasureTheory.AEStronglyMeasurable.fst
+-/
 
+#print MeasureTheory.AEStronglyMeasurable.snd /-
 theorem MeasureTheory.AEStronglyMeasurable.snd {γ} [TopologicalSpace γ] [SigmaFinite ν] {f : β → γ}
     (hf : AEStronglyMeasurable f ν) : AEStronglyMeasurable (fun z : α × β => f z.2) (μ.Prod ν) :=
   hf.comp_quasiMeasurePreserving quasiMeasurePreserving_snd
 #align measure_theory.ae_strongly_measurable.snd MeasureTheory.AEStronglyMeasurable.snd
+-/
 
 /-- 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. -/
@@ -200,6 +204,7 @@ theorem MeasureTheory.AEStronglyMeasurable.integral_prod_right' [SigmaFinite ν]
     filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩
 #align measure_theory.ae_strongly_measurable.integral_prod_right' MeasureTheory.AEStronglyMeasurable.integral_prod_right'
 
+#print MeasureTheory.AEStronglyMeasurable.prod_mk_left /-
 theorem MeasureTheory.AEStronglyMeasurable.prod_mk_left {γ : Type _} [SigmaFinite ν]
     [TopologicalSpace γ] {f : α × β → γ} (hf : AEStronglyMeasurable f (μ.Prod ν)) :
     ∀ᵐ x ∂μ, AEStronglyMeasurable (fun y => f (x, y)) ν :=
@@ -208,6 +213,7 @@ theorem MeasureTheory.AEStronglyMeasurable.prod_mk_left {γ : Type _} [SigmaFini
   exact
     ⟨fun y => hf.mk f (x, y), hf.strongly_measurable_mk.comp_measurable measurable_prod_mk_left, hx⟩
 #align measure_theory.ae_strongly_measurable.prod_mk_left MeasureTheory.AEStronglyMeasurable.prod_mk_left
+-/
 
 end
 
@@ -479,23 +485,29 @@ theorem integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.Prod ν))
   simp_rw [← integral_prod_swap f hf.ae_strongly_measurable]; exact integral_prod _ hf.swap
 #align measure_theory.integral_prod_symm MeasureTheory.integral_prod_symm
 
+#print MeasureTheory.integral_integral /-
 /-- Reversed version of **Fubini's Theorem**. -/
 theorem integral_integral {f : α → β → E} (hf : Integrable (uncurry f) (μ.Prod ν)) :
     (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ z, f z.1 z.2 ∂μ.Prod ν :=
   (integral_prod _ hf).symm
 #align measure_theory.integral_integral MeasureTheory.integral_integral
+-/
 
+#print MeasureTheory.integral_integral_symm /-
 /-- Reversed version of **Fubini's Theorem** (symmetric version). -/
 theorem integral_integral_symm {f : α → β → E} (hf : Integrable (uncurry f) (μ.Prod ν)) :
     (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ z, f z.2 z.1 ∂ν.Prod μ :=
   (integral_prod_symm _ hf.symm).symm
 #align measure_theory.integral_integral_symm MeasureTheory.integral_integral_symm
+-/
 
+#print MeasureTheory.integral_integral_swap /-
 /-- Change the order of Bochner integration. -/
 theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncurry f) (μ.Prod ν)) :
     (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ y, ∫ x, f x y ∂μ ∂ν :=
   (integral_integral hf).trans (integral_prod_symm _ hf)
 #align measure_theory.integral_integral_swap MeasureTheory.integral_integral_swap
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
Diff
@@ -65,7 +65,7 @@ along one of the variables (using either the Lebesgue or Bochner integral) is me
 
 
 theorem measurableSet_integrable [SigmaFinite ν] ⦃f : α → β → E⦄
-    (hf : StronglyMeasurable (uncurry f)) : MeasurableSet { x | Integrable (f x) ν } :=
+    (hf : StronglyMeasurable (uncurry f)) : MeasurableSet {x | Integrable (f x) ν} :=
   by
   simp_rw [integrable, hf.of_uncurry_left.ae_strongly_measurable, true_and_iff]
   exact measurableSet_lt (Measurable.lintegral_prod_right hf.ennnorm) measurable_const
@@ -87,7 +87,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
   let s : ℕ → simple_func (α × β) E :=
     simple_func.approx_on _ hf.measurable (range (uncurry f) ∪ {0}) 0 (by simp)
   let s' : ℕ → α → simple_func β E := fun n x => (s n).comp (Prod.mk x) measurable_prod_mk_left
-  let f' : ℕ → α → E := fun n => { x | integrable (f x) ν }.indicator fun x => (s' n x).integral ν
+  let f' : ℕ → α → E := fun n => {x | integrable (f x) ν}.indicator fun x => (s' n x).integral ν
   have hf' : ∀ n, strongly_measurable (f' n) :=
     by
     intro n; refine' strongly_measurable.indicator _ (measurableSet_integrable hf)
@@ -197,14 +197,14 @@ theorem MeasureTheory.AEStronglyMeasurable.integral_prod_right' [SigmaFinite ν]
     [CompleteSpace E] ⦃f : α × β → E⦄ (hf : AEStronglyMeasurable f (μ.Prod ν)) :
     AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂ν) μ :=
   ⟨fun x => ∫ y, hf.mk f (x, y) ∂ν, hf.stronglyMeasurable_mk.integral_prod_right', by
-    filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk]with _ hx using integral_congr_ae hx⟩
+    filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩
 #align measure_theory.ae_strongly_measurable.integral_prod_right' MeasureTheory.AEStronglyMeasurable.integral_prod_right'
 
 theorem MeasureTheory.AEStronglyMeasurable.prod_mk_left {γ : Type _} [SigmaFinite ν]
     [TopologicalSpace γ] {f : α × β → γ} (hf : AEStronglyMeasurable f (μ.Prod ν)) :
     ∀ᵐ x ∂μ, AEStronglyMeasurable (fun y => f (x, y)) ν :=
   by
-  filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk]with x hx
+  filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk] with x hx
   exact
     ⟨fun y => hf.mk f (x, y), hf.strongly_measurable_mk.comp_measurable measurable_prod_mk_left, hx⟩
 #align measure_theory.ae_strongly_measurable.prod_mk_left MeasureTheory.AEStronglyMeasurable.prod_mk_left
@@ -264,8 +264,8 @@ theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AEStronglyMe
     intro x hx
     exact has_finite_integral_congr hx
   · apply has_finite_integral_congr
-    filter_upwards [ae_ae_of_ae_prod
-        h1f.ae_eq_mk.symm]with _ hx using integral_congr_ae (eventually_eq.fun_comp hx _)
+    filter_upwards [ae_ae_of_ae_prod h1f.ae_eq_mk.symm] with _ hx using
+      integral_congr_ae (eventually_eq.fun_comp hx _)
   · infer_instance
 #align measure_theory.has_finite_integral_prod_iff' MeasureTheory.hasFiniteIntegral_prod_iff'
 
@@ -360,7 +360,7 @@ theorem integral_fn_integral_add ⦃f g : α × β → E⦄ (F : E → E') (hf :
     (∫ x, F (∫ y, f (x, y) + g (x, y) ∂ν) ∂μ) = ∫ x, F ((∫ y, f (x, y) ∂ν) + ∫ y, g (x, y) ∂ν) ∂μ :=
   by
   refine' integral_congr_ae _
-  filter_upwards [hf.prod_right_ae, hg.prod_right_ae]with _ h2f h2g
+  filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
   simp [integral_add h2f h2g]
 #align measure_theory.integral_fn_integral_add MeasureTheory.integral_fn_integral_add
 
@@ -371,7 +371,7 @@ theorem integral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → E') (hf :
     (∫ x, F (∫ y, f (x, y) - g (x, y) ∂ν) ∂μ) = ∫ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ :=
   by
   refine' integral_congr_ae _
-  filter_upwards [hf.prod_right_ae, hg.prod_right_ae]with _ h2f h2g
+  filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
   simp [integral_sub h2f h2g]
 #align measure_theory.integral_fn_integral_sub MeasureTheory.integral_fn_integral_sub
 
@@ -383,7 +383,7 @@ theorem lintegral_fn_integral_sub ⦃f g : α × β → E⦄ (F : E → ℝ≥0
       ∫⁻ x, F ((∫ y, f (x, y) ∂ν) - ∫ y, g (x, y) ∂ν) ∂μ :=
   by
   refine' lintegral_congr_ae _
-  filter_upwards [hf.prod_right_ae, hg.prod_right_ae]with _ h2f h2g
+  filter_upwards [hf.prod_right_ae, hg.prod_right_ae] with _ h2f h2g
   simp [integral_sub h2f h2g]
 #align measure_theory.lintegral_fn_integral_sub MeasureTheory.lintegral_fn_integral_sub
 
Diff
@@ -126,7 +126,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
   Fubini's theorem is measurable. -/
 theorem MeasureTheory.StronglyMeasurable.integral_prod_right' [SigmaFinite ν] ⦃f : α × β → E⦄
     (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂ν := by
-  rw [← uncurry_curry f] at hf; exact hf.integral_prod_right
+  rw [← uncurry_curry f] at hf ; exact hf.integral_prod_right
 #align measure_theory.strongly_measurable.integral_prod_right' MeasureTheory.StronglyMeasurable.integral_prod_right'
 
 /-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
@@ -162,7 +162,7 @@ theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet
   simp_rw [has_finite_integral, ennnorm_eq_of_real to_real_nonneg]
   convert h2s.lt_top using 1; simp_rw [prod_apply hs]; apply lintegral_congr_ae
   refine' (ae_measure_lt_top hs h2s).mp _; apply eventually_of_forall; intro x hx
-  rw [lt_top_iff_ne_top] at hx; simp [of_real_to_real, hx]
+  rw [lt_top_iff_ne_top] at hx ; simp [of_real_to_real, hx]
 #align measure_theory.measure.integrable_measure_prod_mk_left MeasureTheory.Measure.integrable_measure_prod_mk_left
 
 end Measure
@@ -177,7 +177,7 @@ section
 
 theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type _} [TopologicalSpace γ]
     [SigmaFinite μ] [SigmaFinite ν] {f : β × α → γ} (hf : AEStronglyMeasurable f (ν.Prod μ)) :
-    AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) := by rw [← prod_swap] at hf;
+    AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) := by rw [← prod_swap] at hf ;
   exact hf.comp_measurable measurable_swap
 #align measure_theory.ae_strongly_measurable.prod_swap MeasureTheory.AEStronglyMeasurable.prod_swap
 
@@ -344,7 +344,7 @@ variable [SigmaFinite μ]
 theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ.Prod ν)) :
     (∫ z, f z.symm ∂ν.Prod μ) = ∫ z, f z ∂μ.Prod ν :=
   by
-  rw [← prod_swap] at hf
+  rw [← prod_swap] at hf 
   rw [← integral_map measurable_swap.ae_measurable hf, prod_swap]
 #align measure_theory.integral_prod_swap MeasureTheory.integral_prod_swap
 
@@ -504,7 +504,7 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
     (hf : IntegrableOn f (s ×ˢ t) (μ.Prod ν)) :
     (∫ z in s ×ˢ t, f z ∂μ.Prod ν) = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ :=
   by
-  simp only [← measure.prod_restrict s t, integrable_on] at hf⊢
+  simp only [← measure.prod_restrict s t, integrable_on] at hf ⊢
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
 
Diff
@@ -36,7 +36,7 @@ product measure, Fubini's theorem, Fubini-Tonelli theorem
 
 noncomputable section
 
-open Classical Topology ENNReal MeasureTheory
+open scoped Classical Topology ENNReal MeasureTheory
 
 open Set Function Real ENNReal
 
Diff
@@ -90,16 +90,11 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
   let f' : ℕ → α → E := fun n => { x | integrable (f x) ν }.indicator fun x => (s' n x).integral ν
   have hf' : ∀ n, strongly_measurable (f' n) :=
     by
-    intro n
-    refine' strongly_measurable.indicator _ (measurableSet_integrable hf)
+    intro n; refine' strongly_measurable.indicator _ (measurableSet_integrable hf)
     have : ∀ x, ((s' n x).range.filterₓ fun x => x ≠ 0) ⊆ (s n).range :=
       by
-      intro x
-      refine' Finset.Subset.trans (Finset.filter_subset _ _) _
-      intro y
-      simp_rw [simple_func.mem_range]
-      rintro ⟨z, rfl⟩
-      exact ⟨(x, z), rfl⟩
+      intro x; refine' Finset.Subset.trans (Finset.filter_subset _ _) _; intro y
+      simp_rw [simple_func.mem_range]; rintro ⟨z, rfl⟩; exact ⟨(x, z), rfl⟩
     simp only [simple_func.integral_eq_sum_of_subset (this _)]
     refine' Finset.stronglyMeasurable_sum _ fun x _ => _
     refine' (Measurable.ennreal_toReal _).StronglyMeasurable.smul_const _
@@ -108,16 +103,12 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
     exact (s n).measurableSet_fiber x
   have h2f' : tendsto f' at_top (𝓝 fun x : α => ∫ y : β, f x y ∂ν) :=
     by
-    rw [tendsto_pi_nhds]
-    intro x
+    rw [tendsto_pi_nhds]; intro x
     by_cases hfx : integrable (f x) ν
     · have : ∀ n, integrable (s' n x) ν := by
-        intro n
-        apply (hfx.norm.add hfx.norm).mono' (s' n x).AEStronglyMeasurable
-        apply eventually_of_forall
-        intro y
-        simp_rw [s', simple_func.coe_comp]
-        exact simple_func.norm_approx_on_zero_le _ _ (x, y) n
+        intro n; apply (hfx.norm.add hfx.norm).mono' (s' n x).AEStronglyMeasurable
+        apply eventually_of_forall; intro y
+        simp_rw [s', simple_func.coe_comp]; exact simple_func.norm_approx_on_zero_le _ _ (x, y) n
       simp only [f', hfx, simple_func.integral_eq_integral _ (this _), indicator_of_mem,
         mem_set_of_eq]
       refine'
@@ -134,10 +125,8 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
 /-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
   Fubini's theorem is measurable. -/
 theorem MeasureTheory.StronglyMeasurable.integral_prod_right' [SigmaFinite ν] ⦃f : α × β → E⦄
-    (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂ν :=
-  by
-  rw [← uncurry_curry f] at hf
-  exact hf.integral_prod_right
+    (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂ν := by
+  rw [← uncurry_curry f] at hf; exact hf.integral_prod_right
 #align measure_theory.strongly_measurable.integral_prod_right' MeasureTheory.StronglyMeasurable.integral_prod_right'
 
 /-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
@@ -188,9 +177,7 @@ section
 
 theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type _} [TopologicalSpace γ]
     [SigmaFinite μ] [SigmaFinite ν] {f : β × α → γ} (hf : AEStronglyMeasurable f (ν.Prod μ)) :
-    AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) :=
-  by
-  rw [← prod_swap] at hf
+    AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) := by rw [← prod_swap] at hf;
   exact hf.comp_measurable measurable_swap
 #align measure_theory.ae_strongly_measurable.prod_swap MeasureTheory.AEStronglyMeasurable.prod_swap
 
@@ -241,10 +228,7 @@ theorem Integrable.swap [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrab
 
 theorem integrable_swap_iff [SigmaFinite μ] ⦃f : α × β → E⦄ :
     Integrable (f ∘ Prod.swap) (ν.Prod μ) ↔ Integrable f (μ.Prod ν) :=
-  ⟨fun hf => by
-    convert hf.swap
-    ext ⟨x, y⟩
-    rfl, fun hf => hf.symm⟩
+  ⟨fun hf => by convert hf.swap; ext ⟨x, y⟩; rfl, fun hf => hf.symm⟩
 #align measure_theory.integrable_swap_iff MeasureTheory.integrable_swap_iff
 
 theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasurable f) :
@@ -261,18 +245,10 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
   have : ∀ {p q r : Prop} (h1 : r → p), (r ↔ p ∧ q) ↔ p → (r ↔ q) := fun p q r h1 => by
     rw [← and_congr_right_iff, and_iff_right_of_imp h1]
   rw [this]
-  · intro h2f
-    rw [lintegral_congr_ae]
-    refine' h2f.mp _
-    apply eventually_of_forall
-    intro x hx
-    dsimp only
-    rw [of_real_to_real]
-    rw [← lt_top_iff_ne_top]
-    exact hx
-  · intro h2f
-    refine' ae_lt_top _ h2f.ne
-    exact h1f.ennnorm.lintegral_prod_right'
+  · intro h2f; rw [lintegral_congr_ae]
+    refine' h2f.mp _; apply eventually_of_forall; intro x hx; dsimp only
+    rw [of_real_to_real]; rw [← lt_top_iff_ne_top]; exact hx
+  · intro h2f; refine' ae_lt_top _ h2f.ne; exact h1f.ennnorm.lintegral_prod_right'
 #align measure_theory.has_finite_integral_prod_iff MeasureTheory.hasFiniteIntegral_prod_iff
 
 theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable f (μ.Prod ν)) :
@@ -309,9 +285,7 @@ theorem integrable_prod_iff' [SigmaFinite μ] ⦃f : α × β → E⦄
     (h1f : AEStronglyMeasurable f (μ.Prod ν)) :
     Integrable f (μ.Prod ν) ↔
       (∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ) ∧ Integrable (fun y => ∫ x, ‖f (x, y)‖ ∂μ) ν :=
-  by
-  convert integrable_prod_iff h1f.prod_swap using 1
-  rw [integrable_swap_iff]
+  by convert integrable_prod_iff h1f.prod_swap using 1; rw [integrable_swap_iff]
 #align measure_theory.integrable_prod_iff' MeasureTheory.integrable_prod_iff'
 
 theorem Integrable.prod_left_ae [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
@@ -489,13 +463,11 @@ theorem integral_prod :
   · intro f g hfg i_f i_g hf hg
     simp_rw [integral_add' i_f i_g, integral_integral_add' i_f i_g, hf, hg]
   · exact isClosed_eq continuous_integral continuous_integral_integral
-  · intro f g hfg i_f hf
-    convert hf using 1
+  · intro f g hfg i_f hf; convert hf using 1
     · exact integral_congr_ae hfg.symm
     · refine' integral_congr_ae _
       refine' (ae_ae_of_ae_prod hfg).mp _
-      apply eventually_of_forall
-      intro x hfgx
+      apply eventually_of_forall; intro x hfgx
       exact integral_congr_ae (ae_eq_symm hfgx)
 #align measure_theory.integral_prod MeasureTheory.integral_prod
 
@@ -503,10 +475,8 @@ theorem integral_prod :
   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 integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.Prod ν)) :
-    (∫ z, f z ∂μ.Prod ν) = ∫ y, ∫ x, f (x, y) ∂μ ∂ν :=
-  by
-  simp_rw [← integral_prod_swap f hf.ae_strongly_measurable]
-  exact integral_prod _ hf.swap
+    (∫ z, f z ∂μ.Prod ν) = ∫ y, ∫ x, f (x, y) ∂μ ∂ν := by
+  simp_rw [← integral_prod_swap f hf.ae_strongly_measurable]; exact integral_prod _ hf.swap
 #align measure_theory.integral_prod_symm MeasureTheory.integral_prod_symm
 
 /-- Reversed version of **Fubini's Theorem**. -/
Diff
@@ -113,7 +113,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
     by_cases hfx : integrable (f x) ν
     · have : ∀ n, integrable (s' n x) ν := by
         intro n
-        apply (hfx.norm.add hfx.norm).mono' (s' n x).AeStronglyMeasurable
+        apply (hfx.norm.add hfx.norm).mono' (s' n x).AEStronglyMeasurable
         apply eventually_of_forall
         intro y
         simp_rw [s', simple_func.coe_comp]
@@ -122,7 +122,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
         mem_set_of_eq]
       refine'
         tendsto_integral_of_dominated_convergence (fun y => ‖f x y‖ + ‖f x y‖)
-          (fun n => (s' n x).AeStronglyMeasurable) (hfx.norm.add hfx.norm) _ _
+          (fun n => (s' n x).AEStronglyMeasurable) (hfx.norm.add hfx.norm) _ _
       · exact fun n => eventually_of_forall fun y => simple_func.norm_approx_on_zero_le _ _ (x, y) n
       · refine' eventually_of_forall fun y => simple_func.tendsto_approx_on _ _ _
         apply subset_closure
@@ -169,7 +169,7 @@ variable [SigmaFinite ν]
 theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet s)
     (h2s : (μ.Prod ν) s ≠ ∞) : Integrable (fun x => (ν (Prod.mk x ⁻¹' s)).toReal) μ :=
   by
-  refine' ⟨(measurable_measure_prod_mk_left hs).ennreal_toReal.AEMeasurable.AeStronglyMeasurable, _⟩
+  refine' ⟨(measurable_measure_prod_mk_left hs).ennreal_toReal.AEMeasurable.AEStronglyMeasurable, _⟩
   simp_rw [has_finite_integral, ennnorm_eq_of_real to_real_nonneg]
   convert h2s.lt_top using 1; simp_rw [prod_apply hs]; apply lintegral_congr_ae
   refine' (ae_measure_lt_top hs h2s).mp _; apply eventually_of_forall; intro x hx
@@ -186,41 +186,41 @@ open MeasureTheory.Measure
 
 section
 
-theorem MeasureTheory.AeStronglyMeasurable.prod_swap {γ : Type _} [TopologicalSpace γ]
-    [SigmaFinite μ] [SigmaFinite ν] {f : β × α → γ} (hf : AeStronglyMeasurable f (ν.Prod μ)) :
-    AeStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) :=
+theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type _} [TopologicalSpace γ]
+    [SigmaFinite μ] [SigmaFinite ν] {f : β × α → γ} (hf : AEStronglyMeasurable f (ν.Prod μ)) :
+    AEStronglyMeasurable (fun z : α × β => f z.symm) (μ.Prod ν) :=
   by
   rw [← prod_swap] at hf
   exact hf.comp_measurable measurable_swap
-#align measure_theory.ae_strongly_measurable.prod_swap MeasureTheory.AeStronglyMeasurable.prod_swap
+#align measure_theory.ae_strongly_measurable.prod_swap MeasureTheory.AEStronglyMeasurable.prod_swap
 
-theorem MeasureTheory.AeStronglyMeasurable.fst {γ} [TopologicalSpace γ] [SigmaFinite ν] {f : α → γ}
-    (hf : AeStronglyMeasurable f μ) : AeStronglyMeasurable (fun z : α × β => f z.1) (μ.Prod ν) :=
+theorem MeasureTheory.AEStronglyMeasurable.fst {γ} [TopologicalSpace γ] [SigmaFinite ν] {f : α → γ}
+    (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable (fun z : α × β => f z.1) (μ.Prod ν) :=
   hf.comp_quasiMeasurePreserving quasiMeasurePreserving_fst
-#align measure_theory.ae_strongly_measurable.fst MeasureTheory.AeStronglyMeasurable.fst
+#align measure_theory.ae_strongly_measurable.fst MeasureTheory.AEStronglyMeasurable.fst
 
-theorem MeasureTheory.AeStronglyMeasurable.snd {γ} [TopologicalSpace γ] [SigmaFinite ν] {f : β → γ}
-    (hf : AeStronglyMeasurable f ν) : AeStronglyMeasurable (fun z : α × β => f z.2) (μ.Prod ν) :=
+theorem MeasureTheory.AEStronglyMeasurable.snd {γ} [TopologicalSpace γ] [SigmaFinite ν] {f : β → γ}
+    (hf : AEStronglyMeasurable f ν) : AEStronglyMeasurable (fun z : α × β => f z.2) (μ.Prod ν) :=
   hf.comp_quasiMeasurePreserving quasiMeasurePreserving_snd
-#align measure_theory.ae_strongly_measurable.snd MeasureTheory.AeStronglyMeasurable.snd
+#align measure_theory.ae_strongly_measurable.snd MeasureTheory.AEStronglyMeasurable.snd
 
 /-- 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 MeasureTheory.AeStronglyMeasurable.integral_prod_right' [SigmaFinite ν] [NormedSpace ℝ E]
-    [CompleteSpace E] ⦃f : α × β → E⦄ (hf : AeStronglyMeasurable f (μ.Prod ν)) :
-    AeStronglyMeasurable (fun x => ∫ y, f (x, y) ∂ν) μ :=
+theorem MeasureTheory.AEStronglyMeasurable.integral_prod_right' [SigmaFinite ν] [NormedSpace ℝ E]
+    [CompleteSpace E] ⦃f : α × β → E⦄ (hf : AEStronglyMeasurable f (μ.Prod ν)) :
+    AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂ν) μ :=
   ⟨fun x => ∫ y, hf.mk f (x, y) ∂ν, hf.stronglyMeasurable_mk.integral_prod_right', by
     filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk]with _ hx using integral_congr_ae hx⟩
-#align measure_theory.ae_strongly_measurable.integral_prod_right' MeasureTheory.AeStronglyMeasurable.integral_prod_right'
+#align measure_theory.ae_strongly_measurable.integral_prod_right' MeasureTheory.AEStronglyMeasurable.integral_prod_right'
 
-theorem MeasureTheory.AeStronglyMeasurable.prod_mk_left {γ : Type _} [SigmaFinite ν]
-    [TopologicalSpace γ] {f : α × β → γ} (hf : AeStronglyMeasurable f (μ.Prod ν)) :
-    ∀ᵐ x ∂μ, AeStronglyMeasurable (fun y => f (x, y)) ν :=
+theorem MeasureTheory.AEStronglyMeasurable.prod_mk_left {γ : Type _} [SigmaFinite ν]
+    [TopologicalSpace γ] {f : α × β → γ} (hf : AEStronglyMeasurable f (μ.Prod ν)) :
+    ∀ᵐ x ∂μ, AEStronglyMeasurable (fun y => f (x, y)) ν :=
   by
   filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk]with x hx
   exact
     ⟨fun y => hf.mk f (x, y), hf.strongly_measurable_mk.comp_measurable measurable_prod_mk_left, hx⟩
-#align measure_theory.ae_strongly_measurable.prod_mk_left MeasureTheory.AeStronglyMeasurable.prod_mk_left
+#align measure_theory.ae_strongly_measurable.prod_mk_left MeasureTheory.AEStronglyMeasurable.prod_mk_left
 
 end
 
@@ -235,8 +235,8 @@ section
 
 theorem Integrable.swap [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     Integrable (f ∘ Prod.swap) (ν.Prod μ) :=
-  ⟨hf.AeStronglyMeasurable.prod_swap,
-    (lintegral_prod_swap _ hf.AeStronglyMeasurable.ennnorm : _).le.trans_lt hf.HasFiniteIntegral⟩
+  ⟨hf.AEStronglyMeasurable.prod_swap,
+    (lintegral_prod_swap _ hf.AEStronglyMeasurable.ennnorm : _).le.trans_lt hf.HasFiniteIntegral⟩
 #align measure_theory.integrable.swap MeasureTheory.Integrable.swap
 
 theorem integrable_swap_iff [SigmaFinite μ] ⦃f : α × β → E⦄ :
@@ -255,7 +255,7 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
   simp only [has_finite_integral, lintegral_prod_of_measurable _ h1f.ennnorm]
   have : ∀ x, ∀ᵐ y ∂ν, 0 ≤ ‖f (x, y)‖ := fun x => eventually_of_forall fun y => norm_nonneg _
   simp_rw [integral_eq_lintegral_of_nonneg_ae (this _)
-      (h1f.norm.comp_measurable measurable_prod_mk_left).AeStronglyMeasurable,
+      (h1f.norm.comp_measurable measurable_prod_mk_left).AEStronglyMeasurable,
     ennnorm_eq_of_real to_real_nonneg, ofReal_norm_eq_coe_nnnorm]
   -- this fact is probably too specialized to be its own lemma
   have : ∀ {p q r : Prop} (h1 : r → p), (r ↔ p ∧ q) ↔ p → (r ↔ q) := fun p q r h1 => by
@@ -275,7 +275,7 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
     exact h1f.ennnorm.lintegral_prod_right'
 #align measure_theory.has_finite_integral_prod_iff MeasureTheory.hasFiniteIntegral_prod_iff
 
-theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AeStronglyMeasurable f (μ.Prod ν)) :
+theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable f (μ.Prod ν)) :
     HasFiniteIntegral f (μ.Prod ν) ↔
       (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
         HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ :=
@@ -295,7 +295,7 @@ theorem hasFiniteIntegral_prod_iff' ⦃f : α × β → E⦄ (h1f : AeStronglyMe
 
 /-- 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 integrable_prod_iff ⦃f : α × β → E⦄ (h1f : AeStronglyMeasurable f (μ.Prod ν)) :
+theorem integrable_prod_iff ⦃f : α × β → E⦄ (h1f : AEStronglyMeasurable f (μ.Prod ν)) :
     Integrable f (μ.Prod ν) ↔
       (∀ᵐ x ∂μ, Integrable (fun y => f (x, y)) ν) ∧ Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ :=
   by
@@ -306,7 +306,7 @@ theorem integrable_prod_iff ⦃f : α × β → E⦄ (h1f : AeStronglyMeasurable
 /-- 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 integrable_prod_iff' [SigmaFinite μ] ⦃f : α × β → E⦄
-    (h1f : AeStronglyMeasurable f (μ.Prod ν)) :
+    (h1f : AEStronglyMeasurable f (μ.Prod ν)) :
     Integrable f (μ.Prod ν) ↔
       (∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ) ∧ Integrable (fun y => ∫ x, ‖f (x, y)‖ ∂μ) ν :=
   by
@@ -316,7 +316,7 @@ theorem integrable_prod_iff' [SigmaFinite μ] ⦃f : α × β → E⦄
 
 theorem Integrable.prod_left_ae [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     ∀ᵐ y ∂ν, Integrable (fun x => f (x, y)) μ :=
-  ((integrable_prod_iff' hf.AeStronglyMeasurable).mp hf).1
+  ((integrable_prod_iff' hf.AEStronglyMeasurable).mp hf).1
 #align measure_theory.integrable.prod_left_ae MeasureTheory.Integrable.prod_left_ae
 
 theorem Integrable.prod_right_ae [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
@@ -326,7 +326,7 @@ theorem Integrable.prod_right_ae [SigmaFinite μ] ⦃f : α × β → E⦄ (hf :
 
 theorem Integrable.integral_norm_prod_left ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     Integrable (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ :=
-  ((integrable_prod_iff hf.AeStronglyMeasurable).mp hf).2
+  ((integrable_prod_iff hf.AEStronglyMeasurable).mp hf).2
 #align measure_theory.integrable.integral_norm_prod_left MeasureTheory.Integrable.integral_norm_prod_left
 
 theorem Integrable.integral_norm_prod_right [SigmaFinite μ] ⦃f : α × β → E⦄
@@ -349,7 +349,7 @@ variable [NormedSpace ℝ E] [CompleteSpace E]
 
 theorem Integrable.integral_prod_left ⦃f : α × β → E⦄ (hf : Integrable f (μ.Prod ν)) :
     Integrable (fun x => ∫ y, f (x, y) ∂ν) μ :=
-  Integrable.mono hf.integral_norm_prod_left hf.AeStronglyMeasurable.integral_prod_right' <|
+  Integrable.mono hf.integral_norm_prod_left hf.AEStronglyMeasurable.integral_prod_right' <|
     eventually_of_forall fun x =>
       (norm_integral_le_integral_norm _).trans_eq <|
         (norm_of_nonneg <|
@@ -367,7 +367,7 @@ theorem Integrable.integral_prod_right [SigmaFinite μ] ⦃f : α × β → E⦄
 
 variable [SigmaFinite μ]
 
-theorem integral_prod_swap (f : α × β → E) (hf : AeStronglyMeasurable f (μ.Prod ν)) :
+theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ.Prod ν)) :
     (∫ z, f z.symm ∂ν.Prod μ) = ∫ z, f z ∂μ.Prod ν :=
   by
   rw [← prod_swap] at hf
Diff
@@ -102,7 +102,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
       exact ⟨(x, z), rfl⟩
     simp only [simple_func.integral_eq_sum_of_subset (this _)]
     refine' Finset.stronglyMeasurable_sum _ fun x _ => _
-    refine' (Measurable.eNNReal_toReal _).StronglyMeasurable.smul_const _
+    refine' (Measurable.ennreal_toReal _).StronglyMeasurable.smul_const _
     simp (config := { singlePass := true }) only [simple_func.coe_comp, preimage_comp]
     apply measurable_measure_prod_mk_left
     exact (s n).measurableSet_fiber x
@@ -169,7 +169,7 @@ variable [SigmaFinite ν]
 theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet s)
     (h2s : (μ.Prod ν) s ≠ ∞) : Integrable (fun x => (ν (Prod.mk x ⁻¹' s)).toReal) μ :=
   by
-  refine' ⟨(measurable_measure_prod_mk_left hs).eNNReal_toReal.AEMeasurable.AeStronglyMeasurable, _⟩
+  refine' ⟨(measurable_measure_prod_mk_left hs).ennreal_toReal.AEMeasurable.AeStronglyMeasurable, _⟩
   simp_rw [has_finite_integral, ennnorm_eq_of_real to_real_nonneg]
   convert h2s.lt_top using 1; simp_rw [prod_apply hs]; apply lintegral_congr_ae
   refine' (ae_measure_lt_top hs h2s).mp _; apply eventually_of_forall; intro x hx

Changes in mathlib4

mathlib3
mathlib4
chore: replace set_integral with setIntegral (#12215)

Done with a global search and replace, and then (to fix the #align lines), replace (#align \S*)setIntegral with $1set_integral.

Diff
@@ -457,7 +457,7 @@ theorem integral_prod (f : α × β → E) (hf : Integrable f (μ.prod ν)) :
   apply Integrable.induction
   · intro c s hs h2s
     simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
-      integral_indicator (measurable_prod_mk_left hs), set_integral_const, integral_smul_const,
+      integral_indicator (measurable_prod_mk_left hs), setIntegral_const, integral_smul_const,
       integral_toReal (measurable_measure_prod_mk_left hs).aemeasurable
         (ae_measure_lt_top hs h2s.ne)]
     -- Porting note: was `simp_rw`
@@ -498,12 +498,16 @@ theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncur
 #align measure_theory.integral_integral_swap MeasureTheory.integral_integral_swap
 
 /-- **Fubini's Theorem** for set integrals. -/
-theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
+theorem setIntegral_prod (f : α × β → E) {s : Set α} {t : Set β}
     (hf : IntegrableOn f (s ×ˢ t) (μ.prod ν)) :
     ∫ z in s ×ˢ t, f z ∂μ.prod ν = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ := by
   simp only [← Measure.prod_restrict s t, IntegrableOn] at hf ⊢
   exact integral_prod f hf
-#align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
+#align measure_theory.set_integral_prod MeasureTheory.setIntegral_prod
+
+@[deprecated]
+alias set_integral_prod :=
+  setIntegral_prod -- deprecated on 2024-04-17
 
 theorem integral_prod_smul {𝕜 : Type*} [RCLike 𝕜] [NormedSpace 𝕜 E] (f : α → 𝕜) (g : β → E) :
     ∫ z, f z.1 • g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) • ∫ y, g y ∂ν := by
@@ -521,13 +525,17 @@ theorem integral_prod_mul {L : Type*} [RCLike L] (f : α → L) (g : β → L) :
   integral_prod_smul f g
 #align measure_theory.integral_prod_mul MeasureTheory.integral_prod_mul
 
-theorem set_integral_prod_mul {L : Type*} [RCLike L] (f : α → L) (g : β → L) (s : Set α)
+theorem setIntegral_prod_mul {L : Type*} [RCLike L] (f : α → L) (g : β → L) (s : Set α)
     (t : Set β) :
     ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν := by
   -- Porting note: added
   rw [← Measure.prod_restrict s t]
   apply integral_prod_mul
-#align measure_theory.set_integral_prod_mul MeasureTheory.set_integral_prod_mul
+#align measure_theory.set_integral_prod_mul MeasureTheory.setIntegral_prod_mul
+
+@[deprecated]
+alias set_integral_prod_mul :=
+  setIntegral_prod_mul -- deprecated on 2024-04-17
 
 theorem integral_fun_snd (f : β → E) : ∫ z, f z.2 ∂μ.prod ν = (μ univ).toReal • ∫ y, f y ∂ν := by
   simpa using integral_prod_smul (1 : α → ℝ) f
@@ -556,12 +564,12 @@ lemma integral_integral_swap_of_hasCompactSupport
   calc
   ∫ x, (∫ y, f x y ∂ν) ∂μ = ∫ x, (∫ y in V, f x y ∂ν) ∂μ := by
     congr 1 with x
-    apply (set_integral_eq_integral_of_forall_compl_eq_zero (fun y hy ↦ ?_)).symm
+    apply (setIntegral_eq_integral_of_forall_compl_eq_zero (fun y hy ↦ ?_)).symm
     contrapose! hy
     have : (x, y) ∈ Function.support f.uncurry := hy
     exact mem_image_of_mem _ (subset_tsupport _ this)
   _ = ∫ x in U, (∫ y in V, f x y ∂ν) ∂μ := by
-    apply (set_integral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)).symm
+    apply (setIntegral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)).symm
     have : ∀ y, f x y = 0 := by
       intro y
       contrapose! hx
@@ -575,7 +583,7 @@ lemma integral_integral_swap_of_hasCompactSupport
     obtain ⟨C, hC⟩ : ∃ C, ∀ p, ‖f.uncurry p‖ ≤ C := hf.bounded_above_of_compact_support h'f
     exact hasFiniteIntegral_of_bounded (C := C) (eventually_of_forall hC)
   _ = ∫ y, (∫ x in U, f x y ∂μ) ∂ν := by
-    apply set_integral_eq_integral_of_forall_compl_eq_zero (fun y hy ↦ ?_)
+    apply setIntegral_eq_integral_of_forall_compl_eq_zero (fun y hy ↦ ?_)
     have : ∀ x, f x y = 0 := by
       intro x
       contrapose! hy
@@ -584,7 +592,7 @@ lemma integral_integral_swap_of_hasCompactSupport
     simp [this]
   _ = ∫ y, (∫ x, f x y ∂μ) ∂ν := by
     congr 1 with y
-    apply set_integral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)
+    apply setIntegral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)
     contrapose! hx
     have : (x, y) ∈ Function.support f.uncurry := hx
     exact mem_image_of_mem _ (subset_tsupport _ this)
chore: resolve some simp-related porting notes (#12074)

In all cases, the original proof works now. I presume this is due to simp changes in Lean 4.7, but haven't verified.

Diff
@@ -234,9 +234,7 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
     HasFiniteIntegral f (μ.prod ν) ↔
       (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
         HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ := by
-  simp only [HasFiniteIntegral]
-  -- porting note (#10745): was `simp`
-  rw [lintegral_prod_of_measurable _ h1f.ennnorm]
+  simp only [HasFiniteIntegral, lintegral_prod_of_measurable _ h1f.ennnorm]
   have (x) : ∀ᵐ y ∂ν, 0 ≤ ‖f (x, y)‖ := by filter_upwards with y using norm_nonneg _
   simp_rw [integral_eq_lintegral_of_nonneg_ae (this _)
       (h1f.norm.comp_measurable measurable_prod_mk_left).aestronglyMeasurable,
chore: Rename IsROrC to RCLike (#10819)

IsROrC contains data, which goes against the expectation that classes prefixed with Is are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC to RCLike.

Diff
@@ -314,7 +314,7 @@ theorem Integrable.prod_smul {𝕜 : Type*} [NontriviallyNormedField 𝕜] [Norm
   · exact eventually_of_forall fun x => hg.smul (f x)
   · simpa only [norm_smul, integral_mul_left] using hf.norm.mul_const _
 
-theorem Integrable.prod_mul {L : Type*} [IsROrC L] {f : α → L} {g : β → L} (hf : Integrable f μ)
+theorem Integrable.prod_mul {L : Type*} [RCLike L] {f : α → L} {g : β → L} (hf : Integrable f μ)
     (hg : Integrable g ν) : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν) :=
   hf.prod_smul hg
 #align measure_theory.integrable_prod_mul MeasureTheory.Integrable.prod_mul
@@ -507,7 +507,7 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
 
-theorem integral_prod_smul {𝕜 : Type*} [IsROrC 𝕜] [NormedSpace 𝕜 E] (f : α → 𝕜) (g : β → E) :
+theorem integral_prod_smul {𝕜 : Type*} [RCLike 𝕜] [NormedSpace 𝕜 E] (f : α → 𝕜) (g : β → E) :
     ∫ z, f z.1 • g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) • ∫ y, g y ∂ν := by
   by_cases hE : CompleteSpace E; swap; · simp [integral, hE]
   by_cases h : Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν)
@@ -518,12 +518,12 @@ theorem integral_prod_smul {𝕜 : Type*} [IsROrC 𝕜] [NormedSpace 𝕜 E] (f
     exact h.1.prod_smul h.2
   cases' H with H H <;> simp [integral_undef h, integral_undef H]
 
-theorem integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β → L) :
+theorem integral_prod_mul {L : Type*} [RCLike L] (f : α → L) (g : β → L) :
     ∫ z, f z.1 * g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν :=
   integral_prod_smul f g
 #align measure_theory.integral_prod_mul MeasureTheory.integral_prod_mul
 
-theorem set_integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
+theorem set_integral_prod_mul {L : Type*} [RCLike L] (f : α → L) (g : β → L) (s : Set α)
     (t : Set β) :
     ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν := by
   -- Porting note: added
chore: golf using filter_upwards (#11208)

This is presumably not exhaustive, but covers about a hundred instances.

Style opinions (e.g., why a particular change is great/not a good idea) are very welcome; I'm still forming my own.

Diff
@@ -98,9 +98,9 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
   have h2f' : Tendsto f' atTop (𝓝 fun x : α => ∫ y : β, f x y ∂ν) := by
     rw [tendsto_pi_nhds]; intro x
     by_cases hfx : Integrable (f x) ν
-    · have : ∀ n, Integrable (s' n x) ν := by
-        intro n; apply (hfx.norm.add hfx.norm).mono' (s' n x).aestronglyMeasurable
-        apply eventually_of_forall; intro y
+    · have (n) : Integrable (s' n x) ν := by
+        apply (hfx.norm.add hfx.norm).mono' (s' n x).aestronglyMeasurable
+        filter_upwards with y
         simp_rw [s', SimpleFunc.coe_comp]; exact SimpleFunc.norm_approxOn_zero_le _ _ (x, y) n
       simp only [f', hfx, SimpleFunc.integral_eq_integral _ (this _), indicator_of_mem,
         mem_setOf_eq]
@@ -162,7 +162,7 @@ theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet
   -- Porting note: was `simp_rw`
   rw [prod_apply hs]
   apply lintegral_congr_ae
-  refine' (ae_measure_lt_top hs h2s).mp _; apply eventually_of_forall; intro x hx
+  filter_upwards [ae_measure_lt_top hs h2s] with x hx
   rw [lt_top_iff_ne_top] at hx; simp [ofReal_toReal, hx]
 #align measure_theory.measure.integrable_measure_prod_mk_left MeasureTheory.Measure.integrable_measure_prod_mk_left
 
@@ -237,7 +237,7 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
   simp only [HasFiniteIntegral]
   -- porting note (#10745): was `simp`
   rw [lintegral_prod_of_measurable _ h1f.ennnorm]
-  have : ∀ x, ∀ᵐ y ∂ν, 0 ≤ ‖f (x, y)‖ := fun x => eventually_of_forall fun y => norm_nonneg _
+  have (x) : ∀ᵐ y ∂ν, 0 ≤ ‖f (x, y)‖ := by filter_upwards with y using norm_nonneg _
   simp_rw [integral_eq_lintegral_of_nonneg_ae (this _)
       (h1f.norm.comp_measurable measurable_prod_mk_left).aestronglyMeasurable,
     ennnorm_eq_ofReal toReal_nonneg, ofReal_norm_eq_coe_nnnorm]
@@ -246,7 +246,7 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
     rw [← and_congr_right_iff, and_iff_right_of_imp h1]
   rw [this]
   · intro h2f; rw [lintegral_congr_ae]
-    refine' h2f.mp _; apply eventually_of_forall; intro x hx; dsimp only
+    filter_upwards [h2f] with x hx
     rw [ofReal_toReal]; rw [← lt_top_iff_ne_top]; exact hx
   · intro h2f; refine' ae_lt_top _ h2f.ne; exact h1f.ennnorm.lintegral_prod_right'
 #align measure_theory.has_finite_integral_prod_iff MeasureTheory.hasFiniteIntegral_prod_iff
@@ -469,10 +469,8 @@ theorem integral_prod (f : α × β → E) (hf : Integrable f (μ.prod ν)) :
   · exact isClosed_eq continuous_integral continuous_integral_integral
   · rintro f g hfg - hf; convert hf using 1
     · exact integral_congr_ae hfg.symm
-    · refine' integral_congr_ae _
-      refine' (ae_ae_of_ae_prod hfg).mp _
-      apply eventually_of_forall; intro x hfgx
-      exact integral_congr_ae (ae_eq_symm hfgx)
+    · apply integral_congr_ae
+      filter_upwards [ae_ae_of_ae_prod hfg] with x hfgx using integral_congr_ae (ae_eq_symm hfgx)
 #align measure_theory.integral_prod MeasureTheory.integral_prod
 
 /-- Symmetric version of **Fubini's Theorem**: For integrable functions on `α × β`,
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -48,13 +48,9 @@ open TopologicalSpace
 open Filter hiding prod_eq map
 
 variable {α α' β β' γ E : Type*}
-
 variable [MeasurableSpace α] [MeasurableSpace α'] [MeasurableSpace β] [MeasurableSpace β']
-
 variable [MeasurableSpace γ]
-
 variable {μ μ' : Measure α} {ν ν' : Measure β} {τ : Measure γ}
-
 variable [NormedAddCommGroup E]
 
 /-! ### Measurability
chore: move Mathlib to v4.7.0-rc1 (#11162)

This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0 branch as we update to intermediate nightlies.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>

Diff
@@ -96,7 +96,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
     simp only [SimpleFunc.integral_eq_sum_of_subset (this _)]
     refine' Finset.stronglyMeasurable_sum _ fun x _ => _
     refine' (Measurable.ennreal_toReal _).stronglyMeasurable.smul_const _
-    simp only [SimpleFunc.coe_comp, preimage_comp]
+    simp only [s', SimpleFunc.coe_comp, preimage_comp]
     apply measurable_measure_prod_mk_left
     exact (s n).measurableSet_fiber x
   have h2f' : Tendsto f' atTop (𝓝 fun x : α => ∫ y : β, f x y ∂ν) := by
@@ -105,8 +105,8 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
     · have : ∀ n, Integrable (s' n x) ν := by
         intro n; apply (hfx.norm.add hfx.norm).mono' (s' n x).aestronglyMeasurable
         apply eventually_of_forall; intro y
-        simp_rw [SimpleFunc.coe_comp]; exact SimpleFunc.norm_approxOn_zero_le _ _ (x, y) n
-      simp only [hfx, SimpleFunc.integral_eq_integral _ (this _), indicator_of_mem,
+        simp_rw [s', SimpleFunc.coe_comp]; exact SimpleFunc.norm_approxOn_zero_le _ _ (x, y) n
+      simp only [f', hfx, SimpleFunc.integral_eq_integral _ (this _), indicator_of_mem,
         mem_setOf_eq]
       refine'
         tendsto_integral_of_dominated_convergence (fun y => ‖f x y‖ + ‖f x y‖)
@@ -121,7 +121,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
         · simp
         apply subset_closure
         simp [-uncurry_apply_pair]
-    · simp [hfx, integral_undef]
+    · simp [f', hfx, integral_undef]
   exact stronglyMeasurable_of_tendsto _ hf' h2f'
 #align measure_theory.strongly_measurable.integral_prod_right MeasureTheory.StronglyMeasurable.integral_prod_right
 
refactor: move material about the Dominated Convergence Theorem into one file (#11139)

Suggested by @loefflerd. Only code motion (and cosmetic adaptions, such as minimising import and open statements).

Pre-requisite for #11108 and (morally) #11110.

Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
 import Mathlib.MeasureTheory.Constructions.Prod.Basic
+import Mathlib.MeasureTheory.Integral.DominatedConvergence
 import Mathlib.MeasureTheory.Integral.SetIntegral
 
 #align_import measure_theory.constructions.prod.integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
chore: classify was simp porting notes (#10746)

Classifies by adding issue number (#10745) to porting notes claiming was simp.

Diff
@@ -238,7 +238,7 @@ theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasu
       (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
         HasFiniteIntegral (fun x => ∫ y, ‖f (x, y)‖ ∂ν) μ := by
   simp only [HasFiniteIntegral]
-  -- Porting note: was `simp`
+  -- porting note (#10745): was `simp`
   rw [lintegral_prod_of_measurable _ h1f.ennnorm]
   have : ∀ x, ∀ᵐ y ∂ν, 0 ≤ ‖f (x, y)‖ := fun x => eventually_of_forall fun y => norm_nonneg _
   simp_rw [integral_eq_lintegral_of_nonneg_ae (this _)
chore: cleanup use of simp singlePass option (#9928)

Of the 18 uses of singlePass, in 3 cases we can just use rw, in 4 cases it isn't needed at all.

In the other 11 cases we are always use it as simp (config := {singlePass := true}) only [X] (i.e. with just a single simp lemma), and that simp call would loop forever (usually failing with a maxRecDepth error, sometimes with heartbeats). I've left these as is.

There's also one case where there was a missing only.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -95,7 +95,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
     simp only [SimpleFunc.integral_eq_sum_of_subset (this _)]
     refine' Finset.stronglyMeasurable_sum _ fun x _ => _
     refine' (Measurable.ennreal_toReal _).stronglyMeasurable.smul_const _
-    simp (config := { singlePass := true }) only [SimpleFunc.coe_comp, preimage_comp]
+    simp only [SimpleFunc.coe_comp, preimage_comp]
     apply measurable_measure_prod_mk_left
     exact (s n).measurableSet_fiber x
   have h2f' : Tendsto f' atTop (𝓝 fun x : α => ∫ y : β, f x y ∂ν) := by
chore: tidy various files (#8823)
Diff
@@ -514,7 +514,7 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
 
 theorem integral_prod_smul {𝕜 : Type*} [IsROrC 𝕜] [NormedSpace 𝕜 E] (f : α → 𝕜) (g : β → E) :
     ∫ z, f z.1 • g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) • ∫ y, g y ∂ν := by
-  by_cases hE : CompleteSpace E; swap; simp [integral, hE]
+  by_cases hE : CompleteSpace E; swap; · simp [integral, hE]
   by_cases h : Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν)
   · rw [integral_prod _ h]
     simp_rw [integral_smul, integral_smul_const]
feat: Fubini for functions with compact support and non-sigma-finite measures (#8125)
Diff
@@ -24,6 +24,9 @@ In this file we prove Fubini's theorem.
   Tonelli's theorem (see `MeasureTheory.lintegral_prod`). The lemma
   `MeasureTheory.Integrable.integral_prod_right` states that the inner integral of the right-hand
   side is integrable.
+* `MeasureTheory.integral_integral_swap_of_hasCompactSupport`: a version of Fubini theorem for
+  continuous functions with compact support, which does not assume that the measures are σ-finite
+  contrary to all the usual versions of Fubini.
 
 ## Tags
 
@@ -540,4 +543,59 @@ theorem integral_fun_fst (f : α → E) : ∫ z, f z.1 ∂μ.prod ν = (ν univ)
   rw [← integral_prod_swap]
   apply integral_fun_snd
 
+section
+
+variable {X Y : Type*}
+    [TopologicalSpace X] [TopologicalSpace Y] [MeasurableSpace X] [MeasurableSpace Y]
+    [OpensMeasurableSpace X] [OpensMeasurableSpace Y]
+
+/-- A version of *Fubini theorem* for continuous functions with compact support: one may swap
+the order of integration with respect to locally finite measures. One does not assume that the
+measures are σ-finite, contrary to the usual Fubini theorem. -/
+lemma integral_integral_swap_of_hasCompactSupport
+    {f : X → Y → E} (hf : Continuous f.uncurry) (h'f : HasCompactSupport f.uncurry)
+    {μ : Measure X} {ν : Measure Y} [IsFiniteMeasureOnCompacts μ] [IsFiniteMeasureOnCompacts ν] :
+    ∫ x, (∫ y, f x y ∂ν) ∂μ = ∫ y, (∫ x, f x y ∂μ) ∂ν := by
+  let U := Prod.fst '' (tsupport f.uncurry)
+  have : Fact (μ U < ∞) := ⟨(IsCompact.image h'f continuous_fst).measure_lt_top⟩
+  let V := Prod.snd '' (tsupport f.uncurry)
+  have : Fact (ν V < ∞) := ⟨(IsCompact.image h'f continuous_snd).measure_lt_top⟩
+  calc
+  ∫ x, (∫ y, f x y ∂ν) ∂μ = ∫ x, (∫ y in V, f x y ∂ν) ∂μ := by
+    congr 1 with x
+    apply (set_integral_eq_integral_of_forall_compl_eq_zero (fun y hy ↦ ?_)).symm
+    contrapose! hy
+    have : (x, y) ∈ Function.support f.uncurry := hy
+    exact mem_image_of_mem _ (subset_tsupport _ this)
+  _ = ∫ x in U, (∫ y in V, f x y ∂ν) ∂μ := by
+    apply (set_integral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)).symm
+    have : ∀ y, f x y = 0 := by
+      intro y
+      contrapose! hx
+      have : (x, y) ∈ Function.support f.uncurry := hx
+      exact mem_image_of_mem _ (subset_tsupport _ this)
+    simp [this]
+  _ = ∫ y in V, (∫ x in U, f x y ∂μ) ∂ν := by
+    apply integral_integral_swap
+    apply (integrableOn_iff_integrable_of_support_subset (subset_tsupport f.uncurry)).mp
+    refine ⟨(h'f.stronglyMeasurable_of_prod hf).aestronglyMeasurable, ?_⟩
+    obtain ⟨C, hC⟩ : ∃ C, ∀ p, ‖f.uncurry p‖ ≤ C := hf.bounded_above_of_compact_support h'f
+    exact hasFiniteIntegral_of_bounded (C := C) (eventually_of_forall hC)
+  _ = ∫ y, (∫ x in U, f x y ∂μ) ∂ν := by
+    apply set_integral_eq_integral_of_forall_compl_eq_zero (fun y hy ↦ ?_)
+    have : ∀ x, f x y = 0 := by
+      intro x
+      contrapose! hy
+      have : (x, y) ∈ Function.support f.uncurry := hy
+      exact mem_image_of_mem _ (subset_tsupport _ this)
+    simp [this]
+  _ = ∫ y, (∫ x, f x y ∂μ) ∂ν := by
+    congr 1 with y
+    apply set_integral_eq_integral_of_forall_compl_eq_zero (fun x hx ↦ ?_)
+    contrapose! hx
+    have : (x, y) ∈ Function.support f.uncurry := hx
+    exact mem_image_of_mem _ (subset_tsupport _ this)
+
+end
+
 end MeasureTheory
feat: integral of f x • g y over α × β (#7627)
  • Generalize integral_prod_mul to integral_prod_smul, add Integrable.prod_smul.
  • Rename integrable_prod_mul to Integrable.prod_mul.
  • Add integral_fun_fst and integral_fun_snd.
Diff
@@ -306,13 +306,18 @@ theorem Integrable.integral_norm_prod_right [SigmaFinite μ] ⦃f : α × β →
   hf.swap.integral_norm_prod_left
 #align measure_theory.integrable.integral_norm_prod_right MeasureTheory.Integrable.integral_norm_prod_right
 
-theorem integrable_prod_mul {L : Type*} [IsROrC L] {f : α → L} {g : β → L} (hf : Integrable f μ)
-    (hg : Integrable g ν) : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν) := by
+theorem Integrable.prod_smul {𝕜 : Type*} [NontriviallyNormedField 𝕜] [NormedSpace 𝕜 E]
+    {f : α → 𝕜} {g : β → E} (hf : Integrable f μ) (hg : Integrable g ν) :
+    Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν) := by
   refine' (integrable_prod_iff _).2 ⟨_, _⟩
-  · exact hf.1.fst.mul hg.1.snd
-  · exact eventually_of_forall fun x => hg.const_mul (f x)
-  · simpa only [norm_mul, integral_mul_left] using hf.norm.mul_const _
-#align measure_theory.integrable_prod_mul MeasureTheory.integrable_prod_mul
+  · exact hf.1.fst.smul hg.1.snd
+  · exact eventually_of_forall fun x => hg.smul (f x)
+  · simpa only [norm_smul, integral_mul_left] using hf.norm.mul_const _
+
+theorem Integrable.prod_mul {L : Type*} [IsROrC L] {f : α → L} {g : β → L} (hf : Integrable f μ)
+    (hg : Integrable g ν) : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν) :=
+  hf.prod_smul hg
+#align measure_theory.integrable_prod_mul MeasureTheory.Integrable.prod_mul
 
 end
 
@@ -504,15 +509,20 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
 
-theorem integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β → L) :
-    ∫ z, f z.1 * g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν := by
-  by_cases h : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν)
+theorem integral_prod_smul {𝕜 : Type*} [IsROrC 𝕜] [NormedSpace 𝕜 E] (f : α → 𝕜) (g : β → E) :
+    ∫ z, f z.1 • g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) • ∫ y, g y ∂ν := by
+  by_cases hE : CompleteSpace E; swap; simp [integral, hE]
+  by_cases h : Integrable (fun z : α × β => f z.1 • g z.2) (μ.prod ν)
   · rw [integral_prod _ h]
-    simp_rw [integral_mul_left, integral_mul_right]
+    simp_rw [integral_smul, integral_smul_const]
   have H : ¬Integrable f μ ∨ ¬Integrable g ν := by
     contrapose! h
-    exact integrable_prod_mul h.1 h.2
+    exact h.1.prod_smul h.2
   cases' H with H H <;> simp [integral_undef h, integral_undef H]
+
+theorem integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β → L) :
+    ∫ z, f z.1 * g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν :=
+  integral_prod_smul f g
 #align measure_theory.integral_prod_mul MeasureTheory.integral_prod_mul
 
 theorem set_integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
@@ -523,4 +533,11 @@ theorem set_integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β →
   apply integral_prod_mul
 #align measure_theory.set_integral_prod_mul MeasureTheory.set_integral_prod_mul
 
+theorem integral_fun_snd (f : β → E) : ∫ z, f z.2 ∂μ.prod ν = (μ univ).toReal • ∫ y, f y ∂ν := by
+  simpa using integral_prod_smul (1 : α → ℝ) f
+
+theorem integral_fun_fst (f : α → E) : ∫ z, f z.1 ∂μ.prod ν = (ν univ).toReal • ∫ x, f x ∂μ := by
+  rw [← integral_prod_swap]
+  apply integral_fun_snd
+
 end MeasureTheory
feat(MeasureTheory/../Prod): drop unneeded assumptions (#7620)
  • Drop CompleteSpace assumption in all theorems about Bochner integral on α × β.
  • Drop measurability assumption in lintegral_prod_swap.
Diff
@@ -69,13 +69,14 @@ theorem measurableSet_integrable [SigmaFinite ν] ⦃f : α → β → E⦄
 
 section
 
-variable [NormedSpace ℝ E] [CompleteSpace E]
+variable [NormedSpace ℝ E]
 
 /-- 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 MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] ⦃f : α → β → E⦄
     (hf : StronglyMeasurable (uncurry f)) : StronglyMeasurable fun x => ∫ y, f x y ∂ν := by
+  by_cases hE : CompleteSpace E; swap; · simp [integral, hE, stronglyMeasurable_const]
   borelize E
   haveI : SeparableSpace (range (uncurry f) ∪ {0} : Set E) :=
     hf.separableSpace_range_union_singleton
@@ -195,7 +196,7 @@ theorem MeasureTheory.AEStronglyMeasurable.snd {γ} [TopologicalSpace γ] [Sigma
 /-- 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 MeasureTheory.AEStronglyMeasurable.integral_prod_right' [SigmaFinite ν] [NormedSpace ℝ E]
-    [CompleteSpace E] ⦃f : α × β → E⦄ (hf : AEStronglyMeasurable f (μ.prod ν)) :
+    ⦃f : α × β → E⦄ (hf : AEStronglyMeasurable f (μ.prod ν)) :
     AEStronglyMeasurable (fun x => ∫ y, f (x, y) ∂ν) μ :=
   ⟨fun x => ∫ y, hf.mk f (x, y) ∂ν, hf.stronglyMeasurable_mk.integral_prod_right', by
     filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩
@@ -217,7 +218,6 @@ variable [SigmaFinite ν]
 
 /-! ### Integrability on a product -/
 
-
 section
 
 theorem integrable_swap_iff [SigmaFinite μ] {f : α × β → E} :
@@ -316,7 +316,7 @@ theorem integrable_prod_mul {L : Type*} [IsROrC L] {f : α → L} {g : β → L}
 
 end
 
-variable [NormedSpace ℝ E] [CompleteSpace E]
+variable [NormedSpace ℝ E]
 
 theorem Integrable.integral_prod_left ⦃f : α × β → E⦄ (hf : Integrable f (μ.prod ν)) :
     Integrable (fun x => ∫ y, f (x, y) ∂ν) μ :=
@@ -342,7 +342,7 @@ theorem integral_prod_swap (f : α × β → E) :
   measurePreserving_swap.integral_comp MeasurableEquiv.prodComm.measurableEmbedding _
 #align measure_theory.integral_prod_swap MeasureTheory.integral_prod_swap
 
-variable {E' : Type*} [NormedAddCommGroup E'] [CompleteSpace E'] [NormedSpace ℝ E']
+variable {E' : Type*} [NormedAddCommGroup E'] [NormedSpace ℝ E']
 
 /-! 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. -/
@@ -447,9 +447,10 @@ theorem continuous_integral_integral :
   `integrable_prod_iff` can be useful to show that the function in question in integrable.
   `MeasureTheory.Integrable.integral_prod_right` is useful to show that the inner integral
   of the right-hand side is integrable. -/
-theorem integral_prod :
-    ∀ (f : α × β → E) (_ : Integrable f (μ.prod ν)),
-      ∫ z, f z ∂μ.prod ν = ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
+theorem integral_prod (f : α × β → E) (hf : Integrable f (μ.prod ν)) :
+    ∫ z, f z ∂μ.prod ν = ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
+  by_cases hE : CompleteSpace E; swap; · simp only [integral, dif_neg hE]
+  revert f
   apply Integrable.induction
   · intro c s hs h2s
     simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
@@ -519,7 +520,7 @@ theorem set_integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β →
     ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν := by
   -- Porting note: added
   rw [← Measure.prod_restrict s t]
-  simp only [← Measure.prod_restrict s t, IntegrableOn, integral_prod_mul]
+  apply integral_prod_mul
 #align measure_theory.set_integral_prod_mul MeasureTheory.set_integral_prod_mul
 
 end MeasureTheory
chore(MeasureTheory/../Prod/Integral): Drop an assumption, golf (#7579)

Drop some measurability assumptions by using the fact that Prod.swap is a measurable equivalence.

Diff
@@ -220,17 +220,16 @@ variable [SigmaFinite ν]
 
 section
 
+theorem integrable_swap_iff [SigmaFinite μ] {f : α × β → E} :
+    Integrable (f ∘ Prod.swap) (ν.prod μ) ↔ Integrable f (μ.prod ν) :=
+  measurePreserving_swap.integrable_comp_emb MeasurableEquiv.prodComm.measurableEmbedding
+#align measure_theory.integrable_swap_iff MeasureTheory.integrable_swap_iff
+
 theorem Integrable.swap [SigmaFinite μ] ⦃f : α × β → E⦄ (hf : Integrable f (μ.prod ν)) :
     Integrable (f ∘ Prod.swap) (ν.prod μ) :=
-  ⟨hf.aestronglyMeasurable.prod_swap,
-    (lintegral_prod_swap _ hf.aestronglyMeasurable.ennnorm : _).le.trans_lt hf.hasFiniteIntegral⟩
+  integrable_swap_iff.2 hf
 #align measure_theory.integrable.swap MeasureTheory.Integrable.swap
 
-theorem integrable_swap_iff [SigmaFinite μ] ⦃f : α × β → E⦄ :
-    Integrable (f ∘ Prod.swap) (ν.prod μ) ↔ Integrable f (μ.prod ν) :=
-  ⟨fun hf => hf.swap, fun hf => hf.swap⟩
-#align measure_theory.integrable_swap_iff MeasureTheory.integrable_swap_iff
-
 theorem hasFiniteIntegral_prod_iff ⦃f : α × β → E⦄ (h1f : StronglyMeasurable f) :
     HasFiniteIntegral f (μ.prod ν) ↔
       (∀ᵐ x ∂μ, HasFiniteIntegral (fun y => f (x, y)) ν) ∧
@@ -336,13 +335,11 @@ theorem Integrable.integral_prod_right [SigmaFinite μ] ⦃f : α × β → E⦄
 
 /-! ### The Bochner integral on a product -/
 
-
 variable [SigmaFinite μ]
 
-theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ.prod ν)) :
-    ∫ z, f z.swap ∂ν.prod μ = ∫ z, f z ∂μ.prod ν := by
-  rw [← prod_swap] at hf
-  rw [← integral_map measurable_swap.aemeasurable hf, prod_swap]
+theorem integral_prod_swap (f : α × β → E) :
+    ∫ z, f z.swap ∂ν.prod μ = ∫ z, f z ∂μ.prod ν :=
+  measurePreserving_swap.integral_comp MeasurableEquiv.prodComm.measurableEmbedding _
 #align measure_theory.integral_prod_swap MeasureTheory.integral_prod_swap
 
 variable {E' : Type*} [NormedAddCommGroup E'] [CompleteSpace E'] [NormedSpace ℝ E']
@@ -477,7 +474,7 @@ theorem integral_prod :
   This version has the integrals on the right-hand side in the other order. -/
 theorem integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.prod ν)) :
     ∫ z, f z ∂μ.prod ν = ∫ y, ∫ x, f (x, y) ∂μ ∂ν := by
-  simp_rw [← integral_prod_swap f hf.aestronglyMeasurable]; exact integral_prod _ hf.swap
+  rw [← integral_prod_swap f]; exact integral_prod _ hf.swap
 #align measure_theory.integral_prod_symm MeasureTheory.integral_prod_symm
 
 /-- Reversed version of **Fubini's Theorem**. -/
fix(Analysis,Topology): fix names (#6938)

Rename:

  • tendsto_iff_norm_tendsto_onetendsto_iff_norm_div_tendsto_zero;
  • tendsto_iff_norm_tendsto_zerotendsto_iff_norm_sub_tendsto_zero;
  • tendsto_one_iff_norm_tendsto_onetendsto_one_iff_norm_tendsto_zero;
  • Filter.Tendsto.continuous_of_equicontinuous_atFilter.Tendsto.continuous_of_equicontinuousAt.
Diff
@@ -442,7 +442,7 @@ theorem continuous_integral_integral :
     rw [← lintegral_prod_of_measurable _ (this _), ← L1.ofReal_norm_sub_eq_lintegral]
   rw [← ofReal_zero]
   refine' (continuous_ofReal.tendsto 0).comp _
-  rw [← tendsto_iff_norm_tendsto_zero]; exact tendsto_id
+  rw [← tendsto_iff_norm_sub_tendsto_zero]; exact tendsto_id
 #align measure_theory.continuous_integral_integral MeasureTheory.continuous_integral_integral
 
 /-- **Fubini's Theorem**: For integrable functions on `α × β`,
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -43,7 +43,7 @@ open TopologicalSpace
 
 open Filter hiding prod_eq map
 
-variable {α α' β β' γ E : Type _}
+variable {α α' β β' γ E : Type*}
 
 variable [MeasurableSpace α] [MeasurableSpace α'] [MeasurableSpace β] [MeasurableSpace β']
 
@@ -175,7 +175,7 @@ open MeasureTheory.Measure
 
 section
 
-nonrec theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type _} [TopologicalSpace γ]
+nonrec theorem MeasureTheory.AEStronglyMeasurable.prod_swap {γ : Type*} [TopologicalSpace γ]
     [SigmaFinite μ] [SigmaFinite ν] {f : β × α → γ} (hf : AEStronglyMeasurable f (ν.prod μ)) :
     AEStronglyMeasurable (fun z : α × β => f z.swap) (μ.prod ν) := by
   rw [← prod_swap] at hf
@@ -201,7 +201,7 @@ theorem MeasureTheory.AEStronglyMeasurable.integral_prod_right' [SigmaFinite ν]
     filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk] with _ hx using integral_congr_ae hx⟩
 #align measure_theory.ae_strongly_measurable.integral_prod_right' MeasureTheory.AEStronglyMeasurable.integral_prod_right'
 
-theorem MeasureTheory.AEStronglyMeasurable.prod_mk_left {γ : Type _} [SigmaFinite ν]
+theorem MeasureTheory.AEStronglyMeasurable.prod_mk_left {γ : Type*} [SigmaFinite ν]
     [TopologicalSpace γ] {f : α × β → γ} (hf : AEStronglyMeasurable f (μ.prod ν)) :
     ∀ᵐ x ∂μ, AEStronglyMeasurable (fun y => f (x, y)) ν := by
   filter_upwards [ae_ae_of_ae_prod hf.ae_eq_mk] with x hx
@@ -307,7 +307,7 @@ theorem Integrable.integral_norm_prod_right [SigmaFinite μ] ⦃f : α × β →
   hf.swap.integral_norm_prod_left
 #align measure_theory.integrable.integral_norm_prod_right MeasureTheory.Integrable.integral_norm_prod_right
 
-theorem integrable_prod_mul {L : Type _} [IsROrC L] {f : α → L} {g : β → L} (hf : Integrable f μ)
+theorem integrable_prod_mul {L : Type*} [IsROrC L] {f : α → L} {g : β → L} (hf : Integrable f μ)
     (hg : Integrable g ν) : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν) := by
   refine' (integrable_prod_iff _).2 ⟨_, _⟩
   · exact hf.1.fst.mul hg.1.snd
@@ -345,7 +345,7 @@ theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ
   rw [← integral_map measurable_swap.aemeasurable hf, prod_swap]
 #align measure_theory.integral_prod_swap MeasureTheory.integral_prod_swap
 
-variable {E' : Type _} [NormedAddCommGroup E'] [CompleteSpace E'] [NormedSpace ℝ E']
+variable {E' : Type*} [NormedAddCommGroup E'] [CompleteSpace E'] [NormedSpace ℝ E']
 
 /-! 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. -/
@@ -506,7 +506,7 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
 
-theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) :
+theorem integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β → L) :
     ∫ z, f z.1 * g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν := by
   by_cases h : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν)
   · rw [integral_prod _ h]
@@ -517,7 +517,7 @@ theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L)
   cases' H with H H <;> simp [integral_undef h, integral_undef H]
 #align measure_theory.integral_prod_mul MeasureTheory.integral_prod_mul
 
-theorem set_integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
+theorem set_integral_prod_mul {L : Type*} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
     (t : Set β) :
     ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν := by
   -- Porting note: added
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module measure_theory.constructions.prod.integral
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Constructions.Prod.Basic
 import Mathlib.MeasureTheory.Integral.SetIntegral
 
+#align_import measure_theory.constructions.prod.integral from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
 /-!
 # Integration with respect to the product measure
 
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -127,7 +127,7 @@ theorem MeasureTheory.StronglyMeasurable.integral_prod_right [SigmaFinite ν] 
   Fubini's theorem is measurable. -/
 theorem MeasureTheory.StronglyMeasurable.integral_prod_right' [SigmaFinite ν] ⦃f : α × β → E⦄
     (hf : StronglyMeasurable f) : StronglyMeasurable fun x => ∫ y, f (x, y) ∂ν := by
-  rw [← uncurry_curry f] at hf ; exact hf.integral_prod_right
+  rw [← uncurry_curry f] at hf; exact hf.integral_prod_right
 #align measure_theory.strongly_measurable.integral_prod_right' MeasureTheory.StronglyMeasurable.integral_prod_right'
 
 /-- The Bochner integral is measurable. This shows that the integrand of (the right-hand-side of)
@@ -165,7 +165,7 @@ theorem integrable_measure_prod_mk_left {s : Set (α × β)} (hs : MeasurableSet
   rw [prod_apply hs]
   apply lintegral_congr_ae
   refine' (ae_measure_lt_top hs h2s).mp _; apply eventually_of_forall; intro x hx
-  rw [lt_top_iff_ne_top] at hx ; simp [ofReal_toReal, hx]
+  rw [lt_top_iff_ne_top] at hx; simp [ofReal_toReal, hx]
 #align measure_theory.measure.integrable_measure_prod_mk_left MeasureTheory.Measure.integrable_measure_prod_mk_left
 
 end Measure
chore: fix grammar in docs (#5668)
Diff
@@ -21,7 +21,7 @@ In this file we prove Fubini's theorem.
 * `MeasureTheory.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.
-* `MeasureTheory.integral_prod`: Fubini's theorem. It states that for a integrable function
+* `MeasureTheory.integral_prod`: Fubini's theorem. It states that for an 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 (see `MeasureTheory.lintegral_prod`). The lemma
chore: remove superfluous parentheses around integrals (#5591)
Diff
@@ -343,7 +343,7 @@ theorem Integrable.integral_prod_right [SigmaFinite μ] ⦃f : α × β → E⦄
 variable [SigmaFinite μ]
 
 theorem integral_prod_swap (f : α × β → E) (hf : AEStronglyMeasurable f (μ.prod ν)) :
-    (∫ z, f z.swap ∂ν.prod μ) = ∫ z, f z ∂μ.prod ν := by
+    ∫ z, f z.swap ∂ν.prod μ = ∫ z, f z ∂μ.prod ν := by
   rw [← prod_swap] at hf
   rw [← integral_map measurable_swap.aemeasurable hf, prod_swap]
 #align measure_theory.integral_prod_swap MeasureTheory.integral_prod_swap
@@ -455,7 +455,7 @@ theorem continuous_integral_integral :
   of the right-hand side is integrable. -/
 theorem integral_prod :
     ∀ (f : α × β → E) (_ : Integrable f (μ.prod ν)),
-      (∫ z, f z ∂μ.prod ν) = ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
+      ∫ z, f z ∂μ.prod ν = ∫ x, ∫ y, f (x, y) ∂ν ∂μ := by
   apply Integrable.induction
   · intro c s hs h2s
     simp_rw [integral_indicator hs, ← indicator_comp_right, Function.comp,
@@ -479,38 +479,38 @@ theorem integral_prod :
   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 integral_prod_symm (f : α × β → E) (hf : Integrable f (μ.prod ν)) :
-    (∫ z, f z ∂μ.prod ν) = ∫ y, ∫ x, f (x, y) ∂μ ∂ν := by
+    ∫ z, f z ∂μ.prod ν = ∫ y, ∫ x, f (x, y) ∂μ ∂ν := by
   simp_rw [← integral_prod_swap f hf.aestronglyMeasurable]; exact integral_prod _ hf.swap
 #align measure_theory.integral_prod_symm MeasureTheory.integral_prod_symm
 
 /-- Reversed version of **Fubini's Theorem**. -/
 theorem integral_integral {f : α → β → E} (hf : Integrable (uncurry f) (μ.prod ν)) :
-    (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ z, f z.1 z.2 ∂μ.prod ν :=
+    ∫ x, ∫ y, f x y ∂ν ∂μ = ∫ z, f z.1 z.2 ∂μ.prod ν :=
   (integral_prod _ hf).symm
 #align measure_theory.integral_integral MeasureTheory.integral_integral
 
 /-- Reversed version of **Fubini's Theorem** (symmetric version). -/
 theorem integral_integral_symm {f : α → β → E} (hf : Integrable (uncurry f) (μ.prod ν)) :
-    (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ z, f z.2 z.1 ∂ν.prod μ :=
+    ∫ x, ∫ y, f x y ∂ν ∂μ = ∫ z, f z.2 z.1 ∂ν.prod μ :=
   (integral_prod_symm _ hf.swap).symm
 #align measure_theory.integral_integral_symm MeasureTheory.integral_integral_symm
 
 /-- Change the order of Bochner integration. -/
 theorem integral_integral_swap ⦃f : α → β → E⦄ (hf : Integrable (uncurry f) (μ.prod ν)) :
-    (∫ x, ∫ y, f x y ∂ν ∂μ) = ∫ y, ∫ x, f x y ∂μ ∂ν :=
+    ∫ x, ∫ y, f x y ∂ν ∂μ = ∫ y, ∫ x, f x y ∂μ ∂ν :=
   (integral_integral hf).trans (integral_prod_symm _ hf)
 #align measure_theory.integral_integral_swap MeasureTheory.integral_integral_swap
 
 /-- **Fubini's Theorem** for set integrals. -/
 theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
     (hf : IntegrableOn f (s ×ˢ t) (μ.prod ν)) :
-    (∫ z in s ×ˢ t, f z ∂μ.prod ν) = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ := by
+    ∫ z in s ×ˢ t, f z ∂μ.prod ν = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ := by
   simp only [← Measure.prod_restrict s t, IntegrableOn] at hf ⊢
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
 
 theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) :
-    (∫ z, f z.1 * g z.2 ∂μ.prod ν) = (∫ x, f x ∂μ) * ∫ y, g y ∂ν := by
+    ∫ z, f z.1 * g z.2 ∂μ.prod ν = (∫ x, f x ∂μ) * ∫ y, g y ∂ν := by
   by_cases h : Integrable (fun z : α × β => f z.1 * g z.2) (μ.prod ν)
   · rw [integral_prod _ h]
     simp_rw [integral_mul_left, integral_mul_right]
@@ -522,7 +522,7 @@ theorem integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L)
 
 theorem set_integral_prod_mul {L : Type _} [IsROrC L] (f : α → L) (g : β → L) (s : Set α)
     (t : Set β) :
-    (∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν) = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν := by
+    ∫ z in s ×ˢ t, f z.1 * g z.2 ∂μ.prod ν = (∫ x in s, f x ∂μ) * ∫ y in t, g y ∂ν := by
   -- Porting note: added
   rw [← Measure.prod_restrict s t]
   simp only [← Measure.prod_restrict s t, IntegrableOn, integral_prod_mul]
chore: bump to nightly-2023-06-10 (#4933)

The bumps to nightly-2023-06-10, which includes @gebner's https://github.com/leanprover/lean4/pull/2266.

After this is merged I encourage everyone to look around at simp regressions!

  • depends on: #4954 (I've moved changes that work without lean4#2266 to this PR)

Open in Gitpod

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -506,8 +506,6 @@ theorem set_integral_prod (f : α × β → E) {s : Set α} {t : Set β}
     (hf : IntegrableOn f (s ×ˢ t) (μ.prod ν)) :
     (∫ z in s ×ˢ t, f z ∂μ.prod ν) = ∫ x in s, ∫ y in t, f (x, y) ∂ν ∂μ := by
   simp only [← Measure.prod_restrict s t, IntegrableOn] at hf ⊢
-  -- Porting note: added
-  rw [← Measure.prod_restrict s t] at hf ⊢
   exact integral_prod f hf
 #align measure_theory.set_integral_prod MeasureTheory.set_integral_prod
 
chore: tidy various files (#4757)
Diff
@@ -18,14 +18,14 @@ In this file we prove Fubini's theorem.
 
 ## Main results
 
-* `measure_theory.integrable_prod_iff` states that a binary function is integrable iff both
+* `MeasureTheory.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
+* `MeasureTheory.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 (see `measure_theory.lintegral_prod`). The lemma
-  `measure_theory.integrable.integral_prod_right` states that the inner integral of the right-hand
+  Tonelli's theorem (see `MeasureTheory.lintegral_prod`). The lemma
+  `MeasureTheory.Integrable.integral_prod_right` states that the inner integral of the right-hand
   side is integrable.
 
 ## Tags
@@ -451,7 +451,7 @@ theorem continuous_integral_integral :
 /-- **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
+  `MeasureTheory.Integrable.integral_prod_right` is useful to show that the inner integral
   of the right-hand side is integrable. -/
 theorem integral_prod :
     ∀ (f : α × β → E) (_ : Integrable f (μ.prod ν)),
feat: port MeasureTheory.Constructions.Prod.Integral (#4727)

Dependencies 12 + 943

944 files ported (98.7%)
432715 lines ported (98.7%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file