measure_theory.constructions.piMathlib.MeasureTheory.Constructions.Pi

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
@@ -77,7 +77,7 @@ theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i
     IsPiSystem (pi univ '' pi univ C) :=
   by
   rintro _ ⟨s₁, hs₁, rfl⟩ _ ⟨s₂, hs₂, rfl⟩ hst
-  rw [← pi_inter_distrib] at hst ⊢; rw [univ_pi_nonempty_iff] at hst 
+  rw [← pi_inter_distrib] at hst ⊢; rw [univ_pi_nonempty_iff] at hst
   exact mem_image_of_mem _ fun i _ => hC i _ (hs₁ i (mem_univ i)) _ (hs₂ i (mem_univ i)) (hst i)
 #align is_pi_system.pi IsPiSystem.pi
 -/
@@ -126,7 +126,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
         pi univ fun k => ⋃ j : ℕ, @update ι (fun i' => Set (α i')) _ (fun i' => t i' j) i s k :=
       by
       ext; simp_rw [mem_univ_pi]; apply forall_congr'; intro i'
-      by_cases i' = i; · subst h; simp; · rw [← Ne.def] at h ; simp [h]
+      by_cases i' = i; · subst h; simp; · rw [← Ne.def] at h; simp [h]
     rw [this, ← Union_univ_pi]
     apply MeasurableSet.iUnion
     intro n; apply measurable_set_generate_from
@@ -332,7 +332,7 @@ theorem pi_caratheodory :
   by
   refine' iSup_le _
   intro i s hs
-  rw [MeasurableSpace.comap] at hs 
+  rw [MeasurableSpace.comap] at hs
   rcases hs with ⟨s, hs, rfl⟩
   apply bounded_by_caratheodory
   intro t
@@ -422,7 +422,7 @@ theorem pi_eq_generateFrom {C : ∀ i, Set (Set (α i))}
     (finite_spanning_sets_in.pi h3C).ext
       (generateFrom_eq_pi hC fun i => (h3C i).IsCountablySpanning).symm (IsPiSystem.pi h2C) _
   rintro _ ⟨s, hs, rfl⟩
-  rw [mem_univ_pi] at hs 
+  rw [mem_univ_pi] at hs
   haveI := fun i => (h3C i).SigmaFinite
   simp_rw [h₁ s hs, pi_pi_aux μ s fun i => h4C i _ (hs i)]
 #align measure_theory.measure.pi_eq_generate_from MeasureTheory.Measure.pi_eq_generateFrom
Diff
@@ -854,28 +854,28 @@ theorem volume_preserving_piEquivPiSubtypeProd {ι : Type _} (α : ι → Type _
 #align measure_theory.volume_preserving_pi_equiv_pi_subtype_prod MeasureTheory.volume_preserving_piEquivPiSubtypeProd
 -/
 
-#print MeasureTheory.measurePreserving_piFinSuccAboveEquiv /-
-theorem measurePreserving_piFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Type u}
+#print MeasureTheory.measurePreserving_piFinSuccAbove /-
+theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (i : Fin (n + 1)) :
-    MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) (Measure.pi μ)
+    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) (Measure.pi μ)
       ((μ i).Prod <| Measure.pi fun j => μ (i.succAboveEmb j)) :=
   by
-  set e := (MeasurableEquiv.piFinSuccAboveEquiv α i).symm
+  set e := (MeasurableEquiv.piFinSuccAbove α i).symm
   refine' measure_preserving.symm e _
   refine' ⟨e.measurable, (pi_eq fun s hs => _).symm⟩
   rw [e.map_apply, i.prod_univ_succ_above _, ← pi_pi, ← prod_prod]
   congr 1 with ⟨x, f⟩
   simp [i.forall_iff_succ_above]
-#align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreserving_piFinSuccAboveEquiv
+#align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreserving_piFinSuccAbove
 -/
 
-#print MeasureTheory.volume_preserving_piFinSuccAboveEquiv /-
-theorem volume_preserving_piFinSuccAboveEquiv {n : ℕ} (α : Fin (n + 1) → Type u)
+#print MeasureTheory.volume_preserving_piFinSuccAbove /-
+theorem volume_preserving_piFinSuccAbove {n : ℕ} (α : Fin (n + 1) → Type u)
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (i : Fin (n + 1)) :
-    MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) :=
-  measurePreserving_piFinSuccAboveEquiv (fun _ => volume) i
-#align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAboveEquiv
+    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) :=
+  measurePreserving_piFinSuccAbove (fun _ => volume) i
+#align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAbove
 -/
 
 #print MeasureTheory.measurePreserving_funUnique /-
Diff
@@ -3,9 +3,9 @@ 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.Group.Measure
-import Mathbin.Topology.Constructions
+import MeasureTheory.Constructions.Prod.Basic
+import MeasureTheory.Group.Measure
+import Topology.Constructions
 
 #align_import measure_theory.constructions.pi from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
 
Diff
@@ -2,16 +2,13 @@
 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.pi
-! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
-! 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.Group.Measure
 import Mathbin.Topology.Constructions
 
+#align_import measure_theory.constructions.pi from "leanprover-community/mathlib"@"2ebc1d6c2fed9f54c95bbc3998eaa5570527129a"
+
 /-!
 # Product measures
 
Diff
@@ -862,7 +862,7 @@ theorem measurePreserving_piFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Ty
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (i : Fin (n + 1)) :
     MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) (Measure.pi μ)
-      ((μ i).Prod <| Measure.pi fun j => μ (i.succAbove j)) :=
+      ((μ i).Prod <| Measure.pi fun j => μ (i.succAboveEmb j)) :=
   by
   set e := (MeasurableEquiv.piFinSuccAboveEquiv α i).symm
   refine' measure_preserving.symm e _
Diff
@@ -179,10 +179,13 @@ def piPremeasure (m : ∀ i, OuterMeasure (α i)) (s : Set (∀ i, α i)) : ℝ
 #align measure_theory.pi_premeasure MeasureTheory.piPremeasure
 -/
 
+#print MeasureTheory.piPremeasure_pi /-
 theorem piPremeasure_pi {s : ∀ i, Set (α i)} (hs : (pi univ s).Nonempty) :
     piPremeasure m (pi univ s) = ∏ i, m i (s i) := by simp [hs]
 #align measure_theory.pi_premeasure_pi MeasureTheory.piPremeasure_pi
+-/
 
+#print MeasureTheory.piPremeasure_pi' /-
 theorem piPremeasure_pi' {s : ∀ i, Set (α i)} : piPremeasure m (pi univ s) = ∏ i, m i (s i) :=
   by
   cases isEmpty_or_nonempty ι
@@ -194,15 +197,20 @@ theorem piPremeasure_pi' {s : ∀ i, Set (α i)} : piPremeasure m (pi univ s) =
       Finset.prod_eq_zero_iff]
   · simp [h]
 #align measure_theory.pi_premeasure_pi' MeasureTheory.piPremeasure_pi'
+-/
 
+#print MeasureTheory.piPremeasure_pi_mono /-
 theorem piPremeasure_pi_mono {s t : Set (∀ i, α i)} (h : s ⊆ t) :
     piPremeasure m s ≤ piPremeasure m t :=
   Finset.prod_le_prod' fun i _ => (m i).mono' (image_subset _ h)
 #align measure_theory.pi_premeasure_pi_mono MeasureTheory.piPremeasure_pi_mono
+-/
 
+#print MeasureTheory.piPremeasure_pi_eval /-
 theorem piPremeasure_pi_eval {s : Set (∀ i, α i)} :
     piPremeasure m (pi univ fun i => eval i '' s) = piPremeasure m s := by simp [pi_premeasure_pi']
 #align measure_theory.pi_premeasure_pi_eval MeasureTheory.piPremeasure_pi_eval
+-/
 
 namespace OuterMeasure
 
@@ -216,13 +224,16 @@ protected def pi (m : ∀ i, OuterMeasure (α i)) : OuterMeasure (∀ i, α i) :
 #align measure_theory.outer_measure.pi MeasureTheory.OuterMeasure.pi
 -/
 
+#print MeasureTheory.OuterMeasure.pi_pi_le /-
 theorem pi_pi_le (m : ∀ i, OuterMeasure (α i)) (s : ∀ i, Set (α i)) :
     OuterMeasure.pi m (pi univ s) ≤ ∏ i, m i (s i) :=
   by
   cases' (pi univ s).eq_empty_or_nonempty with h h; simp [h]
   exact (bounded_by_le _).trans_eq (pi_premeasure_pi h)
 #align measure_theory.outer_measure.pi_pi_le MeasureTheory.OuterMeasure.pi_pi_le
+-/
 
+#print MeasureTheory.OuterMeasure.le_pi /-
 theorem le_pi {m : ∀ i, OuterMeasure (α i)} {n : OuterMeasure (∀ i, α i)} :
     n ≤ OuterMeasure.pi m ↔
       ∀ s : ∀ i, Set (α i), (pi univ s).Nonempty → n (pi univ s) ≤ ∏ i, m i (s i) :=
@@ -232,6 +243,7 @@ theorem le_pi {m : ∀ i, OuterMeasure (α i)} {n : OuterMeasure (∀ i, α i)}
   · intro h s hs; refine' le_trans (n.mono <| subset_pi_eval_image univ s) (h _ _)
     simp [univ_pi_nonempty_iff, hs]
 #align measure_theory.outer_measure.le_pi MeasureTheory.OuterMeasure.le_pi
+-/
 
 end OuterMeasure
 
@@ -245,24 +257,31 @@ open List
 
 variable {δ : Type _} {π : δ → Type _} [∀ x, MeasurableSpace (π x)]
 
+#print MeasureTheory.Measure.tprod /-
 -- for some reason the equation compiler doesn't like this definition
 /-- A product of measures in `tprod α l`. -/
 protected def tprod (l : List δ) (μ : ∀ i, Measure (π i)) : Measure (TProd π l) := by
   induction' l with i l ih; exact dirac PUnit.unit; exact (μ i).Prod ih
 #align measure_theory.measure.tprod MeasureTheory.Measure.tprod
+-/
 
+#print MeasureTheory.Measure.tprod_nil /-
 @[simp]
 theorem tprod_nil (μ : ∀ i, Measure (π i)) : Measure.tprod [] μ = dirac PUnit.unit :=
   rfl
 #align measure_theory.measure.tprod_nil MeasureTheory.Measure.tprod_nil
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print MeasureTheory.Measure.tprod_cons /-
 @[simp]
 theorem tprod_cons (i : δ) (l : List δ) (μ : ∀ i, Measure (π i)) :
     Measure.tprod (i::l) μ = (μ i).Prod (Measure.tprod l μ) :=
   rfl
 #align measure_theory.measure.tprod_cons MeasureTheory.Measure.tprod_cons
+-/
 
+#print MeasureTheory.Measure.sigmaFinite_tprod /-
 instance sigmaFinite_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
     SigmaFinite (Measure.tprod l μ) :=
   by
@@ -270,13 +289,16 @@ instance sigmaFinite_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, Si
   · rw [tprod_nil]; infer_instance
   · rw [tprod_cons]; skip; infer_instance
 #align measure_theory.measure.sigma_finite_tprod MeasureTheory.Measure.sigmaFinite_tprod
+-/
 
+#print MeasureTheory.Measure.tprod_tprod /-
 theorem tprod_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
     (s : ∀ i, Set (π i)) : Measure.tprod l μ (Set.tprod l s) = (l.map fun i => (μ i) (s i)).Prod :=
   by
   induction' l with i l ih; · simp
   rw [tprod_cons, Set.tprod, prod_prod, map_cons, prod_cons, ih]
 #align measure_theory.measure.tprod_tprod MeasureTheory.Measure.tprod_tprod
+-/
 
 end Tprod
 
@@ -286,13 +308,16 @@ open List MeasurableEquiv
 
 variable [Encodable ι]
 
+#print MeasureTheory.Measure.pi' /-
 /-- The product measure on an encodable finite type, defined by mapping `measure.tprod` along the
   equivalence `measurable_equiv.pi_measurable_equiv_tprod`.
   The definition `measure_theory.measure.pi` should be used instead of this one. -/
 def pi' : Measure (∀ i, α i) :=
   Measure.map (TProd.elim' mem_sortedUniv) (Measure.tprod (sortedUniv ι) μ)
 #align measure_theory.measure.pi' MeasureTheory.Measure.pi'
+-/
 
+#print MeasureTheory.Measure.pi'_pi /-
 theorem pi'_pi [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) : pi' μ (pi univ s) = ∏ i, μ i (s i) :=
   by
   rw [pi', ← MeasurableEquiv.piMeasurableEquivTProd_symm_apply, MeasurableEquiv.map_apply,
@@ -300,9 +325,11 @@ theorem pi'_pi [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) : pi' μ (pi
       List.prod_toFinset, sorted_univ_to_finset] <;>
     exact sorted_univ_nodup ι
 #align measure_theory.measure.pi'_pi MeasureTheory.Measure.pi'_pi
+-/
 
 end Encodable
 
+#print MeasureTheory.Measure.pi_caratheodory /-
 theorem pi_caratheodory :
     MeasurableSpace.pi ≤ (OuterMeasure.pi fun i => (μ i).toOuterMeasure).caratheodory :=
   by
@@ -318,6 +345,7 @@ theorem pi_caratheodory :
   · rintro j - hj; apply mono'; apply image_subset; apply inter_subset_left
   · rintro j - hj; apply mono'; apply image_subset; apply diff_subset
 #align measure_theory.measure.pi_caratheodory MeasureTheory.Measure.pi_caratheodory
+-/
 
 #print MeasureTheory.Measure.pi /-
 /-- `measure.pi μ` is the finite product of the measures `{μ i | i : ι}`.
@@ -327,6 +355,7 @@ protected irreducible_def pi : Measure (∀ i, α i) :=
 #align measure_theory.measure.pi MeasureTheory.Measure.pi
 -/
 
+#print MeasureTheory.Measure.pi_pi_aux /-
 theorem pi_pi_aux [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) (hs : ∀ i, MeasurableSet (s i)) :
     Measure.pi μ (pi univ s) = ∏ i, μ i (s i) :=
   by
@@ -345,6 +374,7 @@ theorem pi_pi_aux [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) (hs : ∀
     simp_rw [to_outer_measure_apply]
     exact (pi'_pi μ s).le
 #align measure_theory.measure.pi_pi_aux MeasureTheory.Measure.pi_pi_aux
+-/
 
 variable {μ}
 
@@ -380,6 +410,7 @@ def FiniteSpanningSetsIn.pi {C : ∀ i, Set (Set (α i))}
 #align measure_theory.measure.finite_spanning_sets_in.pi MeasureTheory.Measure.FiniteSpanningSetsIn.pi
 -/
 
+#print MeasureTheory.Measure.pi_eq_generateFrom /-
 /-- A measure on a finite product space equals the product measure if they are equal on rectangles
   with as sides sets that generate the corresponding σ-algebras. -/
 theorem pi_eq_generateFrom {C : ∀ i, Set (Set (α i))}
@@ -398,9 +429,11 @@ theorem pi_eq_generateFrom {C : ∀ i, Set (Set (α i))}
   haveI := fun i => (h3C i).SigmaFinite
   simp_rw [h₁ s hs, pi_pi_aux μ s fun i => h4C i _ (hs i)]
 #align measure_theory.measure.pi_eq_generate_from MeasureTheory.Measure.pi_eq_generateFrom
+-/
 
 variable [∀ i, SigmaFinite (μ i)]
 
+#print MeasureTheory.Measure.pi_eq /-
 /-- A measure on a finite product space equals the product measure if they are equal on
   rectangles. -/
 theorem pi_eq {μ' : Measure (∀ i, α i)}
@@ -409,31 +442,42 @@ theorem pi_eq {μ' : Measure (∀ i, α i)}
   pi_eq_generateFrom (fun i => generateFrom_measurableSet) (fun i => isPiSystem_measurableSet)
     (fun i => (μ i).toFiniteSpanningSetsIn) h
 #align measure_theory.measure.pi_eq MeasureTheory.Measure.pi_eq
+-/
 
 variable (μ)
 
+#print MeasureTheory.Measure.pi'_eq_pi /-
 theorem pi'_eq_pi [Encodable ι] : pi' μ = Measure.pi μ :=
   Eq.symm <| pi_eq fun s hs => pi'_pi μ s
 #align measure_theory.measure.pi'_eq_pi MeasureTheory.Measure.pi'_eq_pi
+-/
 
+#print MeasureTheory.Measure.pi_pi /-
 @[simp]
 theorem pi_pi (s : ∀ i, Set (α i)) : Measure.pi μ (pi univ s) = ∏ i, μ i (s i) :=
   by
   haveI : Encodable ι := Fintype.toEncodable ι
   rw [← pi'_eq_pi, pi'_pi]
 #align measure_theory.measure.pi_pi MeasureTheory.Measure.pi_pi
+-/
 
+#print MeasureTheory.Measure.pi_univ /-
 theorem pi_univ : Measure.pi μ univ = ∏ i, μ i univ := by rw [← pi_univ, pi_pi μ]
 #align measure_theory.measure.pi_univ MeasureTheory.Measure.pi_univ
+-/
 
+#print MeasureTheory.Measure.pi_ball /-
 theorem pi_ball [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 < r) :
     Measure.pi μ (Metric.ball x r) = ∏ i, μ i (Metric.ball (x i) r) := by rw [ball_pi _ hr, pi_pi]
 #align measure_theory.measure.pi_ball MeasureTheory.Measure.pi_ball
+-/
 
+#print MeasureTheory.Measure.pi_closedBall /-
 theorem pi_closedBall [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 ≤ r) :
     Measure.pi μ (Metric.closedBall x r) = ∏ i, μ i (Metric.closedBall (x i) r) := by
   rw [closedBall_pi _ hr, pi_pi]
 #align measure_theory.measure.pi_closed_ball MeasureTheory.Measure.pi_closedBall
+-/
 
 #print MeasureTheory.Measure.pi.sigmaFinite /-
 instance pi.sigmaFinite : SigmaFinite (Measure.pi μ) :=
@@ -441,6 +485,7 @@ instance pi.sigmaFinite : SigmaFinite (Measure.pi μ) :=
 #align measure_theory.measure.pi.sigma_finite MeasureTheory.Measure.pi.sigmaFinite
 -/
 
+#print MeasureTheory.Measure.pi_of_empty /-
 theorem pi_of_empty {α : Type _} [IsEmpty α] {β : α → Type _} {m : ∀ a, MeasurableSpace (β a)}
     (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) : Measure.pi μ = dirac x :=
   by
@@ -449,7 +494,9 @@ theorem pi_of_empty {α : Type _} [IsEmpty α] {β : α → Type _} {m : ∀ a,
   rw [Fintype.prod_empty, dirac_apply_of_mem]
   exact isEmptyElim
 #align measure_theory.measure.pi_of_empty MeasureTheory.Measure.pi_of_empty
+-/
 
+#print MeasureTheory.Measure.pi_eval_preimage_null /-
 theorem pi_eval_preimage_null {i : ι} {s : Set (α i)} (hs : μ i s = 0) :
     Measure.pi μ (eval i ⁻¹' s) = 0 :=
   by
@@ -463,11 +510,14 @@ theorem pi_eval_preimage_null {i : ι} {s : Set (α i)} (hs : μ i s = 0) :
   apply Finset.prod_eq_zero (Finset.mem_univ i)
   simp [hμt]
 #align measure_theory.measure.pi_eval_preimage_null MeasureTheory.Measure.pi_eval_preimage_null
+-/
 
+#print MeasureTheory.Measure.pi_hyperplane /-
 theorem pi_hyperplane (i : ι) [NoAtoms (μ i)] (x : α i) :
     Measure.pi μ {f : ∀ i, α i | f i = x} = 0 :=
   show Measure.pi μ (eval i ⁻¹' {x}) = 0 from pi_eval_preimage_null _ (measure_singleton x)
 #align measure_theory.measure.pi_hyperplane MeasureTheory.Measure.pi_hyperplane
+-/
 
 #print MeasureTheory.Measure.ae_eval_ne /-
 theorem ae_eval_ne (i : ι) [NoAtoms (μ i)] (x : α i) : ∀ᵐ y : ∀ i, α i ∂Measure.pi μ, y i ≠ x :=
@@ -477,13 +527,17 @@ theorem ae_eval_ne (i : ι) [NoAtoms (μ i)] (x : α i) : ∀ᵐ y : ∀ i, α i
 
 variable {μ}
 
+#print MeasureTheory.Measure.tendsto_eval_ae_ae /-
 theorem tendsto_eval_ae_ae {i : ι} : Tendsto (eval i) (Measure.pi μ).ae (μ i).ae := fun s hs =>
   pi_eval_preimage_null μ hs
 #align measure_theory.measure.tendsto_eval_ae_ae MeasureTheory.Measure.tendsto_eval_ae_ae
+-/
 
+#print MeasureTheory.Measure.ae_pi_le_pi /-
 theorem ae_pi_le_pi : (Measure.pi μ).ae ≤ Filter.pi fun i => (μ i).ae :=
   le_iInf fun i => tendsto_eval_ae_ae.le_comap
 #align measure_theory.measure.ae_pi_le_pi MeasureTheory.Measure.ae_pi_le_pi
+-/
 
 #print MeasureTheory.Measure.ae_eq_pi /-
 theorem ae_eq_pi {β : ι → Type _} {f f' : ∀ i, α i → β i} (h : ∀ i, f i =ᵐ[μ i] f' i) :
@@ -500,30 +554,38 @@ theorem ae_le_pi {β : ι → Type _} [∀ i, Preorder (β i)] {f f' : ∀ i, α
 #align measure_theory.measure.ae_le_pi MeasureTheory.Measure.ae_le_pi
 -/
 
+#print MeasureTheory.Measure.ae_le_set_pi /-
 theorem ae_le_set_pi {I : Set ι} {s t : ∀ i, Set (α i)} (h : ∀ i ∈ I, s i ≤ᵐ[μ i] t i) :
     Set.pi I s ≤ᵐ[Measure.pi μ] Set.pi I t :=
   ((eventually_all_finite I.toFinite).2 fun i hi => tendsto_eval_ae_ae.Eventually (h i hi)).mono
     fun x hst hx i hi => hst i hi <| hx i hi
 #align measure_theory.measure.ae_le_set_pi MeasureTheory.Measure.ae_le_set_pi
+-/
 
+#print MeasureTheory.Measure.ae_eq_set_pi /-
 theorem ae_eq_set_pi {I : Set ι} {s t : ∀ i, Set (α i)} (h : ∀ i ∈ I, s i =ᵐ[μ i] t i) :
     Set.pi I s =ᵐ[Measure.pi μ] Set.pi I t :=
   (ae_le_set_pi fun i hi => (h i hi).le).antisymm (ae_le_set_pi fun i hi => (h i hi).symm.le)
 #align measure_theory.measure.ae_eq_set_pi MeasureTheory.Measure.ae_eq_set_pi
+-/
 
 section Intervals
 
 variable {μ} [∀ i, PartialOrder (α i)] [∀ i, NoAtoms (μ i)]
 
+#print MeasureTheory.Measure.pi_Iio_ae_eq_pi_Iic /-
 theorem pi_Iio_ae_eq_pi_Iic {s : Set ι} {f : ∀ i, α i} :
     (pi s fun i => Iio (f i)) =ᵐ[Measure.pi μ] pi s fun i => Iic (f i) :=
   ae_eq_set_pi fun i hi => Iio_ae_eq_Iic
 #align measure_theory.measure.pi_Iio_ae_eq_pi_Iic MeasureTheory.Measure.pi_Iio_ae_eq_pi_Iic
+-/
 
+#print MeasureTheory.Measure.pi_Ioi_ae_eq_pi_Ici /-
 theorem pi_Ioi_ae_eq_pi_Ici {s : Set ι} {f : ∀ i, α i} :
     (pi s fun i => Ioi (f i)) =ᵐ[Measure.pi μ] pi s fun i => Ici (f i) :=
   ae_eq_set_pi fun i hi => Ioi_ae_eq_Ici
 #align measure_theory.measure.pi_Ioi_ae_eq_pi_Ici MeasureTheory.Measure.pi_Ioi_ae_eq_pi_Ici
+-/
 
 #print MeasureTheory.Measure.univ_pi_Iio_ae_eq_Iic /-
 theorem univ_pi_Iio_ae_eq_Iic {f : ∀ i, α i} :
@@ -539,15 +601,19 @@ theorem univ_pi_Ioi_ae_eq_Ici {f : ∀ i, α i} :
 #align measure_theory.measure.univ_pi_Ioi_ae_eq_Ici MeasureTheory.Measure.univ_pi_Ioi_ae_eq_Ici
 -/
 
+#print MeasureTheory.Measure.pi_Ioo_ae_eq_pi_Icc /-
 theorem pi_Ioo_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
     (pi s fun i => Ioo (f i) (g i)) =ᵐ[Measure.pi μ] pi s fun i => Icc (f i) (g i) :=
   ae_eq_set_pi fun i hi => Ioo_ae_eq_Icc
 #align measure_theory.measure.pi_Ioo_ae_eq_pi_Icc MeasureTheory.Measure.pi_Ioo_ae_eq_pi_Icc
+-/
 
+#print MeasureTheory.Measure.pi_Ioo_ae_eq_pi_Ioc /-
 theorem pi_Ioo_ae_eq_pi_Ioc {s : Set ι} {f g : ∀ i, α i} :
     (pi s fun i => Ioo (f i) (g i)) =ᵐ[Measure.pi μ] pi s fun i => Ioc (f i) (g i) :=
   ae_eq_set_pi fun i hi => Ioo_ae_eq_Ioc
 #align measure_theory.measure.pi_Ioo_ae_eq_pi_Ioc MeasureTheory.Measure.pi_Ioo_ae_eq_pi_Ioc
+-/
 
 #print MeasureTheory.Measure.univ_pi_Ioo_ae_eq_Icc /-
 theorem univ_pi_Ioo_ae_eq_Icc {f g : ∀ i, α i} :
@@ -556,10 +622,12 @@ theorem univ_pi_Ioo_ae_eq_Icc {f g : ∀ i, α i} :
 #align measure_theory.measure.univ_pi_Ioo_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ioo_ae_eq_Icc
 -/
 
+#print MeasureTheory.Measure.pi_Ioc_ae_eq_pi_Icc /-
 theorem pi_Ioc_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
     (pi s fun i => Ioc (f i) (g i)) =ᵐ[Measure.pi μ] pi s fun i => Icc (f i) (g i) :=
   ae_eq_set_pi fun i hi => Ioc_ae_eq_Icc
 #align measure_theory.measure.pi_Ioc_ae_eq_pi_Icc MeasureTheory.Measure.pi_Ioc_ae_eq_pi_Icc
+-/
 
 #print MeasureTheory.Measure.univ_pi_Ioc_ae_eq_Icc /-
 theorem univ_pi_Ioc_ae_eq_Icc {f g : ∀ i, α i} :
@@ -568,10 +636,12 @@ theorem univ_pi_Ioc_ae_eq_Icc {f g : ∀ i, α i} :
 #align measure_theory.measure.univ_pi_Ioc_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ioc_ae_eq_Icc
 -/
 
+#print MeasureTheory.Measure.pi_Ico_ae_eq_pi_Icc /-
 theorem pi_Ico_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
     (pi s fun i => Ico (f i) (g i)) =ᵐ[Measure.pi μ] pi s fun i => Icc (f i) (g i) :=
   ae_eq_set_pi fun i hi => Ico_ae_eq_Icc
 #align measure_theory.measure.pi_Ico_ae_eq_pi_Icc MeasureTheory.Measure.pi_Ico_ae_eq_pi_Icc
+-/
 
 #print MeasureTheory.Measure.univ_pi_Ico_ae_eq_Icc /-
 theorem univ_pi_Ico_ae_eq_Icc {f g : ∀ i, α i} :
@@ -604,6 +674,7 @@ instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)]
 
 variable (μ)
 
+#print MeasureTheory.Measure.pi.isMulLeftInvariant /-
 @[to_additive]
 instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
     [∀ i, IsMulLeftInvariant (μ i)] : IsMulLeftInvariant (Measure.pi μ) :=
@@ -614,7 +685,9 @@ instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i
   simp_rw [measure_preimage_mul]
 #align measure_theory.measure.pi.is_mul_left_invariant MeasureTheory.Measure.pi.isMulLeftInvariant
 #align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.isAddLeftInvariant
+-/
 
+#print MeasureTheory.Measure.pi.isMulRightInvariant /-
 @[to_additive]
 instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
     [∀ i, IsMulRightInvariant (μ i)] : IsMulRightInvariant (Measure.pi μ) :=
@@ -625,7 +698,9 @@ instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α
   simp_rw [measure_preimage_mul_right]
 #align measure_theory.measure.pi.is_mul_right_invariant MeasureTheory.Measure.pi.isMulRightInvariant
 #align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.isAddRightInvariant
+-/
 
+#print MeasureTheory.Measure.pi.isInvInvariant /-
 @[to_additive]
 instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
     [∀ i, IsInvInvariant (μ i)] : IsInvInvariant (Measure.pi μ) :=
@@ -636,6 +711,7 @@ instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
     measure_preimage_inv]
 #align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
 #align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.isNegInvariant
+-/
 
 #print MeasureTheory.Measure.pi.isOpenPosMeasure /-
 instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
@@ -667,17 +743,21 @@ instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
 #align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.isFiniteMeasureOnCompacts
 -/
 
+#print MeasureTheory.Measure.pi.isHaarMeasure /-
 @[to_additive]
 instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
     [∀ i, IsHaarMeasure (μ i)] [∀ i, MeasurableMul (α i)] : IsHaarMeasure (Measure.pi μ) where
 #align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.isHaarMeasure
 #align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.isAddHaarMeasure
+-/
 
 end Measure
 
+#print MeasureTheory.MeasureSpace.pi /-
 instance MeasureSpace.pi [∀ i, MeasureSpace (α i)] : MeasureSpace (∀ i, α i) :=
   ⟨Measure.pi fun i => volume⟩
 #align measure_theory.measure_space.pi MeasureTheory.MeasureSpace.pi
+-/
 
 #print MeasureTheory.volume_pi /-
 theorem volume_pi [∀ i, MeasureSpace (α i)] :
@@ -693,20 +773,25 @@ theorem volume_pi_pi [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume :
 #align measure_theory.volume_pi_pi MeasureTheory.volume_pi_pi
 -/
 
+#print MeasureTheory.volume_pi_ball /-
 theorem volume_pi_ball [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))]
     [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 < r) :
     volume (Metric.ball x r) = ∏ i, volume (Metric.ball (x i) r) :=
   Measure.pi_ball _ _ hr
 #align measure_theory.volume_pi_ball MeasureTheory.volume_pi_ball
+-/
 
+#print MeasureTheory.volume_pi_closedBall /-
 theorem volume_pi_closedBall [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))]
     [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 ≤ r) :
     volume (Metric.closedBall x r) = ∏ i, volume (Metric.closedBall (x i) r) :=
   Measure.pi_closedBall _ _ hr
 #align measure_theory.volume_pi_closed_ball MeasureTheory.volume_pi_closedBall
+-/
 
 open Measure
 
+#print MeasureTheory.Pi.isMulLeftInvariant_volume /-
 /-- We intentionally restrict this only to the nondependent function space, since type-class
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
@@ -717,7 +802,9 @@ instance Pi.isMulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
   pi.isMulLeftInvariant _
 #align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariant_volume
 #align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.isAddLeftInvariant_volume
+-/
 
+#print MeasureTheory.Pi.isInvInvariant_volume /-
 /-- We intentionally restrict this only to the nondependent function space, since type-class
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
@@ -728,6 +815,7 @@ instance Pi.isInvInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite
   pi.isInvInvariant _
 #align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariant_volume
 #align measure_theory.pi.is_neg_invariant_volume MeasureTheory.Pi.isNegInvariant_volume
+-/
 
 /-!
 ### Measure preserving equivalences
@@ -761,12 +849,15 @@ theorem measurePreserving_piEquivPiSubtypeProd {ι : Type u} {α : ι → Type v
 #align measure_theory.measure_preserving_pi_equiv_pi_subtype_prod MeasureTheory.measurePreserving_piEquivPiSubtypeProd
 -/
 
+#print MeasureTheory.volume_preserving_piEquivPiSubtypeProd /-
 theorem volume_preserving_piEquivPiSubtypeProd {ι : Type _} (α : ι → Type _) [Fintype ι]
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (p : ι → Prop)
     [DecidablePred p] : MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) :=
   measurePreserving_piEquivPiSubtypeProd (fun i => volume) p
 #align measure_theory.volume_preserving_pi_equiv_pi_subtype_prod MeasureTheory.volume_preserving_piEquivPiSubtypeProd
+-/
 
+#print MeasureTheory.measurePreserving_piFinSuccAboveEquiv /-
 theorem measurePreserving_piFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Type u}
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (i : Fin (n + 1)) :
@@ -780,12 +871,15 @@ theorem measurePreserving_piFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Ty
   congr 1 with ⟨x, f⟩
   simp [i.forall_iff_succ_above]
 #align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreserving_piFinSuccAboveEquiv
+-/
 
+#print MeasureTheory.volume_preserving_piFinSuccAboveEquiv /-
 theorem volume_preserving_piFinSuccAboveEquiv {n : ℕ} (α : Fin (n + 1) → Type u)
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (i : Fin (n + 1)) :
     MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) :=
   measurePreserving_piFinSuccAboveEquiv (fun _ => volume) i
 #align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAboveEquiv
+-/
 
 #print MeasureTheory.measurePreserving_funUnique /-
 theorem measurePreserving_funUnique {β : Type u} {m : MeasurableSpace β} (μ : Measure β)
@@ -810,6 +904,7 @@ theorem volume_preserving_funUnique (α : Type u) (β : Type v) [Unique α] [Mea
 #align measure_theory.volume_preserving_fun_unique MeasureTheory.volume_preserving_funUnique
 -/
 
+#print MeasureTheory.measurePreserving_piFinTwo /-
 theorem measurePreserving_piFinTwo {α : Fin 2 → Type u} {m : ∀ i, MeasurableSpace (α i)}
     (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)] :
     MeasurePreserving (MeasurableEquiv.piFinTwo α) (Measure.pi μ) ((μ 0).Prod (μ 1)) :=
@@ -819,12 +914,15 @@ theorem measurePreserving_piFinTwo {α : Fin 2 → Type u} {m : ∀ i, Measurabl
     measure.pi_pi, Fin.prod_univ_two]
   rfl
 #align measure_theory.measure_preserving_pi_fin_two MeasureTheory.measurePreserving_piFinTwo
+-/
 
+#print MeasureTheory.volume_preserving_piFinTwo /-
 theorem volume_preserving_piFinTwo (α : Fin 2 → Type u) [∀ i, MeasureSpace (α i)]
     [∀ i, SigmaFinite (volume : Measure (α i))] :
     MeasurePreserving (MeasurableEquiv.piFinTwo α) volume volume :=
   measurePreserving_piFinTwo _
 #align measure_theory.volume_preserving_pi_fin_two MeasureTheory.volume_preserving_piFinTwo
+-/
 
 #print MeasureTheory.measurePreserving_finTwoArrow_vec /-
 theorem measurePreserving_finTwoArrow_vec {α : Type u} {m : MeasurableSpace α} (μ ν : Measure α)
Diff
@@ -373,7 +373,6 @@ def FiniteSpanningSetsIn.pi {C : ∀ i, Set (Set (α i))}
         (pi_pi_aux μ _ fun i => measurable_set_to_measurable _ _)
       _ = ∏ i, μ i ((hμ i).Set (e n i)) := by simp only [measure_to_measurable]
       _ < ∞ := ENNReal.prod_lt_top fun i hi => ((hμ i).Finite _).Ne
-      
   ·
     simp_rw [(surjective_decode_iget (ι → ℕ)).iUnion_comp fun x =>
         pi univ fun i => (hμ i).Set (x i),
Diff
@@ -676,11 +676,9 @@ instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
 
 end Measure
 
-#print MeasureTheory.MeasureSpace.pi /-
 instance MeasureSpace.pi [∀ i, MeasureSpace (α i)] : MeasureSpace (∀ i, α i) :=
   ⟨Measure.pi fun i => volume⟩
 #align measure_theory.measure_space.pi MeasureTheory.MeasureSpace.pi
--/
 
 #print MeasureTheory.volume_pi /-
 theorem volume_pi [∀ i, MeasureSpace (α i)] :
@@ -689,10 +687,12 @@ theorem volume_pi [∀ i, MeasureSpace (α i)] :
 #align measure_theory.volume_pi MeasureTheory.volume_pi
 -/
 
+#print MeasureTheory.volume_pi_pi /-
 theorem volume_pi_pi [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))]
     (s : ∀ i, Set (α i)) : volume (pi univ s) = ∏ i, volume (s i) :=
   Measure.pi_pi (fun i => volume) s
 #align measure_theory.volume_pi_pi MeasureTheory.volume_pi_pi
+-/
 
 theorem volume_pi_ball [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))]
     [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (hr : 0 < r) :
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.pi
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Topology.Constructions
 /-!
 # Product measures
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we define and prove properties about finite products of measures
 (and at some point, countable products of measures).
 
@@ -85,7 +88,7 @@ theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i
 #print isPiSystem_pi /-
 /-- Boxes form a π-system. -/
 theorem isPiSystem_pi [∀ i, MeasurableSpace (α i)] :
-    IsPiSystem (pi univ '' pi univ fun i => { s : Set (α i) | MeasurableSet s }) :=
+    IsPiSystem (pi univ '' pi univ fun i => {s : Set (α i) | MeasurableSet s}) :=
   IsPiSystem.pi fun i => isPiSystem_measurableSet
 #align is_pi_system_pi isPiSystem_pi
 -/
@@ -152,7 +155,7 @@ theorem generateFrom_eq_pi [h : ∀ i, MeasurableSpace (α i)] {C : ∀ i, Set (
 /-- The product σ-algebra is generated from boxes, i.e. `s ×ˢ t` for sets `s : set α` and
   `t : set β`. -/
 theorem generateFrom_pi [∀ i, MeasurableSpace (α i)] :
-    generateFrom (pi univ '' pi univ fun i => { s : Set (α i) | MeasurableSet s }) =
+    generateFrom (pi univ '' pi univ fun i => {s : Set (α i) | MeasurableSet s}) =
       MeasurableSpace.pi :=
   generateFrom_eq_pi (fun i => generateFrom_measurableSet) fun i =>
     isCountablySpanning_measurableSet
@@ -463,7 +466,7 @@ theorem pi_eval_preimage_null {i : ι} {s : Set (α i)} (hs : μ i s = 0) :
 #align measure_theory.measure.pi_eval_preimage_null MeasureTheory.Measure.pi_eval_preimage_null
 
 theorem pi_hyperplane (i : ι) [NoAtoms (μ i)] (x : α i) :
-    Measure.pi μ { f : ∀ i, α i | f i = x } = 0 :=
+    Measure.pi μ {f : ∀ i, α i | f i = x} = 0 :=
   show Measure.pi μ (eval i ⁻¹' {x}) = 0 from pi_eval_preimage_null _ (measure_singleton x)
 #align measure_theory.measure.pi_hyperplane MeasureTheory.Measure.pi_hyperplane
 
@@ -591,8 +594,8 @@ theorem pi_noAtoms (i : ι) [NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
 instance [h : Nonempty ι] [∀ i, NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   h.elim fun i => pi_noAtoms i
 
-instance [∀ i, TopologicalSpace (α i)] [∀ i, LocallyFiniteMeasure (μ i)] :
-    LocallyFiniteMeasure (Measure.pi μ) :=
+instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)] :
+    IsLocallyFiniteMeasure (Measure.pi μ) :=
   by
   refine' ⟨fun x => _⟩
   choose s hxs ho hμ using fun i => (μ i).exists_isOpen_measure_lt_top (x i)
@@ -604,7 +607,7 @@ variable (μ)
 
 @[to_additive]
 instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
-    [∀ i, MulLeftInvariant (μ i)] : MulLeftInvariant (Measure.pi μ) :=
+    [∀ i, IsMulLeftInvariant (μ i)] : IsMulLeftInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_const_mul _) (MeasurableSet.univ_pi hs),
@@ -615,7 +618,7 @@ instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i
 
 @[to_additive]
 instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
-    [∀ i, MulRightInvariant (μ i)] : MulRightInvariant (Measure.pi μ) :=
+    [∀ i, IsMulRightInvariant (μ i)] : IsMulRightInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_mul_const _) (MeasurableSet.univ_pi hs),
@@ -625,8 +628,8 @@ instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α
 #align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.isAddRightInvariant
 
 @[to_additive]
-instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)] [∀ i, InvInvariant (μ i)] :
-    InvInvariant (Measure.pi μ) :=
+instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
+    [∀ i, IsInvInvariant (μ i)] : IsInvInvariant (Measure.pi μ) :=
   by
   refine' ⟨(measure.pi_eq fun s hs => _).symm⟩
   have A : Inv.inv ⁻¹' pi univ s = Set.pi univ fun i => Inv.inv ⁻¹' s i := by ext; simp
@@ -635,9 +638,9 @@ instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)] [
 #align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
 #align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.isNegInvariant
 
-#print MeasureTheory.Measure.pi.openPosMeasure /-
-instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasure (μ i)] :
-    OpenPosMeasure (MeasureTheory.Measure.pi μ) :=
+#print MeasureTheory.Measure.pi.isOpenPosMeasure /-
+instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
+    IsOpenPosMeasure (MeasureTheory.Measure.pi μ) :=
   by
   constructor
   rintro U U_open ⟨a, ha⟩
@@ -647,12 +650,13 @@ instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasu
   rw [CanonicallyOrderedCommSemiring.prod_pos]
   intro i _
   apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
-#align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.openPosMeasure
+#align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.isOpenPosMeasure
 -/
 
-#print MeasureTheory.Measure.pi.finiteMeasureOnCompacts /-
-instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
-    [∀ i, FiniteMeasureOnCompacts (μ i)] : FiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) :=
+#print MeasureTheory.Measure.pi.isFiniteMeasureOnCompacts /-
+instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
+    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
+    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) :=
   by
   constructor
   intro K hK
@@ -661,12 +665,12 @@ instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
   rw [measure.pi_pi]
   refine' WithTop.prod_lt_top _
   exact fun i _ => ne_of_lt (IsCompact.measure_lt_top (IsCompact.image hK (continuous_apply i)))
-#align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.finiteMeasureOnCompacts
+#align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.isFiniteMeasureOnCompacts
 -/
 
 @[to_additive]
-instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)] [∀ i, HaarMeasure (μ i)]
-    [∀ i, MeasurableMul (α i)] : HaarMeasure (Measure.pi μ) where
+instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
+    [∀ i, IsHaarMeasure (μ i)] [∀ i, MeasurableMul (α i)] : IsHaarMeasure (Measure.pi μ) where
 #align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.isHaarMeasure
 #align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.isAddHaarMeasure
 
@@ -709,8 +713,8 @@ inference cannot find an instance for `ι → ℝ` when this is stated for depen
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
 instance Pi.isMulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
-    [SigmaFinite (volume : Measure α)] [MeasurableMul α] [MulLeftInvariant (volume : Measure α)] :
-    MulLeftInvariant (volume : Measure (ι → α)) :=
+    [SigmaFinite (volume : Measure α)] [MeasurableMul α] [IsMulLeftInvariant (volume : Measure α)] :
+    IsMulLeftInvariant (volume : Measure (ι → α)) :=
   pi.isMulLeftInvariant _
 #align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariant_volume
 #align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.isAddLeftInvariant_volume
@@ -720,8 +724,8 @@ inference cannot find an instance for `ι → ℝ` when this is stated for depen
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
 instance Pi.isInvInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
-    [MeasurableInv α] [InvInvariant (volume : Measure α)] :
-    InvInvariant (volume : Measure (ι → α)) :=
+    [MeasurableInv α] [IsInvInvariant (volume : Measure α)] :
+    IsInvInvariant (volume : Measure (ι → α)) :=
   pi.isInvInvariant _
 #align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariant_volume
 #align measure_theory.pi.is_neg_invariant_volume MeasureTheory.Pi.isNegInvariant_volume
Diff
@@ -77,7 +77,7 @@ theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i
     IsPiSystem (pi univ '' pi univ C) :=
   by
   rintro _ ⟨s₁, hs₁, rfl⟩ _ ⟨s₂, hs₂, rfl⟩ hst
-  rw [← pi_inter_distrib] at hst⊢; rw [univ_pi_nonempty_iff] at hst
+  rw [← pi_inter_distrib] at hst ⊢; rw [univ_pi_nonempty_iff] at hst 
   exact mem_image_of_mem _ fun i _ => hC i _ (hs₁ i (mem_univ i)) _ (hs₂ i (mem_univ i)) (hst i)
 #align is_pi_system.pi IsPiSystem.pi
 -/
@@ -126,7 +126,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
         pi univ fun k => ⋃ j : ℕ, @update ι (fun i' => Set (α i')) _ (fun i' => t i' j) i s k :=
       by
       ext; simp_rw [mem_univ_pi]; apply forall_congr'; intro i'
-      by_cases i' = i; · subst h; simp; · rw [← Ne.def] at h; simp [h]
+      by_cases i' = i; · subst h; simp; · rw [← Ne.def] at h ; simp [h]
     rw [this, ← Union_univ_pi]
     apply MeasurableSet.iUnion
     intro n; apply measurable_set_generate_from
@@ -305,7 +305,7 @@ theorem pi_caratheodory :
   by
   refine' iSup_le _
   intro i s hs
-  rw [MeasurableSpace.comap] at hs
+  rw [MeasurableSpace.comap] at hs 
   rcases hs with ⟨s, hs, rfl⟩
   apply bounded_by_caratheodory
   intro t
@@ -392,7 +392,7 @@ theorem pi_eq_generateFrom {C : ∀ i, Set (Set (α i))}
     (finite_spanning_sets_in.pi h3C).ext
       (generateFrom_eq_pi hC fun i => (h3C i).IsCountablySpanning).symm (IsPiSystem.pi h2C) _
   rintro _ ⟨s, hs, rfl⟩
-  rw [mem_univ_pi] at hs
+  rw [mem_univ_pi] at hs 
   haveI := fun i => (h3C i).SigmaFinite
   simp_rw [h₁ s hs, pi_pi_aux μ s fun i => h4C i _ (hs i)]
 #align measure_theory.measure.pi_eq_generate_from MeasureTheory.Measure.pi_eq_generateFrom
Diff
@@ -71,6 +71,7 @@ variable {ι ι' : Type _} {α : ι → Type _}
 /-! We start with some measurability properties -/
 
 
+#print IsPiSystem.pi /-
 /-- Boxes formed by π-systems form a π-system. -/
 theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i)) :
     IsPiSystem (pi univ '' pi univ C) :=
@@ -79,17 +80,21 @@ theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i
   rw [← pi_inter_distrib] at hst⊢; rw [univ_pi_nonempty_iff] at hst
   exact mem_image_of_mem _ fun i _ => hC i _ (hs₁ i (mem_univ i)) _ (hs₂ i (mem_univ i)) (hst i)
 #align is_pi_system.pi IsPiSystem.pi
+-/
 
+#print isPiSystem_pi /-
 /-- Boxes form a π-system. -/
 theorem isPiSystem_pi [∀ i, MeasurableSpace (α i)] :
     IsPiSystem (pi univ '' pi univ fun i => { s : Set (α i) | MeasurableSet s }) :=
   IsPiSystem.pi fun i => isPiSystem_measurableSet
 #align is_pi_system_pi isPiSystem_pi
+-/
 
 section Finite
 
 variable [Finite ι] [Finite ι']
 
+#print IsCountablySpanning.pi /-
 /-- Boxes of countably spanning sets are countably spanning. -/
 theorem IsCountablySpanning.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountablySpanning (C i)) :
     IsCountablySpanning (pi univ '' pi univ C) :=
@@ -101,7 +106,9 @@ theorem IsCountablySpanning.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCoun
   simp_rw [(surjective_decode_iget (ι → ℕ)).iUnion_comp fun x => pi univ fun i => s i (x i),
     Union_univ_pi s, h2s, pi_univ]
 #align is_countably_spanning.pi IsCountablySpanning.pi
+-/
 
+#print generateFrom_pi_eq /-
 /-- The product of generated σ-algebras is the one generated by boxes, if both generating sets
   are countably spanning. -/
 theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountablySpanning (C i)) :
@@ -129,7 +136,9 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
     rw [univ_pi_eq_Inter]; apply MeasurableSet.iInter; intro i; apply measurable_pi_apply
     exact measurable_set_generate_from (hs i (mem_univ i))
 #align generate_from_pi_eq generateFrom_pi_eq
+-/
 
+#print generateFrom_eq_pi /-
 /-- If `C` and `D` generate the σ-algebras on `α` resp. `β`, then rectangles formed by `C` and `D`
   generate the σ-algebra on `α × β`. -/
 theorem generateFrom_eq_pi [h : ∀ i, MeasurableSpace (α i)] {C : ∀ i, Set (Set (α i))}
@@ -137,7 +146,9 @@ theorem generateFrom_eq_pi [h : ∀ i, MeasurableSpace (α i)] {C : ∀ i, Set (
     generateFrom (pi univ '' pi univ C) = MeasurableSpace.pi := by
   rw [← funext hC, generateFrom_pi_eq h2C]
 #align generate_from_eq_pi generateFrom_eq_pi
+-/
 
+#print generateFrom_pi /-
 /-- The product σ-algebra is generated from boxes, i.e. `s ×ˢ t` for sets `s : set α` and
   `t : set β`. -/
 theorem generateFrom_pi [∀ i, MeasurableSpace (α i)] :
@@ -146,6 +157,7 @@ theorem generateFrom_pi [∀ i, MeasurableSpace (α i)] :
   generateFrom_eq_pi (fun i => generateFrom_measurableSet) fun i =>
     isCountablySpanning_measurableSet
 #align generate_from_pi generateFrom_pi
+-/
 
 end Finite
 
@@ -153,6 +165,7 @@ namespace MeasureTheory
 
 variable [Fintype ι] {m : ∀ i, OuterMeasure (α i)}
 
+#print MeasureTheory.piPremeasure /-
 /-- An upper bound for the measure in a finite product space.
   It is defined to by taking the image of the set under all projections, and taking the product
   of the measures of these images.
@@ -161,6 +174,7 @@ variable [Fintype ι] {m : ∀ i, OuterMeasure (α i)}
 def piPremeasure (m : ∀ i, OuterMeasure (α i)) (s : Set (∀ i, α i)) : ℝ≥0∞ :=
   ∏ i, m i (eval i '' s)
 #align measure_theory.pi_premeasure MeasureTheory.piPremeasure
+-/
 
 theorem piPremeasure_pi {s : ∀ i, Set (α i)} (hs : (pi univ s).Nonempty) :
     piPremeasure m (pi univ s) = ∏ i, m i (s i) := by simp [hs]
@@ -189,6 +203,7 @@ theorem piPremeasure_pi_eval {s : Set (∀ i, α i)} :
 
 namespace OuterMeasure
 
+#print MeasureTheory.OuterMeasure.pi /-
 /-- `outer_measure.pi m` is the finite product of the outer measures `{m i | i : ι}`.
   It is defined to be the maximal outer measure `n` with the property that
   `n (pi univ s) ≤ ∏ i, m i (s i)`, where `pi univ s` is the product of the sets
@@ -196,6 +211,7 @@ namespace OuterMeasure
 protected def pi (m : ∀ i, OuterMeasure (α i)) : OuterMeasure (∀ i, α i) :=
   boundedBy (piPremeasure m)
 #align measure_theory.outer_measure.pi MeasureTheory.OuterMeasure.pi
+-/
 
 theorem pi_pi_le (m : ∀ i, OuterMeasure (α i)) (s : ∀ i, Set (α i)) :
     OuterMeasure.pi m (pi univ s) ≤ ∏ i, m i (s i) :=
@@ -233,31 +249,31 @@ protected def tprod (l : List δ) (μ : ∀ i, Measure (π i)) : Measure (TProd
 #align measure_theory.measure.tprod MeasureTheory.Measure.tprod
 
 @[simp]
-theorem tProd_nil (μ : ∀ i, Measure (π i)) : Measure.tprod [] μ = dirac PUnit.unit :=
+theorem tprod_nil (μ : ∀ i, Measure (π i)) : Measure.tprod [] μ = dirac PUnit.unit :=
   rfl
-#align measure_theory.measure.tprod_nil MeasureTheory.Measure.tProd_nil
+#align measure_theory.measure.tprod_nil MeasureTheory.Measure.tprod_nil
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 @[simp]
-theorem tProd_cons (i : δ) (l : List δ) (μ : ∀ i, Measure (π i)) :
+theorem tprod_cons (i : δ) (l : List δ) (μ : ∀ i, Measure (π i)) :
     Measure.tprod (i::l) μ = (μ i).Prod (Measure.tprod l μ) :=
   rfl
-#align measure_theory.measure.tprod_cons MeasureTheory.Measure.tProd_cons
+#align measure_theory.measure.tprod_cons MeasureTheory.Measure.tprod_cons
 
-instance sigmaFinite_tProd (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
+instance sigmaFinite_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
     SigmaFinite (Measure.tprod l μ) :=
   by
   induction' l with i l ih
   · rw [tprod_nil]; infer_instance
   · rw [tprod_cons]; skip; infer_instance
-#align measure_theory.measure.sigma_finite_tprod MeasureTheory.Measure.sigmaFinite_tProd
+#align measure_theory.measure.sigma_finite_tprod MeasureTheory.Measure.sigmaFinite_tprod
 
-theorem tProd_tProd (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
+theorem tprod_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
     (s : ∀ i, Set (π i)) : Measure.tprod l μ (Set.tprod l s) = (l.map fun i => (μ i) (s i)).Prod :=
   by
   induction' l with i l ih; · simp
   rw [tprod_cons, Set.tprod, prod_prod, map_cons, prod_cons, ih]
-#align measure_theory.measure.tprod_tprod MeasureTheory.Measure.tProd_tProd
+#align measure_theory.measure.tprod_tprod MeasureTheory.Measure.tprod_tprod
 
 end Tprod
 
@@ -300,11 +316,13 @@ theorem pi_caratheodory :
   · rintro j - hj; apply mono'; apply image_subset; apply diff_subset
 #align measure_theory.measure.pi_caratheodory MeasureTheory.Measure.pi_caratheodory
 
+#print MeasureTheory.Measure.pi /-
 /-- `measure.pi μ` is the finite product of the measures `{μ i | i : ι}`.
   It is defined to be measure corresponding to `measure_theory.outer_measure.pi`. -/
 protected irreducible_def pi : Measure (∀ i, α i) :=
   toMeasure (OuterMeasure.pi fun i => (μ i).toOuterMeasure) (pi_caratheodory μ)
 #align measure_theory.measure.pi MeasureTheory.Measure.pi
+-/
 
 theorem pi_pi_aux [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) (hs : ∀ i, MeasurableSet (s i)) :
     Measure.pi μ (pi univ s) = ∏ i, μ i (s i) :=
@@ -327,6 +345,7 @@ theorem pi_pi_aux [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) (hs : ∀
 
 variable {μ}
 
+#print MeasureTheory.Measure.FiniteSpanningSetsIn.pi /-
 /-- `measure.pi μ` has finite spanning sets in rectangles of finite spanning sets. -/
 def FiniteSpanningSetsIn.pi {C : ∀ i, Set (Set (α i))}
     (hμ : ∀ i, (μ i).FiniteSpanningSetsIn (C i)) :
@@ -357,6 +376,7 @@ def FiniteSpanningSetsIn.pi {C : ∀ i, Set (Set (α i))}
         pi univ fun i => (hμ i).Set (x i),
       Union_univ_pi fun i => (hμ i).Set, (hμ _).spanning, Set.pi_univ]
 #align measure_theory.measure.finite_spanning_sets_in.pi MeasureTheory.Measure.FiniteSpanningSetsIn.pi
+-/
 
 /-- A measure on a finite product space equals the product measure if they are equal on rectangles
   with as sides sets that generate the corresponding σ-algebras. -/
@@ -413,9 +433,11 @@ theorem pi_closedBall [∀ i, MetricSpace (α i)] (x : ∀ i, α i) {r : ℝ} (h
   rw [closedBall_pi _ hr, pi_pi]
 #align measure_theory.measure.pi_closed_ball MeasureTheory.Measure.pi_closedBall
 
+#print MeasureTheory.Measure.pi.sigmaFinite /-
 instance pi.sigmaFinite : SigmaFinite (Measure.pi μ) :=
   (FiniteSpanningSetsIn.pi fun i => (μ i).toFiniteSpanningSetsIn).SigmaFinite
 #align measure_theory.measure.pi.sigma_finite MeasureTheory.Measure.pi.sigmaFinite
+-/
 
 theorem pi_of_empty {α : Type _} [IsEmpty α] {β : α → Type _} {m : ∀ a, MeasurableSpace (β a)}
     (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) : Measure.pi μ = dirac x :=
@@ -445,9 +467,11 @@ theorem pi_hyperplane (i : ι) [NoAtoms (μ i)] (x : α i) :
   show Measure.pi μ (eval i ⁻¹' {x}) = 0 from pi_eval_preimage_null _ (measure_singleton x)
 #align measure_theory.measure.pi_hyperplane MeasureTheory.Measure.pi_hyperplane
 
+#print MeasureTheory.Measure.ae_eval_ne /-
 theorem ae_eval_ne (i : ι) [NoAtoms (μ i)] (x : α i) : ∀ᵐ y : ∀ i, α i ∂Measure.pi μ, y i ≠ x :=
   compl_mem_ae_iff.2 (pi_hyperplane μ i x)
 #align measure_theory.measure.ae_eval_ne MeasureTheory.Measure.ae_eval_ne
+-/
 
 variable {μ}
 
@@ -459,16 +483,20 @@ theorem ae_pi_le_pi : (Measure.pi μ).ae ≤ Filter.pi fun i => (μ i).ae :=
   le_iInf fun i => tendsto_eval_ae_ae.le_comap
 #align measure_theory.measure.ae_pi_le_pi MeasureTheory.Measure.ae_pi_le_pi
 
+#print MeasureTheory.Measure.ae_eq_pi /-
 theorem ae_eq_pi {β : ι → Type _} {f f' : ∀ i, α i → β i} (h : ∀ i, f i =ᵐ[μ i] f' i) :
     (fun (x : ∀ i, α i) i => f i (x i)) =ᵐ[Measure.pi μ] fun x i => f' i (x i) :=
   (eventually_all.2 fun i => tendsto_eval_ae_ae.Eventually (h i)).mono fun x hx => funext hx
 #align measure_theory.measure.ae_eq_pi MeasureTheory.Measure.ae_eq_pi
+-/
 
+#print MeasureTheory.Measure.ae_le_pi /-
 theorem ae_le_pi {β : ι → Type _} [∀ i, Preorder (β i)] {f f' : ∀ i, α i → β i}
     (h : ∀ i, f i ≤ᵐ[μ i] f' i) :
     (fun (x : ∀ i, α i) i => f i (x i)) ≤ᵐ[Measure.pi μ] fun x i => f' i (x i) :=
   (eventually_all.2 fun i => tendsto_eval_ae_ae.Eventually (h i)).mono fun x hx => hx
 #align measure_theory.measure.ae_le_pi MeasureTheory.Measure.ae_le_pi
+-/
 
 theorem ae_le_set_pi {I : Set ι} {s t : ∀ i, Set (α i)} (h : ∀ i ∈ I, s i ≤ᵐ[μ i] t i) :
     Set.pi I s ≤ᵐ[Measure.pi μ] Set.pi I t :=
@@ -495,15 +523,19 @@ theorem pi_Ioi_ae_eq_pi_Ici {s : Set ι} {f : ∀ i, α i} :
   ae_eq_set_pi fun i hi => Ioi_ae_eq_Ici
 #align measure_theory.measure.pi_Ioi_ae_eq_pi_Ici MeasureTheory.Measure.pi_Ioi_ae_eq_pi_Ici
 
+#print MeasureTheory.Measure.univ_pi_Iio_ae_eq_Iic /-
 theorem univ_pi_Iio_ae_eq_Iic {f : ∀ i, α i} :
     (pi univ fun i => Iio (f i)) =ᵐ[Measure.pi μ] Iic f := by rw [← pi_univ_Iic];
   exact pi_Iio_ae_eq_pi_Iic
 #align measure_theory.measure.univ_pi_Iio_ae_eq_Iic MeasureTheory.Measure.univ_pi_Iio_ae_eq_Iic
+-/
 
+#print MeasureTheory.Measure.univ_pi_Ioi_ae_eq_Ici /-
 theorem univ_pi_Ioi_ae_eq_Ici {f : ∀ i, α i} :
     (pi univ fun i => Ioi (f i)) =ᵐ[Measure.pi μ] Ici f := by rw [← pi_univ_Ici];
   exact pi_Ioi_ae_eq_pi_Ici
 #align measure_theory.measure.univ_pi_Ioi_ae_eq_Ici MeasureTheory.Measure.univ_pi_Ioi_ae_eq_Ici
+-/
 
 theorem pi_Ioo_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
     (pi s fun i => Ioo (f i) (g i)) =ᵐ[Measure.pi μ] pi s fun i => Icc (f i) (g i) :=
@@ -515,38 +547,46 @@ theorem pi_Ioo_ae_eq_pi_Ioc {s : Set ι} {f g : ∀ i, α i} :
   ae_eq_set_pi fun i hi => Ioo_ae_eq_Ioc
 #align measure_theory.measure.pi_Ioo_ae_eq_pi_Ioc MeasureTheory.Measure.pi_Ioo_ae_eq_pi_Ioc
 
+#print MeasureTheory.Measure.univ_pi_Ioo_ae_eq_Icc /-
 theorem univ_pi_Ioo_ae_eq_Icc {f g : ∀ i, α i} :
     (pi univ fun i => Ioo (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g := by rw [← pi_univ_Icc];
   exact pi_Ioo_ae_eq_pi_Icc
 #align measure_theory.measure.univ_pi_Ioo_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ioo_ae_eq_Icc
+-/
 
 theorem pi_Ioc_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
     (pi s fun i => Ioc (f i) (g i)) =ᵐ[Measure.pi μ] pi s fun i => Icc (f i) (g i) :=
   ae_eq_set_pi fun i hi => Ioc_ae_eq_Icc
 #align measure_theory.measure.pi_Ioc_ae_eq_pi_Icc MeasureTheory.Measure.pi_Ioc_ae_eq_pi_Icc
 
+#print MeasureTheory.Measure.univ_pi_Ioc_ae_eq_Icc /-
 theorem univ_pi_Ioc_ae_eq_Icc {f g : ∀ i, α i} :
     (pi univ fun i => Ioc (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g := by rw [← pi_univ_Icc];
   exact pi_Ioc_ae_eq_pi_Icc
 #align measure_theory.measure.univ_pi_Ioc_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ioc_ae_eq_Icc
+-/
 
 theorem pi_Ico_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
     (pi s fun i => Ico (f i) (g i)) =ᵐ[Measure.pi μ] pi s fun i => Icc (f i) (g i) :=
   ae_eq_set_pi fun i hi => Ico_ae_eq_Icc
 #align measure_theory.measure.pi_Ico_ae_eq_pi_Icc MeasureTheory.Measure.pi_Ico_ae_eq_pi_Icc
 
+#print MeasureTheory.Measure.univ_pi_Ico_ae_eq_Icc /-
 theorem univ_pi_Ico_ae_eq_Icc {f g : ∀ i, α i} :
     (pi univ fun i => Ico (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g := by rw [← pi_univ_Icc];
   exact pi_Ico_ae_eq_pi_Icc
 #align measure_theory.measure.univ_pi_Ico_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ico_ae_eq_Icc
+-/
 
 end Intervals
 
+#print MeasureTheory.Measure.pi_noAtoms /-
 /-- If one of the measures `μ i` has no atoms, them `measure.pi µ`
 has no atoms. The instance below assumes that all `μ i` have no atoms. -/
 theorem pi_noAtoms (i : ι) [NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   ⟨fun x => flip measure_mono_null (pi_hyperplane μ i (x i)) (singleton_subset_iff.2 rfl)⟩
 #align measure_theory.measure.pi_has_no_atoms MeasureTheory.Measure.pi_noAtoms
+-/
 
 instance [h : Nonempty ι] [∀ i, NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   h.elim fun i => pi_noAtoms i
@@ -563,38 +603,39 @@ instance [∀ i, TopologicalSpace (α i)] [∀ i, LocallyFiniteMeasure (μ i)] :
 variable (μ)
 
 @[to_additive]
-instance pi.mulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
+instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
     [∀ i, MulLeftInvariant (μ i)] : MulLeftInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_const_mul _) (MeasurableSet.univ_pi hs),
     show (· * ·) v ⁻¹' univ.pi s = univ.pi fun i => (· * ·) (v i) ⁻¹' s i by rfl, pi_pi]
   simp_rw [measure_preimage_mul]
-#align measure_theory.measure.pi.is_mul_left_invariant MeasureTheory.Measure.pi.mulLeftInvariant
-#align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.is_add_left_invariant
+#align measure_theory.measure.pi.is_mul_left_invariant MeasureTheory.Measure.pi.isMulLeftInvariant
+#align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.isAddLeftInvariant
 
 @[to_additive]
-instance pi.mulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
+instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
     [∀ i, MulRightInvariant (μ i)] : MulRightInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_mul_const _) (MeasurableSet.univ_pi hs),
     show (· * v) ⁻¹' univ.pi s = univ.pi fun i => (· * v i) ⁻¹' s i by rfl, pi_pi]
   simp_rw [measure_preimage_mul_right]
-#align measure_theory.measure.pi.is_mul_right_invariant MeasureTheory.Measure.pi.mulRightInvariant
-#align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.is_add_right_invariant
+#align measure_theory.measure.pi.is_mul_right_invariant MeasureTheory.Measure.pi.isMulRightInvariant
+#align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.isAddRightInvariant
 
 @[to_additive]
-instance pi.invInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)] [∀ i, InvInvariant (μ i)] :
+instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)] [∀ i, InvInvariant (μ i)] :
     InvInvariant (Measure.pi μ) :=
   by
   refine' ⟨(measure.pi_eq fun s hs => _).symm⟩
   have A : Inv.inv ⁻¹' pi univ s = Set.pi univ fun i => Inv.inv ⁻¹' s i := by ext; simp
   simp_rw [measure.inv, measure.map_apply measurable_inv (MeasurableSet.univ_pi hs), A, pi_pi,
     measure_preimage_inv]
-#align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.invInvariant
-#align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.is_neg_invariant
+#align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
+#align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.isNegInvariant
 
+#print MeasureTheory.Measure.pi.openPosMeasure /-
 instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasure (μ i)] :
     OpenPosMeasure (MeasureTheory.Measure.pi μ) :=
   by
@@ -607,7 +648,9 @@ instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasu
   intro i _
   apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
 #align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.openPosMeasure
+-/
 
+#print MeasureTheory.Measure.pi.finiteMeasureOnCompacts /-
 instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
     [∀ i, FiniteMeasureOnCompacts (μ i)] : FiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) :=
   by
@@ -619,23 +662,28 @@ instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
   refine' WithTop.prod_lt_top _
   exact fun i _ => ne_of_lt (IsCompact.measure_lt_top (IsCompact.image hK (continuous_apply i)))
 #align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.finiteMeasureOnCompacts
+-/
 
 @[to_additive]
-instance pi.haarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)] [∀ i, HaarMeasure (μ i)]
+instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)] [∀ i, HaarMeasure (μ i)]
     [∀ i, MeasurableMul (α i)] : HaarMeasure (Measure.pi μ) where
-#align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.haarMeasure
-#align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.is_add_haar_measure
+#align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.isHaarMeasure
+#align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.isAddHaarMeasure
 
 end Measure
 
+#print MeasureTheory.MeasureSpace.pi /-
 instance MeasureSpace.pi [∀ i, MeasureSpace (α i)] : MeasureSpace (∀ i, α i) :=
   ⟨Measure.pi fun i => volume⟩
 #align measure_theory.measure_space.pi MeasureTheory.MeasureSpace.pi
+-/
 
+#print MeasureTheory.volume_pi /-
 theorem volume_pi [∀ i, MeasureSpace (α i)] :
     (volume : Measure (∀ i, α i)) = Measure.pi fun i => volume :=
   rfl
 #align measure_theory.volume_pi MeasureTheory.volume_pi
+-/
 
 theorem volume_pi_pi [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))]
     (s : ∀ i, Set (α i)) : volume (pi univ s) = ∏ i, volume (s i) :=
@@ -660,23 +708,23 @@ open Measure
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
-instance Pi.mulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
+instance Pi.isMulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
     [SigmaFinite (volume : Measure α)] [MeasurableMul α] [MulLeftInvariant (volume : Measure α)] :
     MulLeftInvariant (volume : Measure (ι → α)) :=
-  pi.mulLeftInvariant _
-#align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.mulLeftInvariant_volume
-#align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.is_add_left_invariant_volume
+  pi.isMulLeftInvariant _
+#align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariant_volume
+#align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.isAddLeftInvariant_volume
 
 /-- We intentionally restrict this only to the nondependent function space, since type-class
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
-instance Pi.invInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
+instance Pi.isInvInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
     [MeasurableInv α] [InvInvariant (volume : Measure α)] :
     InvInvariant (volume : Measure (ι → α)) :=
-  pi.invInvariant _
-#align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.invInvariant_volume
-#align measure_theory.pi.is_neg_invariant_volume MeasureTheory.Pi.is_neg_invariant_volume
+  pi.isInvInvariant _
+#align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariant_volume
+#align measure_theory.pi.is_neg_invariant_volume MeasureTheory.Pi.isNegInvariant_volume
 
 /-!
 ### Measure preserving equivalences
@@ -691,6 +739,7 @@ measures of corresponding sets (images or preimages) have equal measures and fun
 section MeasurePreserving
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print MeasureTheory.measurePreserving_piEquivPiSubtypeProd /-
 theorem measurePreserving_piEquivPiSubtypeProd {ι : Type u} {α : ι → Type v} [Fintype ι]
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (p : ι → Prop) [DecidablePred p] :
@@ -707,6 +756,7 @@ theorem measurePreserving_piEquivPiSubtypeProd {ι : Type u} {α : ι → Type v
   rw [e.map_apply, this, prod_prod, pi_pi, pi_pi]
   exact Fintype.prod_subtype_mul_prod_subtype p fun i => μ i (s i)
 #align measure_theory.measure_preserving_pi_equiv_pi_subtype_prod MeasureTheory.measurePreserving_piEquivPiSubtypeProd
+-/
 
 theorem volume_preserving_piEquivPiSubtypeProd {ι : Type _} (α : ι → Type _) [Fintype ι]
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (p : ι → Prop)
@@ -734,6 +784,7 @@ theorem volume_preserving_piFinSuccAboveEquiv {n : ℕ} (α : Fin (n + 1) → Ty
   measurePreserving_piFinSuccAboveEquiv (fun _ => volume) i
 #align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAboveEquiv
 
+#print MeasureTheory.measurePreserving_funUnique /-
 theorem measurePreserving_funUnique {β : Type u} {m : MeasurableSpace β} (μ : Measure β)
     (α : Type v) [Unique α] :
     MeasurePreserving (MeasurableEquiv.funUnique α β) (Measure.pi fun a : α => μ) μ :=
@@ -747,11 +798,14 @@ theorem measurePreserving_funUnique {β : Type u} {m : MeasurableSpace β} (μ :
   simp only [measure.pi, outer_measure.pi, this, bounded_by_measure, to_outer_measure_to_measure]
   exact (e.symm.measurable.measure_preserving _).symm e.symm
 #align measure_theory.measure_preserving_fun_unique MeasureTheory.measurePreserving_funUnique
+-/
 
+#print MeasureTheory.volume_preserving_funUnique /-
 theorem volume_preserving_funUnique (α : Type u) (β : Type v) [Unique α] [MeasureSpace β] :
     MeasurePreserving (MeasurableEquiv.funUnique α β) volume volume :=
   measurePreserving_funUnique volume α
 #align measure_theory.volume_preserving_fun_unique MeasureTheory.volume_preserving_funUnique
+-/
 
 theorem measurePreserving_piFinTwo {α : Fin 2 → Type u} {m : ∀ i, MeasurableSpace (α i)}
     (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)] :
@@ -769,26 +823,33 @@ theorem volume_preserving_piFinTwo (α : Fin 2 → Type u) [∀ i, MeasureSpace
   measurePreserving_piFinTwo _
 #align measure_theory.volume_preserving_pi_fin_two MeasureTheory.volume_preserving_piFinTwo
 
+#print MeasureTheory.measurePreserving_finTwoArrow_vec /-
 theorem measurePreserving_finTwoArrow_vec {α : Type u} {m : MeasurableSpace α} (μ ν : Measure α)
     [SigmaFinite μ] [SigmaFinite ν] :
     MeasurePreserving MeasurableEquiv.finTwoArrow (Measure.pi ![μ, ν]) (μ.Prod ν) :=
   haveI : ∀ i, sigma_finite (![μ, ν] i) := Fin.forall_fin_two.2 ⟨‹_›, ‹_›⟩
   measure_preserving_pi_fin_two _
 #align measure_theory.measure_preserving_fin_two_arrow_vec MeasureTheory.measurePreserving_finTwoArrow_vec
+-/
 
+#print MeasureTheory.measurePreserving_finTwoArrow /-
 theorem measurePreserving_finTwoArrow {α : Type u} {m : MeasurableSpace α} (μ : Measure α)
     [SigmaFinite μ] :
     MeasurePreserving MeasurableEquiv.finTwoArrow (Measure.pi fun _ => μ) (μ.Prod μ) := by
   simpa only [Matrix.vec_single_eq_const, Matrix.vecCons_const] using
     measure_preserving_fin_two_arrow_vec μ μ
 #align measure_theory.measure_preserving_fin_two_arrow MeasureTheory.measurePreserving_finTwoArrow
+-/
 
+#print MeasureTheory.volume_preserving_finTwoArrow /-
 theorem volume_preserving_finTwoArrow (α : Type u) [MeasureSpace α]
     [SigmaFinite (volume : Measure α)] :
     MeasurePreserving (@MeasurableEquiv.finTwoArrow α _) volume volume :=
   measurePreserving_finTwoArrow volume
 #align measure_theory.volume_preserving_fin_two_arrow MeasureTheory.volume_preserving_finTwoArrow
+-/
 
+#print MeasureTheory.measurePreserving_pi_empty /-
 theorem measurePreserving_pi_empty {ι : Type u} {α : ι → Type v} [IsEmpty ι]
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) :
     MeasurePreserving (MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit) (Measure.pi μ)
@@ -798,12 +859,15 @@ theorem measurePreserving_pi_empty {ι : Type u} {α : ι → Type v} [IsEmpty 
   refine' ⟨e.measurable, _⟩
   rw [measure.pi_of_empty, measure.map_dirac e.measurable]; rfl
 #align measure_theory.measure_preserving_pi_empty MeasureTheory.measurePreserving_pi_empty
+-/
 
+#print MeasureTheory.volume_preserving_pi_empty /-
 theorem volume_preserving_pi_empty {ι : Type u} (α : ι → Type v) [IsEmpty ι]
     [∀ i, MeasureSpace (α i)] :
     MeasurePreserving (MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit) volume volume :=
   measurePreserving_pi_empty fun _ => volume
 #align measure_theory.volume_preserving_pi_empty MeasureTheory.volume_preserving_pi_empty
+-/
 
 end MeasurePreserving
 
Diff
@@ -563,36 +563,36 @@ instance [∀ i, TopologicalSpace (α i)] [∀ i, LocallyFiniteMeasure (μ i)] :
 variable (μ)
 
 @[to_additive]
-instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
-    [∀ i, IsMulLeftInvariant (μ i)] : IsMulLeftInvariant (Measure.pi μ) :=
+instance pi.mulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
+    [∀ i, MulLeftInvariant (μ i)] : MulLeftInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_const_mul _) (MeasurableSet.univ_pi hs),
     show (· * ·) v ⁻¹' univ.pi s = univ.pi fun i => (· * ·) (v i) ⁻¹' s i by rfl, pi_pi]
   simp_rw [measure_preimage_mul]
-#align measure_theory.measure.pi.is_mul_left_invariant MeasureTheory.Measure.pi.isMulLeftInvariant
+#align measure_theory.measure.pi.is_mul_left_invariant MeasureTheory.Measure.pi.mulLeftInvariant
 #align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.is_add_left_invariant
 
 @[to_additive]
-instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
-    [∀ i, IsMulRightInvariant (μ i)] : IsMulRightInvariant (Measure.pi μ) :=
+instance pi.mulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
+    [∀ i, MulRightInvariant (μ i)] : MulRightInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_mul_const _) (MeasurableSet.univ_pi hs),
     show (· * v) ⁻¹' univ.pi s = univ.pi fun i => (· * v i) ⁻¹' s i by rfl, pi_pi]
   simp_rw [measure_preimage_mul_right]
-#align measure_theory.measure.pi.is_mul_right_invariant MeasureTheory.Measure.pi.isMulRightInvariant
+#align measure_theory.measure.pi.is_mul_right_invariant MeasureTheory.Measure.pi.mulRightInvariant
 #align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.is_add_right_invariant
 
 @[to_additive]
-instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
-    [∀ i, IsInvInvariant (μ i)] : IsInvInvariant (Measure.pi μ) :=
+instance pi.invInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)] [∀ i, InvInvariant (μ i)] :
+    InvInvariant (Measure.pi μ) :=
   by
   refine' ⟨(measure.pi_eq fun s hs => _).symm⟩
   have A : Inv.inv ⁻¹' pi univ s = Set.pi univ fun i => Inv.inv ⁻¹' s i := by ext; simp
   simp_rw [measure.inv, measure.map_apply measurable_inv (MeasurableSet.univ_pi hs), A, pi_pi,
     measure_preimage_inv]
-#align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
+#align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.invInvariant
 #align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.is_neg_invariant
 
 instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasure (μ i)] :
@@ -621,9 +621,9 @@ instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
 #align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.finiteMeasureOnCompacts
 
 @[to_additive]
-instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
-    [∀ i, IsHaarMeasure (μ i)] [∀ i, MeasurableMul (α i)] : IsHaarMeasure (Measure.pi μ) where
-#align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.isHaarMeasure
+instance pi.haarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)] [∀ i, HaarMeasure (μ i)]
+    [∀ i, MeasurableMul (α i)] : HaarMeasure (Measure.pi μ) where
+#align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.haarMeasure
 #align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.is_add_haar_measure
 
 end Measure
@@ -660,22 +660,22 @@ open Measure
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
-instance Pi.isMulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
-    [SigmaFinite (volume : Measure α)] [MeasurableMul α] [IsMulLeftInvariant (volume : Measure α)] :
-    IsMulLeftInvariant (volume : Measure (ι → α)) :=
-  pi.isMulLeftInvariant _
-#align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariant_volume
+instance Pi.mulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
+    [SigmaFinite (volume : Measure α)] [MeasurableMul α] [MulLeftInvariant (volume : Measure α)] :
+    MulLeftInvariant (volume : Measure (ι → α)) :=
+  pi.mulLeftInvariant _
+#align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.mulLeftInvariant_volume
 #align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.is_add_left_invariant_volume
 
 /-- We intentionally restrict this only to the nondependent function space, since type-class
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
-instance Pi.isInvInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
-    [MeasurableInv α] [IsInvInvariant (volume : Measure α)] :
-    IsInvInvariant (volume : Measure (ι → α)) :=
-  pi.isInvInvariant _
-#align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariant_volume
+instance Pi.invInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
+    [MeasurableInv α] [InvInvariant (volume : Measure α)] :
+    InvInvariant (volume : Measure (ι → α)) :=
+  pi.invInvariant _
+#align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.invInvariant_volume
 #align measure_theory.pi.is_neg_invariant_volume MeasureTheory.Pi.is_neg_invariant_volume
 
 /-!
Diff
@@ -62,7 +62,7 @@ noncomputable section
 
 open Function Set MeasureTheory.OuterMeasure Filter MeasurableSpace Encodable
 
-open Classical BigOperators Topology ENNReal
+open scoped Classical BigOperators Topology ENNReal
 
 universe u v
 
Diff
@@ -109,12 +109,8 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
   by
   cases nonempty_encodable ι
   apply le_antisymm
-  · refine' iSup_le _
-    intro i
-    rw [comap_generate_from]
-    apply generate_from_le
-    rintro _ ⟨s, hs, rfl⟩
-    dsimp
+  · refine' iSup_le _; intro i; rw [comap_generate_from]
+    apply generate_from_le; rintro _ ⟨s, hs, rfl⟩; dsimp
     choose t h1t h2t using hC
     simp_rw [eval_preimage, ← h2t]
     rw [← @Union_const _ ℕ _ s]
@@ -122,33 +118,15 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
       pi univ (update (fun i' : ι => Union (t i')) i (⋃ i' : ℕ, s)) =
         pi univ fun k => ⋃ j : ℕ, @update ι (fun i' => Set (α i')) _ (fun i' => t i' j) i s k :=
       by
-      ext
-      simp_rw [mem_univ_pi]
-      apply forall_congr'
-      intro i'
-      by_cases i' = i
-      · subst h
-        simp
-      · rw [← Ne.def] at h
-        simp [h]
+      ext; simp_rw [mem_univ_pi]; apply forall_congr'; intro i'
+      by_cases i' = i; · subst h; simp; · rw [← Ne.def] at h; simp [h]
     rw [this, ← Union_univ_pi]
     apply MeasurableSet.iUnion
-    intro n
-    apply measurable_set_generate_from
-    apply mem_image_of_mem
-    intro j _
-    dsimp only
-    by_cases h : j = i
-    subst h
-    rwa [update_same]
-    rw [update_noteq h]
-    apply h1t
-  · apply generate_from_le
-    rintro _ ⟨s, hs, rfl⟩
-    rw [univ_pi_eq_Inter]
-    apply MeasurableSet.iInter
-    intro i
-    apply measurable_pi_apply
+    intro n; apply measurable_set_generate_from
+    apply mem_image_of_mem; intro j _; dsimp only
+    by_cases h : j = i; subst h; rwa [update_same]; rw [update_noteq h]; apply h1t
+  · apply generate_from_le; rintro _ ⟨s, hs, rfl⟩
+    rw [univ_pi_eq_Inter]; apply MeasurableSet.iInter; intro i; apply measurable_pi_apply
     exact measurable_set_generate_from (hs i (mem_univ i))
 #align generate_from_pi_eq generateFrom_pi_eq
 
@@ -222,8 +200,7 @@ protected def pi (m : ∀ i, OuterMeasure (α i)) : OuterMeasure (∀ i, α i) :
 theorem pi_pi_le (m : ∀ i, OuterMeasure (α i)) (s : ∀ i, Set (α i)) :
     OuterMeasure.pi m (pi univ s) ≤ ∏ i, m i (s i) :=
   by
-  cases' (pi univ s).eq_empty_or_nonempty with h h
-  simp [h]
+  cases' (pi univ s).eq_empty_or_nonempty with h h; simp [h]
   exact (bounded_by_le _).trans_eq (pi_premeasure_pi h)
 #align measure_theory.outer_measure.pi_pi_le MeasureTheory.OuterMeasure.pi_pi_le
 
@@ -232,10 +209,8 @@ theorem le_pi {m : ∀ i, OuterMeasure (α i)} {n : OuterMeasure (∀ i, α i)}
       ∀ s : ∀ i, Set (α i), (pi univ s).Nonempty → n (pi univ s) ≤ ∏ i, m i (s i) :=
   by
   rw [outer_measure.pi, le_bounded_by']; constructor
-  · intro h s hs
-    refine' (h _ hs).trans_eq (pi_premeasure_pi hs)
-  · intro h s hs
-    refine' le_trans (n.mono <| subset_pi_eval_image univ s) (h _ _)
+  · intro h s hs; refine' (h _ hs).trans_eq (pi_premeasure_pi hs)
+  · intro h s hs; refine' le_trans (n.mono <| subset_pi_eval_image univ s) (h _ _)
     simp [univ_pi_nonempty_iff, hs]
 #align measure_theory.outer_measure.le_pi MeasureTheory.OuterMeasure.le_pi
 
@@ -253,11 +228,8 @@ variable {δ : Type _} {π : δ → Type _} [∀ x, MeasurableSpace (π x)]
 
 -- for some reason the equation compiler doesn't like this definition
 /-- A product of measures in `tprod α l`. -/
-protected def tprod (l : List δ) (μ : ∀ i, Measure (π i)) : Measure (TProd π l) :=
-  by
-  induction' l with i l ih
-  exact dirac PUnit.unit
-  exact (μ i).Prod ih
+protected def tprod (l : List δ) (μ : ∀ i, Measure (π i)) : Measure (TProd π l) := by
+  induction' l with i l ih; exact dirac PUnit.unit; exact (μ i).Prod ih
 #align measure_theory.measure.tprod MeasureTheory.Measure.tprod
 
 @[simp]
@@ -276,11 +248,8 @@ instance sigmaFinite_tProd (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, Si
     SigmaFinite (Measure.tprod l μ) :=
   by
   induction' l with i l ih
-  · rw [tprod_nil]
-    infer_instance
-  · rw [tprod_cons]
-    skip
-    infer_instance
+  · rw [tprod_nil]; infer_instance
+  · rw [tprod_cons]; skip; infer_instance
 #align measure_theory.measure.sigma_finite_tprod MeasureTheory.Measure.sigmaFinite_tProd
 
 theorem tProd_tProd (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
@@ -327,14 +296,8 @@ theorem pi_caratheodory :
   simp_rw [pi_premeasure]
   refine' Finset.prod_add_prod_le' (Finset.mem_univ i) _ _ _
   · simp [image_inter_preimage, image_diff_preimage, measure_inter_add_diff _ hs, le_refl]
-  · rintro j - hj
-    apply mono'
-    apply image_subset
-    apply inter_subset_left
-  · rintro j - hj
-    apply mono'
-    apply image_subset
-    apply diff_subset
+  · rintro j - hj; apply mono'; apply image_subset; apply inter_subset_left
+  · rintro j - hj; apply mono'; apply image_subset; apply diff_subset
 #align measure_theory.measure.pi_caratheodory MeasureTheory.Measure.pi_caratheodory
 
 /-- `measure.pi μ` is the finite product of the measures `{μ i | i : ι}`.
@@ -403,10 +366,7 @@ theorem pi_eq_generateFrom {C : ∀ i, Set (Set (α i))}
     (h₁ : ∀ s : ∀ i, Set (α i), (∀ i, s i ∈ C i) → μν (pi univ s) = ∏ i, μ i (s i)) :
     Measure.pi μ = μν :=
   by
-  have h4C : ∀ (i) (s : Set (α i)), s ∈ C i → MeasurableSet s :=
-    by
-    intro i s hs
-    rw [← hC]
+  have h4C : ∀ (i) (s : Set (α i)), s ∈ C i → MeasurableSet s := by intro i s hs; rw [← hC];
     exact measurable_set_generate_from hs
   refine'
     (finite_spanning_sets_in.pi h3C).ext
@@ -536,16 +496,12 @@ theorem pi_Ioi_ae_eq_pi_Ici {s : Set ι} {f : ∀ i, α i} :
 #align measure_theory.measure.pi_Ioi_ae_eq_pi_Ici MeasureTheory.Measure.pi_Ioi_ae_eq_pi_Ici
 
 theorem univ_pi_Iio_ae_eq_Iic {f : ∀ i, α i} :
-    (pi univ fun i => Iio (f i)) =ᵐ[Measure.pi μ] Iic f :=
-  by
-  rw [← pi_univ_Iic]
+    (pi univ fun i => Iio (f i)) =ᵐ[Measure.pi μ] Iic f := by rw [← pi_univ_Iic];
   exact pi_Iio_ae_eq_pi_Iic
 #align measure_theory.measure.univ_pi_Iio_ae_eq_Iic MeasureTheory.Measure.univ_pi_Iio_ae_eq_Iic
 
 theorem univ_pi_Ioi_ae_eq_Ici {f : ∀ i, α i} :
-    (pi univ fun i => Ioi (f i)) =ᵐ[Measure.pi μ] Ici f :=
-  by
-  rw [← pi_univ_Ici]
+    (pi univ fun i => Ioi (f i)) =ᵐ[Measure.pi μ] Ici f := by rw [← pi_univ_Ici];
   exact pi_Ioi_ae_eq_pi_Ici
 #align measure_theory.measure.univ_pi_Ioi_ae_eq_Ici MeasureTheory.Measure.univ_pi_Ioi_ae_eq_Ici
 
@@ -560,9 +516,7 @@ theorem pi_Ioo_ae_eq_pi_Ioc {s : Set ι} {f g : ∀ i, α i} :
 #align measure_theory.measure.pi_Ioo_ae_eq_pi_Ioc MeasureTheory.Measure.pi_Ioo_ae_eq_pi_Ioc
 
 theorem univ_pi_Ioo_ae_eq_Icc {f g : ∀ i, α i} :
-    (pi univ fun i => Ioo (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g :=
-  by
-  rw [← pi_univ_Icc]
+    (pi univ fun i => Ioo (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g := by rw [← pi_univ_Icc];
   exact pi_Ioo_ae_eq_pi_Icc
 #align measure_theory.measure.univ_pi_Ioo_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ioo_ae_eq_Icc
 
@@ -572,9 +526,7 @@ theorem pi_Ioc_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
 #align measure_theory.measure.pi_Ioc_ae_eq_pi_Icc MeasureTheory.Measure.pi_Ioc_ae_eq_pi_Icc
 
 theorem univ_pi_Ioc_ae_eq_Icc {f g : ∀ i, α i} :
-    (pi univ fun i => Ioc (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g :=
-  by
-  rw [← pi_univ_Icc]
+    (pi univ fun i => Ioc (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g := by rw [← pi_univ_Icc];
   exact pi_Ioc_ae_eq_pi_Icc
 #align measure_theory.measure.univ_pi_Ioc_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ioc_ae_eq_Icc
 
@@ -584,9 +536,7 @@ theorem pi_Ico_ae_eq_pi_Icc {s : Set ι} {f g : ∀ i, α i} :
 #align measure_theory.measure.pi_Ico_ae_eq_pi_Icc MeasureTheory.Measure.pi_Ico_ae_eq_pi_Icc
 
 theorem univ_pi_Ico_ae_eq_Icc {f g : ∀ i, α i} :
-    (pi univ fun i => Ico (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g :=
-  by
-  rw [← pi_univ_Icc]
+    (pi univ fun i => Ico (f i) (g i)) =ᵐ[Measure.pi μ] Icc f g := by rw [← pi_univ_Icc];
   exact pi_Ico_ae_eq_pi_Icc
 #align measure_theory.measure.univ_pi_Ico_ae_eq_Icc MeasureTheory.Measure.univ_pi_Ico_ae_eq_Icc
 
@@ -639,10 +589,7 @@ instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
     [∀ i, IsInvInvariant (μ i)] : IsInvInvariant (Measure.pi μ) :=
   by
   refine' ⟨(measure.pi_eq fun s hs => _).symm⟩
-  have A : Inv.inv ⁻¹' pi univ s = Set.pi univ fun i => Inv.inv ⁻¹' s i :=
-    by
-    ext
-    simp
+  have A : Inv.inv ⁻¹' pi univ s = Set.pi univ fun i => Inv.inv ⁻¹' s i := by ext; simp
   simp_rw [measure.inv, measure.map_apply measurable_inv (MeasurableSet.univ_pi hs), A, pi_pi,
     measure_preimage_inv]
 #align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
@@ -796,8 +743,7 @@ theorem measurePreserving_funUnique {β : Type u} {m : MeasurableSpace β} (μ :
     by
     ext1 s
     rw [pi_premeasure, Fintype.prod_unique, to_outer_measure_apply, e.symm.map_apply]
-    congr 1
-    exact e.to_equiv.image_eq_preimage s
+    congr 1; exact e.to_equiv.image_eq_preimage s
   simp only [measure.pi, outer_measure.pi, this, bounded_by_measure, to_outer_measure_to_measure]
   exact (e.symm.measurable.measure_preserving _).symm e.symm
 #align measure_theory.measure_preserving_fun_unique MeasureTheory.measurePreserving_funUnique
Diff
@@ -4,11 +4,11 @@ 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.pi
-! leanprover-community/mathlib commit 4b83fd2855cbf5e9da1fcf0fc1eba89a48c21551
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.MeasureTheory.Constructions.Prod
+import Mathbin.MeasureTheory.Constructions.Prod.Basic
 import Mathbin.MeasureTheory.Group.Measure
 import Mathbin.Topology.Constructions
 
Diff
@@ -98,7 +98,7 @@ theorem IsCountablySpanning.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCoun
   cases nonempty_encodable (ι → ℕ)
   let e : ℕ → ι → ℕ := fun n => (decode (ι → ℕ) n).iget
   refine' ⟨fun n => pi univ fun i => s i (e n i), fun n => mem_image_of_mem _ fun i _ => h1s i _, _⟩
-  simp_rw [(surjective_decode_iget (ι → ℕ)).unionᵢ_comp fun x => pi univ fun i => s i (x i),
+  simp_rw [(surjective_decode_iget (ι → ℕ)).iUnion_comp fun x => pi univ fun i => s i (x i),
     Union_univ_pi s, h2s, pi_univ]
 #align is_countably_spanning.pi IsCountablySpanning.pi
 
@@ -109,7 +109,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
   by
   cases nonempty_encodable ι
   apply le_antisymm
-  · refine' supᵢ_le _
+  · refine' iSup_le _
     intro i
     rw [comap_generate_from]
     apply generate_from_le
@@ -132,7 +132,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
       · rw [← Ne.def] at h
         simp [h]
     rw [this, ← Union_univ_pi]
-    apply MeasurableSet.unionᵢ
+    apply MeasurableSet.iUnion
     intro n
     apply measurable_set_generate_from
     apply mem_image_of_mem
@@ -146,7 +146,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
   · apply generate_from_le
     rintro _ ⟨s, hs, rfl⟩
     rw [univ_pi_eq_Inter]
-    apply MeasurableSet.interᵢ
+    apply MeasurableSet.iInter
     intro i
     apply measurable_pi_apply
     exact measurable_set_generate_from (hs i (mem_univ i))
@@ -318,7 +318,7 @@ end Encodable
 theorem pi_caratheodory :
     MeasurableSpace.pi ≤ (OuterMeasure.pi fun i => (μ i).toOuterMeasure).caratheodory :=
   by
-  refine' supᵢ_le _
+  refine' iSup_le _
   intro i s hs
   rw [MeasurableSpace.comap] at hs
   rcases hs with ⟨s, hs, rfl⟩
@@ -390,7 +390,7 @@ def FiniteSpanningSetsIn.pi {C : ∀ i, Set (Set (α i))}
       _ < ∞ := ENNReal.prod_lt_top fun i hi => ((hμ i).Finite _).Ne
       
   ·
-    simp_rw [(surjective_decode_iget (ι → ℕ)).unionᵢ_comp fun x =>
+    simp_rw [(surjective_decode_iget (ι → ℕ)).iUnion_comp fun x =>
         pi univ fun i => (hμ i).Set (x i),
       Union_univ_pi fun i => (hμ i).Set, (hμ _).spanning, Set.pi_univ]
 #align measure_theory.measure.finite_spanning_sets_in.pi MeasureTheory.Measure.FiniteSpanningSetsIn.pi
@@ -496,7 +496,7 @@ theorem tendsto_eval_ae_ae {i : ι} : Tendsto (eval i) (Measure.pi μ).ae (μ i)
 #align measure_theory.measure.tendsto_eval_ae_ae MeasureTheory.Measure.tendsto_eval_ae_ae
 
 theorem ae_pi_le_pi : (Measure.pi μ).ae ≤ Filter.pi fun i => (μ i).ae :=
-  le_infᵢ fun i => tendsto_eval_ae_ae.le_comap
+  le_iInf fun i => tendsto_eval_ae_ae.le_comap
 #align measure_theory.measure.ae_pi_le_pi MeasureTheory.Measure.ae_pi_le_pi
 
 theorem ae_eq_pi {β : ι → Type _} {f f' : ∀ i, α i → β i} (h : ∀ i, f i =ᵐ[μ i] f' i) :
Diff
@@ -613,7 +613,7 @@ instance [∀ i, TopologicalSpace (α i)] [∀ i, LocallyFiniteMeasure (μ i)] :
 variable (μ)
 
 @[to_additive]
-instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, HasMeasurableMul (α i)]
+instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
     [∀ i, IsMulLeftInvariant (μ i)] : IsMulLeftInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
@@ -624,7 +624,7 @@ instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, HasMeasurableMul (
 #align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.is_add_left_invariant
 
 @[to_additive]
-instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, HasMeasurableMul (α i)]
+instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
     [∀ i, IsMulRightInvariant (μ i)] : IsMulRightInvariant (Measure.pi μ) :=
   by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
@@ -635,7 +635,7 @@ instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, HasMeasurableMul (
 #align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.is_add_right_invariant
 
 @[to_additive]
-instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, HasMeasurableInv (α i)]
+instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
     [∀ i, IsInvInvariant (μ i)] : IsInvInvariant (Measure.pi μ) :=
   by
   refine' ⟨(measure.pi_eq fun s hs => _).symm⟩
@@ -675,7 +675,7 @@ instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
 
 @[to_additive]
 instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
-    [∀ i, IsHaarMeasure (μ i)] [∀ i, HasMeasurableMul (α i)] : IsHaarMeasure (Measure.pi μ) where
+    [∀ i, IsHaarMeasure (μ i)] [∀ i, MeasurableMul (α i)] : IsHaarMeasure (Measure.pi μ) where
 #align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.isHaarMeasure
 #align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.is_add_haar_measure
 
@@ -714,8 +714,8 @@ inference cannot find an instance for `ι → ℝ` when this is stated for depen
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
 instance Pi.isMulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
-    [SigmaFinite (volume : Measure α)] [HasMeasurableMul α]
-    [IsMulLeftInvariant (volume : Measure α)] : IsMulLeftInvariant (volume : Measure (ι → α)) :=
+    [SigmaFinite (volume : Measure α)] [MeasurableMul α] [IsMulLeftInvariant (volume : Measure α)] :
+    IsMulLeftInvariant (volume : Measure (ι → α)) :=
   pi.isMulLeftInvariant _
 #align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariant_volume
 #align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.is_add_left_invariant_volume
@@ -725,7 +725,7 @@ inference cannot find an instance for `ι → ℝ` when this is stated for depen
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
 instance Pi.isInvInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
-    [HasMeasurableInv α] [IsInvInvariant (volume : Measure α)] :
+    [MeasurableInv α] [IsInvInvariant (volume : Measure α)] :
     IsInvInvariant (volume : Measure (ι → α)) :=
   pi.isInvInvariant _
 #align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariant_volume
Diff
@@ -648,8 +648,8 @@ instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, HasMeasurableInv (α i)
 #align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
 #align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.is_neg_invariant
 
-instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
-    IsOpenPosMeasure (MeasureTheory.Measure.pi μ) :=
+instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasure (μ i)] :
+    OpenPosMeasure (MeasureTheory.Measure.pi μ) :=
   by
   constructor
   rintro U U_open ⟨a, ha⟩
@@ -659,7 +659,7 @@ instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosM
   rw [CanonicallyOrderedCommSemiring.prod_pos]
   intro i _
   apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
-#align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.isOpenPosMeasure
+#align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.openPosMeasure
 
 instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
     [∀ i, FiniteMeasureOnCompacts (μ i)] : FiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) :=
Diff
@@ -480,12 +480,12 @@ theorem pi_eval_preimage_null {i : ι} {s : Set (α i)} (hs : μ i s = 0) :
   simp [hμt]
 #align measure_theory.measure.pi_eval_preimage_null MeasureTheory.Measure.pi_eval_preimage_null
 
-theorem pi_hyperplane (i : ι) [HasNoAtoms (μ i)] (x : α i) :
+theorem pi_hyperplane (i : ι) [NoAtoms (μ i)] (x : α i) :
     Measure.pi μ { f : ∀ i, α i | f i = x } = 0 :=
   show Measure.pi μ (eval i ⁻¹' {x}) = 0 from pi_eval_preimage_null _ (measure_singleton x)
 #align measure_theory.measure.pi_hyperplane MeasureTheory.Measure.pi_hyperplane
 
-theorem ae_eval_ne (i : ι) [HasNoAtoms (μ i)] (x : α i) : ∀ᵐ y : ∀ i, α i ∂Measure.pi μ, y i ≠ x :=
+theorem ae_eval_ne (i : ι) [NoAtoms (μ i)] (x : α i) : ∀ᵐ y : ∀ i, α i ∂Measure.pi μ, y i ≠ x :=
   compl_mem_ae_iff.2 (pi_hyperplane μ i x)
 #align measure_theory.measure.ae_eval_ne MeasureTheory.Measure.ae_eval_ne
 
@@ -523,7 +523,7 @@ theorem ae_eq_set_pi {I : Set ι} {s t : ∀ i, Set (α i)} (h : ∀ i ∈ I, s
 
 section Intervals
 
-variable {μ} [∀ i, PartialOrder (α i)] [∀ i, HasNoAtoms (μ i)]
+variable {μ} [∀ i, PartialOrder (α i)] [∀ i, NoAtoms (μ i)]
 
 theorem pi_Iio_ae_eq_pi_Iic {s : Set ι} {f : ∀ i, α i} :
     (pi s fun i => Iio (f i)) =ᵐ[Measure.pi μ] pi s fun i => Iic (f i) :=
@@ -594,15 +594,15 @@ end Intervals
 
 /-- If one of the measures `μ i` has no atoms, them `measure.pi µ`
 has no atoms. The instance below assumes that all `μ i` have no atoms. -/
-theorem pi_hasNoAtoms (i : ι) [HasNoAtoms (μ i)] : HasNoAtoms (Measure.pi μ) :=
+theorem pi_noAtoms (i : ι) [NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   ⟨fun x => flip measure_mono_null (pi_hyperplane μ i (x i)) (singleton_subset_iff.2 rfl)⟩
-#align measure_theory.measure.pi_has_no_atoms MeasureTheory.Measure.pi_hasNoAtoms
+#align measure_theory.measure.pi_has_no_atoms MeasureTheory.Measure.pi_noAtoms
 
-instance [h : Nonempty ι] [∀ i, HasNoAtoms (μ i)] : HasNoAtoms (Measure.pi μ) :=
-  h.elim fun i => pi_hasNoAtoms i
+instance [h : Nonempty ι] [∀ i, NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
+  h.elim fun i => pi_noAtoms i
 
-instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)] :
-    IsLocallyFiniteMeasure (Measure.pi μ) :=
+instance [∀ i, TopologicalSpace (α i)] [∀ i, LocallyFiniteMeasure (μ i)] :
+    LocallyFiniteMeasure (Measure.pi μ) :=
   by
   refine' ⟨fun x => _⟩
   choose s hxs ho hμ using fun i => (μ i).exists_isOpen_measure_lt_top (x i)
@@ -661,9 +661,8 @@ instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosM
   apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
 #align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.isOpenPosMeasure
 
-instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
-    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
-    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) :=
+instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
+    [∀ i, FiniteMeasureOnCompacts (μ i)] : FiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) :=
   by
   constructor
   intro K hK
@@ -672,7 +671,7 @@ instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
   rw [measure.pi_pi]
   refine' WithTop.prod_lt_top _
   exact fun i _ => ne_of_lt (IsCompact.measure_lt_top (IsCompact.image hK (continuous_apply i)))
-#align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.isFiniteMeasureOnCompacts
+#align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.finiteMeasureOnCompacts
 
 @[to_additive]
 instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
Diff
@@ -272,7 +272,7 @@ theorem tProd_cons (i : δ) (l : List δ) (μ : ∀ i, Measure (π i)) :
   rfl
 #align measure_theory.measure.tprod_cons MeasureTheory.Measure.tProd_cons
 
-instance sigmaFiniteTprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
+instance sigmaFinite_tProd (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
     SigmaFinite (Measure.tprod l μ) :=
   by
   induction' l with i l ih
@@ -281,7 +281,7 @@ instance sigmaFiniteTprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, Sig
   · rw [tprod_cons]
     skip
     infer_instance
-#align measure_theory.measure.sigma_finite_tprod MeasureTheory.Measure.sigmaFiniteTprod
+#align measure_theory.measure.sigma_finite_tprod MeasureTheory.Measure.sigmaFinite_tProd
 
 theorem tProd_tProd (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
     (s : ∀ i, Set (π i)) : Measure.tprod l μ (Set.tprod l s) = (l.map fun i => (μ i) (s i)).Prod :=
@@ -594,12 +594,12 @@ end Intervals
 
 /-- If one of the measures `μ i` has no atoms, them `measure.pi µ`
 has no atoms. The instance below assumes that all `μ i` have no atoms. -/
-theorem piHasNoAtoms (i : ι) [HasNoAtoms (μ i)] : HasNoAtoms (Measure.pi μ) :=
+theorem pi_hasNoAtoms (i : ι) [HasNoAtoms (μ i)] : HasNoAtoms (Measure.pi μ) :=
   ⟨fun x => flip measure_mono_null (pi_hyperplane μ i (x i)) (singleton_subset_iff.2 rfl)⟩
-#align measure_theory.measure.pi_has_no_atoms MeasureTheory.Measure.piHasNoAtoms
+#align measure_theory.measure.pi_has_no_atoms MeasureTheory.Measure.pi_hasNoAtoms
 
 instance [h : Nonempty ι] [∀ i, HasNoAtoms (μ i)] : HasNoAtoms (Measure.pi μ) :=
-  h.elim fun i => piHasNoAtoms i
+  h.elim fun i => pi_hasNoAtoms i
 
 instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)] :
     IsLocallyFiniteMeasure (Measure.pi μ) :=
@@ -714,22 +714,22 @@ open Measure
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
-instance Pi.isMulLeftInvariantVolume {α} [Group α] [MeasureSpace α]
+instance Pi.isMulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
     [SigmaFinite (volume : Measure α)] [HasMeasurableMul α]
     [IsMulLeftInvariant (volume : Measure α)] : IsMulLeftInvariant (volume : Measure (ι → α)) :=
   pi.isMulLeftInvariant _
-#align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariantVolume
+#align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariant_volume
 #align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.is_add_left_invariant_volume
 
 /-- We intentionally restrict this only to the nondependent function space, since type-class
 inference cannot find an instance for `ι → ℝ` when this is stated for dependent function spaces. -/
 @[to_additive
       "We intentionally restrict this only to the nondependent function space, since\ntype-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function\nspaces."]
-instance Pi.isInvInvariantVolume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
+instance Pi.isInvInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
     [HasMeasurableInv α] [IsInvInvariant (volume : Measure α)] :
     IsInvInvariant (volume : Measure (ι → α)) :=
   pi.isInvInvariant _
-#align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariantVolume
+#align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariant_volume
 #align measure_theory.pi.is_neg_invariant_volume MeasureTheory.Pi.is_neg_invariant_volume
 
 /-!
@@ -745,7 +745,7 @@ measures of corresponding sets (images or preimages) have equal measures and fun
 section MeasurePreserving
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-theorem measurePreservingPiEquivPiSubtypeProd {ι : Type u} {α : ι → Type v} [Fintype ι]
+theorem measurePreserving_piEquivPiSubtypeProd {ι : Type u} {α : ι → Type v} [Fintype ι]
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (p : ι → Prop) [DecidablePred p] :
     MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
@@ -760,15 +760,15 @@ theorem measurePreservingPiEquivPiSubtypeProd {ι : Type u} {α : ι → Type v}
     Equiv.preimage_piEquivPiSubtypeProd_symm_pi p s
   rw [e.map_apply, this, prod_prod, pi_pi, pi_pi]
   exact Fintype.prod_subtype_mul_prod_subtype p fun i => μ i (s i)
-#align measure_theory.measure_preserving_pi_equiv_pi_subtype_prod MeasureTheory.measurePreservingPiEquivPiSubtypeProd
+#align measure_theory.measure_preserving_pi_equiv_pi_subtype_prod MeasureTheory.measurePreserving_piEquivPiSubtypeProd
 
-theorem volumePreservingPiEquivPiSubtypeProd {ι : Type _} (α : ι → Type _) [Fintype ι]
+theorem volume_preserving_piEquivPiSubtypeProd {ι : Type _} (α : ι → Type _) [Fintype ι]
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (p : ι → Prop)
     [DecidablePred p] : MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) :=
-  measurePreservingPiEquivPiSubtypeProd (fun i => volume) p
-#align measure_theory.volume_preserving_pi_equiv_pi_subtype_prod MeasureTheory.volumePreservingPiEquivPiSubtypeProd
+  measurePreserving_piEquivPiSubtypeProd (fun i => volume) p
+#align measure_theory.volume_preserving_pi_equiv_pi_subtype_prod MeasureTheory.volume_preserving_piEquivPiSubtypeProd
 
-theorem measurePreservingPiFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Type u}
+theorem measurePreserving_piFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Type u}
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (i : Fin (n + 1)) :
     MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) (Measure.pi μ)
@@ -780,16 +780,17 @@ theorem measurePreservingPiFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Typ
   rw [e.map_apply, i.prod_univ_succ_above _, ← pi_pi, ← prod_prod]
   congr 1 with ⟨x, f⟩
   simp [i.forall_iff_succ_above]
-#align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreservingPiFinSuccAboveEquiv
+#align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreserving_piFinSuccAboveEquiv
 
-theorem volumePreservingPiFinSuccAboveEquiv {n : ℕ} (α : Fin (n + 1) → Type u)
+theorem volume_preserving_piFinSuccAboveEquiv {n : ℕ} (α : Fin (n + 1) → Type u)
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (i : Fin (n + 1)) :
     MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) :=
-  measurePreservingPiFinSuccAboveEquiv (fun _ => volume) i
-#align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volumePreservingPiFinSuccAboveEquiv
+  measurePreserving_piFinSuccAboveEquiv (fun _ => volume) i
+#align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAboveEquiv
 
-theorem measurePreservingFunUnique {β : Type u} {m : MeasurableSpace β} (μ : Measure β) (α : Type v)
-    [Unique α] : MeasurePreserving (MeasurableEquiv.funUnique α β) (Measure.pi fun a : α => μ) μ :=
+theorem measurePreserving_funUnique {β : Type u} {m : MeasurableSpace β} (μ : Measure β)
+    (α : Type v) [Unique α] :
+    MeasurePreserving (MeasurableEquiv.funUnique α β) (Measure.pi fun a : α => μ) μ :=
   by
   set e := MeasurableEquiv.funUnique α β
   have : (pi_premeasure fun _ : α => μ.to_outer_measure) = measure.map e.symm μ :=
@@ -800,14 +801,14 @@ theorem measurePreservingFunUnique {β : Type u} {m : MeasurableSpace β} (μ :
     exact e.to_equiv.image_eq_preimage s
   simp only [measure.pi, outer_measure.pi, this, bounded_by_measure, to_outer_measure_to_measure]
   exact (e.symm.measurable.measure_preserving _).symm e.symm
-#align measure_theory.measure_preserving_fun_unique MeasureTheory.measurePreservingFunUnique
+#align measure_theory.measure_preserving_fun_unique MeasureTheory.measurePreserving_funUnique
 
-theorem volumePreservingFunUnique (α : Type u) (β : Type v) [Unique α] [MeasureSpace β] :
+theorem volume_preserving_funUnique (α : Type u) (β : Type v) [Unique α] [MeasureSpace β] :
     MeasurePreserving (MeasurableEquiv.funUnique α β) volume volume :=
-  measurePreservingFunUnique volume α
-#align measure_theory.volume_preserving_fun_unique MeasureTheory.volumePreservingFunUnique
+  measurePreserving_funUnique volume α
+#align measure_theory.volume_preserving_fun_unique MeasureTheory.volume_preserving_funUnique
 
-theorem measurePreservingPiFinTwo {α : Fin 2 → Type u} {m : ∀ i, MeasurableSpace (α i)}
+theorem measurePreserving_piFinTwo {α : Fin 2 → Type u} {m : ∀ i, MeasurableSpace (α i)}
     (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)] :
     MeasurePreserving (MeasurableEquiv.piFinTwo α) (Measure.pi μ) ((μ 0).Prod (μ 1)) :=
   by
@@ -815,35 +816,35 @@ theorem measurePreservingPiFinTwo {α : Fin 2 → Type u} {m : ∀ i, Measurable
   rw [MeasurableEquiv.map_apply, MeasurableEquiv.piFinTwo_apply, Fin.preimage_apply_01_prod,
     measure.pi_pi, Fin.prod_univ_two]
   rfl
-#align measure_theory.measure_preserving_pi_fin_two MeasureTheory.measurePreservingPiFinTwo
+#align measure_theory.measure_preserving_pi_fin_two MeasureTheory.measurePreserving_piFinTwo
 
-theorem volumePreservingPiFinTwo (α : Fin 2 → Type u) [∀ i, MeasureSpace (α i)]
+theorem volume_preserving_piFinTwo (α : Fin 2 → Type u) [∀ i, MeasureSpace (α i)]
     [∀ i, SigmaFinite (volume : Measure (α i))] :
     MeasurePreserving (MeasurableEquiv.piFinTwo α) volume volume :=
-  measurePreservingPiFinTwo _
-#align measure_theory.volume_preserving_pi_fin_two MeasureTheory.volumePreservingPiFinTwo
+  measurePreserving_piFinTwo _
+#align measure_theory.volume_preserving_pi_fin_two MeasureTheory.volume_preserving_piFinTwo
 
-theorem measurePreservingFinTwoArrowVec {α : Type u} {m : MeasurableSpace α} (μ ν : Measure α)
+theorem measurePreserving_finTwoArrow_vec {α : Type u} {m : MeasurableSpace α} (μ ν : Measure α)
     [SigmaFinite μ] [SigmaFinite ν] :
     MeasurePreserving MeasurableEquiv.finTwoArrow (Measure.pi ![μ, ν]) (μ.Prod ν) :=
   haveI : ∀ i, sigma_finite (![μ, ν] i) := Fin.forall_fin_two.2 ⟨‹_›, ‹_›⟩
   measure_preserving_pi_fin_two _
-#align measure_theory.measure_preserving_fin_two_arrow_vec MeasureTheory.measurePreservingFinTwoArrowVec
+#align measure_theory.measure_preserving_fin_two_arrow_vec MeasureTheory.measurePreserving_finTwoArrow_vec
 
-theorem measurePreservingFinTwoArrow {α : Type u} {m : MeasurableSpace α} (μ : Measure α)
+theorem measurePreserving_finTwoArrow {α : Type u} {m : MeasurableSpace α} (μ : Measure α)
     [SigmaFinite μ] :
     MeasurePreserving MeasurableEquiv.finTwoArrow (Measure.pi fun _ => μ) (μ.Prod μ) := by
   simpa only [Matrix.vec_single_eq_const, Matrix.vecCons_const] using
     measure_preserving_fin_two_arrow_vec μ μ
-#align measure_theory.measure_preserving_fin_two_arrow MeasureTheory.measurePreservingFinTwoArrow
+#align measure_theory.measure_preserving_fin_two_arrow MeasureTheory.measurePreserving_finTwoArrow
 
-theorem volumePreservingFinTwoArrow (α : Type u) [MeasureSpace α]
+theorem volume_preserving_finTwoArrow (α : Type u) [MeasureSpace α]
     [SigmaFinite (volume : Measure α)] :
     MeasurePreserving (@MeasurableEquiv.finTwoArrow α _) volume volume :=
-  measurePreservingFinTwoArrow volume
-#align measure_theory.volume_preserving_fin_two_arrow MeasureTheory.volumePreservingFinTwoArrow
+  measurePreserving_finTwoArrow volume
+#align measure_theory.volume_preserving_fin_two_arrow MeasureTheory.volume_preserving_finTwoArrow
 
-theorem measurePreservingPiEmpty {ι : Type u} {α : ι → Type v} [IsEmpty ι]
+theorem measurePreserving_pi_empty {ι : Type u} {α : ι → Type v} [IsEmpty ι]
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) :
     MeasurePreserving (MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit) (Measure.pi μ)
       (Measure.dirac ()) :=
@@ -851,13 +852,13 @@ theorem measurePreservingPiEmpty {ι : Type u} {α : ι → Type v} [IsEmpty ι]
   set e := MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit
   refine' ⟨e.measurable, _⟩
   rw [measure.pi_of_empty, measure.map_dirac e.measurable]; rfl
-#align measure_theory.measure_preserving_pi_empty MeasureTheory.measurePreservingPiEmpty
+#align measure_theory.measure_preserving_pi_empty MeasureTheory.measurePreserving_pi_empty
 
-theorem volumePreservingPiEmpty {ι : Type u} (α : ι → Type v) [IsEmpty ι]
+theorem volume_preserving_pi_empty {ι : Type u} (α : ι → Type v) [IsEmpty ι]
     [∀ i, MeasureSpace (α i)] :
     MeasurePreserving (MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit) volume volume :=
-  measurePreservingPiEmpty fun _ => volume
-#align measure_theory.volume_preserving_pi_empty MeasureTheory.volumePreservingPiEmpty
+  measurePreserving_pi_empty fun _ => volume
+#align measure_theory.volume_preserving_pi_empty MeasureTheory.volume_preserving_pi_empty
 
 end MeasurePreserving
 
Diff
@@ -307,8 +307,8 @@ def pi' : Measure (∀ i, α i) :=
 
 theorem pi'_pi [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) : pi' μ (pi univ s) = ∏ i, μ i (s i) :=
   by
-  rw [pi', ← MeasurableEquiv.piMeasurableEquivTprod_symm_apply, MeasurableEquiv.map_apply,
-      MeasurableEquiv.piMeasurableEquivTprod_symm_apply, elim_preimage_pi, tprod_tprod _ μ, ←
+  rw [pi', ← MeasurableEquiv.piMeasurableEquivTProd_symm_apply, MeasurableEquiv.map_apply,
+      MeasurableEquiv.piMeasurableEquivTProd_symm_apply, elim_preimage_pi, tprod_tprod _ μ, ←
       List.prod_toFinset, sorted_univ_to_finset] <;>
     exact sorted_univ_nodup ι
 #align measure_theory.measure.pi'_pi MeasureTheory.Measure.pi'_pi
Diff
@@ -385,7 +385,7 @@ def FiniteSpanningSetsIn.pi {C : ∀ i, Set (Set (α i))}
           measure.pi μ (pi univ fun i => to_measurable (μ i) ((hμ i).Set (e n i))) :=
         measure_mono (pi_mono fun i hi => subset_to_measurable _ _)
       _ = ∏ i, μ i (to_measurable (μ i) ((hμ i).Set (e n i))) :=
-        pi_pi_aux μ _ fun i => measurable_set_to_measurable _ _
+        (pi_pi_aux μ _ fun i => measurable_set_to_measurable _ _)
       _ = ∏ i, μ i ((hμ i).Set (e n i)) := by simp only [measure_to_measurable]
       _ < ∞ := ENNReal.prod_lt_top fun i hi => ((hμ i).Finite _).Ne
       
Diff
@@ -62,7 +62,7 @@ noncomputable section
 
 open Function Set MeasureTheory.OuterMeasure Filter MeasurableSpace Encodable
 
-open Classical BigOperators Topology Ennreal
+open Classical BigOperators Topology ENNReal
 
 universe u v
 
@@ -387,7 +387,7 @@ def FiniteSpanningSetsIn.pi {C : ∀ i, Set (Set (α i))}
       _ = ∏ i, μ i (to_measurable (μ i) ((hμ i).Set (e n i))) :=
         pi_pi_aux μ _ fun i => measurable_set_to_measurable _ _
       _ = ∏ i, μ i ((hμ i).Set (e n i)) := by simp only [measure_to_measurable]
-      _ < ∞ := Ennreal.prod_lt_top fun i hi => ((hμ i).Finite _).Ne
+      _ < ∞ := ENNReal.prod_lt_top fun i hi => ((hμ i).Finite _).Ne
       
   ·
     simp_rw [(surjective_decode_iget (ι → ℕ)).unionᵢ_comp fun x =>
@@ -608,7 +608,7 @@ instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)]
   choose s hxs ho hμ using fun i => (μ i).exists_isOpen_measure_lt_top (x i)
   refine' ⟨pi univ s, set_pi_mem_nhds finite_univ fun i hi => IsOpen.mem_nhds (ho i) (hxs i), _⟩
   rw [pi_pi]
-  exact Ennreal.prod_lt_top fun i _ => (hμ i).Ne
+  exact ENNReal.prod_lt_top fun i _ => (hμ i).Ne
 
 variable (μ)
 

Changes in mathlib4

mathlib3
mathlib4
feat: add instances for Measure.pi (#12400)

Add instances for Measure.pi of finite measures to be finite and for Measure.pi of probability measures to be a probability measure. Add also the same instances for the canonical volume measure.

Diff
@@ -412,6 +412,23 @@ instance {α : ι → Type*} [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (v
     SigmaFinite (volume : Measure (∀ i, α i)) :=
   pi.sigmaFinite _
 
+instance pi.instIsFiniteMeasure [∀ i, IsFiniteMeasure (μ i)] :
+    IsFiniteMeasure (Measure.pi μ) :=
+  ⟨Measure.pi_univ μ ▸ ENNReal.prod_lt_top (fun i _ ↦ measure_ne_top (μ i) _)⟩
+
+instance {α : ι → Type*} [∀ i, MeasureSpace (α i)] [∀ i, IsFiniteMeasure (volume : Measure (α i))] :
+    IsFiniteMeasure (volume : Measure (∀ i, α i)) :=
+  pi.instIsFiniteMeasure _
+
+instance pi.instIsProbabilityMeasure [∀ i, IsProbabilityMeasure (μ i)] :
+    IsProbabilityMeasure (Measure.pi μ) :=
+  ⟨by simp only [Measure.pi_univ, measure_univ, Finset.prod_const_one]⟩
+
+instance {α : ι → Type*} [∀ i, MeasureSpace (α i)]
+    [∀ i, IsProbabilityMeasure (volume : Measure (α i))] :
+    IsProbabilityMeasure (volume : Measure (∀ i, α i)) :=
+  pi.instIsProbabilityMeasure _
+
 theorem pi_of_empty {α : Type*} [Fintype α] [IsEmpty α] {β : α → Type*}
     {m : ∀ a, MeasurableSpace (β a)} (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) :
     Measure.pi μ = dirac x := by
chore: backports from #11997, adaptations for nightly-2024-04-07 (#12176)

These are changes from #11997, the latest adaptation PR for nightly-2024-04-07, which can be made directly on master.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>

Diff
@@ -113,7 +113,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
       ext; simp_rw [mem_univ_pi]; apply forall_congr'; intro i'
       by_cases h : i' = i
       · subst h; simp
-      · rw [← Ne.def] at h; simp [h]
+      · rw [← Ne] at h; simp [h]
     rw [this, ← iUnion_univ_pi]
     apply MeasurableSet.iUnion
     intro n; apply measurableSet_generateFrom
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -300,7 +300,7 @@ protected irreducible_def pi : Measure (∀ i, α i) :=
   toMeasure (OuterMeasure.pi fun i => (μ i).toOuterMeasure) (pi_caratheodory μ)
 #align measure_theory.measure.pi MeasureTheory.Measure.pi
 
--- porting note: moved from below so that instances about `Measure.pi` and `MeasureSpace.pi`
+-- Porting note: moved from below so that instances about `Measure.pi` and `MeasureSpace.pi`
 -- go together
 instance _root_.MeasureTheory.MeasureSpace.pi {α : ι → Type*} [∀ i, MeasureSpace (α i)] :
     MeasureSpace (∀ i, α i) :=
chore: more backporting of simp changes from #10995 (#11001)

Co-authored-by: Patrick Massot <patrickmassot@free.fr> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -807,7 +807,7 @@ theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
   refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
   rw [e.map_apply, i.prod_univ_succAbove _, ← pi_pi, ← prod_prod]
   congr 1 with ⟨x, f⟩
-  simp [i.forall_iff_succAbove]
+  simp [e, i.forall_iff_succAbove]
 #align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreserving_piFinSuccAbove
 
 theorem volume_preserving_piFinSuccAbove {n : ℕ} (α : Fin (n + 1) → Type u)
feat: The support of f ^ n (#9617)

This involves moving lemmas from Algebra.GroupPower.Ring to Algebra.GroupWithZero.Basic and changing some 0 < n assumptions to n ≠ 0.

From LeanAPAP

Diff
@@ -167,7 +167,7 @@ theorem piPremeasure_pi' {s : ∀ i, Set (α i)} : piPremeasure m (pi univ s) =
   rcases (pi univ s).eq_empty_or_nonempty with h | h
   · rcases univ_pi_eq_empty_iff.mp h with ⟨i, hi⟩
     have : ∃ i, m i (s i) = 0 := ⟨i, by simp [hi]⟩
-    simpa [h, Finset.card_univ, zero_pow (Fintype.card_pos_iff.mpr ‹_›), @eq_comm _ (0 : ℝ≥0∞),
+    simpa [h, Finset.card_univ, zero_pow Fintype.card_ne_zero, @eq_comm _ (0 : ℝ≥0∞),
       Finset.prod_eq_zero_iff, piPremeasure]
   · simp [h, piPremeasure]
 #align measure_theory.pi_premeasure_pi' MeasureTheory.piPremeasure_pi'
feat: the volume in a MeasureSpace over an empty index is the Dirac mass (#8799)
Diff
@@ -421,6 +421,11 @@ theorem pi_of_empty {α : Type*} [Fintype α] [IsEmpty α] {β : α → Type*}
   exact isEmptyElim (α := α)
 #align measure_theory.measure.pi_of_empty MeasureTheory.Measure.pi_of_empty
 
+lemma volume_pi_eq_dirac {ι : Type*} [Fintype ι] [IsEmpty ι]
+    {α : ι → Type*} [∀ i, MeasureSpace (α i)] (x : ∀ a, α a := isEmptyElim) :
+    (volume : Measure (∀ i, α i)) = Measure.dirac x :=
+  Measure.pi_of_empty _ _
+
 @[simp]
 theorem pi_empty_univ {α : Type*} [Fintype α] [IsEmpty α] {β : α → Type*}
     {m : ∀ α, MeasurableSpace (β α)} (μ : ∀ a : α, Measure (β a)) :
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -164,7 +164,7 @@ theorem piPremeasure_pi {s : ∀ i, Set (α i)} (hs : (pi univ s).Nonempty) :
 theorem piPremeasure_pi' {s : ∀ i, Set (α i)} : piPremeasure m (pi univ s) = ∏ i, m i (s i) := by
   cases isEmpty_or_nonempty ι
   · simp [piPremeasure]
-  cases' (pi univ s).eq_empty_or_nonempty with h h
+  rcases (pi univ s).eq_empty_or_nonempty with h | h
   · rcases univ_pi_eq_empty_iff.mp h with ⟨i, hi⟩
     have : ∃ i, m i (s i) = 0 := ⟨i, by simp [hi]⟩
     simpa [h, Finset.card_univ, zero_pow (Fintype.card_pos_iff.mpr ‹_›), @eq_comm _ (0 : ℝ≥0∞),
@@ -194,7 +194,7 @@ protected def pi (m : ∀ i, OuterMeasure (α i)) : OuterMeasure (∀ i, α i) :
 
 theorem pi_pi_le (m : ∀ i, OuterMeasure (α i)) (s : ∀ i, Set (α i)) :
     OuterMeasure.pi m (pi univ s) ≤ ∏ i, m i (s i) := by
-  cases' (pi univ s).eq_empty_or_nonempty with h h; simp [h]
+  rcases (pi univ s).eq_empty_or_nonempty with h | h; simp [h]
   exact (boundedBy_le _).trans_eq (piPremeasure_pi h)
 #align measure_theory.outer_measure.pi_pi_le MeasureTheory.OuterMeasure.pi_pi_le
 
feat: demote the instance Fintype.ofIsEmpty to a def (#8816)

Rationale: this instance creates (empty) data out of nothing, which may conflict with other data. If you have in the context [Fintype i] and case on whether i is empty or not, then this gave two non-defeq instances of [Fintype i] around.

Diff
@@ -412,8 +412,9 @@ instance {α : ι → Type*} [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (v
     SigmaFinite (volume : Measure (∀ i, α i)) :=
   pi.sigmaFinite _
 
-theorem pi_of_empty {α : Type*} [IsEmpty α] {β : α → Type*} {m : ∀ a, MeasurableSpace (β a)}
-    (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) : Measure.pi μ = dirac x := by
+theorem pi_of_empty {α : Type*} [Fintype α] [IsEmpty α] {β : α → Type*}
+    {m : ∀ a, MeasurableSpace (β a)} (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) :
+    Measure.pi μ = dirac x := by
   haveI : ∀ a, SigmaFinite (μ a) := isEmptyElim
   refine' pi_eq fun s _ => _
   rw [Fintype.prod_empty, dirac_apply_of_mem]
@@ -421,17 +422,16 @@ theorem pi_of_empty {α : Type*} [IsEmpty α] {β : α → Type*} {m : ∀ a, Me
 #align measure_theory.measure.pi_of_empty MeasureTheory.Measure.pi_of_empty
 
 @[simp]
-theorem pi_empty_univ {α : Type*} {β : α → Type*} [IsEmpty α] {m : ∀ α, MeasurableSpace (β α)}
-    (μ : ∀ a : α, Measure (β a)) : Measure.pi μ (Set.univ) = 1 := by
-    rw [pi_of_empty, measure_univ]
+theorem pi_empty_univ {α : Type*} [Fintype α] [IsEmpty α] {β : α → Type*}
+    {m : ∀ α, MeasurableSpace (β α)} (μ : ∀ a : α, Measure (β a)) :
+    Measure.pi μ (Set.univ) = 1 := by
+  rw [pi_of_empty, measure_univ]
 
 theorem pi_eval_preimage_null {i : ι} {s : Set (α i)} (hs : μ i s = 0) :
     Measure.pi μ (eval i ⁻¹' s) = 0 := by
   -- WLOG, `s` is measurable
   rcases exists_measurable_superset_of_null hs with ⟨t, hst, _, hμt⟩
-  suffices : Measure.pi μ (eval i ⁻¹' t) = 0
-  exact measure_mono_null (preimage_mono hst) this
-  clear! s
+  suffices Measure.pi μ (eval i ⁻¹' t) = 0 from measure_mono_null (preimage_mono hst) this
   -- Now rewrite it as `Set.pi`, and apply `pi_pi`
   rw [← univ_pi_update_univ, pi_pi]
   apply Finset.prod_eq_zero (Finset.mem_univ i)
@@ -874,7 +874,7 @@ theorem volume_preserving_finTwoArrow (α : Type u) [MeasureSpace α]
   measurePreserving_finTwoArrow volume
 #align measure_theory.volume_preserving_fin_two_arrow MeasureTheory.volume_preserving_finTwoArrow
 
-theorem measurePreserving_pi_empty {ι : Type u} {α : ι → Type v} [IsEmpty ι]
+theorem measurePreserving_pi_empty {ι : Type u} {α : ι → Type v} [Fintype ι] [IsEmpty ι]
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) :
     MeasurePreserving (MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit) (Measure.pi μ)
       (Measure.dirac ()) := by
@@ -883,7 +883,7 @@ theorem measurePreserving_pi_empty {ι : Type u} {α : ι → Type v} [IsEmpty 
   rw [Measure.pi_of_empty, Measure.map_dirac e.measurable]
 #align measure_theory.measure_preserving_pi_empty MeasureTheory.measurePreserving_pi_empty
 
-theorem volume_preserving_pi_empty {ι : Type u} (α : ι → Type v) [IsEmpty ι]
+theorem volume_preserving_pi_empty {ι : Type u} (α : ι → Type v) [Fintype ι] [IsEmpty ι]
     [∀ i, MeasureSpace (α i)] :
     MeasurePreserving (MeasurableEquiv.ofUniqueOfUnique (∀ i, α i) Unit) volume volume :=
   measurePreserving_pi_empty fun _ => volume
chore: replace piFinSuccAboveEquiv with piFinSuccAbove (#9030)

Replaces Equiv.piFinSuccAboveEquiv with .piFinSuccAbove, and same for MeasurableEquiv.piFinSuccAboveEquiv

Diff
@@ -792,24 +792,24 @@ theorem volume_measurePreserving_sumPiEquivProdPi (π : ι ⊕ ι' → Type*)
     MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π) volume volume :=
   measurePreserving_sumPiEquivProdPi (fun _ ↦ volume)
 
-theorem measurePreserving_piFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Type u}
+theorem measurePreserving_piFinSuccAbove {n : ℕ} {α : Fin (n + 1) → Type u}
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (i : Fin (n + 1)) :
-    MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) (Measure.pi μ)
+    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) (Measure.pi μ)
       ((μ i).prod <| Measure.pi fun j => μ (i.succAbove j)) := by
-  set e := (MeasurableEquiv.piFinSuccAboveEquiv α i).symm
+  set e := (MeasurableEquiv.piFinSuccAbove α i).symm
   refine' MeasurePreserving.symm e _
   refine' ⟨e.measurable, (pi_eq fun s _ => _).symm⟩
   rw [e.map_apply, i.prod_univ_succAbove _, ← pi_pi, ← prod_prod]
   congr 1 with ⟨x, f⟩
   simp [i.forall_iff_succAbove]
-#align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreserving_piFinSuccAboveEquiv
+#align measure_theory.measure_preserving_pi_fin_succ_above_equiv MeasureTheory.measurePreserving_piFinSuccAbove
 
-theorem volume_preserving_piFinSuccAboveEquiv {n : ℕ} (α : Fin (n + 1) → Type u)
+theorem volume_preserving_piFinSuccAbove {n : ℕ} (α : Fin (n + 1) → Type u)
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (i : Fin (n + 1)) :
-    MeasurePreserving (MeasurableEquiv.piFinSuccAboveEquiv α i) :=
-  measurePreserving_piFinSuccAboveEquiv (fun _ => volume) i
-#align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAboveEquiv
+    MeasurePreserving (MeasurableEquiv.piFinSuccAbove α i) :=
+  measurePreserving_piFinSuccAbove (fun _ => volume) i
+#align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAbove
 
 theorem measurePreserving_piUnique {π : ι → Type*} [Unique ι] {m : ∀ i, MeasurableSpace (π i)}
     (μ : ∀ i, Measure (π i)) :
chore: Replace (· op ·) a by (a op ·) (#8843)

I used the regex \(\(· (.) ·\) (.)\), replacing with ($2 $1 ·).

Diff
@@ -576,7 +576,7 @@ instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i
     [∀ i, IsMulLeftInvariant (μ i)] : IsMulLeftInvariant (Measure.pi μ) := by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_const_mul _) (MeasurableSet.univ_pi hs),
-    show (· * ·) v ⁻¹' univ.pi s = univ.pi fun i => (· * ·) (v i) ⁻¹' s i by rfl, pi_pi]
+    show (v * ·) ⁻¹' univ.pi s = univ.pi fun i => (v i * ·) ⁻¹' s i by rfl, pi_pi]
   simp_rw [measure_preimage_mul]
 #align measure_theory.measure.pi.is_mul_left_invariant MeasureTheory.Measure.pi.isMulLeftInvariant
 #align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.isAddLeftInvariant
feat: Compute volume of balls of higher dimension for Lp norms (#8030)

We give a formula measure_unitBall_eq_integral_div_gamma for computing the volume of the unit ball in a normed finite dimensional -vector space E with an Haar measure:

theorem measure_unitBall_eq_integral_div_gamma {E : Type*} {p : ℝ}
    [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E]
    [BorelSpace E] (μ : Measure E) [IsAddHaarMeasure μ] (hp : 0 < p) :
    μ (Metric.ball 0 1) =
      ENNReal.ofReal ((∫ (x : E), Real.exp (- ‖x‖ ^ p) ∂μ) / Real.Gamma (finrank ℝ E / p + 1))

We also provide a theorem measure_lt_one_eq_integral_div_gamma to compute the volume of the ball {x : E | g x < 1} for a function g : E → ℝ defining a norm.

theorem measure_lt_one_eq_integral_div_gamma {E : Type*}
    [AddCommGroup E] [Module ℝ E] [FiniteDimensional ℝ E] [mE : MeasurableSpace E]
    [tE : TopologicalSpace E] [TopologicalAddGroup E] [BorelSpace E] [T2Space E]
    [ContinuousSMul ℝ E] (μ : Measure E) [IsAddHaarMeasure μ]
    {g : E → ℝ} (hg0 : g 0 = 0) (hgn : ∀ x, g (- x) = g x) (hgt : ∀ x y, g (x + y) ≤ g x + g y)
    (hgs : ∀ {x}, g x = 0 → x = 0) (hns :  ∀ r x, g (r • x) ≤ |r| * (g x)) {p : ℝ} (hp : 0 < p) :
    μ {x : E | g x < 1} =
      ENNReal.ofReal ((∫ (x : E), Real.exp (- (g x) ^ p) ∂μ) / Real.Gamma (finrank ℝ E / p + 1))

This provides a way to compute the volume of the unit ball for the norms L_p for 1 ≤ p in any dimension over the reals MeasureTheory.volume_sum_rpow_lt_one and the complex Complex.volume_sum_rpow_lt_one.

variable (ι : Type*) [Fintype ι] {p : ℝ} (hp : 1 ≤ p)

theorem volume_sum_rpow_lt_one :
    volume {x : ι → ℝ | ∑ i, |x i| ^ p < 1} =
      ENNReal.ofReal ((2 * Real.Gamma (1 / p + 1)) ^ card ι / Real.Gamma (card ι / p + 1))

theorem Complex.volume_sum_rpow_lt_one {p : ℝ} (hp : 1 ≤ p) :
    volume {x : ι → ℂ | ∑ i, ‖x i‖ ^ p < 1} =
      ENNReal.ofReal ((π * Real.Gamma (2 / p + 1)) ^ card ι / Real.Gamma (2 * card ι / p + 1)) 

From these, we deduce the volume of balls in several situations.

--

Other significant changes include:

  • Adding MeasurePreserving.integral_comp': when the theorem MeasurePreserving.integral_comp is used with f a measurable equiv, it is necessary to specify that it is a measurable embedding although it is trivial in this case. This version bypasses this hypothesis
  • Proof of volume computations of the unit ball in and in EuclideanSpace ℝ (Fin 2) which are now done with the methods of the file VolumeOfBalls have been moved to this file.

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -420,6 +420,11 @@ theorem pi_of_empty {α : Type*} [IsEmpty α] {β : α → Type*} {m : ∀ a, Me
   exact isEmptyElim (α := α)
 #align measure_theory.measure.pi_of_empty MeasureTheory.Measure.pi_of_empty
 
+@[simp]
+theorem pi_empty_univ {α : Type*} {β : α → Type*} [IsEmpty α] {m : ∀ α, MeasurableSpace (β α)}
+    (μ : ∀ a : α, Measure (β a)) : Measure.pi μ (Set.univ) = 1 := by
+    rw [pi_of_empty, measure_univ]
+
 theorem pi_eval_preimage_null {i : ι} {s : Set (α i)} (hs : μ i s = 0) :
     Measure.pi μ (eval i ⁻¹' s) = 0 := by
   -- WLOG, `s` is measurable
feat: extend results on product measures from sigma-finite to s-finite measures (#8713)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -243,7 +243,7 @@ instance sigmaFinite_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, Si
     SigmaFinite (Measure.tprod l μ) := by
   induction l with
   | nil => rw [tprod_nil]; infer_instance
-  | cons i l ih => rw [tprod_cons]; exact @prod.instSigmaFinite _ _ _ _ _ _ ih _
+  | cons i l ih => rw [tprod_cons]; exact @prod.instSigmaFinite _ _ _ _ _ _ _ ih
 #align measure_theory.measure.sigma_finite_tprod MeasureTheory.Measure.sigmaFinite_tprod
 
 theorem tprod_tprod (l : List δ) (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)]
feat: define the marginal of a function (#8379)
  • This is a convenient way to work with iterated integrals and apply Fubini's theorem, without requiring the hassle of working with measurable equivalences.

Co-authored-by: Heather Macbeth 25316162+hrmacbeth@users.noreply.github.com

Diff
@@ -20,12 +20,9 @@ In this file we define and prove properties about finite products of measures
 * `MeasureTheory.Measure.pi`: The product of finitely many σ-finite measures.
   Given `μ : (i : ι) → Measure (α i)` for `[Fintype ι]` it has type `Measure ((i : ι) → α i)`.
 
-To apply Fubini along some subset of the variables, use
-`MeasureTheory.measurePreserving_piEquivPiSubtypeProd` to reduce to the situation of a product
-of two measures: this lemma states that the bijection
-`MeasurableEquiv.piEquivPiSubtypeProd α p` between `(∀ i : ι, α i)` and
-`((i : {i // p i}) → α i) × ((i : {i // ¬ p i}) → α i)` maps a product measure to a direct product
-of product measures, to which one can apply the usual Fubini for direct product of measures.
+To apply Fubini's theorem or Tonelli's theorem along some subset, we recommend using the marginal
+construction `MeasureTheory.lmarginal` and (todo) `MeasureTheory.marginal`. This allows you to
+apply the theorems without any bookkeeping with measurable equivalences.
 
 ## Implementation Notes
 
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -274,8 +274,7 @@ def pi' : Measure (∀ i, α i) :=
 theorem pi'_pi [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) :
     pi' μ (pi univ s) = ∏ i, μ i (s i) := by
   rw [pi']
-  simp only [TProd.elim'] -- Porting note: new step
-  erw [← MeasurableEquiv.piMeasurableEquivTProd_symm_apply, MeasurableEquiv.map_apply,
+  rw [← MeasurableEquiv.piMeasurableEquivTProd_symm_apply, MeasurableEquiv.map_apply,
     MeasurableEquiv.piMeasurableEquivTProd_symm_apply, elim_preimage_pi, tprod_tprod _ μ, ←
     List.prod_toFinset, sortedUniv_toFinset] <;>
   exact sortedUniv_nodup ι
feat: measurability of uniqueElim and piFinsetUnion (#8249)
  • The extra import doesn't add any additional imports transitively
  • Also use implicit arguments for some MeasurableSpace arguments for consistency with other lemmas.
  • Redefine Equiv.piSubsingleton and MulEquiv.piSubsingleton to Equiv.piUnique and MulEquiv.piUnique.
Diff
@@ -764,8 +764,8 @@ theorem volume_measurePreserving_piCongrLeft (α : ι → Type*) (f : ι' ≃ ι
     MeasurePreserving (MeasurableEquiv.piCongrLeft α f) volume volume :=
   measurePreserving_piCongrLeft (fun _ ↦ volume) f
 
-theorem measurePreserving_sumPiEquivProdPi_symm {π : ι ⊕ ι' → Type*} [∀ i, MeasurableSpace (π i)]
-    (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
+theorem measurePreserving_sumPiEquivProdPi_symm {π : ι ⊕ ι' → Type*}
+    {m : ∀ i, MeasurableSpace (π i)} (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
     MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π).symm
       ((Measure.pi fun i => μ (.inl i)).prod (Measure.pi fun i => μ (.inr i))) (Measure.pi μ) where
   measurable := (MeasurableEquiv.sumPiEquivProdPi π).symm.measurable
@@ -780,7 +780,7 @@ theorem volume_measurePreserving_sumPiEquivProdPi_symm (π : ι ⊕ ι' → Type
     MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π).symm volume volume :=
   measurePreserving_sumPiEquivProdPi_symm (fun _ ↦ volume)
 
-theorem measurePreserving_sumPiEquivProdPi {π : ι ⊕ ι' → Type*} [∀ i, MeasurableSpace (π i)]
+theorem measurePreserving_sumPiEquivProdPi {π : ι ⊕ ι' → Type*} {_m : ∀ i, MeasurableSpace (π i)}
     (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
     MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π)
       (Measure.pi μ) ((Measure.pi fun i => μ (.inl i)).prod (Measure.pi fun i => μ (.inr i))) :=
@@ -810,16 +810,27 @@ theorem volume_preserving_piFinSuccAboveEquiv {n : ℕ} (α : Fin (n + 1) → Ty
   measurePreserving_piFinSuccAboveEquiv (fun _ => volume) i
 #align measure_theory.volume_preserving_pi_fin_succ_above_equiv MeasureTheory.volume_preserving_piFinSuccAboveEquiv
 
-theorem measurePreserving_funUnique {β : Type u} {m : MeasurableSpace β} (μ : Measure β)
+theorem measurePreserving_piUnique {π : ι → Type*} [Unique ι] {m : ∀ i, MeasurableSpace (π i)}
+    (μ : ∀ i, Measure (π i)) :
+    MeasurePreserving (MeasurableEquiv.piUnique π) (Measure.pi μ) (μ default) where
+  measurable := (MeasurableEquiv.piUnique π).measurable
+  map_eq := by
+    set e := MeasurableEquiv.piUnique π
+    have : (piPremeasure fun i => (μ i).toOuterMeasure) = Measure.map e.symm (μ default) := by
+      ext1 s
+      rw [piPremeasure, Fintype.prod_unique, e.symm.map_apply]
+      congr 1; exact e.toEquiv.image_eq_preimage s
+    simp_rw [Measure.pi, OuterMeasure.pi, this, boundedBy_eq_self, toOuterMeasure_toMeasure,
+      MeasurableEquiv.map_map_symm]
+
+theorem volume_preserving_piUnique (π : ι → Type*) [Unique ι] [∀ i, MeasureSpace (π i)] :
+    MeasurePreserving (MeasurableEquiv.piUnique π) volume volume :=
+  measurePreserving_piUnique _
+
+theorem measurePreserving_funUnique {β : Type u} {_m : MeasurableSpace β} (μ : Measure β)
     (α : Type v) [Unique α] :
-    MeasurePreserving (MeasurableEquiv.funUnique α β) (Measure.pi fun _ : α => μ) μ := by
-  set e := MeasurableEquiv.funUnique α β
-  have : (piPremeasure fun _ : α => μ.toOuterMeasure) = Measure.map e.symm μ := by
-    ext1 s
-    rw [piPremeasure, Fintype.prod_unique, e.symm.map_apply]
-    congr 1; exact e.toEquiv.image_eq_preimage s
-  simp only [Measure.pi, OuterMeasure.pi, this, boundedBy_measure, toOuterMeasure_toMeasure]
-  exact (e.symm.measurable.measurePreserving _).symm e.symm
+    MeasurePreserving (MeasurableEquiv.funUnique α β) (Measure.pi fun _ : α => μ) μ :=
+  measurePreserving_piUnique _
 #align measure_theory.measure_preserving_fun_unique MeasureTheory.measurePreserving_funUnique
 
 theorem volume_preserving_funUnique (α : Type u) (β : Type v) [Unique α] [MeasureSpace β] :
@@ -877,6 +888,20 @@ theorem volume_preserving_pi_empty {ι : Type u} (α : ι → Type v) [IsEmpty 
   measurePreserving_pi_empty fun _ => volume
 #align measure_theory.volume_preserving_pi_empty MeasureTheory.volume_preserving_pi_empty
 
+theorem measurePreserving_piFinsetUnion [DecidableEq ι] {s t : Finset ι} (h : Disjoint s t)
+    (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)] :
+    MeasurePreserving (MeasurableEquiv.piFinsetUnion α h)
+      ((Measure.pi fun i : s ↦ μ i).prod (Measure.pi fun i : t ↦ μ i))
+      (Measure.pi fun i : ↥(s ∪ t) ↦ μ i) :=
+  let e := Equiv.Finset.union s t h
+  measurePreserving_piCongrLeft (fun i : ↥(s ∪ t) ↦ μ i) e |>.comp <|
+    measurePreserving_sumPiEquivProdPi_symm fun b ↦ μ (e b)
+
+theorem volume_preserving_piFinsetUnion (α : ι → Type*) [DecidableEq ι] {s t : Finset ι}
+    (h : Disjoint s t) [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] :
+    MeasurePreserving (MeasurableEquiv.piFinsetUnion α h) volume volume :=
+  measurePreserving_piFinsetUnion h (fun _ ↦ volume)
+
 end MeasurePreserving
 
 end MeasureTheory
feat: some measure preserving equivalences on pi-types (#7751)
  • Also fix the statement of some lemmas of an earlier PR.
  • From the Sobolev project
  • There are more that depend on #7341

Co-authored-by: Heather Macbeth 25316162+hrmacbeth@users.noreply.github.com

Diff
@@ -728,9 +728,10 @@ measures of corresponding sets (images or preimages) have equal measures and fun
 
 section MeasurePreserving
 
-theorem measurePreserving_piEquivPiSubtypeProd {ι : Type u} {α : ι → Type v} [Fintype ι]
-    {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
-    (p : ι → Prop) [DecidablePred p] :
+variable {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
+variable [Fintype ι']
+
+theorem measurePreserving_piEquivPiSubtypeProd (p : ι → Prop) [DecidablePred p] :
     MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) (Measure.pi μ)
       ((Measure.pi fun i : Subtype p => μ i).prod (Measure.pi fun i => μ i)) := by
   set e := (MeasurableEquiv.piEquivPiSubtypeProd α p).symm
@@ -743,12 +744,53 @@ theorem measurePreserving_piEquivPiSubtypeProd {ι : Type u} {α : ι → Type v
   exact Fintype.prod_subtype_mul_prod_subtype p fun i => μ i (s i)
 #align measure_theory.measure_preserving_pi_equiv_pi_subtype_prod MeasureTheory.measurePreserving_piEquivPiSubtypeProd
 
-theorem volume_preserving_piEquivPiSubtypeProd {ι : Type*} (α : ι → Type*) [Fintype ι]
+theorem volume_preserving_piEquivPiSubtypeProd (α : ι → Type*)
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (p : ι → Prop)
     [DecidablePred p] : MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) :=
   measurePreserving_piEquivPiSubtypeProd (fun _ => volume) p
 #align measure_theory.volume_preserving_pi_equiv_pi_subtype_prod MeasureTheory.volume_preserving_piEquivPiSubtypeProd
 
+theorem measurePreserving_piCongrLeft (f : ι' ≃ ι) :
+    MeasurePreserving (MeasurableEquiv.piCongrLeft α f)
+      (Measure.pi fun i' => μ (f i')) (Measure.pi μ) where
+  measurable := (MeasurableEquiv.piCongrLeft α f).measurable
+  map_eq := by
+    refine' (pi_eq fun s _ => _).symm
+    rw [MeasurableEquiv.map_apply, MeasurableEquiv.coe_piCongrLeft f,
+      Equiv.piCongrLeft_preimage_univ_pi, pi_pi _ _, f.prod_comp (fun i => μ i (s i))]
+
+theorem volume_measurePreserving_piCongrLeft (α : ι → Type*) (f : ι' ≃ ι)
+    [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] :
+    MeasurePreserving (MeasurableEquiv.piCongrLeft α f) volume volume :=
+  measurePreserving_piCongrLeft (fun _ ↦ volume) f
+
+theorem measurePreserving_sumPiEquivProdPi_symm {π : ι ⊕ ι' → Type*} [∀ i, MeasurableSpace (π i)]
+    (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
+    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π).symm
+      ((Measure.pi fun i => μ (.inl i)).prod (Measure.pi fun i => μ (.inr i))) (Measure.pi μ) where
+  measurable := (MeasurableEquiv.sumPiEquivProdPi π).symm.measurable
+  map_eq := by
+    refine' (pi_eq fun s _ => _).symm
+    simp_rw [MeasurableEquiv.map_apply, MeasurableEquiv.coe_sumPiEquivProdPi_symm,
+      Equiv.sumPiEquivProdPi_symm_preimage_univ_pi, Measure.prod_prod, Measure.pi_pi,
+      Fintype.prod_sum_type]
+
+theorem volume_measurePreserving_sumPiEquivProdPi_symm (π : ι ⊕ ι' → Type*)
+    [∀ i, MeasureSpace (π i)] [∀ i, SigmaFinite (volume : Measure (π i))] :
+    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π).symm volume volume :=
+  measurePreserving_sumPiEquivProdPi_symm (fun _ ↦ volume)
+
+theorem measurePreserving_sumPiEquivProdPi {π : ι ⊕ ι' → Type*} [∀ i, MeasurableSpace (π i)]
+    (μ : ∀ i, Measure (π i)) [∀ i, SigmaFinite (μ i)] :
+    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π)
+      (Measure.pi μ) ((Measure.pi fun i => μ (.inl i)).prod (Measure.pi fun i => μ (.inr i))) :=
+  measurePreserving_sumPiEquivProdPi_symm μ |>.symm
+
+theorem volume_measurePreserving_sumPiEquivProdPi (π : ι ⊕ ι' → Type*)
+    [∀ i, MeasureSpace (π i)] [∀ i, SigmaFinite (volume : Measure (π i))] :
+    MeasurePreserving (MeasurableEquiv.sumPiEquivProdPi π) volume volume :=
+  measurePreserving_sumPiEquivProdPi (fun _ ↦ volume)
+
 theorem measurePreserving_piFinSuccAboveEquiv {n : ℕ} {α : Fin (n + 1) → Type u}
     {m : ∀ i, MeasurableSpace (α i)} (μ : ∀ i, Measure (α i)) [∀ i, SigmaFinite (μ i)]
     (i : Fin (n + 1)) :
chore: remove unused simps (#6632)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -317,7 +317,6 @@ theorem pi_pi_aux [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) (hs : ∀
   · rw [Measure.pi, toMeasure_apply _ _ (MeasurableSet.pi countable_univ fun i _ => hs i)]
     apply OuterMeasure.pi_pi_le
   · haveI : Encodable ι := Fintype.toEncodable ι
-    rw [← pi'_pi μ s]
     simp_rw [← pi'_pi μ s, Measure.pi,
       toMeasure_apply _ _ (MeasurableSet.pi countable_univ fun i _ => hs i)]
     suffices (pi' μ).toOuterMeasure ≤ OuterMeasure.pi fun i => (μ i).toOuterMeasure by exact this _
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
@@ -63,7 +63,7 @@ open scoped Classical BigOperators Topology ENNReal
 
 universe u v
 
-variable {ι ι' : Type _} {α : ι → Type _}
+variable {ι ι' : Type*} {α : ι → Type*}
 
 /-! We start with some measurability properties -/
 
@@ -220,7 +220,7 @@ section Tprod
 
 open List
 
-variable {δ : Type _} {π : δ → Type _} [∀ x, MeasurableSpace (π x)]
+variable {δ : Type*} {π : δ → Type*} [∀ x, MeasurableSpace (π x)]
 
 -- for some reason the equation compiler doesn't like this definition
 /-- A product of measures in `tprod α l`. -/
@@ -306,7 +306,7 @@ protected irreducible_def pi : Measure (∀ i, α i) :=
 
 -- porting note: moved from below so that instances about `Measure.pi` and `MeasureSpace.pi`
 -- go together
-instance _root_.MeasureTheory.MeasureSpace.pi {α : ι → Type _} [∀ i, MeasureSpace (α i)] :
+instance _root_.MeasureTheory.MeasureSpace.pi {α : ι → Type*} [∀ i, MeasureSpace (α i)] :
     MeasureSpace (∀ i, α i) :=
   ⟨Measure.pi fun _ => volume⟩
 #align measure_theory.measure_space.pi MeasureTheory.MeasureSpace.pi
@@ -413,11 +413,11 @@ instance pi.sigmaFinite : SigmaFinite (Measure.pi μ) :=
   (FiniteSpanningSetsIn.pi fun i => (μ i).toFiniteSpanningSetsIn).sigmaFinite
 #align measure_theory.measure.pi.sigma_finite MeasureTheory.Measure.pi.sigmaFinite
 
-instance {α : ι → Type _} [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] :
+instance {α : ι → Type*} [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] :
     SigmaFinite (volume : Measure (∀ i, α i)) :=
   pi.sigmaFinite _
 
-theorem pi_of_empty {α : Type _} [IsEmpty α] {β : α → Type _} {m : ∀ a, MeasurableSpace (β a)}
+theorem pi_of_empty {α : Type*} [IsEmpty α] {β : α → Type*} {m : ∀ a, MeasurableSpace (β a)}
     (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) : Measure.pi μ = dirac x := by
   haveI : ∀ a, SigmaFinite (μ a) := isEmptyElim
   refine' pi_eq fun s _ => _
@@ -457,12 +457,12 @@ theorem ae_pi_le_pi : (Measure.pi μ).ae ≤ Filter.pi fun i => (μ i).ae :=
   le_iInf fun _ => tendsto_eval_ae_ae.le_comap
 #align measure_theory.measure.ae_pi_le_pi MeasureTheory.Measure.ae_pi_le_pi
 
-theorem ae_eq_pi {β : ι → Type _} {f f' : ∀ i, α i → β i} (h : ∀ i, f i =ᵐ[μ i] f' i) :
+theorem ae_eq_pi {β : ι → Type*} {f f' : ∀ i, α i → β i} (h : ∀ i, f i =ᵐ[μ i] f' i) :
     (fun (x : ∀ i, α i) i => f i (x i)) =ᵐ[Measure.pi μ] fun x i => f' i (x i) :=
   (eventually_all.2 fun i => tendsto_eval_ae_ae.eventually (h i)).mono fun _ hx => funext hx
 #align measure_theory.measure.ae_eq_pi MeasureTheory.Measure.ae_eq_pi
 
-theorem ae_le_pi {β : ι → Type _} [∀ i, Preorder (β i)] {f f' : ∀ i, α i → β i}
+theorem ae_le_pi {β : ι → Type*} [∀ i, Preorder (β i)] {f f' : ∀ i, α i → β i}
     (h : ∀ i, f i ≤ᵐ[μ i] f' i) :
     (fun (x : ∀ i, α i) i => f i (x i)) ≤ᵐ[Measure.pi μ] fun x i => f' i (x i) :=
   (eventually_all.2 fun i => tendsto_eval_ae_ae.eventually (h i)).mono fun _ hx => hx
@@ -549,7 +549,7 @@ theorem pi_noAtoms (i : ι) [NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
 instance pi_noAtoms' [h : Nonempty ι] [∀ i, NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   h.elim fun i => pi_noAtoms i
 
-instance {α : ι → Type _} [Nonempty ι] [∀ i, MeasureSpace (α i)]
+instance {α : ι → Type*} [Nonempty ι] [∀ i, MeasureSpace (α i)]
     [∀ i, SigmaFinite (volume : Measure (α i))] [∀ i, NoAtoms (volume : Measure (α i))] :
     NoAtoms (volume : Measure (∀ i, α i)) :=
   pi_noAtoms'
@@ -563,7 +563,7 @@ instance pi.isLocallyFiniteMeasure
   rw [pi_pi]
   exact ENNReal.prod_lt_top fun i _ => (hμ i).ne
 
-instance {X : ι → Type _} [∀ i, TopologicalSpace (X i)] [∀ i, MeasureSpace (X i)]
+instance {X : ι → Type*} [∀ i, TopologicalSpace (X i)] [∀ i, MeasureSpace (X i)]
     [∀ i, SigmaFinite (volume : Measure (X i))]
     [∀ i, IsLocallyFiniteMeasure (volume : Measure (X i))] :
     IsLocallyFiniteMeasure (volume : Measure (∀ i, X i)) :=
@@ -582,7 +582,7 @@ instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i
 #align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.isAddLeftInvariant
 
 @[to_additive]
-instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
+instance {G : ι → Type*} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
     [∀ i, SigmaFinite (volume : Measure (G i))] [∀ i, IsMulLeftInvariant (volume : Measure (G i))] :
     IsMulLeftInvariant (volume : Measure (∀ i, G i)) :=
   pi.isMulLeftInvariant _
@@ -598,7 +598,7 @@ instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α
 #align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.isAddRightInvariant
 
 @[to_additive]
-instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
+instance {G : ι → Type*} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
     [∀ i, SigmaFinite (volume : Measure (G i))]
     [∀ i, IsMulRightInvariant (volume : Measure (G i))] :
     IsMulRightInvariant (volume : Measure (∀ i, G i)) :=
@@ -615,7 +615,7 @@ instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
 #align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.isNegInvariant
 
 @[to_additive]
-instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableInv (G i)]
+instance {G : ι → Type*} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableInv (G i)]
     [∀ i, SigmaFinite (volume : Measure (G i))] [∀ i, IsInvInvariant (volume : Measure (G i))] :
     IsInvInvariant (volume : Measure (∀ i, G i)) :=
   pi.isInvInvariant _
@@ -632,7 +632,7 @@ instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosM
   apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
 #align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.isOpenPosMeasure
 
-instance {X : ι → Type _} [∀ i, TopologicalSpace (X i)] [∀ i, MeasureSpace (X i)]
+instance {X : ι → Type*} [∀ i, TopologicalSpace (X i)] [∀ i, MeasureSpace (X i)]
     [∀ i, IsOpenPosMeasure (volume : Measure (X i))] [∀ i, SigmaFinite (volume : Measure (X i))] :
     IsOpenPosMeasure (volume : Measure (∀ i, X i)) :=
   pi.isOpenPosMeasure _
@@ -649,7 +649,7 @@ instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
   exact fun i _ => ne_of_lt (IsCompact.measure_lt_top (IsCompact.image hK (continuous_apply i)))
 #align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.isFiniteMeasureOnCompacts
 
-instance {X : ι → Type _} [∀ i, MeasureSpace (X i)] [∀ i, TopologicalSpace (X i)]
+instance {X : ι → Type*} [∀ i, MeasureSpace (X i)] [∀ i, TopologicalSpace (X i)]
     [∀ i, SigmaFinite (volume : Measure (X i))]
     [∀ i, IsFiniteMeasureOnCompacts (volume : Measure (X i))] :
     IsFiniteMeasureOnCompacts (volume : Measure (∀ i, X i)) :=
@@ -662,7 +662,7 @@ instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
 #align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.isAddHaarMeasure
 
 @[to_additive]
-instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
+instance {G : ι → Type*} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
     [∀ i, TopologicalSpace (G i)] [∀ i, SigmaFinite (volume : Measure (G i))]
     [∀ i, IsHaarMeasure (volume : Measure (G i))] : IsHaarMeasure (volume : Measure (∀ i, G i)) :=
   pi.isHaarMeasure _
@@ -744,7 +744,7 @@ theorem measurePreserving_piEquivPiSubtypeProd {ι : Type u} {α : ι → Type v
   exact Fintype.prod_subtype_mul_prod_subtype p fun i => μ i (s i)
 #align measure_theory.measure_preserving_pi_equiv_pi_subtype_prod MeasureTheory.measurePreserving_piEquivPiSubtypeProd
 
-theorem volume_preserving_piEquivPiSubtypeProd {ι : Type _} (α : ι → Type _) [Fintype ι]
+theorem volume_preserving_piEquivPiSubtypeProd {ι : Type*} (α : ι → Type*) [Fintype ι]
     [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] (p : ι → Prop)
     [DecidablePred p] : MeasurePreserving (MeasurableEquiv.piEquivPiSubtypeProd α p) :=
   measurePreserving_piEquivPiSubtypeProd (fun _ => volume) p
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,16 +2,13 @@
 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.pi
-! 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.Group.Measure
 import Mathlib.Topology.Constructions
 
+#align_import measure_theory.constructions.pi from "leanprover-community/mathlib"@"fd5edc43dc4f10b85abfe544b88f82cf13c5f844"
+
 /-!
 # Product measures
 
chore: bump to nightly-2023-07-01 (#5409)

Open in Gitpod

Co-authored-by: Komyyy <pol_tta@outlook.jp> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -185,7 +185,7 @@ theorem piPremeasure_pi_mono {s t : Set (∀ i, α i)} (h : s ⊆ t) :
 
 theorem piPremeasure_pi_eval {s : Set (∀ i, α i)} :
     piPremeasure m (pi univ fun i => eval i '' s) = piPremeasure m s := by
-  simp [piPremeasure_pi']; rfl
+  simp only [eval, piPremeasure_pi']; rfl
 #align measure_theory.pi_premeasure_pi_eval MeasureTheory.piPremeasure_pi_eval
 
 namespace OuterMeasure
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -75,7 +75,7 @@ variable {ι ι' : Type _} {α : ι → Type _}
 theorem IsPiSystem.pi {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsPiSystem (C i)) :
     IsPiSystem (pi univ '' pi univ C) := by
   rintro _ ⟨s₁, hs₁, rfl⟩ _ ⟨s₂, hs₂, rfl⟩ hst
-  rw [← pi_inter_distrib] at hst⊢; rw [univ_pi_nonempty_iff] at hst
+  rw [← pi_inter_distrib] at hst ⊢; rw [univ_pi_nonempty_iff] at hst
   exact mem_image_of_mem _ fun i _ => hC i _ (hs₁ i (mem_univ i)) _ (hs₂ i (mem_univ i)) (hst i)
 #align is_pi_system.pi IsPiSystem.pi
 
chore: tidy various files (#5104)
Diff
@@ -117,7 +117,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
         Set.pi univ fun k => ⋃ j : ℕ,
         @update ι (fun i' => Set (α i')) _ (fun i' => t i' j) i s k := by
       ext; simp_rw [mem_univ_pi]; apply forall_congr'; intro i'
-      by_cases i' = i
+      by_cases h : i' = i
       · subst h; simp
       · rw [← Ne.def] at h; simp [h]
     rw [this, ← iUnion_univ_pi]
feat: add instances about volume (#4628)

Lean 3 was able to apply, e.g., instances about measure_theory.measure.prod to the volume on the Cartesian product. Lean 4 can't do this, so we need to duplicate many instances.

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Komyyy <pol_tta@outlook.jp>

Diff
@@ -307,6 +307,13 @@ protected irreducible_def pi : Measure (∀ i, α i) :=
   toMeasure (OuterMeasure.pi fun i => (μ i).toOuterMeasure) (pi_caratheodory μ)
 #align measure_theory.measure.pi MeasureTheory.Measure.pi
 
+-- porting note: moved from below so that instances about `Measure.pi` and `MeasureSpace.pi`
+-- go together
+instance _root_.MeasureTheory.MeasureSpace.pi {α : ι → Type _} [∀ i, MeasureSpace (α i)] :
+    MeasureSpace (∀ i, α i) :=
+  ⟨Measure.pi fun _ => volume⟩
+#align measure_theory.measure_space.pi MeasureTheory.MeasureSpace.pi
+
 theorem pi_pi_aux [∀ i, SigmaFinite (μ i)] (s : ∀ i, Set (α i)) (hs : ∀ i, MeasurableSet (s i)) :
     Measure.pi μ (pi univ s) = ∏ i, μ i (s i) := by
   refine' le_antisymm _ _
@@ -409,6 +416,10 @@ instance pi.sigmaFinite : SigmaFinite (Measure.pi μ) :=
   (FiniteSpanningSetsIn.pi fun i => (μ i).toFiniteSpanningSetsIn).sigmaFinite
 #align measure_theory.measure.pi.sigma_finite MeasureTheory.Measure.pi.sigmaFinite
 
+instance {α : ι → Type _} [∀ i, MeasureSpace (α i)] [∀ i, SigmaFinite (volume : Measure (α i))] :
+    SigmaFinite (volume : Measure (∀ i, α i)) :=
+  pi.sigmaFinite _
+
 theorem pi_of_empty {α : Type _} [IsEmpty α] {β : α → Type _} {m : ∀ a, MeasurableSpace (β a)}
     (μ : ∀ a : α, Measure (β a)) (x : ∀ a, β a := isEmptyElim) : Measure.pi μ = dirac x := by
   haveI : ∀ a, SigmaFinite (μ a) := isEmptyElim
@@ -538,10 +549,16 @@ theorem pi_noAtoms (i : ι) [NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   ⟨fun x => flip measure_mono_null (pi_hyperplane μ i (x i)) (singleton_subset_iff.2 rfl)⟩
 #align measure_theory.measure.pi_has_no_atoms MeasureTheory.Measure.pi_noAtoms
 
-instance [h : Nonempty ι] [∀ i, NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
+instance pi_noAtoms' [h : Nonempty ι] [∀ i, NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   h.elim fun i => pi_noAtoms i
 
-instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)] :
+instance {α : ι → Type _} [Nonempty ι] [∀ i, MeasureSpace (α i)]
+    [∀ i, SigmaFinite (volume : Measure (α i))] [∀ i, NoAtoms (volume : Measure (α i))] :
+    NoAtoms (volume : Measure (∀ i, α i)) :=
+  pi_noAtoms'
+
+instance pi.isLocallyFiniteMeasure
+    [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)] :
     IsLocallyFiniteMeasure (Measure.pi μ) := by
   refine' ⟨fun x => _⟩
   choose s hxs ho hμ using fun i => (μ i).exists_isOpen_measure_lt_top (x i)
@@ -549,6 +566,12 @@ instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)]
   rw [pi_pi]
   exact ENNReal.prod_lt_top fun i _ => (hμ i).ne
 
+instance {X : ι → Type _} [∀ i, TopologicalSpace (X i)] [∀ i, MeasureSpace (X i)]
+    [∀ i, SigmaFinite (volume : Measure (X i))]
+    [∀ i, IsLocallyFiniteMeasure (volume : Measure (X i))] :
+    IsLocallyFiniteMeasure (volume : Measure (∀ i, X i)) :=
+  pi.isLocallyFiniteMeasure
+
 variable (μ)
 
 @[to_additive]
@@ -561,6 +584,12 @@ instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i
 #align measure_theory.measure.pi.is_mul_left_invariant MeasureTheory.Measure.pi.isMulLeftInvariant
 #align measure_theory.measure.pi.is_add_left_invariant MeasureTheory.Measure.pi.isAddLeftInvariant
 
+@[to_additive]
+instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
+    [∀ i, SigmaFinite (volume : Measure (G i))] [∀ i, IsMulLeftInvariant (volume : Measure (G i))] :
+    IsMulLeftInvariant (volume : Measure (∀ i, G i)) :=
+  pi.isMulLeftInvariant _
+
 @[to_additive]
 instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
     [∀ i, IsMulRightInvariant (μ i)] : IsMulRightInvariant (Measure.pi μ) := by
@@ -571,6 +600,13 @@ instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α
 #align measure_theory.measure.pi.is_mul_right_invariant MeasureTheory.Measure.pi.isMulRightInvariant
 #align measure_theory.measure.pi.is_add_right_invariant MeasureTheory.Measure.pi.isAddRightInvariant
 
+@[to_additive]
+instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
+    [∀ i, SigmaFinite (volume : Measure (G i))]
+    [∀ i, IsMulRightInvariant (volume : Measure (G i))] :
+    IsMulRightInvariant (volume : Measure (∀ i, G i)) :=
+  pi.isMulRightInvariant _
+
 @[to_additive]
 instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
     [∀ i, IsInvInvariant (μ i)] : IsInvInvariant (Measure.pi μ) := by
@@ -581,6 +617,12 @@ instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
 #align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
 #align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.isNegInvariant
 
+@[to_additive]
+instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableInv (G i)]
+    [∀ i, SigmaFinite (volume : Measure (G i))] [∀ i, IsInvInvariant (volume : Measure (G i))] :
+    IsInvInvariant (volume : Measure (∀ i, G i)) :=
+  pi.isInvInvariant _
+
 instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
     IsOpenPosMeasure (MeasureTheory.Measure.pi μ) := by
   constructor
@@ -593,6 +635,11 @@ instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosM
   apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
 #align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.isOpenPosMeasure
 
+instance {X : ι → Type _} [∀ i, TopologicalSpace (X i)] [∀ i, MeasureSpace (X i)]
+    [∀ i, IsOpenPosMeasure (volume : Measure (X i))] [∀ i, SigmaFinite (volume : Measure (X i))] :
+    IsOpenPosMeasure (volume : Measure (∀ i, X i)) :=
+  pi.isOpenPosMeasure _
+
 instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
     [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
     IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
@@ -605,17 +652,25 @@ instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
   exact fun i _ => ne_of_lt (IsCompact.measure_lt_top (IsCompact.image hK (continuous_apply i)))
 #align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.isFiniteMeasureOnCompacts
 
+instance {X : ι → Type _} [∀ i, MeasureSpace (X i)] [∀ i, TopologicalSpace (X i)]
+    [∀ i, SigmaFinite (volume : Measure (X i))]
+    [∀ i, IsFiniteMeasureOnCompacts (volume : Measure (X i))] :
+    IsFiniteMeasureOnCompacts (volume : Measure (∀ i, X i)) :=
+  pi.isFiniteMeasureOnCompacts _
+
 @[to_additive]
 instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
     [∀ i, IsHaarMeasure (μ i)] [∀ i, MeasurableMul (α i)] : IsHaarMeasure (Measure.pi μ) where
 #align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.isHaarMeasure
 #align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.isAddHaarMeasure
 
-end Measure
+@[to_additive]
+instance {G : ι → Type _} [∀ i, Group (G i)] [∀ i, MeasureSpace (G i)] [∀ i, MeasurableMul (G i)]
+    [∀ i, TopologicalSpace (G i)] [∀ i, SigmaFinite (volume : Measure (G i))]
+    [∀ i, IsHaarMeasure (volume : Measure (G i))] : IsHaarMeasure (volume : Measure (∀ i, G i)) :=
+  pi.isHaarMeasure _
 
-instance MeasureSpace.pi [∀ i, MeasureSpace (α i)] : MeasureSpace (∀ i, α i) :=
-  ⟨Measure.pi fun _ => volume⟩
-#align measure_theory.measure_space.pi MeasureTheory.MeasureSpace.pi
+end Measure
 
 theorem volume_pi [∀ i, MeasureSpace (α i)] :
     (volume : Measure (∀ i, α i)) = Measure.pi fun _ => volume :=
style: allow _ for an argument in notation3 & replace _foo with _ in notation3 (#4652)
Diff
@@ -113,7 +113,7 @@ theorem generateFrom_pi_eq {C : ∀ i, Set (Set (α i))} (hC : ∀ i, IsCountabl
     choose t h1t h2t using hC
     simp_rw [eval_preimage, ← h2t]
     rw [← @iUnion_const _ ℕ _ s]
-    have : Set.pi univ (update (fun i' : ι => iUnion (t i')) i (⋃ _i' : ℕ, s)) =
+    have : Set.pi univ (update (fun i' : ι => iUnion (t i')) i (⋃ _ : ℕ, s)) =
         Set.pi univ fun k => ⋃ j : ℕ,
         @update ι (fun i' => Set (α i')) _ (fun i' => t i' j) i s k := by
       ext; simp_rw [mem_univ_pi]; apply forall_congr'; intro i'
style: recover Is of Foo which is ported from is_foo (#4639)

I have misported is_foo to Foo because I misunderstood the rule for IsLawfulFoo. This PR recover Is of Foo which is ported from is_foo. This PR also renames some misported theorems.

Diff
@@ -541,8 +541,8 @@ theorem pi_noAtoms (i : ι) [NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
 instance [h : Nonempty ι] [∀ i, NoAtoms (μ i)] : NoAtoms (Measure.pi μ) :=
   h.elim fun i => pi_noAtoms i
 
-instance [∀ i, TopologicalSpace (α i)] [∀ i, LocallyFiniteMeasure (μ i)] :
-    LocallyFiniteMeasure (Measure.pi μ) := by
+instance [∀ i, TopologicalSpace (α i)] [∀ i, IsLocallyFiniteMeasure (μ i)] :
+    IsLocallyFiniteMeasure (Measure.pi μ) := by
   refine' ⟨fun x => _⟩
   choose s hxs ho hμ using fun i => (μ i).exists_isOpen_measure_lt_top (x i)
   refine' ⟨pi univ s, set_pi_mem_nhds finite_univ fun i _ => IsOpen.mem_nhds (ho i) (hxs i), _⟩
@@ -553,7 +553,7 @@ variable (μ)
 
 @[to_additive]
 instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
-    [∀ i, MulLeftInvariant (μ i)] : MulLeftInvariant (Measure.pi μ) := by
+    [∀ i, IsMulLeftInvariant (μ i)] : IsMulLeftInvariant (Measure.pi μ) := by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_const_mul _) (MeasurableSet.univ_pi hs),
     show (· * ·) v ⁻¹' univ.pi s = univ.pi fun i => (· * ·) (v i) ⁻¹' s i by rfl, pi_pi]
@@ -563,7 +563,7 @@ instance pi.isMulLeftInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i
 
 @[to_additive]
 instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α i)]
-    [∀ i, MulRightInvariant (μ i)] : MulRightInvariant (Measure.pi μ) := by
+    [∀ i, IsMulRightInvariant (μ i)] : IsMulRightInvariant (Measure.pi μ) := by
   refine' ⟨fun v => (pi_eq fun s hs => _).symm⟩
   rw [map_apply (measurable_mul_const _) (MeasurableSet.univ_pi hs),
     show (· * v) ⁻¹' univ.pi s = univ.pi fun i => (· * v i) ⁻¹' s i by rfl, pi_pi]
@@ -573,7 +573,7 @@ instance pi.isMulRightInvariant [∀ i, Group (α i)] [∀ i, MeasurableMul (α
 
 @[to_additive]
 instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
-    [∀ i, InvInvariant (μ i)] : InvInvariant (Measure.pi μ) := by
+    [∀ i, IsInvInvariant (μ i)] : IsInvInvariant (Measure.pi μ) := by
   refine' ⟨(Measure.pi_eq fun s hs => _).symm⟩
   have A : Inv.inv ⁻¹' pi univ s = Set.pi univ fun i => Inv.inv ⁻¹' s i := by ext; simp
   simp_rw [Measure.inv, Measure.map_apply measurable_inv (MeasurableSet.univ_pi hs), A, pi_pi,
@@ -581,8 +581,8 @@ instance pi.isInvInvariant [∀ i, Group (α i)] [∀ i, MeasurableInv (α i)]
 #align measure_theory.measure.pi.is_inv_invariant MeasureTheory.Measure.pi.isInvInvariant
 #align measure_theory.measure.pi.is_neg_invariant MeasureTheory.Measure.pi.isNegInvariant
 
-instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasure (μ i)] :
-    OpenPosMeasure (MeasureTheory.Measure.pi μ) := by
+instance pi.isOpenPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, IsOpenPosMeasure (μ i)] :
+    IsOpenPosMeasure (MeasureTheory.Measure.pi μ) := by
   constructor
   rintro U U_open ⟨a, ha⟩
   obtain ⟨s, ⟨hs, hsU⟩⟩ := isOpen_pi_iff'.1 U_open a ha
@@ -591,11 +591,11 @@ instance pi.openPosMeasure [∀ i, TopologicalSpace (α i)] [∀ i, OpenPosMeasu
   rw [CanonicallyOrderedCommSemiring.prod_pos]
   intro i _
   apply (hs i).1.measure_pos (μ i) ⟨a i, (hs i).2⟩
-#align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.openPosMeasure
+#align measure_theory.measure.pi.is_open_pos_measure MeasureTheory.Measure.pi.isOpenPosMeasure
 
-instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
-    [∀ i, FiniteMeasureOnCompacts (μ i)] :
-    FiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
+instance pi.isFiniteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
+    [∀ i, IsFiniteMeasureOnCompacts (μ i)] :
+    IsFiniteMeasureOnCompacts (MeasureTheory.Measure.pi μ) := by
   constructor
   intro K hK
   suffices Measure.pi μ (Set.univ.pi fun j => Function.eval j '' K) < ⊤ by
@@ -603,11 +603,11 @@ instance pi.finiteMeasureOnCompacts [∀ i, TopologicalSpace (α i)]
   rw [Measure.pi_pi]
   refine' WithTop.prod_lt_top _
   exact fun i _ => ne_of_lt (IsCompact.measure_lt_top (IsCompact.image hK (continuous_apply i)))
-#align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.finiteMeasureOnCompacts
+#align measure_theory.measure.pi.is_finite_measure_on_compacts MeasureTheory.Measure.pi.isFiniteMeasureOnCompacts
 
 @[to_additive]
 instance pi.isHaarMeasure [∀ i, Group (α i)] [∀ i, TopologicalSpace (α i)]
-    [∀ i, HaarMeasure (μ i)] [∀ i, MeasurableMul (α i)] : HaarMeasure (Measure.pi μ) where
+    [∀ i, IsHaarMeasure (μ i)] [∀ i, MeasurableMul (α i)] : IsHaarMeasure (Measure.pi μ) where
 #align measure_theory.measure.pi.is_haar_measure MeasureTheory.Measure.pi.isHaarMeasure
 #align measure_theory.measure.pi.is_add_haar_measure MeasureTheory.Measure.pi.isAddHaarMeasure
 
@@ -647,8 +647,8 @@ inference cannot find an instance for `ι → ℝ` when this is stated for depen
 type-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function
 spaces."]
 instance Pi.isMulLeftInvariant_volume {α} [Group α] [MeasureSpace α]
-    [SigmaFinite (volume : Measure α)] [MeasurableMul α] [MulLeftInvariant (volume : Measure α)] :
-    MulLeftInvariant (volume : Measure (ι → α)) :=
+    [SigmaFinite (volume : Measure α)] [MeasurableMul α] [IsMulLeftInvariant (volume : Measure α)] :
+    IsMulLeftInvariant (volume : Measure (ι → α)) :=
   pi.isMulLeftInvariant _
 #align measure_theory.pi.is_mul_left_invariant_volume MeasureTheory.Pi.isMulLeftInvariant_volume
 #align measure_theory.pi.is_add_left_invariant_volume MeasureTheory.Pi.isAddLeftInvariant_volume
@@ -659,8 +659,8 @@ inference cannot find an instance for `ι → ℝ` when this is stated for depen
 type-class inference cannot find an instance for `ι → ℝ` when this is stated for dependent function
 spaces."]
 instance Pi.isInvInvariant_volume {α} [Group α] [MeasureSpace α] [SigmaFinite (volume : Measure α)]
-    [MeasurableInv α] [InvInvariant (volume : Measure α)] :
-    InvInvariant (volume : Measure (ι → α)) :=
+    [MeasurableInv α] [IsInvInvariant (volume : Measure α)] :
+    IsInvInvariant (volume : Measure (ι → α)) :=
   pi.isInvInvariant _
 #align measure_theory.pi.is_inv_invariant_volume MeasureTheory.Pi.isInvInvariant_volume
 #align measure_theory.pi.is_neg_invariant_volume MeasureTheory.Pi.isNegInvariant_volume
feat: port MeasureTheory.Constructions.Pi (#4501)

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Komyyy <pol_tta@outlook.jp>

Dependencies 10 + 645

646 files ported (98.5%)
291631 lines ported (98.2%)
Show graph

The unported dependencies are

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