probability.ident_distribMathlib.Probability.IdentDistrib

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -113,7 +113,7 @@ protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f
 protected theorem comp_of_aemeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
     (hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
   { aEMeasurable_fst := hu.comp_aemeasurable h.aEMeasurable_fst
-    aEMeasurable_snd := by rw [h.map_eq] at hu ; exact hu.comp_ae_measurable h.ae_measurable_snd
+    aEMeasurable_snd := by rw [h.map_eq] at hu; exact hu.comp_ae_measurable h.ae_measurable_snd
     map_eq :=
       by
       rw [← AEMeasurable.map_map_of_aemeasurable hu h.ae_measurable_fst, ←
@@ -231,10 +231,10 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace
       · exact is_closed_closure.measurable_set
     change ∫ x, id (f x) ∂μ = ∫ x, id (g x) ∂ν
     rw [← integral_map h.ae_measurable_fst A]
-    rw [h.map_eq] at A 
+    rw [h.map_eq] at A
     rw [← integral_map h.ae_measurable_snd A, h.map_eq]
   · rw [integral_non_ae_strongly_measurable hf]
-    rw [h.ae_strongly_measurable_iff] at hf 
+    rw [h.ae_strongly_measurable_iff] at hf
     rw [integral_non_ae_strongly_measurable hf]
 #align probability_theory.ident_distrib.integral_eq ProbabilityTheory.IdentDistrib.integral_eq
 -/
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 -/
-import Mathbin.Probability.Variance
-import Mathbin.MeasureTheory.Function.UniformIntegrable
+import Probability.Variance
+import MeasureTheory.Function.UniformIntegrable
 
 #align_import probability.ident_distrib from "leanprover-community/mathlib"@"1b089e3bdc3ce6b39cd472543474a0a137128c6c"
 
Diff
@@ -146,7 +146,7 @@ theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : Measurabl
 #align probability_theory.ident_distrib.measure_mem_eq ProbabilityTheory.IdentDistrib.measure_mem_eq
 -/
 
-alias measure_mem_eq ← measure_preimage_eq
+alias measure_preimage_eq := measure_mem_eq
 #align probability_theory.ident_distrib.measure_preimage_eq ProbabilityTheory.IdentDistrib.measure_preimage_eq
 
 #print ProbabilityTheory.IdentDistrib.ae_snd /-
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module probability.ident_distrib
-! leanprover-community/mathlib commit 1b089e3bdc3ce6b39cd472543474a0a137128c6c
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Probability.Variance
 import Mathbin.MeasureTheory.Function.UniformIntegrable
 
+#align_import probability.ident_distrib from "leanprover-community/mathlib"@"1b089e3bdc3ce6b39cd472543474a0a137128c6c"
+
 /-!
 # Identically distributed random variables
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
 
 ! This file was ported from Lean 3 source module probability.ident_distrib
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 1b089e3bdc3ce6b39cd472543474a0a137128c6c
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.MeasureTheory.Function.UniformIntegrable
 /-!
 # Identically distributed random variables
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Two random variables defined on two (possibly different) probability spaces but taking value in
 the same space are *identically distributed* if their distributions (i.e., the image probability
 measures on the target space) coincide. We define this concept and establish its basic properties
Diff
@@ -65,6 +65,7 @@ variable {α β γ δ : Type _} [MeasurableSpace α] [MeasurableSpace β] [Measu
 
 namespace ProbabilityTheory
 
+#print ProbabilityTheory.IdentDistrib /-
 /-- Two functions defined on two (possibly different) measure spaces are identically distributed if
 their image measures coincide. This only makes sense when the functions are ae measurable
 (as otherwise the image measures are not defined), so we require this as well in the definition. -/
@@ -75,6 +76,7 @@ structure IdentDistrib (f : α → γ) (g : β → γ)
   aEMeasurable_snd : AEMeasurable g ν
   map_eq : Measure.map f μ = Measure.map g ν
 #align probability_theory.ident_distrib ProbabilityTheory.IdentDistrib
+-/
 
 namespace IdentDistrib
 
@@ -82,26 +84,33 @@ open TopologicalSpace
 
 variable {μ : Measure α} {ν : Measure β} {f : α → γ} {g : β → γ}
 
+#print ProbabilityTheory.IdentDistrib.refl /-
 protected theorem refl (hf : AEMeasurable f μ) : IdentDistrib f f μ μ :=
   { aEMeasurable_fst := hf
     aEMeasurable_snd := hf
     map_eq := rfl }
 #align probability_theory.ident_distrib.refl ProbabilityTheory.IdentDistrib.refl
+-/
 
+#print ProbabilityTheory.IdentDistrib.symm /-
 protected theorem symm (h : IdentDistrib f g μ ν) : IdentDistrib g f ν μ :=
   { aEMeasurable_fst := h.aEMeasurable_snd
     aEMeasurable_snd := h.aEMeasurable_fst
     map_eq := h.map_eq.symm }
 #align probability_theory.ident_distrib.symm ProbabilityTheory.IdentDistrib.symm
+-/
 
+#print ProbabilityTheory.IdentDistrib.trans /-
 protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f g μ ν)
     (h₂ : IdentDistrib g h ν ρ) : IdentDistrib f h μ ρ :=
   { aEMeasurable_fst := h₁.aEMeasurable_fst
     aEMeasurable_snd := h₂.aEMeasurable_snd
     map_eq := h₁.map_eq.trans h₂.map_eq }
 #align probability_theory.ident_distrib.trans ProbabilityTheory.IdentDistrib.trans
+-/
 
-protected theorem comp_of_aEMeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
+#print ProbabilityTheory.IdentDistrib.comp_of_aemeasurable /-
+protected theorem comp_of_aemeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
     (hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
   { aEMeasurable_fst := hu.comp_aemeasurable h.aEMeasurable_fst
     aEMeasurable_snd := by rw [h.map_eq] at hu ; exact hu.comp_ae_measurable h.ae_measurable_snd
@@ -110,29 +119,37 @@ protected theorem comp_of_aEMeasurable {u : γ → δ} (h : IdentDistrib f g μ
       rw [← AEMeasurable.map_map_of_aemeasurable hu h.ae_measurable_fst, ←
         AEMeasurable.map_map_of_aemeasurable _ h.ae_measurable_snd, h.map_eq]
       rwa [← h.map_eq] }
-#align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.comp_of_aEMeasurable
+#align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.comp_of_aemeasurable
+-/
 
+#print ProbabilityTheory.IdentDistrib.comp /-
 protected theorem comp {u : γ → δ} (h : IdentDistrib f g μ ν) (hu : Measurable u) :
     IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
-  h.comp_of_aEMeasurable hu.AEMeasurable
+  h.comp_of_aemeasurable hu.AEMeasurable
 #align probability_theory.ident_distrib.comp ProbabilityTheory.IdentDistrib.comp
+-/
 
+#print ProbabilityTheory.IdentDistrib.of_ae_eq /-
 protected theorem of_ae_eq {g : α → γ} (hf : AEMeasurable f μ) (heq : f =ᵐ[μ] g) :
     IdentDistrib f g μ μ :=
   { aEMeasurable_fst := hf
     aEMeasurable_snd := hf.congr HEq
     map_eq := Measure.map_congr HEq }
 #align probability_theory.ident_distrib.of_ae_eq ProbabilityTheory.IdentDistrib.of_ae_eq
+-/
 
+#print ProbabilityTheory.IdentDistrib.measure_mem_eq /-
 theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) :
     μ (f ⁻¹' s) = ν (g ⁻¹' s) := by
   rw [← measure.map_apply_of_ae_measurable h.ae_measurable_fst hs, ←
     measure.map_apply_of_ae_measurable h.ae_measurable_snd hs, h.map_eq]
 #align probability_theory.ident_distrib.measure_mem_eq ProbabilityTheory.IdentDistrib.measure_mem_eq
+-/
 
 alias measure_mem_eq ← measure_preimage_eq
 #align probability_theory.ident_distrib.measure_preimage_eq ProbabilityTheory.IdentDistrib.measure_preimage_eq
 
+#print ProbabilityTheory.IdentDistrib.ae_snd /-
 theorem ae_snd (h : IdentDistrib f g μ ν) {p : γ → Prop} (pmeas : MeasurableSet {x | p x})
     (hp : ∀ᵐ x ∂μ, p (f x)) : ∀ᵐ x ∂ν, p (g x) :=
   by
@@ -140,22 +157,28 @@ theorem ae_snd (h : IdentDistrib f g μ ν) {p : γ → Prop} (pmeas : Measurabl
   rw [← h.map_eq]
   exact (ae_map_iff h.ae_measurable_fst pmeas).2 hp
 #align probability_theory.ident_distrib.ae_snd ProbabilityTheory.IdentDistrib.ae_snd
+-/
 
+#print ProbabilityTheory.IdentDistrib.ae_mem_snd /-
 theorem ae_mem_snd (h : IdentDistrib f g μ ν) {t : Set γ} (tmeas : MeasurableSet t)
     (ht : ∀ᵐ x ∂μ, f x ∈ t) : ∀ᵐ x ∂ν, g x ∈ t :=
   h.ae_snd tmeas ht
 #align probability_theory.ident_distrib.ae_mem_snd ProbabilityTheory.IdentDistrib.ae_mem_snd
+-/
 
+#print ProbabilityTheory.IdentDistrib.aestronglyMeasurable_fst /-
 /-- In a second countable topology, the first function in an identically distributed pair is a.e.
 strongly measurable. So is the second function, but use `h.symm.ae_strongly_measurable_fst` as
 `h.ae_strongly_measurable_snd` has a different meaning.-/
-theorem aEStronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
+theorem aestronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
     [SecondCountableTopology γ] (h : IdentDistrib f g μ ν) : AEStronglyMeasurable f μ :=
   h.aEMeasurable_fst.AEStronglyMeasurable
-#align probability_theory.ident_distrib.ae_strongly_measurable_fst ProbabilityTheory.IdentDistrib.aEStronglyMeasurable_fst
+#align probability_theory.ident_distrib.ae_strongly_measurable_fst ProbabilityTheory.IdentDistrib.aestronglyMeasurable_fst
+-/
 
+#print ProbabilityTheory.IdentDistrib.aestronglyMeasurable_snd /-
 /-- If `f` and `g` are identically distributed and `f` is a.e. strongly measurable, so is `g`. -/
-theorem aEStronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
+theorem aestronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
     (h : IdentDistrib f g μ ν) (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable g ν :=
   by
   refine' aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨h.ae_measurable_snd, _⟩
@@ -163,13 +186,17 @@ theorem aEStronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [Bor
   refine' ⟨closure t, t_sep.closure, _⟩
   apply h.ae_mem_snd is_closed_closure.measurable_set
   filter_upwards [ht] with x hx using subset_closure hx
-#align probability_theory.ident_distrib.ae_strongly_measurable_snd ProbabilityTheory.IdentDistrib.aEStronglyMeasurable_snd
+#align probability_theory.ident_distrib.ae_strongly_measurable_snd ProbabilityTheory.IdentDistrib.aestronglyMeasurable_snd
+-/
 
-theorem aEStronglyMeasurable_iff [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
+#print ProbabilityTheory.IdentDistrib.aestronglyMeasurable_iff /-
+theorem aestronglyMeasurable_iff [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
     (h : IdentDistrib f g μ ν) : AEStronglyMeasurable f μ ↔ AEStronglyMeasurable g ν :=
-  ⟨fun hf => h.aEStronglyMeasurable_snd hf, fun hg => h.symm.aEStronglyMeasurable_snd hg⟩
-#align probability_theory.ident_distrib.ae_strongly_measurable_iff ProbabilityTheory.IdentDistrib.aEStronglyMeasurable_iff
+  ⟨fun hf => h.aestronglyMeasurable_snd hf, fun hg => h.symm.aestronglyMeasurable_snd hg⟩
+#align probability_theory.ident_distrib.ae_strongly_measurable_iff ProbabilityTheory.IdentDistrib.aestronglyMeasurable_iff
+-/
 
+#print ProbabilityTheory.IdentDistrib.essSup_eq /-
 theorem essSup_eq [ConditionallyCompleteLinearOrder γ] [TopologicalSpace γ] [OpensMeasurableSpace γ]
     [OrderClosedTopology γ] (h : IdentDistrib f g μ ν) : essSup f μ = essSup g ν :=
   by
@@ -177,7 +204,9 @@ theorem essSup_eq [ConditionallyCompleteLinearOrder γ] [TopologicalSpace γ] [O
     h.measure_mem_eq measurableSet_Ioi
   simp_rw [essSup_eq_sInf, I]
 #align probability_theory.ident_distrib.ess_sup_eq ProbabilityTheory.IdentDistrib.essSup_eq
+-/
 
+#print ProbabilityTheory.IdentDistrib.lintegral_eq /-
 theorem lintegral_eq {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (h : IdentDistrib f g μ ν) :
     ∫⁻ x, f x ∂μ = ∫⁻ x, g x ∂ν :=
   by
@@ -185,7 +214,9 @@ theorem lintegral_eq {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (h : IdentD
   rw [← lintegral_map' aemeasurable_id h.ae_measurable_fst, ←
     lintegral_map' aemeasurable_id h.ae_measurable_snd, h.map_eq]
 #align probability_theory.ident_distrib.lintegral_eq ProbabilityTheory.IdentDistrib.lintegral_eq
+-/
 
+#print ProbabilityTheory.IdentDistrib.integral_eq /-
 theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace γ] [BorelSpace γ]
     (h : IdentDistrib f g μ ν) : ∫ x, f x ∂μ = ∫ x, g x ∂ν :=
   by
@@ -206,7 +237,9 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace
     rw [h.ae_strongly_measurable_iff] at hf 
     rw [integral_non_ae_strongly_measurable hf]
 #align probability_theory.ident_distrib.integral_eq ProbabilityTheory.IdentDistrib.integral_eq
+-/
 
+#print ProbabilityTheory.IdentDistrib.snorm_eq /-
 theorem snorm_eq [NormedAddCommGroup γ] [OpensMeasurableSpace γ] (h : IdentDistrib f g μ ν)
     (p : ℝ≥0∞) : snorm f p μ = snorm g p ν :=
   by
@@ -223,7 +256,9 @@ theorem snorm_eq [NormedAddCommGroup γ] [OpensMeasurableSpace γ] (h : IdentDis
   exact
     h.comp (Measurable.pow_const (measurable_coe_nnreal_ennreal.comp measurable_nnnorm) p.to_real)
 #align probability_theory.ident_distrib.snorm_eq ProbabilityTheory.IdentDistrib.snorm_eq
+-/
 
+#print ProbabilityTheory.IdentDistrib.memℒp_snd /-
 theorem memℒp_snd [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h : IdentDistrib f g μ ν)
     (hf : Memℒp f p μ) : Memℒp g p ν :=
   by
@@ -231,77 +266,103 @@ theorem memℒp_snd [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h
   rw [← h.snorm_eq]
   exact hf.2
 #align probability_theory.ident_distrib.mem_ℒp_snd ProbabilityTheory.IdentDistrib.memℒp_snd
+-/
 
+#print ProbabilityTheory.IdentDistrib.memℒp_iff /-
 theorem memℒp_iff [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h : IdentDistrib f g μ ν) :
     Memℒp f p μ ↔ Memℒp g p ν :=
   ⟨fun hf => h.memℒp_snd hf, fun hg => h.symm.memℒp_snd hg⟩
 #align probability_theory.ident_distrib.mem_ℒp_iff ProbabilityTheory.IdentDistrib.memℒp_iff
+-/
 
+#print ProbabilityTheory.IdentDistrib.integrable_snd /-
 theorem integrable_snd [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν)
     (hf : Integrable f μ) : Integrable g ν :=
   by
   rw [← mem_ℒp_one_iff_integrable] at hf ⊢
   exact h.mem_ℒp_snd hf
 #align probability_theory.ident_distrib.integrable_snd ProbabilityTheory.IdentDistrib.integrable_snd
+-/
 
+#print ProbabilityTheory.IdentDistrib.integrable_iff /-
 theorem integrable_iff [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν) :
     Integrable f μ ↔ Integrable g ν :=
   ⟨fun hf => h.integrable_snd hf, fun hg => h.symm.integrable_snd hg⟩
 #align probability_theory.ident_distrib.integrable_iff ProbabilityTheory.IdentDistrib.integrable_iff
+-/
 
+#print ProbabilityTheory.IdentDistrib.norm /-
 protected theorem norm [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => ‖f x‖) (fun x => ‖g x‖) μ ν :=
   h.comp measurable_norm
 #align probability_theory.ident_distrib.norm ProbabilityTheory.IdentDistrib.norm
+-/
 
+#print ProbabilityTheory.IdentDistrib.nnnorm /-
 protected theorem nnnorm [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => ‖f x‖₊) (fun x => ‖g x‖₊) μ ν :=
   h.comp measurable_nnnorm
 #align probability_theory.ident_distrib.nnnorm ProbabilityTheory.IdentDistrib.nnnorm
+-/
 
+#print ProbabilityTheory.IdentDistrib.pow /-
 protected theorem pow [Pow γ ℕ] [MeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) {n : ℕ} :
     IdentDistrib (fun x => f x ^ n) (fun x => g x ^ n) μ ν :=
   h.comp (measurable_id.pow_const n)
 #align probability_theory.ident_distrib.pow ProbabilityTheory.IdentDistrib.pow
+-/
 
+#print ProbabilityTheory.IdentDistrib.sq /-
 protected theorem sq [Pow γ ℕ] [MeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => f x ^ 2) (fun x => g x ^ 2) μ ν :=
   h.comp (measurable_id.pow_const 2)
 #align probability_theory.ident_distrib.sq ProbabilityTheory.IdentDistrib.sq
+-/
 
-protected theorem coe_nNReal_eNNReal {f : α → ℝ≥0} {g : β → ℝ≥0} (h : IdentDistrib f g μ ν) :
+#print ProbabilityTheory.IdentDistrib.coe_nnreal_ennreal /-
+protected theorem coe_nnreal_ennreal {f : α → ℝ≥0} {g : β → ℝ≥0} (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => (f x : ℝ≥0∞)) (fun x => (g x : ℝ≥0∞)) μ ν :=
   h.comp measurable_coe_nnreal_ennreal
-#align probability_theory.ident_distrib.coe_nnreal_ennreal ProbabilityTheory.IdentDistrib.coe_nNReal_eNNReal
+#align probability_theory.ident_distrib.coe_nnreal_ennreal ProbabilityTheory.IdentDistrib.coe_nnreal_ennreal
+-/
 
+#print ProbabilityTheory.IdentDistrib.mul_const /-
 @[to_additive]
 theorem mul_const [Mul γ] [MeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => f x * c) (fun x => g x * c) μ ν :=
   h.comp (measurable_mul_const c)
 #align probability_theory.ident_distrib.mul_const ProbabilityTheory.IdentDistrib.mul_const
 #align probability_theory.ident_distrib.add_const ProbabilityTheory.IdentDistrib.add_const
+-/
 
+#print ProbabilityTheory.IdentDistrib.const_mul /-
 @[to_additive]
 theorem const_mul [Mul γ] [MeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => c * f x) (fun x => c * g x) μ ν :=
   h.comp (measurable_const_mul c)
 #align probability_theory.ident_distrib.const_mul ProbabilityTheory.IdentDistrib.const_mul
 #align probability_theory.ident_distrib.const_add ProbabilityTheory.IdentDistrib.const_add
+-/
 
+#print ProbabilityTheory.IdentDistrib.div_const /-
 @[to_additive]
 theorem div_const [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => f x / c) (fun x => g x / c) μ ν :=
   h.comp (MeasurableDiv.measurable_div_const c)
 #align probability_theory.ident_distrib.div_const ProbabilityTheory.IdentDistrib.div_const
 #align probability_theory.ident_distrib.sub_const ProbabilityTheory.IdentDistrib.sub_const
+-/
 
+#print ProbabilityTheory.IdentDistrib.const_div /-
 @[to_additive]
 theorem const_div [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => c / f x) (fun x => c / g x) μ ν :=
   h.comp (MeasurableDiv.measurable_div_const c)
 #align probability_theory.ident_distrib.const_div ProbabilityTheory.IdentDistrib.const_div
 #align probability_theory.ident_distrib.const_sub ProbabilityTheory.IdentDistrib.const_sub
+-/
 
+#print ProbabilityTheory.IdentDistrib.evariance_eq /-
 theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
     evariance f μ = evariance g ν :=
   by
@@ -309,10 +370,13 @@ theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ
   rw [h.integral_eq]
   rfl
 #align probability_theory.ident_distrib.evariance_eq ProbabilityTheory.IdentDistrib.evariance_eq
+-/
 
+#print ProbabilityTheory.IdentDistrib.variance_eq /-
 theorem variance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
     variance f μ = variance g ν := by rw [variance, h.evariance_eq]; rfl
 #align probability_theory.ident_distrib.variance_eq ProbabilityTheory.IdentDistrib.variance_eq
+-/
 
 end IdentDistrib
 
@@ -323,6 +387,7 @@ open TopologicalSpace
 variable {E : Type _} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
   [SecondCountableTopology E] {μ : Measure α} [IsFiniteMeasure μ]
 
+#print ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib_aux /-
 /-- This lemma is superceded by `mem_ℒp.uniform_integrable_of_ident_distrib` which only require
 `ae_strongly_measurable`. -/
 theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
@@ -349,14 +414,16 @@ theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type _} {f : ι →
   all_goals
     exact ae_strongly_measurable_id.indicator (measurableSet_le measurable_const measurable_nnnorm)
 #align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib_aux ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib_aux
+-/
 
+#print ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib /-
 /-- A sequence of identically distributed Lᵖ functions is p-uniformly integrable. -/
 theorem Memℒp.uniformIntegrable_of_identDistrib {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
     (hp : 1 ≤ p) (hp' : p ≠ ∞) (hℒp : Memℒp (f j) p μ) (hf : ∀ i, IdentDistrib (f i) (f j) μ μ) :
     UniformIntegrable f p μ :=
   by
   have hfmeas : ∀ i, ae_strongly_measurable (f i) μ := fun i =>
-    (hf i).aEStronglyMeasurable_iff.2 hℒp.1
+    (hf i).aestronglyMeasurable_iff.2 hℒp.1
   set g : ι → α → E := fun i => (hfmeas i).some
   have hgmeas : ∀ i, strongly_measurable (g i) := fun i => (Exists.choose_spec <| hfmeas i).1
   have hgeq : ∀ i, g i =ᵐ[μ] f i := fun i => (Exists.choose_spec <| hfmeas i).2.symm
@@ -368,6 +435,7 @@ theorem Memℒp.uniformIntegrable_of_identDistrib {ι : Type _} {f : ι → α 
           ((hf i).trans <| ident_distrib.of_ae_eq (hfmeas j).AEMeasurable (hgeq j).symm))
       hgeq
 #align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib
+-/
 
 end UniformIntegrable
 
Diff
@@ -179,15 +179,15 @@ theorem essSup_eq [ConditionallyCompleteLinearOrder γ] [TopologicalSpace γ] [O
 #align probability_theory.ident_distrib.ess_sup_eq ProbabilityTheory.IdentDistrib.essSup_eq
 
 theorem lintegral_eq {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (h : IdentDistrib f g μ ν) :
-    (∫⁻ x, f x ∂μ) = ∫⁻ x, g x ∂ν :=
+    ∫⁻ x, f x ∂μ = ∫⁻ x, g x ∂ν :=
   by
-  change (∫⁻ x, id (f x) ∂μ) = ∫⁻ x, id (g x) ∂ν
+  change ∫⁻ x, id (f x) ∂μ = ∫⁻ x, id (g x) ∂ν
   rw [← lintegral_map' aemeasurable_id h.ae_measurable_fst, ←
     lintegral_map' aemeasurable_id h.ae_measurable_snd, h.map_eq]
 #align probability_theory.ident_distrib.lintegral_eq ProbabilityTheory.IdentDistrib.lintegral_eq
 
 theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace γ] [BorelSpace γ]
-    (h : IdentDistrib f g μ ν) : (∫ x, f x ∂μ) = ∫ x, g x ∂ν :=
+    (h : IdentDistrib f g μ ν) : ∫ x, f x ∂μ = ∫ x, g x ∂ν :=
   by
   by_cases hf : ae_strongly_measurable f μ
   · have A : ae_strongly_measurable id (measure.map f μ) :=
@@ -198,7 +198,7 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace
       rw [ae_map_iff h.ae_measurable_fst]
       · filter_upwards [ht] with x hx using subset_closure hx
       · exact is_closed_closure.measurable_set
-    change (∫ x, id (f x) ∂μ) = ∫ x, id (g x) ∂ν
+    change ∫ x, id (f x) ∂μ = ∫ x, id (g x) ∂ν
     rw [← integral_map h.ae_measurable_fst A]
     rw [h.map_eq] at A 
     rw [← integral_map h.ae_measurable_snd A, h.map_eq]
Diff
@@ -133,7 +133,7 @@ theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : Measurabl
 alias measure_mem_eq ← measure_preimage_eq
 #align probability_theory.ident_distrib.measure_preimage_eq ProbabilityTheory.IdentDistrib.measure_preimage_eq
 
-theorem ae_snd (h : IdentDistrib f g μ ν) {p : γ → Prop} (pmeas : MeasurableSet { x | p x })
+theorem ae_snd (h : IdentDistrib f g μ ν) {p : γ → Prop} (pmeas : MeasurableSet {x | p x})
     (hp : ∀ᵐ x ∂μ, p (f x)) : ∀ᵐ x ∂ν, p (g x) :=
   by
   apply (ae_map_iff h.ae_measurable_snd pmeas).1
@@ -162,7 +162,7 @@ theorem aEStronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [Bor
   rcases(aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
   refine' ⟨closure t, t_sep.closure, _⟩
   apply h.ae_mem_snd is_closed_closure.measurable_set
-  filter_upwards [ht]with x hx using subset_closure hx
+  filter_upwards [ht] with x hx using subset_closure hx
 #align probability_theory.ident_distrib.ae_strongly_measurable_snd ProbabilityTheory.IdentDistrib.aEStronglyMeasurable_snd
 
 theorem aEStronglyMeasurable_iff [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
@@ -173,7 +173,7 @@ theorem aEStronglyMeasurable_iff [TopologicalSpace γ] [MetrizableSpace γ] [Bor
 theorem essSup_eq [ConditionallyCompleteLinearOrder γ] [TopologicalSpace γ] [OpensMeasurableSpace γ]
     [OrderClosedTopology γ] (h : IdentDistrib f g μ ν) : essSup f μ = essSup g ν :=
   by
-  have I : ∀ a, μ { x : α | a < f x } = ν { x : β | a < g x } := fun a =>
+  have I : ∀ a, μ {x : α | a < f x} = ν {x : β | a < g x} := fun a =>
     h.measure_mem_eq measurableSet_Ioi
   simp_rw [essSup_eq_sInf, I]
 #align probability_theory.ident_distrib.ess_sup_eq ProbabilityTheory.IdentDistrib.essSup_eq
@@ -196,7 +196,7 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace
       rcases(aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
       refine' ⟨aemeasurable_id, ⟨closure t, t_sep.closure, _⟩⟩
       rw [ae_map_iff h.ae_measurable_fst]
-      · filter_upwards [ht]with x hx using subset_closure hx
+      · filter_upwards [ht] with x hx using subset_closure hx
       · exact is_closed_closure.measurable_set
     change (∫ x, id (f x) ∂μ) = ∫ x, id (g x) ∂ν
     rw [← integral_map h.ae_measurable_fst A]
@@ -305,7 +305,7 @@ theorem const_div [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c :
 theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
     evariance f μ = evariance g ν :=
   by
-  convert(h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nnreal_ennreal.sq.lintegral_eq
+  convert (h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nnreal_ennreal.sq.lintegral_eq
   rw [h.integral_eq]
   rfl
 #align probability_theory.ident_distrib.evariance_eq ProbabilityTheory.IdentDistrib.evariance_eq
@@ -321,7 +321,7 @@ section UniformIntegrable
 open TopologicalSpace
 
 variable {E : Type _} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
-  [SecondCountableTopology E] {μ : Measure α} [FiniteMeasure μ]
+  [SecondCountableTopology E] {μ : Measure α} [IsFiniteMeasure μ]
 
 /-- This lemma is superceded by `mem_ℒp.uniform_integrable_of_ident_distrib` which only require
 `ae_strongly_measurable`. -/
@@ -333,11 +333,11 @@ theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type _} {f : ι →
   by_cases hι : Nonempty ι
   swap; · exact ⟨0, fun i => False.elim (hι <| Nonempty.intro i)⟩
   obtain ⟨C, hC₁, hC₂⟩ := hℒp.snorm_indicator_norm_ge_pos_le μ (hfmeas _) hε
-  have hmeas : ∀ i, MeasurableSet { x | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊ } := fun i =>
+  have hmeas : ∀ i, MeasurableSet {x | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊} := fun i =>
     measurableSet_le measurable_const (hfmeas _).Measurable.nnnorm
   refine' ⟨⟨C, hC₁.le⟩, fun i => le_trans (le_of_eq _) hC₂⟩
   have :
-    { x : α | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊ }.indicator (f i) =
+    {x : α | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊}.indicator (f i) =
       (fun x : E => if (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖x‖₊ then x else 0) ∘ f i :=
     by
     ext x
Diff
@@ -69,8 +69,8 @@ namespace ProbabilityTheory
 their image measures coincide. This only makes sense when the functions are ae measurable
 (as otherwise the image measures are not defined), so we require this as well in the definition. -/
 structure IdentDistrib (f : α → γ) (g : β → γ)
-  (μ : Measure α := by exact MeasureTheory.MeasureSpace.volume)
-  (ν : Measure β := by exact MeasureTheory.MeasureSpace.volume) : Prop where
+    (μ : Measure α := by exact MeasureTheory.MeasureSpace.volume)
+    (ν : Measure β := by exact MeasureTheory.MeasureSpace.volume) : Prop where
   aEMeasurable_fst : AEMeasurable f μ
   aEMeasurable_snd : AEMeasurable g ν
   map_eq : Measure.map f μ = Measure.map g ν
@@ -104,7 +104,7 @@ protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f
 protected theorem comp_of_aEMeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
     (hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
   { aEMeasurable_fst := hu.comp_aemeasurable h.aEMeasurable_fst
-    aEMeasurable_snd := by rw [h.map_eq] at hu; exact hu.comp_ae_measurable h.ae_measurable_snd
+    aEMeasurable_snd := by rw [h.map_eq] at hu ; exact hu.comp_ae_measurable h.ae_measurable_snd
     map_eq :=
       by
       rw [← AEMeasurable.map_map_of_aemeasurable hu h.ae_measurable_fst, ←
@@ -200,10 +200,10 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace
       · exact is_closed_closure.measurable_set
     change (∫ x, id (f x) ∂μ) = ∫ x, id (g x) ∂ν
     rw [← integral_map h.ae_measurable_fst A]
-    rw [h.map_eq] at A
+    rw [h.map_eq] at A 
     rw [← integral_map h.ae_measurable_snd A, h.map_eq]
   · rw [integral_non_ae_strongly_measurable hf]
-    rw [h.ae_strongly_measurable_iff] at hf
+    rw [h.ae_strongly_measurable_iff] at hf 
     rw [integral_non_ae_strongly_measurable hf]
 #align probability_theory.ident_distrib.integral_eq ProbabilityTheory.IdentDistrib.integral_eq
 
@@ -240,7 +240,7 @@ theorem memℒp_iff [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h
 theorem integrable_snd [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν)
     (hf : Integrable f μ) : Integrable g ν :=
   by
-  rw [← mem_ℒp_one_iff_integrable] at hf⊢
+  rw [← mem_ℒp_one_iff_integrable] at hf ⊢
   exact h.mem_ℒp_snd hf
 #align probability_theory.ident_distrib.integrable_snd ProbabilityTheory.IdentDistrib.integrable_snd
 
Diff
@@ -58,7 +58,7 @@ open MeasureTheory Filter Finset
 
 noncomputable section
 
-open Topology BigOperators MeasureTheory ENNReal NNReal
+open scoped Topology BigOperators MeasureTheory ENNReal NNReal
 
 variable {α β γ δ : Type _} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
   [MeasurableSpace δ]
Diff
@@ -104,9 +104,7 @@ protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f
 protected theorem comp_of_aEMeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
     (hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
   { aEMeasurable_fst := hu.comp_aemeasurable h.aEMeasurable_fst
-    aEMeasurable_snd := by
-      rw [h.map_eq] at hu
-      exact hu.comp_ae_measurable h.ae_measurable_snd
+    aEMeasurable_snd := by rw [h.map_eq] at hu; exact hu.comp_ae_measurable h.ae_measurable_snd
     map_eq :=
       by
       rw [← AEMeasurable.map_map_of_aemeasurable hu h.ae_measurable_fst, ←
@@ -313,9 +311,7 @@ theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ
 #align probability_theory.ident_distrib.evariance_eq ProbabilityTheory.IdentDistrib.evariance_eq
 
 theorem variance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
-    variance f μ = variance g ν := by
-  rw [variance, h.evariance_eq]
-  rfl
+    variance f μ = variance g ν := by rw [variance, h.evariance_eq]; rfl
 #align probability_theory.ident_distrib.variance_eq ProbabilityTheory.IdentDistrib.variance_eq
 
 end IdentDistrib
@@ -335,8 +331,7 @@ theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type _} {f : ι →
   by
   refine' uniform_integrable_of' hp hp' hfmeas fun ε hε => _
   by_cases hι : Nonempty ι
-  swap
-  · exact ⟨0, fun i => False.elim (hι <| Nonempty.intro i)⟩
+  swap; · exact ⟨0, fun i => False.elim (hι <| Nonempty.intro i)⟩
   obtain ⟨C, hC₁, hC₂⟩ := hℒp.snorm_indicator_norm_ge_pos_le μ (hfmeas _) hε
   have hmeas : ∀ i, MeasurableSet { x | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊ } := fun i =>
     measurableSet_le measurable_const (hfmeas _).Measurable.nnnorm
Diff
@@ -151,26 +151,26 @@ theorem ae_mem_snd (h : IdentDistrib f g μ ν) {t : Set γ} (tmeas : Measurable
 /-- In a second countable topology, the first function in an identically distributed pair is a.e.
 strongly measurable. So is the second function, but use `h.symm.ae_strongly_measurable_fst` as
 `h.ae_strongly_measurable_snd` has a different meaning.-/
-theorem aeStronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
-    [SecondCountableTopology γ] (h : IdentDistrib f g μ ν) : AeStronglyMeasurable f μ :=
-  h.aEMeasurable_fst.AeStronglyMeasurable
-#align probability_theory.ident_distrib.ae_strongly_measurable_fst ProbabilityTheory.IdentDistrib.aeStronglyMeasurable_fst
+theorem aEStronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
+    [SecondCountableTopology γ] (h : IdentDistrib f g μ ν) : AEStronglyMeasurable f μ :=
+  h.aEMeasurable_fst.AEStronglyMeasurable
+#align probability_theory.ident_distrib.ae_strongly_measurable_fst ProbabilityTheory.IdentDistrib.aEStronglyMeasurable_fst
 
 /-- If `f` and `g` are identically distributed and `f` is a.e. strongly measurable, so is `g`. -/
-theorem aeStronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
-    (h : IdentDistrib f g μ ν) (hf : AeStronglyMeasurable f μ) : AeStronglyMeasurable g ν :=
+theorem aEStronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
+    (h : IdentDistrib f g μ ν) (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable g ν :=
   by
-  refine' aeStronglyMeasurable_iff_aEMeasurable_separable.2 ⟨h.ae_measurable_snd, _⟩
-  rcases(aeStronglyMeasurable_iff_aEMeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
+  refine' aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨h.ae_measurable_snd, _⟩
+  rcases(aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
   refine' ⟨closure t, t_sep.closure, _⟩
   apply h.ae_mem_snd is_closed_closure.measurable_set
   filter_upwards [ht]with x hx using subset_closure hx
-#align probability_theory.ident_distrib.ae_strongly_measurable_snd ProbabilityTheory.IdentDistrib.aeStronglyMeasurable_snd
+#align probability_theory.ident_distrib.ae_strongly_measurable_snd ProbabilityTheory.IdentDistrib.aEStronglyMeasurable_snd
 
-theorem aeStronglyMeasurable_iff [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
-    (h : IdentDistrib f g μ ν) : AeStronglyMeasurable f μ ↔ AeStronglyMeasurable g ν :=
-  ⟨fun hf => h.aeStronglyMeasurable_snd hf, fun hg => h.symm.aeStronglyMeasurable_snd hg⟩
-#align probability_theory.ident_distrib.ae_strongly_measurable_iff ProbabilityTheory.IdentDistrib.aeStronglyMeasurable_iff
+theorem aEStronglyMeasurable_iff [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
+    (h : IdentDistrib f g μ ν) : AEStronglyMeasurable f μ ↔ AEStronglyMeasurable g ν :=
+  ⟨fun hf => h.aEStronglyMeasurable_snd hf, fun hg => h.symm.aEStronglyMeasurable_snd hg⟩
+#align probability_theory.ident_distrib.ae_strongly_measurable_iff ProbabilityTheory.IdentDistrib.aEStronglyMeasurable_iff
 
 theorem essSup_eq [ConditionallyCompleteLinearOrder γ] [TopologicalSpace γ] [OpensMeasurableSpace γ]
     [OrderClosedTopology γ] (h : IdentDistrib f g μ ν) : essSup f μ = essSup g ν :=
@@ -194,8 +194,8 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace
   by_cases hf : ae_strongly_measurable f μ
   · have A : ae_strongly_measurable id (measure.map f μ) :=
       by
-      rw [aeStronglyMeasurable_iff_aEMeasurable_separable]
-      rcases(aeStronglyMeasurable_iff_aEMeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
+      rw [aestronglyMeasurable_iff_aemeasurable_separable]
+      rcases(aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
       refine' ⟨aemeasurable_id, ⟨closure t, t_sep.closure, _⟩⟩
       rw [ae_map_iff h.ae_measurable_fst]
       · filter_upwards [ht]with x hx using subset_closure hx
@@ -361,7 +361,7 @@ theorem Memℒp.uniformIntegrable_of_identDistrib {ι : Type _} {f : ι → α 
     UniformIntegrable f p μ :=
   by
   have hfmeas : ∀ i, ae_strongly_measurable (f i) μ := fun i =>
-    (hf i).aeStronglyMeasurable_iff.2 hℒp.1
+    (hf i).aEStronglyMeasurable_iff.2 hℒp.1
   set g : ι → α → E := fun i => (hfmeas i).some
   have hgmeas : ∀ i, strongly_measurable (g i) := fun i => (Exists.choose_spec <| hfmeas i).1
   have hgeq : ∀ i, g i =ᵐ[μ] f i := fun i => (Exists.choose_spec <| hfmeas i).2.symm
Diff
@@ -273,7 +273,7 @@ protected theorem sq [Pow γ ℕ] [MeasurablePow γ ℕ] (h : IdentDistrib f g 
 
 protected theorem coe_nNReal_eNNReal {f : α → ℝ≥0} {g : β → ℝ≥0} (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => (f x : ℝ≥0∞)) (fun x => (g x : ℝ≥0∞)) μ ν :=
-  h.comp measurable_coe_nNReal_eNNReal
+  h.comp measurable_coe_nnreal_ennreal
 #align probability_theory.ident_distrib.coe_nnreal_ennreal ProbabilityTheory.IdentDistrib.coe_nNReal_eNNReal
 
 @[to_additive]
@@ -307,7 +307,7 @@ theorem const_div [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c :
 theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
     evariance f μ = evariance g ν :=
   by
-  convert(h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nNReal_eNNReal.sq.lintegral_eq
+  convert(h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nnreal_ennreal.sq.lintegral_eq
   rw [h.integral_eq]
   rfl
 #align probability_theory.ident_distrib.evariance_eq ProbabilityTheory.IdentDistrib.evariance_eq
Diff
@@ -177,7 +177,7 @@ theorem essSup_eq [ConditionallyCompleteLinearOrder γ] [TopologicalSpace γ] [O
   by
   have I : ∀ a, μ { x : α | a < f x } = ν { x : β | a < g x } := fun a =>
     h.measure_mem_eq measurableSet_Ioi
-  simp_rw [essSup_eq_infₛ, I]
+  simp_rw [essSup_eq_sInf, I]
 #align probability_theory.ident_distrib.ess_sup_eq ProbabilityTheory.IdentDistrib.essSup_eq
 
 theorem lintegral_eq {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (h : IdentDistrib f g μ ν) :
Diff
@@ -261,12 +261,12 @@ protected theorem nnnorm [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistr
   h.comp measurable_nnnorm
 #align probability_theory.ident_distrib.nnnorm ProbabilityTheory.IdentDistrib.nnnorm
 
-protected theorem pow [Pow γ ℕ] [HasMeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) {n : ℕ} :
+protected theorem pow [Pow γ ℕ] [MeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) {n : ℕ} :
     IdentDistrib (fun x => f x ^ n) (fun x => g x ^ n) μ ν :=
   h.comp (measurable_id.pow_const n)
 #align probability_theory.ident_distrib.pow ProbabilityTheory.IdentDistrib.pow
 
-protected theorem sq [Pow γ ℕ] [HasMeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) :
+protected theorem sq [Pow γ ℕ] [MeasurablePow γ ℕ] (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => f x ^ 2) (fun x => g x ^ 2) μ ν :=
   h.comp (measurable_id.pow_const 2)
 #align probability_theory.ident_distrib.sq ProbabilityTheory.IdentDistrib.sq
@@ -277,30 +277,30 @@ protected theorem coe_nNReal_eNNReal {f : α → ℝ≥0} {g : β → ℝ≥0} (
 #align probability_theory.ident_distrib.coe_nnreal_ennreal ProbabilityTheory.IdentDistrib.coe_nNReal_eNNReal
 
 @[to_additive]
-theorem mul_const [Mul γ] [HasMeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem mul_const [Mul γ] [MeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => f x * c) (fun x => g x * c) μ ν :=
   h.comp (measurable_mul_const c)
 #align probability_theory.ident_distrib.mul_const ProbabilityTheory.IdentDistrib.mul_const
 #align probability_theory.ident_distrib.add_const ProbabilityTheory.IdentDistrib.add_const
 
 @[to_additive]
-theorem const_mul [Mul γ] [HasMeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem const_mul [Mul γ] [MeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => c * f x) (fun x => c * g x) μ ν :=
   h.comp (measurable_const_mul c)
 #align probability_theory.ident_distrib.const_mul ProbabilityTheory.IdentDistrib.const_mul
 #align probability_theory.ident_distrib.const_add ProbabilityTheory.IdentDistrib.const_add
 
 @[to_additive]
-theorem div_const [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem div_const [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => f x / c) (fun x => g x / c) μ ν :=
-  h.comp (HasMeasurableDiv.measurable_div_const c)
+  h.comp (MeasurableDiv.measurable_div_const c)
 #align probability_theory.ident_distrib.div_const ProbabilityTheory.IdentDistrib.div_const
 #align probability_theory.ident_distrib.sub_const ProbabilityTheory.IdentDistrib.sub_const
 
 @[to_additive]
-theorem const_div [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem const_div [Div γ] [MeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => c / f x) (fun x => c / g x) μ ν :=
-  h.comp (HasMeasurableDiv.measurable_const_div c)
+  h.comp (MeasurableDiv.measurable_div_const c)
 #align probability_theory.ident_distrib.const_div ProbabilityTheory.IdentDistrib.const_div
 #align probability_theory.ident_distrib.const_sub ProbabilityTheory.IdentDistrib.const_sub
 
Diff
@@ -109,8 +109,8 @@ protected theorem comp_of_aEMeasurable {u : γ → δ} (h : IdentDistrib f g μ
       exact hu.comp_ae_measurable h.ae_measurable_snd
     map_eq :=
       by
-      rw [← AEMeasurable.map_map_of_aEMeasurable hu h.ae_measurable_fst, ←
-        AEMeasurable.map_map_of_aEMeasurable _ h.ae_measurable_snd, h.map_eq]
+      rw [← AEMeasurable.map_map_of_aemeasurable hu h.ae_measurable_fst, ←
+        AEMeasurable.map_map_of_aemeasurable _ h.ae_measurable_snd, h.map_eq]
       rwa [← h.map_eq] }
 #align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.comp_of_aEMeasurable
 
Diff
@@ -325,7 +325,7 @@ section UniformIntegrable
 open TopologicalSpace
 
 variable {E : Type _} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
-  [SecondCountableTopology E] {μ : Measure α} [IsFiniteMeasure μ]
+  [SecondCountableTopology E] {μ : Measure α} [FiniteMeasure μ]
 
 /-- This lemma is superceded by `mem_ℒp.uniform_integrable_of_ident_distrib` which only require
 `ae_strongly_measurable`. -/
Diff
@@ -71,8 +71,8 @@ their image measures coincide. This only makes sense when the functions are ae m
 structure IdentDistrib (f : α → γ) (g : β → γ)
   (μ : Measure α := by exact MeasureTheory.MeasureSpace.volume)
   (ν : Measure β := by exact MeasureTheory.MeasureSpace.volume) : Prop where
-  aeMeasurableFst : AeMeasurable f μ
-  aeMeasurableSnd : AeMeasurable g ν
+  aEMeasurable_fst : AEMeasurable f μ
+  aEMeasurable_snd : AEMeasurable g ν
   map_eq : Measure.map f μ = Measure.map g ν
 #align probability_theory.ident_distrib ProbabilityTheory.IdentDistrib
 
@@ -82,49 +82,49 @@ open TopologicalSpace
 
 variable {μ : Measure α} {ν : Measure β} {f : α → γ} {g : β → γ}
 
-protected theorem refl (hf : AeMeasurable f μ) : IdentDistrib f f μ μ :=
-  { aeMeasurableFst := hf
-    aeMeasurableSnd := hf
+protected theorem refl (hf : AEMeasurable f μ) : IdentDistrib f f μ μ :=
+  { aEMeasurable_fst := hf
+    aEMeasurable_snd := hf
     map_eq := rfl }
 #align probability_theory.ident_distrib.refl ProbabilityTheory.IdentDistrib.refl
 
 protected theorem symm (h : IdentDistrib f g μ ν) : IdentDistrib g f ν μ :=
-  { aeMeasurableFst := h.aeMeasurableSnd
-    aeMeasurableSnd := h.aeMeasurableFst
+  { aEMeasurable_fst := h.aEMeasurable_snd
+    aEMeasurable_snd := h.aEMeasurable_fst
     map_eq := h.map_eq.symm }
 #align probability_theory.ident_distrib.symm ProbabilityTheory.IdentDistrib.symm
 
 protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f g μ ν)
     (h₂ : IdentDistrib g h ν ρ) : IdentDistrib f h μ ρ :=
-  { aeMeasurableFst := h₁.aeMeasurableFst
-    aeMeasurableSnd := h₂.aeMeasurableSnd
+  { aEMeasurable_fst := h₁.aEMeasurable_fst
+    aEMeasurable_snd := h₂.aEMeasurable_snd
     map_eq := h₁.map_eq.trans h₂.map_eq }
 #align probability_theory.ident_distrib.trans ProbabilityTheory.IdentDistrib.trans
 
-protected theorem compOfAeMeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
-    (hu : AeMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
-  { aeMeasurableFst := hu.compAeMeasurable h.aeMeasurableFst
-    aeMeasurableSnd := by
+protected theorem comp_of_aEMeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
+    (hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
+  { aEMeasurable_fst := hu.comp_aemeasurable h.aEMeasurable_fst
+    aEMeasurable_snd := by
       rw [h.map_eq] at hu
       exact hu.comp_ae_measurable h.ae_measurable_snd
     map_eq :=
       by
-      rw [← AeMeasurable.map_map_of_aeMeasurable hu h.ae_measurable_fst, ←
-        AeMeasurable.map_map_of_aeMeasurable _ h.ae_measurable_snd, h.map_eq]
+      rw [← AEMeasurable.map_map_of_aEMeasurable hu h.ae_measurable_fst, ←
+        AEMeasurable.map_map_of_aEMeasurable _ h.ae_measurable_snd, h.map_eq]
       rwa [← h.map_eq] }
-#align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.compOfAeMeasurable
+#align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.comp_of_aEMeasurable
 
 protected theorem comp {u : γ → δ} (h : IdentDistrib f g μ ν) (hu : Measurable u) :
     IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
-  h.compOfAeMeasurable hu.AeMeasurable
+  h.comp_of_aEMeasurable hu.AEMeasurable
 #align probability_theory.ident_distrib.comp ProbabilityTheory.IdentDistrib.comp
 
-protected theorem ofAeEq {g : α → γ} (hf : AeMeasurable f μ) (heq : f =ᵐ[μ] g) :
+protected theorem of_ae_eq {g : α → γ} (hf : AEMeasurable f μ) (heq : f =ᵐ[μ] g) :
     IdentDistrib f g μ μ :=
-  { aeMeasurableFst := hf
-    aeMeasurableSnd := hf.congr HEq
+  { aEMeasurable_fst := hf
+    aEMeasurable_snd := hf.congr HEq
     map_eq := Measure.map_congr HEq }
-#align probability_theory.ident_distrib.of_ae_eq ProbabilityTheory.IdentDistrib.ofAeEq
+#align probability_theory.ident_distrib.of_ae_eq ProbabilityTheory.IdentDistrib.of_ae_eq
 
 theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) :
     μ (f ⁻¹' s) = ν (g ⁻¹' s) := by
@@ -151,25 +151,25 @@ theorem ae_mem_snd (h : IdentDistrib f g μ ν) {t : Set γ} (tmeas : Measurable
 /-- In a second countable topology, the first function in an identically distributed pair is a.e.
 strongly measurable. So is the second function, but use `h.symm.ae_strongly_measurable_fst` as
 `h.ae_strongly_measurable_snd` has a different meaning.-/
-theorem aeStronglyMeasurableFst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
+theorem aeStronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
     [SecondCountableTopology γ] (h : IdentDistrib f g μ ν) : AeStronglyMeasurable f μ :=
-  h.aeMeasurableFst.AeStronglyMeasurable
-#align probability_theory.ident_distrib.ae_strongly_measurable_fst ProbabilityTheory.IdentDistrib.aeStronglyMeasurableFst
+  h.aEMeasurable_fst.AeStronglyMeasurable
+#align probability_theory.ident_distrib.ae_strongly_measurable_fst ProbabilityTheory.IdentDistrib.aeStronglyMeasurable_fst
 
 /-- If `f` and `g` are identically distributed and `f` is a.e. strongly measurable, so is `g`. -/
-theorem aeStronglyMeasurableSnd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
+theorem aeStronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
     (h : IdentDistrib f g μ ν) (hf : AeStronglyMeasurable f μ) : AeStronglyMeasurable g ν :=
   by
-  refine' aeStronglyMeasurable_iff_aeMeasurable_separable.2 ⟨h.ae_measurable_snd, _⟩
-  rcases(aeStronglyMeasurable_iff_aeMeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
+  refine' aeStronglyMeasurable_iff_aEMeasurable_separable.2 ⟨h.ae_measurable_snd, _⟩
+  rcases(aeStronglyMeasurable_iff_aEMeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
   refine' ⟨closure t, t_sep.closure, _⟩
   apply h.ae_mem_snd is_closed_closure.measurable_set
   filter_upwards [ht]with x hx using subset_closure hx
-#align probability_theory.ident_distrib.ae_strongly_measurable_snd ProbabilityTheory.IdentDistrib.aeStronglyMeasurableSnd
+#align probability_theory.ident_distrib.ae_strongly_measurable_snd ProbabilityTheory.IdentDistrib.aeStronglyMeasurable_snd
 
 theorem aeStronglyMeasurable_iff [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
     (h : IdentDistrib f g μ ν) : AeStronglyMeasurable f μ ↔ AeStronglyMeasurable g ν :=
-  ⟨fun hf => h.aeStronglyMeasurableSnd hf, fun hg => h.symm.aeStronglyMeasurableSnd hg⟩
+  ⟨fun hf => h.aeStronglyMeasurable_snd hf, fun hg => h.symm.aeStronglyMeasurable_snd hg⟩
 #align probability_theory.ident_distrib.ae_strongly_measurable_iff ProbabilityTheory.IdentDistrib.aeStronglyMeasurable_iff
 
 theorem essSup_eq [ConditionallyCompleteLinearOrder γ] [TopologicalSpace γ] [OpensMeasurableSpace γ]
@@ -184,8 +184,8 @@ theorem lintegral_eq {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (h : IdentD
     (∫⁻ x, f x ∂μ) = ∫⁻ x, g x ∂ν :=
   by
   change (∫⁻ x, id (f x) ∂μ) = ∫⁻ x, id (g x) ∂ν
-  rw [← lintegral_map' aeMeasurableId h.ae_measurable_fst, ←
-    lintegral_map' aeMeasurableId h.ae_measurable_snd, h.map_eq]
+  rw [← lintegral_map' aemeasurable_id h.ae_measurable_fst, ←
+    lintegral_map' aemeasurable_id h.ae_measurable_snd, h.map_eq]
 #align probability_theory.ident_distrib.lintegral_eq ProbabilityTheory.IdentDistrib.lintegral_eq
 
 theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace γ] [BorelSpace γ]
@@ -194,9 +194,9 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace
   by_cases hf : ae_strongly_measurable f μ
   · have A : ae_strongly_measurable id (measure.map f μ) :=
       by
-      rw [aeStronglyMeasurable_iff_aeMeasurable_separable]
-      rcases(aeStronglyMeasurable_iff_aeMeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
-      refine' ⟨aeMeasurableId, ⟨closure t, t_sep.closure, _⟩⟩
+      rw [aeStronglyMeasurable_iff_aEMeasurable_separable]
+      rcases(aeStronglyMeasurable_iff_aEMeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
+      refine' ⟨aemeasurable_id, ⟨closure t, t_sep.closure, _⟩⟩
       rw [ae_map_iff h.ae_measurable_fst]
       · filter_upwards [ht]with x hx using subset_closure hx
       · exact is_closed_closure.measurable_set
@@ -226,29 +226,29 @@ theorem snorm_eq [NormedAddCommGroup γ] [OpensMeasurableSpace γ] (h : IdentDis
     h.comp (Measurable.pow_const (measurable_coe_nnreal_ennreal.comp measurable_nnnorm) p.to_real)
 #align probability_theory.ident_distrib.snorm_eq ProbabilityTheory.IdentDistrib.snorm_eq
 
-theorem memℒpSnd [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h : IdentDistrib f g μ ν)
+theorem memℒp_snd [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h : IdentDistrib f g μ ν)
     (hf : Memℒp f p μ) : Memℒp g p ν :=
   by
   refine' ⟨h.ae_strongly_measurable_snd hf.ae_strongly_measurable, _⟩
   rw [← h.snorm_eq]
   exact hf.2
-#align probability_theory.ident_distrib.mem_ℒp_snd ProbabilityTheory.IdentDistrib.memℒpSnd
+#align probability_theory.ident_distrib.mem_ℒp_snd ProbabilityTheory.IdentDistrib.memℒp_snd
 
 theorem memℒp_iff [NormedAddCommGroup γ] [BorelSpace γ] {p : ℝ≥0∞} (h : IdentDistrib f g μ ν) :
     Memℒp f p μ ↔ Memℒp g p ν :=
-  ⟨fun hf => h.memℒpSnd hf, fun hg => h.symm.memℒpSnd hg⟩
+  ⟨fun hf => h.memℒp_snd hf, fun hg => h.symm.memℒp_snd hg⟩
 #align probability_theory.ident_distrib.mem_ℒp_iff ProbabilityTheory.IdentDistrib.memℒp_iff
 
-theorem integrableSnd [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν)
+theorem integrable_snd [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν)
     (hf : Integrable f μ) : Integrable g ν :=
   by
   rw [← mem_ℒp_one_iff_integrable] at hf⊢
   exact h.mem_ℒp_snd hf
-#align probability_theory.ident_distrib.integrable_snd ProbabilityTheory.IdentDistrib.integrableSnd
+#align probability_theory.ident_distrib.integrable_snd ProbabilityTheory.IdentDistrib.integrable_snd
 
 theorem integrable_iff [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν) :
     Integrable f μ ↔ Integrable g ν :=
-  ⟨fun hf => h.integrableSnd hf, fun hg => h.symm.integrableSnd hg⟩
+  ⟨fun hf => h.integrable_snd hf, fun hg => h.symm.integrable_snd hg⟩
 #align probability_theory.ident_distrib.integrable_iff ProbabilityTheory.IdentDistrib.integrable_iff
 
 protected theorem norm [NormedAddCommGroup γ] [BorelSpace γ] (h : IdentDistrib f g μ ν) :
@@ -271,37 +271,37 @@ protected theorem sq [Pow γ ℕ] [HasMeasurablePow γ ℕ] (h : IdentDistrib f
   h.comp (measurable_id.pow_const 2)
 #align probability_theory.ident_distrib.sq ProbabilityTheory.IdentDistrib.sq
 
-protected theorem coeNnrealEnnreal {f : α → ℝ≥0} {g : β → ℝ≥0} (h : IdentDistrib f g μ ν) :
+protected theorem coe_nNReal_eNNReal {f : α → ℝ≥0} {g : β → ℝ≥0} (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => (f x : ℝ≥0∞)) (fun x => (g x : ℝ≥0∞)) μ ν :=
   h.comp measurable_coe_nNReal_eNNReal
-#align probability_theory.ident_distrib.coe_nnreal_ennreal ProbabilityTheory.IdentDistrib.coeNnrealEnnreal
+#align probability_theory.ident_distrib.coe_nnreal_ennreal ProbabilityTheory.IdentDistrib.coe_nNReal_eNNReal
 
 @[to_additive]
-theorem mulConst [Mul γ] [HasMeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem mul_const [Mul γ] [HasMeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => f x * c) (fun x => g x * c) μ ν :=
   h.comp (measurable_mul_const c)
-#align probability_theory.ident_distrib.mul_const ProbabilityTheory.IdentDistrib.mulConst
+#align probability_theory.ident_distrib.mul_const ProbabilityTheory.IdentDistrib.mul_const
 #align probability_theory.ident_distrib.add_const ProbabilityTheory.IdentDistrib.add_const
 
 @[to_additive]
-theorem constMul [Mul γ] [HasMeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem const_mul [Mul γ] [HasMeasurableMul γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => c * f x) (fun x => c * g x) μ ν :=
   h.comp (measurable_const_mul c)
-#align probability_theory.ident_distrib.const_mul ProbabilityTheory.IdentDistrib.constMul
+#align probability_theory.ident_distrib.const_mul ProbabilityTheory.IdentDistrib.const_mul
 #align probability_theory.ident_distrib.const_add ProbabilityTheory.IdentDistrib.const_add
 
 @[to_additive]
-theorem divConst [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem div_const [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => f x / c) (fun x => g x / c) μ ν :=
   h.comp (HasMeasurableDiv.measurable_div_const c)
-#align probability_theory.ident_distrib.div_const ProbabilityTheory.IdentDistrib.divConst
+#align probability_theory.ident_distrib.div_const ProbabilityTheory.IdentDistrib.div_const
 #align probability_theory.ident_distrib.sub_const ProbabilityTheory.IdentDistrib.sub_const
 
 @[to_additive]
-theorem constDiv [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
+theorem const_div [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c : γ) :
     IdentDistrib (fun x => c / f x) (fun x => c / g x) μ ν :=
   h.comp (HasMeasurableDiv.measurable_const_div c)
-#align probability_theory.ident_distrib.const_div ProbabilityTheory.IdentDistrib.constDiv
+#align probability_theory.ident_distrib.const_div ProbabilityTheory.IdentDistrib.const_div
 #align probability_theory.ident_distrib.const_sub ProbabilityTheory.IdentDistrib.const_sub
 
 theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
@@ -329,7 +329,7 @@ variable {E : Type _} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
 
 /-- This lemma is superceded by `mem_ℒp.uniform_integrable_of_ident_distrib` which only require
 `ae_strongly_measurable`. -/
-theorem Memℒp.uniformIntegrableOfIdentDistribAux {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
+theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
     (hp : 1 ≤ p) (hp' : p ≠ ∞) (hℒp : Memℒp (f j) p μ) (hfmeas : ∀ i, StronglyMeasurable (f i))
     (hf : ∀ i, IdentDistrib (f i) (f j) μ μ) : UniformIntegrable f p μ :=
   by
@@ -348,15 +348,15 @@ theorem Memℒp.uniformIntegrableOfIdentDistribAux {ι : Type _} {f : ι → α
     ext x
     simp only [Set.indicator, Set.mem_setOf_eq]
   simp_rw [coe_nnnorm, this]
-  rw [← snorm_map_measure _ (hf i).aeMeasurableFst, (hf i).map_eq,
-    snorm_map_measure _ (hf j).aeMeasurableFst]
+  rw [← snorm_map_measure _ (hf i).aEMeasurable_fst, (hf i).map_eq,
+    snorm_map_measure _ (hf j).aEMeasurable_fst]
   · rfl
   all_goals
     exact ae_strongly_measurable_id.indicator (measurableSet_le measurable_const measurable_nnnorm)
-#align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib_aux ProbabilityTheory.Memℒp.uniformIntegrableOfIdentDistribAux
+#align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib_aux ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib_aux
 
 /-- A sequence of identically distributed Lᵖ functions is p-uniformly integrable. -/
-theorem Memℒp.uniformIntegrableOfIdentDistrib {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
+theorem Memℒp.uniformIntegrable_of_identDistrib {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
     (hp : 1 ≤ p) (hp' : p ≠ ∞) (hℒp : Memℒp (f j) p μ) (hf : ∀ i, IdentDistrib (f i) (f j) μ μ) :
     UniformIntegrable f p μ :=
   by
@@ -369,10 +369,10 @@ theorem Memℒp.uniformIntegrableOfIdentDistrib {ι : Type _} {f : ι → α →
   exact
     uniform_integrable.ae_eq
       (mem_ℒp.uniform_integrable_of_ident_distrib_aux hp hp' hgℒp hgmeas fun i =>
-        (ident_distrib.of_ae_eq (hgmeas i).AeMeasurable (hgeq i)).trans
-          ((hf i).trans <| ident_distrib.of_ae_eq (hfmeas j).AeMeasurable (hgeq j).symm))
+        (ident_distrib.of_ae_eq (hgmeas i).AEMeasurable (hgeq i)).trans
+          ((hf i).trans <| ident_distrib.of_ae_eq (hfmeas j).AEMeasurable (hgeq j).symm))
       hgeq
-#align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib ProbabilityTheory.Memℒp.uniformIntegrableOfIdentDistrib
+#align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib
 
 end UniformIntegrable
 
Diff
@@ -307,7 +307,7 @@ theorem constDiv [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c
 theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
     evariance f μ = evariance g ν :=
   by
-  convert (h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nNReal_eNNReal.sq.lintegral_eq
+  convert(h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nNReal_eNNReal.sq.lintegral_eq
   rw [h.integral_eq]
   rfl
 #align probability_theory.ident_distrib.evariance_eq ProbabilityTheory.IdentDistrib.evariance_eq
Diff
@@ -58,7 +58,7 @@ open MeasureTheory Filter Finset
 
 noncomputable section
 
-open Topology BigOperators MeasureTheory Ennreal NNReal
+open Topology BigOperators MeasureTheory ENNReal NNReal
 
 variable {α β γ δ : Type _} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
   [MeasurableSpace δ]
@@ -215,7 +215,7 @@ theorem snorm_eq [NormedAddCommGroup γ] [OpensMeasurableSpace γ] (h : IdentDis
   by_cases h0 : p = 0
   · simp [h0]
   by_cases h_top : p = ∞
-  · simp only [h_top, snorm, snorm_ess_sup, Ennreal.top_ne_zero, eq_self_iff_true, if_true,
+  · simp only [h_top, snorm, snorm_ess_sup, ENNReal.top_ne_zero, eq_self_iff_true, if_true,
       if_false]
     apply ess_sup_eq
     exact h.comp (measurable_coe_nnreal_ennreal.comp measurable_nnnorm)
@@ -273,7 +273,7 @@ protected theorem sq [Pow γ ℕ] [HasMeasurablePow γ ℕ] (h : IdentDistrib f
 
 protected theorem coeNnrealEnnreal {f : α → ℝ≥0} {g : β → ℝ≥0} (h : IdentDistrib f g μ ν) :
     IdentDistrib (fun x => (f x : ℝ≥0∞)) (fun x => (g x : ℝ≥0∞)) μ ν :=
-  h.comp measurable_coe_nNReal_ennreal
+  h.comp measurable_coe_nNReal_eNNReal
 #align probability_theory.ident_distrib.coe_nnreal_ennreal ProbabilityTheory.IdentDistrib.coeNnrealEnnreal
 
 @[to_additive]
@@ -307,7 +307,7 @@ theorem constDiv [Div γ] [HasMeasurableDiv γ] (h : IdentDistrib f g μ ν) (c
 theorem evariance_eq {f : α → ℝ} {g : β → ℝ} (h : IdentDistrib f g μ ν) :
     evariance f μ = evariance g ν :=
   by
-  convert (h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nNReal_ennreal.sq.lintegral_eq
+  convert (h.sub_const (∫ x, f x ∂μ)).nnnorm.coe_nNReal_eNNReal.sq.lintegral_eq
   rw [h.integral_eq]
   rfl
 #align probability_theory.ident_distrib.evariance_eq ProbabilityTheory.IdentDistrib.evariance_eq

Changes in mathlib4

mathlib3
mathlib4
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -152,7 +152,7 @@ theorem ae_mem_snd (h : IdentDistrib f g μ ν) {t : Set γ} (tmeas : Measurable
 
 /-- In a second countable topology, the first function in an identically distributed pair is a.e.
 strongly measurable. So is the second function, but use `h.symm.aestronglyMeasurable_fst` as
-`h.aestronglyMeasurable_snd` has a different meaning.-/
+`h.aestronglyMeasurable_snd` has a different meaning. -/
 theorem aestronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
     [SecondCountableTopology γ] (h : IdentDistrib f g μ ν) : AEStronglyMeasurable f μ :=
   h.aemeasurable_fst.aestronglyMeasurable
refactor(MeasureTheory/Function/UniformIntegrable): removed needlessly explicit argument (#10599)

A variable declaration made (μ) an explicit argument, even though it could be deduced from other arguments in almost all cases. The declaration was removed and the change propagated to other files.

Diff
@@ -325,7 +325,7 @@ theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type*} {f : ι → 
   refine' uniformIntegrable_of' hp hp' hfmeas fun ε hε => _
   by_cases hι : Nonempty ι
   swap; · exact ⟨0, fun i => False.elim (hι <| Nonempty.intro i)⟩
-  obtain ⟨C, hC₁, hC₂⟩ := hℒp.snorm_indicator_norm_ge_pos_le μ (hfmeas _) hε
+  obtain ⟨C, hC₁, hC₂⟩ := hℒp.snorm_indicator_norm_ge_pos_le (hfmeas _) hε
   refine' ⟨⟨C, hC₁.le⟩, fun i => le_trans (le_of_eq _) hC₂⟩
   have : {x | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊} = {x | C ≤ ‖f i x‖} := by
     ext x
chore: missing spaces after rcases, convert and congrm (#7725)

Replace rcases( with rcases (. Same thing for convert( and congrm(. No other change.

Diff
@@ -162,7 +162,7 @@ theorem aestronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [Ope
 theorem aestronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
     (h : IdentDistrib f g μ ν) (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable g ν := by
   refine' aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨h.aemeasurable_snd, _⟩
-  rcases(aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
+  rcases (aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
   refine' ⟨closure t, t_sep.closure, _⟩
   apply h.ae_mem_snd isClosed_closure.measurableSet
   filter_upwards [ht] with x hx using subset_closure hx
@@ -192,7 +192,7 @@ theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [BorelSpace γ]
   by_cases hf : AEStronglyMeasurable f μ
   · have A : AEStronglyMeasurable id (Measure.map f μ) := by
       rw [aestronglyMeasurable_iff_aemeasurable_separable]
-      rcases(aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
+      rcases (aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
       refine' ⟨aemeasurable_id, ⟨closure t, t_sep.closure, _⟩⟩
       rw [ae_map_iff h.aemeasurable_fst]
       · filter_upwards [ht] with x hx using subset_closure hx
feat: strong law of large numbers for vector-valued random variables (#7218)

We already have the strong law of large numbers for real-valued integrable random variables. We generalize it to general vector-valued integrable random variables. This does not require any second-countability assumptions as integrable functions can by definition be approximated by simple functions, for which the result is deduced from the one-dimensional one.

Along the way, we extend a few lemmas in the library from the real case to the vector case, and remove unneeded second-countability assumptions.

Diff
@@ -120,6 +120,15 @@ protected theorem of_ae_eq {g : α → γ} (hf : AEMeasurable f μ) (heq : f =
     map_eq := Measure.map_congr heq }
 #align probability_theory.ident_distrib.of_ae_eq ProbabilityTheory.IdentDistrib.of_ae_eq
 
+lemma _root_.MeasureTheory.AEMeasurable.identDistrib_mk
+    (hf : AEMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
+  IdentDistrib.of_ae_eq hf hf.ae_eq_mk
+
+lemma _root_.MeasureTheory.AEStronglyMeasurable.identDistrib_mk
+    [TopologicalSpace γ] [PseudoMetrizableSpace γ] [BorelSpace γ]
+    (hf : AEStronglyMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
+  IdentDistrib.of_ae_eq hf.aemeasurable hf.ae_eq_mk
+
 theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) :
     μ (f ⁻¹' s) = ν (g ⁻¹' s) := by
   rw [← Measure.map_apply_of_aemeasurable h.aemeasurable_fst hs, ←
@@ -306,7 +315,7 @@ section UniformIntegrable
 open TopologicalSpace
 
 variable {E : Type*} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
-  [SecondCountableTopology E] {μ : Measure α} [IsFiniteMeasure μ]
+  {μ : Measure α} [IsFiniteMeasure μ]
 
 /-- This lemma is superseded by `Memℒp.uniformIntegrable_of_identDistrib` which only requires
 `AEStronglyMeasurable`. -/
@@ -318,17 +327,21 @@ theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type*} {f : ι → 
   swap; · exact ⟨0, fun i => False.elim (hι <| Nonempty.intro i)⟩
   obtain ⟨C, hC₁, hC₂⟩ := hℒp.snorm_indicator_norm_ge_pos_le μ (hfmeas _) hε
   refine' ⟨⟨C, hC₁.le⟩, fun i => le_trans (le_of_eq _) hC₂⟩
-  have : {x : α | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊}.indicator (f i) =
-      (fun x : E => if (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖x‖₊ then x else 0) ∘ f i := by
+  have : {x | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊} = {x | C ≤ ‖f i x‖} := by
+    ext x
+    simp_rw [← norm_toNNReal]
+    exact Real.le_toNNReal_iff_coe_le (norm_nonneg _)
+  rw [this, ← snorm_norm, ← snorm_norm (Set.indicator _ _)]
+  simp_rw [norm_indicator_eq_indicator_norm, coe_nnnorm]
+  let F : E → ℝ := (fun x : E => if (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖x‖₊ then ‖x‖ else 0)
+  have F_meas : Measurable F := by
+    apply measurable_norm.indicator (measurableSet_le measurable_const measurable_nnnorm)
+  have : ∀ k, (fun x ↦ Set.indicator {x | C ≤ ‖f k x‖} (fun a ↦ ‖f k a‖) x) = F ∘ f k := by
+    intro k
     ext x
     simp only [Set.indicator, Set.mem_setOf_eq]; norm_cast
-  simp_rw [coe_nnnorm, this]
-  rw [← snorm_map_measure _ (hf i).aemeasurable_fst, (hf i).map_eq,
-    snorm_map_measure _ (hf j).aemeasurable_fst]
-  · rfl
-  all_goals
-    exact_mod_cast aestronglyMeasurable_id.indicator
-      (measurableSet_le measurable_const measurable_nnnorm)
+  rw [this, this, ← snorm_map_measure F_meas.aestronglyMeasurable (hf i).aemeasurable_fst,
+    (hf i).map_eq, snorm_map_measure F_meas.aestronglyMeasurable (hf j).aemeasurable_fst]
 #align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib_aux ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib_aux
 
 /-- A sequence of identically distributed Lᵖ functions is p-uniformly integrable. -/
feat: patch for new alias command (#6172)
Diff
@@ -126,7 +126,7 @@ theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : Measurabl
     Measure.map_apply_of_aemeasurable h.aemeasurable_snd hs, h.map_eq]
 #align probability_theory.ident_distrib.measure_mem_eq ProbabilityTheory.IdentDistrib.measure_mem_eq
 
-alias measure_mem_eq ← measure_preimage_eq
+alias measure_preimage_eq := measure_mem_eq
 #align probability_theory.ident_distrib.measure_preimage_eq ProbabilityTheory.IdentDistrib.measure_preimage_eq
 
 theorem ae_snd (h : IdentDistrib f g μ ν) {p : γ → Prop} (pmeas : MeasurableSet {x | p x})
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
@@ -57,7 +57,7 @@ noncomputable section
 
 open scoped Topology BigOperators MeasureTheory ENNReal NNReal
 
-variable {α β γ δ : Type _} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
+variable {α β γ δ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
   [MeasurableSpace δ]
 
 namespace ProbabilityTheory
@@ -305,12 +305,12 @@ section UniformIntegrable
 
 open TopologicalSpace
 
-variable {E : Type _} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
+variable {E : Type*} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
   [SecondCountableTopology E] {μ : Measure α} [IsFiniteMeasure μ]
 
 /-- This lemma is superseded by `Memℒp.uniformIntegrable_of_identDistrib` which only requires
 `AEStronglyMeasurable`. -/
-theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
+theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type*} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
     (hp : 1 ≤ p) (hp' : p ≠ ∞) (hℒp : Memℒp (f j) p μ) (hfmeas : ∀ i, StronglyMeasurable (f i))
     (hf : ∀ i, IdentDistrib (f i) (f j) μ μ) : UniformIntegrable f p μ := by
   refine' uniformIntegrable_of' hp hp' hfmeas fun ε hε => _
@@ -332,7 +332,7 @@ theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type _} {f : ι →
 #align probability_theory.mem_ℒp.uniform_integrable_of_ident_distrib_aux ProbabilityTheory.Memℒp.uniformIntegrable_of_identDistrib_aux
 
 /-- A sequence of identically distributed Lᵖ functions is p-uniformly integrable. -/
-theorem Memℒp.uniformIntegrable_of_identDistrib {ι : Type _} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
+theorem Memℒp.uniformIntegrable_of_identDistrib {ι : Type*} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
     (hp : 1 ≤ p) (hp' : p ≠ ∞) (hℒp : Memℒp (f j) p μ) (hf : ∀ i, IdentDistrib (f i) (f j) μ μ) :
     UniformIntegrable f p μ := by
   have hfmeas : ∀ i, AEStronglyMeasurable (f i) μ := fun i =>
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

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

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module probability.ident_distrib
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Probability.Variance
 import Mathlib.MeasureTheory.Function.UniformIntegrable
 
+#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
+
 /-!
 # Identically distributed random variables
 
feat(MeasureTheory.Integral.Bochner): drop completeness requirement from the definition (#5910)

The notion of Bochner integral of a function taking values in a normed space E requires that E is complete. This means that whenever we write down an integral, the term contains the assertion that E is complete.

In this PR, we remove the completeness requirement from the definition, using the junk value 0 when the space is not complete. Mathematically this does not make any difference, as all reasonable applications will be with a complete E. But it means that terms involving integrals become a little bit simpler and that completeness will not have to be checked by the system when applying a bunch of basic lemmas on integrals.

Diff
@@ -181,7 +181,7 @@ theorem lintegral_eq {f : α → ℝ≥0∞} {g : β → ℝ≥0∞} (h : IdentD
     lintegral_map' aemeasurable_id h.aemeasurable_snd, h.map_eq]
 #align probability_theory.ident_distrib.lintegral_eq ProbabilityTheory.IdentDistrib.lintegral_eq
 
-theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [CompleteSpace γ] [BorelSpace γ]
+theorem integral_eq [NormedAddCommGroup γ] [NormedSpace ℝ γ] [BorelSpace γ]
     (h : IdentDistrib f g μ ν) : ∫ x, f x ∂μ = ∫ x, g x ∂ν := by
   by_cases hf : AEStronglyMeasurable f μ
   · have A : AEStronglyMeasurable id (Measure.map f μ) := by
chore: remove occurrences of semicolon after space (#5713)

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

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

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

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

Diff
@@ -104,7 +104,7 @@ protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f
 protected theorem comp_of_aemeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
     (hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
   { aemeasurable_fst := hu.comp_aemeasurable h.aemeasurable_fst
-    aemeasurable_snd := by rw [h.map_eq] at hu ; exact hu.comp_aemeasurable h.aemeasurable_snd
+    aemeasurable_snd := by rw [h.map_eq] at hu; exact hu.comp_aemeasurable h.aemeasurable_snd
     map_eq := by
       rw [← AEMeasurable.map_map_of_aemeasurable hu h.aemeasurable_fst, ←
         AEMeasurable.map_map_of_aemeasurable _ h.aemeasurable_snd, h.map_eq]
feat: port Probability.IdentDistrib (#5331)

Dependencies 12 + 1002

1003 files ported (98.8%)
457521 lines ported (98.8%)
Show graph

The unported dependencies are

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