probability.martingale.basicMathlib.Probability.Martingale.Basic

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -136,14 +136,14 @@ theorem integrable (hf : Martingale f ℱ μ) (i : ι) : Integrable (f i) μ :=
 #align measure_theory.martingale.integrable MeasureTheory.Martingale.integrable
 -/
 
-#print MeasureTheory.Martingale.set_integral_eq /-
-theorem set_integral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
+#print MeasureTheory.Martingale.setIntegral_eq /-
+theorem setIntegral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
     {s : Set Ω} (hs : measurable_set[ℱ i] s) : ∫ ω in s, f i ω ∂μ = ∫ ω in s, f j ω ∂μ :=
   by
   rw [← @set_integral_condexp _ _ _ _ _ (ℱ i) m0 _ _ _ (ℱ.le i) _ (hf.integrable j) hs]
   refine' set_integral_congr_ae (ℱ.le i s hs) _
   filter_upwards [hf.2 i j hij] with _ heq _ using HEq.symm
-#align measure_theory.martingale.set_integral_eq MeasureTheory.Martingale.set_integral_eq
+#align measure_theory.martingale.set_integral_eq MeasureTheory.Martingale.setIntegral_eq
 -/
 
 #print MeasureTheory.Martingale.add /-
@@ -235,15 +235,15 @@ theorem condexp_ae_le [LE E] (hf : Supermartingale f ℱ μ) {i j : ι} (hij : i
 #align measure_theory.supermartingale.condexp_ae_le MeasureTheory.Supermartingale.condexp_ae_le
 -/
 
-#print MeasureTheory.Supermartingale.set_integral_le /-
-theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Supermartingale f ℱ μ)
+#print MeasureTheory.Supermartingale.setIntegral_le /-
+theorem setIntegral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Supermartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : measurable_set[ℱ i] s) :
     ∫ ω in s, f j ω ∂μ ≤ ∫ ω in s, f i ω ∂μ :=
   by
   rw [← set_integral_condexp (ℱ.le i) (hf.integrable j) hs]
   refine' set_integral_mono_ae integrable_condexp.integrable_on (hf.integrable i).IntegrableOn _
   filter_upwards [hf.2.1 i j hij] with _ heq using HEq
-#align measure_theory.supermartingale.set_integral_le MeasureTheory.Supermartingale.set_integral_le
+#align measure_theory.supermartingale.set_integral_le MeasureTheory.Supermartingale.setIntegral_le
 -/
 
 #print MeasureTheory.Supermartingale.add /-
@@ -338,15 +338,15 @@ theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submar
 #align measure_theory.submartingale.neg MeasureTheory.Submartingale.neg
 -/
 
-#print MeasureTheory.Submartingale.set_integral_le /-
+#print MeasureTheory.Submartingale.setIntegral_le /-
 /-- The converse of this lemma is `measure_theory.submartingale_of_set_integral_le`. -/
-theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ)
+theorem setIntegral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : measurable_set[ℱ i] s) :
     ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f j ω ∂μ :=
   by
   rw [← neg_le_neg_iff, ← integral_neg, ← integral_neg]
   exact supermartingale.set_integral_le hf.neg hij hs
-#align measure_theory.submartingale.set_integral_le MeasureTheory.Submartingale.set_integral_le
+#align measure_theory.submartingale.set_integral_le MeasureTheory.Submartingale.setIntegral_le
 -/
 
 #print MeasureTheory.Submartingale.sub_supermartingale /-
@@ -394,8 +394,8 @@ end Submartingale
 
 section Submartingale
 
-#print MeasureTheory.submartingale_of_set_integral_le /-
-theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+#print MeasureTheory.submartingale_of_setIntegral_le /-
+theorem submartingale_of_setIntegral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i j : ι,
@@ -415,7 +415,7 @@ theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω →
   rwa [← set_integral_trim _ (strongly_measurable_condexp.sub <| hadp i) hs,
     integral_sub' integrable_condexp.integrable_on (hint i).IntegrableOn, sub_nonneg,
     set_integral_condexp (ℱ.le i) (hint j) hs]
-#align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_set_integral_le
+#align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_setIntegral_le
 -/
 
 #print MeasureTheory.submartingale_of_condexp_sub_nonneg /-
@@ -533,8 +533,8 @@ section Nat
 
 variable {𝒢 : Filtration ℕ m0}
 
-#print MeasureTheory.submartingale_of_set_integral_le_succ /-
-theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+#print MeasureTheory.submartingale_of_setIntegral_le_succ /-
+theorem submartingale_of_setIntegral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
     Submartingale f 𝒢 μ :=
@@ -543,29 +543,29 @@ theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ →
   induction' hij with k hk₁ hk₂
   · exact le_rfl
   · exact le_trans hk₂ (hf k s (𝒢.mono hk₁ _ hs))
-#align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_set_integral_le_succ
+#align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_setIntegral_le_succ
 -/
 
-#print MeasureTheory.supermartingale_of_set_integral_succ_le /-
-theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+#print MeasureTheory.supermartingale_of_setIntegral_succ_le /-
+theorem supermartingale_of_setIntegral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f (i + 1) ω ∂μ ≤ ∫ ω in s, f i ω ∂μ) :
     Supermartingale f 𝒢 μ := by
   rw [← neg_neg f]
   refine' (submartingale_of_set_integral_le_succ hadp.neg (fun i => (hint i).neg) _).neg
   simpa only [integral_neg, Pi.neg_apply, neg_le_neg_iff]
-#align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_set_integral_succ_le
+#align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_setIntegral_succ_le
 -/
 
-#print MeasureTheory.martingale_of_set_integral_eq_succ /-
-theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+#print MeasureTheory.martingale_of_setIntegral_eq_succ /-
+theorem martingale_of_setIntegral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f i ω ∂μ = ∫ ω in s, f (i + 1) ω ∂μ) :
     Martingale f 𝒢 μ :=
   martingale_iff.2
-    ⟨supermartingale_of_set_integral_succ_le hadp hint fun i s hs => (hf i s hs).ge,
-      submartingale_of_set_integral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
-#align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_set_integral_eq_succ
+    ⟨supermartingale_of_setIntegral_succ_le hadp hint fun i s hs => (hf i s hs).ge,
+      submartingale_of_setIntegral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
+#align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_setIntegral_eq_succ
 -/
 
 #print MeasureTheory.submartingale_nat /-
Diff
@@ -723,7 +723,7 @@ theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ →
     by
     intro m
     refine' Finset.stronglyMeasurable_sum' _ fun i hi => _
-    rw [Finset.mem_range] at hi 
+    rw [Finset.mem_range] at hi
     exact
       (hξ.strongly_measurable_le hi.le).mul
         ((hf.adapted.strongly_measurable_le (Nat.succ_le_of_lt hi)).sub
Diff
@@ -483,7 +483,7 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Superma
   refine' (condexp_smul c (f j)).le.trans _
   filter_upwards [hf.2.1 i j hij] with _ hle
   simp_rw [Pi.smul_apply]
-  exact smul_le_smul_of_nonneg hle hc
+  exact smul_le_smul_of_nonneg_left hle hc
 #align measure_theory.supermartingale.smul_nonneg MeasureTheory.Supermartingale.smul_nonneg
 -/
 
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne, Kexing Ying
 -/
-import Mathbin.Probability.Notation
-import Mathbin.Probability.Process.Stopping
+import Probability.Notation
+import Probability.Process.Stopping
 
 #align_import probability.martingale.basic from "leanprover-community/mathlib"@"f2ad3645af9effcdb587637dc28a6074edc813f9"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne, Kexing Ying
-
-! This file was ported from Lean 3 source module probability.martingale.basic
-! leanprover-community/mathlib commit f2ad3645af9effcdb587637dc28a6074edc813f9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Probability.Notation
 import Mathbin.Probability.Process.Stopping
 
+#align_import probability.martingale.basic from "leanprover-community/mathlib"@"f2ad3645af9effcdb587637dc28a6074edc813f9"
+
 /-!
 # Martingales
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne, Kexing Ying
 
 ! This file was ported from Lean 3 source module probability.martingale.basic
-! leanprover-community/mathlib commit ba074af83b6cf54c3104e59402b39410ddbd6dca
+! leanprover-community/mathlib commit f2ad3645af9effcdb587637dc28a6074edc813f9
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Probability.Process.Stopping
 /-!
 # Martingales
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 A family of functions `f : ι → Ω → E` is a martingale with respect to a filtration `ℱ` if every
 `f i` is integrable, `f` is adapted with respect to `ℱ` and for all `i ≤ j`,
 `μ[f j | ℱ i] =ᵐ[μ] f i`. On the other hand, `f : ι → Ω → E` is said to be a supermartingale
Diff
@@ -491,7 +491,7 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Superma
 theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Supermartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
-  rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(-c • f))]
+  rw [← neg_neg c, (by ext i x; simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
 #align measure_theory.supermartingale.smul_nonpos MeasureTheory.Supermartingale.smul_nonpos
 -/
@@ -511,7 +511,7 @@ variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [Complet
 theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
-  rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(c • -f))]
+  rw [← neg_neg c, (by ext i x; simp : - -c • f = -(c • -f))]
   exact supermartingale.neg (hf.neg.smul_nonneg hc)
 #align measure_theory.submartingale.smul_nonneg MeasureTheory.Submartingale.smul_nonneg
 -/
@@ -520,7 +520,7 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submart
 theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Submartingale f ℱ μ) :
     Supermartingale (c • f) ℱ μ :=
   by
-  rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(-c • f))]
+  rw [← neg_neg c, (by ext i x; simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
 #align measure_theory.submartingale.smul_nonpos MeasureTheory.Submartingale.smul_nonpos
 -/
Diff
@@ -50,13 +50,16 @@ namespace MeasureTheory
 variable {Ω E ι : Type _} [Preorder ι] {m0 : MeasurableSpace Ω} {μ : Measure Ω}
   [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {f g : ι → Ω → E} {ℱ : Filtration ι m0}
 
+#print MeasureTheory.Martingale /-
 /-- A family of functions `f : ι → Ω → E` is a martingale with respect to a filtration `ℱ` if `f`
 is adapted with respect to `ℱ` and for all `i ≤ j`, `μ[f j | ℱ i] =ᵐ[μ] f i`. -/
 def Martingale (f : ι → Ω → E) (ℱ : Filtration ι m0)
     (μ : Measure Ω := by exact MeasureTheory.MeasureSpace.volume) : Prop :=
   Adapted ℱ f ∧ ∀ i j, i ≤ j → μ[f j|ℱ i] =ᵐ[μ] f i
 #align measure_theory.martingale MeasureTheory.Martingale
+-/
 
+#print MeasureTheory.Supermartingale /-
 /-- A family of integrable functions `f : ι → Ω → E` is a supermartingale with respect to a
 filtration `ℱ` if `f` is adapted with respect to `ℱ` and for all `i ≤ j`,
 `μ[f j | ℱ.le i] ≤ᵐ[μ] f i`. -/
@@ -64,7 +67,9 @@ def Supermartingale [LE E] (f : ι → Ω → E) (ℱ : Filtration ι m0)
     (μ : Measure Ω := by exact MeasureTheory.MeasureSpace.volume) : Prop :=
   Adapted ℱ f ∧ (∀ i j, i ≤ j → μ[f j|ℱ i] ≤ᵐ[μ] f i) ∧ ∀ i, Integrable (f i) μ
 #align measure_theory.supermartingale MeasureTheory.Supermartingale
+-/
 
+#print MeasureTheory.Submartingale /-
 /-- A family of integrable functions `f : ι → Ω → E` is a submartingale with respect to a
 filtration `ℱ` if `f` is adapted with respect to `ℱ` and for all `i ≤ j`,
 `f i ≤ᵐ[μ] μ[f j | ℱ.le i]`. -/
@@ -72,12 +77,16 @@ def Submartingale [LE E] (f : ι → Ω → E) (ℱ : Filtration ι m0)
     (μ : Measure Ω := by exact MeasureTheory.MeasureSpace.volume) : Prop :=
   Adapted ℱ f ∧ (∀ i j, i ≤ j → f i ≤ᵐ[μ] μ[f j|ℱ i]) ∧ ∀ i, Integrable (f i) μ
 #align measure_theory.submartingale MeasureTheory.Submartingale
+-/
 
+#print MeasureTheory.martingale_const /-
 theorem martingale_const (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ] (x : E) :
     Martingale (fun _ _ => x) ℱ μ :=
   ⟨adapted_const ℱ _, fun i j hij => by rw [condexp_const (ℱ.le _)]⟩
 #align measure_theory.martingale_const MeasureTheory.martingale_const
+-/
 
+#print MeasureTheory.martingale_const_fun /-
 theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ]
     {f : Ω → E} (hf : strongly_measurable[ℱ ⊥] f) (hfint : Integrable f μ) :
     Martingale (fun _ => f) ℱ μ :=
@@ -86,36 +95,48 @@ theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measur
   rw [condexp_of_strongly_measurable (ℱ.le _) (hf.mono <| ℱ.mono bot_le) hfint]
   infer_instance
 #align measure_theory.martingale_const_fun MeasureTheory.martingale_const_fun
+-/
 
 variable (E)
 
+#print MeasureTheory.martingale_zero /-
 theorem martingale_zero (ℱ : Filtration ι m0) (μ : Measure Ω) : Martingale (0 : ι → Ω → E) ℱ μ :=
   ⟨adapted_zero E ℱ, fun i j hij => by rw [Pi.zero_apply, condexp_zero]; simp⟩
 #align measure_theory.martingale_zero MeasureTheory.martingale_zero
+-/
 
 variable {E}
 
 namespace Martingale
 
+#print MeasureTheory.Martingale.adapted /-
 @[protected]
 theorem adapted (hf : Martingale f ℱ μ) : Adapted ℱ f :=
   hf.1
 #align measure_theory.martingale.adapted MeasureTheory.Martingale.adapted
+-/
 
+#print MeasureTheory.Martingale.stronglyMeasurable /-
 @[protected]
 theorem stronglyMeasurable (hf : Martingale f ℱ μ) (i : ι) : strongly_measurable[ℱ i] (f i) :=
   hf.Adapted i
 #align measure_theory.martingale.strongly_measurable MeasureTheory.Martingale.stronglyMeasurable
+-/
 
+#print MeasureTheory.Martingale.condexp_ae_eq /-
 theorem condexp_ae_eq (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j) : μ[f j|ℱ i] =ᵐ[μ] f i :=
   hf.2 i j hij
 #align measure_theory.martingale.condexp_ae_eq MeasureTheory.Martingale.condexp_ae_eq
+-/
 
+#print MeasureTheory.Martingale.integrable /-
 @[protected]
 theorem integrable (hf : Martingale f ℱ μ) (i : ι) : Integrable (f i) μ :=
   integrable_condexp.congr (hf.condexp_ae_eq (le_refl i))
 #align measure_theory.martingale.integrable MeasureTheory.Martingale.integrable
+-/
 
+#print MeasureTheory.Martingale.set_integral_eq /-
 theorem set_integral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
     {s : Set Ω} (hs : measurable_set[ℱ i] s) : ∫ ω in s, f i ω ∂μ = ∫ ω in s, f j ω ∂μ :=
   by
@@ -123,72 +144,98 @@ theorem set_integral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ
   refine' set_integral_congr_ae (ℱ.le i s hs) _
   filter_upwards [hf.2 i j hij] with _ heq _ using HEq.symm
 #align measure_theory.martingale.set_integral_eq MeasureTheory.Martingale.set_integral_eq
+-/
 
+#print MeasureTheory.Martingale.add /-
 theorem add (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f + g) ℱ μ :=
   by
   refine' ⟨hf.adapted.add hg.adapted, fun i j hij => _⟩
   exact (condexp_add (hf.integrable j) (hg.integrable j)).trans ((hf.2 i j hij).add (hg.2 i j hij))
 #align measure_theory.martingale.add MeasureTheory.Martingale.add
+-/
 
+#print MeasureTheory.Martingale.neg /-
 theorem neg (hf : Martingale f ℱ μ) : Martingale (-f) ℱ μ :=
   ⟨hf.Adapted.neg, fun i j hij => (condexp_neg (f j)).trans (hf.2 i j hij).neg⟩
 #align measure_theory.martingale.neg MeasureTheory.Martingale.neg
+-/
 
+#print MeasureTheory.Martingale.sub /-
 theorem sub (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f - g) ℱ μ := by
   rw [sub_eq_add_neg]; exact hf.add hg.neg
 #align measure_theory.martingale.sub MeasureTheory.Martingale.sub
+-/
 
+#print MeasureTheory.Martingale.smul /-
 theorem smul (c : ℝ) (hf : Martingale f ℱ μ) : Martingale (c • f) ℱ μ :=
   by
   refine' ⟨hf.adapted.smul c, fun i j hij => _⟩
   refine' (condexp_smul c (f j)).trans ((hf.2 i j hij).mono fun x hx => _)
   rw [Pi.smul_apply, hx, Pi.smul_apply, Pi.smul_apply]
 #align measure_theory.martingale.smul MeasureTheory.Martingale.smul
+-/
 
+#print MeasureTheory.Martingale.supermartingale /-
 theorem supermartingale [Preorder E] (hf : Martingale f ℱ μ) : Supermartingale f ℱ μ :=
   ⟨hf.1, fun i j hij => (hf.2 i j hij).le, fun i => hf.Integrable i⟩
 #align measure_theory.martingale.supermartingale MeasureTheory.Martingale.supermartingale
+-/
 
+#print MeasureTheory.Martingale.submartingale /-
 theorem submartingale [Preorder E] (hf : Martingale f ℱ μ) : Submartingale f ℱ μ :=
   ⟨hf.1, fun i j hij => (hf.2 i j hij).symm.le, fun i => hf.Integrable i⟩
 #align measure_theory.martingale.submartingale MeasureTheory.Martingale.submartingale
+-/
 
 end Martingale
 
+#print MeasureTheory.martingale_iff /-
 theorem martingale_iff [PartialOrder E] :
     Martingale f ℱ μ ↔ Supermartingale f ℱ μ ∧ Submartingale f ℱ μ :=
   ⟨fun hf => ⟨hf.Supermartingale, hf.Submartingale⟩, fun ⟨hf₁, hf₂⟩ =>
     ⟨hf₁.1, fun i j hij => (hf₁.2.1 i j hij).antisymm (hf₂.2.1 i j hij)⟩⟩
 #align measure_theory.martingale_iff MeasureTheory.martingale_iff
+-/
 
+#print MeasureTheory.martingale_condexp /-
 theorem martingale_condexp (f : Ω → E) (ℱ : Filtration ι m0) (μ : Measure Ω)
     [SigmaFiniteFiltration μ ℱ] : Martingale (fun i => μ[f|ℱ i]) ℱ μ :=
   ⟨fun i => stronglyMeasurable_condexp, fun i j hij => condexp_condexp_of_le (ℱ.mono hij) (ℱ.le j)⟩
 #align measure_theory.martingale_condexp MeasureTheory.martingale_condexp
+-/
 
 namespace Supermartingale
 
+#print MeasureTheory.Supermartingale.adapted /-
 @[protected]
 theorem adapted [LE E] (hf : Supermartingale f ℱ μ) : Adapted ℱ f :=
   hf.1
 #align measure_theory.supermartingale.adapted MeasureTheory.Supermartingale.adapted
+-/
 
+#print MeasureTheory.Supermartingale.stronglyMeasurable /-
 @[protected]
 theorem stronglyMeasurable [LE E] (hf : Supermartingale f ℱ μ) (i : ι) :
     strongly_measurable[ℱ i] (f i) :=
   hf.Adapted i
 #align measure_theory.supermartingale.strongly_measurable MeasureTheory.Supermartingale.stronglyMeasurable
+-/
 
+#print MeasureTheory.Supermartingale.integrable /-
 @[protected]
 theorem integrable [LE E] (hf : Supermartingale f ℱ μ) (i : ι) : Integrable (f i) μ :=
   hf.2.2 i
 #align measure_theory.supermartingale.integrable MeasureTheory.Supermartingale.integrable
+-/
 
+#print MeasureTheory.Supermartingale.condexp_ae_le /-
 theorem condexp_ae_le [LE E] (hf : Supermartingale f ℱ μ) {i j : ι} (hij : i ≤ j) :
     μ[f j|ℱ i] ≤ᵐ[μ] f i :=
   hf.2.1 i j hij
 #align measure_theory.supermartingale.condexp_ae_le MeasureTheory.Supermartingale.condexp_ae_le
+-/
 
+#print MeasureTheory.Supermartingale.set_integral_le /-
 theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Supermartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : measurable_set[ℱ i] s) :
     ∫ ω in s, f j ω ∂μ ≤ ∫ ω in s, f i ω ∂μ :=
@@ -197,7 +244,9 @@ theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (
   refine' set_integral_mono_ae integrable_condexp.integrable_on (hf.integrable i).IntegrableOn _
   filter_upwards [hf.2.1 i j hij] with _ heq using HEq
 #align measure_theory.supermartingale.set_integral_le MeasureTheory.Supermartingale.set_integral_le
+-/
 
+#print MeasureTheory.Supermartingale.add /-
 theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ)
     (hg : Supermartingale g ℱ μ) : Supermartingale (f + g) ℱ μ :=
   by
@@ -207,12 +256,16 @@ theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Superm
   intros
   refine' add_le_add _ _ <;> assumption
 #align measure_theory.supermartingale.add MeasureTheory.Supermartingale.add
+-/
 
+#print MeasureTheory.Supermartingale.add_martingale /-
 theorem add_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
     (hf : Supermartingale f ℱ μ) (hg : Martingale g ℱ μ) : Supermartingale (f + g) ℱ μ :=
   hf.add hg.Supermartingale
 #align measure_theory.supermartingale.add_martingale MeasureTheory.Supermartingale.add_martingale
+-/
 
+#print MeasureTheory.Supermartingale.neg /-
 theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ) :
     Submartingale (-f) ℱ μ :=
   by
@@ -221,32 +274,42 @@ theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Superm
   filter_upwards [hf.2.1 i j hij] with _ _
   simpa
 #align measure_theory.supermartingale.neg MeasureTheory.Supermartingale.neg
+-/
 
 end Supermartingale
 
 namespace Submartingale
 
+#print MeasureTheory.Submartingale.adapted /-
 @[protected]
 theorem adapted [LE E] (hf : Submartingale f ℱ μ) : Adapted ℱ f :=
   hf.1
 #align measure_theory.submartingale.adapted MeasureTheory.Submartingale.adapted
+-/
 
+#print MeasureTheory.Submartingale.stronglyMeasurable /-
 @[protected]
 theorem stronglyMeasurable [LE E] (hf : Submartingale f ℱ μ) (i : ι) :
     strongly_measurable[ℱ i] (f i) :=
   hf.Adapted i
 #align measure_theory.submartingale.strongly_measurable MeasureTheory.Submartingale.stronglyMeasurable
+-/
 
+#print MeasureTheory.Submartingale.integrable /-
 @[protected]
 theorem integrable [LE E] (hf : Submartingale f ℱ μ) (i : ι) : Integrable (f i) μ :=
   hf.2.2 i
 #align measure_theory.submartingale.integrable MeasureTheory.Submartingale.integrable
+-/
 
+#print MeasureTheory.Submartingale.ae_le_condexp /-
 theorem ae_le_condexp [LE E] (hf : Submartingale f ℱ μ) {i j : ι} (hij : i ≤ j) :
     f i ≤ᵐ[μ] μ[f j|ℱ i] :=
   hf.2.1 i j hij
 #align measure_theory.submartingale.ae_le_condexp MeasureTheory.Submartingale.ae_le_condexp
+-/
 
+#print MeasureTheory.Submartingale.add /-
 theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
     (hg : Submartingale g ℱ μ) : Submartingale (f + g) ℱ μ :=
   by
@@ -256,12 +319,16 @@ theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submar
   intros
   refine' add_le_add _ _ <;> assumption
 #align measure_theory.submartingale.add MeasureTheory.Submartingale.add
+-/
 
+#print MeasureTheory.Submartingale.add_martingale /-
 theorem add_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
     (hg : Martingale g ℱ μ) : Submartingale (f + g) ℱ μ :=
   hf.add hg.Submartingale
 #align measure_theory.submartingale.add_martingale MeasureTheory.Submartingale.add_martingale
+-/
 
+#print MeasureTheory.Submartingale.neg /-
 theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ) :
     Supermartingale (-f) ℱ μ :=
   by
@@ -269,7 +336,9 @@ theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submar
   filter_upwards [hf.2.1 i j hij] with _ _
   simpa
 #align measure_theory.submartingale.neg MeasureTheory.Submartingale.neg
+-/
 
+#print MeasureTheory.Submartingale.set_integral_le /-
 /-- The converse of this lemma is `measure_theory.submartingale_of_set_integral_le`. -/
 theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : measurable_set[ℱ i] s) :
@@ -278,17 +347,23 @@ theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (
   rw [← neg_le_neg_iff, ← integral_neg, ← integral_neg]
   exact supermartingale.set_integral_le hf.neg hij hs
 #align measure_theory.submartingale.set_integral_le MeasureTheory.Submartingale.set_integral_le
+-/
 
+#print MeasureTheory.Submartingale.sub_supermartingale /-
 theorem sub_supermartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
     (hf : Submartingale f ℱ μ) (hg : Supermartingale g ℱ μ) : Submartingale (f - g) ℱ μ := by
   rw [sub_eq_add_neg]; exact hf.add hg.neg
 #align measure_theory.submartingale.sub_supermartingale MeasureTheory.Submartingale.sub_supermartingale
+-/
 
+#print MeasureTheory.Submartingale.sub_martingale /-
 theorem sub_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
     (hg : Martingale g ℱ μ) : Submartingale (f - g) ℱ μ :=
   hf.sub_supermartingale hg.Supermartingale
 #align measure_theory.submartingale.sub_martingale MeasureTheory.Submartingale.sub_martingale
+-/
 
+#print MeasureTheory.Submartingale.sup /-
 protected theorem sup {f g : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) (hg : Submartingale g ℱ μ) :
     Submartingale (f ⊔ g) ℱ μ :=
   by
@@ -307,15 +382,19 @@ protected theorem sup {f g : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) (h
         (condexp_mono (hg.integrable _) (integrable.sup (hf.integrable j) (hg.integrable j))
           (eventually_of_forall fun x => le_max_right _ _))
 #align measure_theory.submartingale.sup MeasureTheory.Submartingale.sup
+-/
 
+#print MeasureTheory.Submartingale.pos /-
 protected theorem pos {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) : Submartingale (f⁺) ℱ μ :=
   hf.sup (martingale_zero _ _ _).Submartingale
 #align measure_theory.submartingale.pos MeasureTheory.Submartingale.pos
+-/
 
 end Submartingale
 
 section Submartingale
 
+#print MeasureTheory.submartingale_of_set_integral_le /-
 theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
@@ -337,7 +416,9 @@ theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω →
     integral_sub' integrable_condexp.integrable_on (hint i).IntegrableOn, sub_nonneg,
     set_integral_condexp (ℱ.le i) (hint j) hs]
 #align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_set_integral_le
+-/
 
+#print MeasureTheory.submartingale_of_condexp_sub_nonneg /-
 theorem submartingale_of_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]) :
     Submartingale f ℱ μ := by
@@ -346,7 +427,9 @@ theorem submartingale_of_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω
   exact eventually_le.trans (hf i j hij) (condexp_sub (hint _) (hint _)).le
   infer_instance
 #align measure_theory.submartingale_of_condexp_sub_nonneg MeasureTheory.submartingale_of_condexp_sub_nonneg
+-/
 
+#print MeasureTheory.Submartingale.condexp_sub_nonneg /-
 theorem Submartingale.condexp_sub_nonneg {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) {i j : ι}
     (hij : i ≤ j) : 0 ≤ᵐ[μ] μ[f j - f i|ℱ i] :=
   by
@@ -358,33 +441,41 @@ theorem Submartingale.condexp_sub_nonneg {f : ι → Ω → ℝ} (hf : Submartin
   · exact hf.2.1 i j hij
   · exact h
 #align measure_theory.submartingale.condexp_sub_nonneg MeasureTheory.Submartingale.condexp_sub_nonneg
+-/
 
+#print MeasureTheory.submartingale_iff_condexp_sub_nonneg /-
 theorem submartingale_iff_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} :
     Submartingale f ℱ μ ↔
       Adapted ℱ f ∧ (∀ i, Integrable (f i) μ) ∧ ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i] :=
   ⟨fun h => ⟨h.Adapted, h.Integrable, fun i j => h.condexp_sub_nonneg⟩, fun ⟨hadp, hint, h⟩ =>
     submartingale_of_condexp_sub_nonneg hadp hint h⟩
 #align measure_theory.submartingale_iff_condexp_sub_nonneg MeasureTheory.submartingale_iff_condexp_sub_nonneg
+-/
 
 end Submartingale
 
 namespace Supermartingale
 
+#print MeasureTheory.Supermartingale.sub_submartingale /-
 theorem sub_submartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
     (hf : Supermartingale f ℱ μ) (hg : Submartingale g ℱ μ) : Supermartingale (f - g) ℱ μ := by
   rw [sub_eq_add_neg]; exact hf.add hg.neg
 #align measure_theory.supermartingale.sub_submartingale MeasureTheory.Supermartingale.sub_submartingale
+-/
 
+#print MeasureTheory.Supermartingale.sub_martingale /-
 theorem sub_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
     (hf : Supermartingale f ℱ μ) (hg : Martingale g ℱ μ) : Supermartingale (f - g) ℱ μ :=
   hf.sub_submartingale hg.Submartingale
 #align measure_theory.supermartingale.sub_martingale MeasureTheory.Supermartingale.sub_martingale
+-/
 
 section
 
 variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
   [OrderedSMul ℝ F]
 
+#print MeasureTheory.Supermartingale.smul_nonneg /-
 theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Supermartingale f ℱ μ) :
     Supermartingale (c • f) ℱ μ :=
   by
@@ -394,13 +485,16 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Superma
   simp_rw [Pi.smul_apply]
   exact smul_le_smul_of_nonneg hle hc
 #align measure_theory.supermartingale.smul_nonneg MeasureTheory.Supermartingale.smul_nonneg
+-/
 
+#print MeasureTheory.Supermartingale.smul_nonpos /-
 theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Supermartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
   rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
 #align measure_theory.supermartingale.smul_nonpos MeasureTheory.Supermartingale.smul_nonpos
+-/
 
 end
 
@@ -413,19 +507,23 @@ section
 variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
   [OrderedSMul ℝ F]
 
+#print MeasureTheory.Submartingale.smul_nonneg /-
 theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
   rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(c • -f))]
   exact supermartingale.neg (hf.neg.smul_nonneg hc)
 #align measure_theory.submartingale.smul_nonneg MeasureTheory.Submartingale.smul_nonneg
+-/
 
+#print MeasureTheory.Submartingale.smul_nonpos /-
 theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Submartingale f ℱ μ) :
     Supermartingale (c • f) ℱ μ :=
   by
   rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
 #align measure_theory.submartingale.smul_nonpos MeasureTheory.Submartingale.smul_nonpos
+-/
 
 end
 
@@ -435,6 +533,7 @@ section Nat
 
 variable {𝒢 : Filtration ℕ m0}
 
+#print MeasureTheory.submartingale_of_set_integral_le_succ /-
 theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
@@ -445,7 +544,9 @@ theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ →
   · exact le_rfl
   · exact le_trans hk₂ (hf k s (𝒢.mono hk₁ _ hs))
 #align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_set_integral_le_succ
+-/
 
+#print MeasureTheory.supermartingale_of_set_integral_succ_le /-
 theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f (i + 1) ω ∂μ ≤ ∫ ω in s, f i ω ∂μ) :
@@ -454,7 +555,9 @@ theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ 
   refine' (submartingale_of_set_integral_le_succ hadp.neg (fun i => (hint i).neg) _).neg
   simpa only [integral_neg, Pi.neg_apply, neg_le_neg_iff]
 #align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_set_integral_succ_le
+-/
 
+#print MeasureTheory.martingale_of_set_integral_eq_succ /-
 theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f i ω ∂μ = ∫ ω in s, f (i + 1) ω ∂μ) :
@@ -463,7 +566,9 @@ theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω
     ⟨supermartingale_of_set_integral_succ_le hadp hint fun i s hs => (hf i s hs).ge,
       submartingale_of_set_integral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
 #align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_set_integral_eq_succ
+-/
 
+#print MeasureTheory.submartingale_nat /-
 theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i ≤ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
@@ -473,7 +578,9 @@ theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp :
   rw [this]
   exact set_integral_mono_ae (hint i).IntegrableOn integrable_condexp.integrable_on (hf i)
 #align measure_theory.submartingale_nat MeasureTheory.submartingale_nat
+-/
 
+#print MeasureTheory.supermartingale_nat /-
 theorem supermartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, μ[f (i + 1)|𝒢 i] ≤ᵐ[μ] f i) :
     Supermartingale f 𝒢 μ := by
@@ -483,14 +590,18 @@ theorem supermartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp
         eventually_le.trans _ (condexp_neg _).symm.le).neg
   filter_upwards [hf i] with x hx using neg_le_neg hx
 #align measure_theory.supermartingale_nat MeasureTheory.supermartingale_nat
+-/
 
+#print MeasureTheory.martingale_nat /-
 theorem martingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i =ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Martingale f 𝒢 μ :=
   martingale_iff.2
     ⟨supermartingale_nat hadp hint fun i => (hf i).symm.le,
       submartingale_nat hadp hint fun i => (hf i).le⟩
 #align measure_theory.martingale_nat MeasureTheory.martingale_nat
+-/
 
+#print MeasureTheory.submartingale_of_condexp_sub_nonneg_nat /-
 theorem submartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, 0 ≤ᵐ[μ] μ[f (i + 1) - f i|𝒢 i]) : Submartingale f 𝒢 μ :=
@@ -500,7 +611,9 @@ theorem submartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ 
   exact eventually_le.trans (hf i) (condexp_sub (hint _) (hint _)).le
   infer_instance
 #align measure_theory.submartingale_of_condexp_sub_nonneg_nat MeasureTheory.submartingale_of_condexp_sub_nonneg_nat
+-/
 
+#print MeasureTheory.supermartingale_of_condexp_sub_nonneg_nat /-
 theorem supermartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, 0 ≤ᵐ[μ] μ[f i - f (i + 1)|𝒢 i]) : Supermartingale f 𝒢 μ :=
@@ -509,7 +622,9 @@ theorem supermartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ
   refine' (submartingale_of_condexp_sub_nonneg_nat hadp.neg (fun i => (hint i).neg) _).neg
   simpa only [Pi.zero_apply, Pi.neg_apply, neg_sub_neg]
 #align measure_theory.supermartingale_of_condexp_sub_nonneg_nat MeasureTheory.supermartingale_of_condexp_sub_nonneg_nat
+-/
 
+#print MeasureTheory.martingale_of_condexp_sub_eq_zero_nat /-
 theorem martingale_of_condexp_sub_eq_zero_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) : Martingale f 𝒢 μ :=
@@ -523,7 +638,9 @@ theorem martingale_of_condexp_sub_eq_zero_nat [IsFiniteMeasure μ] {f : ℕ →
   filter_upwards [hf i] with x hx
   simpa only [Pi.zero_apply, Pi.neg_apply, zero_eq_neg]
 #align measure_theory.martingale_of_condexp_sub_eq_zero_nat MeasureTheory.martingale_of_condexp_sub_eq_zero_nat
+-/
 
+#print MeasureTheory.Submartingale.zero_le_of_predictable /-
 -- Note that one cannot use `submartingale.zero_le_of_predictable` to prove the other two
 -- corresponding lemmas without imposing more restrictions to the ordering of `E`
 /-- A predictable submartingale is a.e. greater equal than its initial state. -/
@@ -540,7 +657,9 @@ theorem Submartingale.zero_le_of_predictable [Preorder E] [SigmaFiniteFiltration
             congr_arg coe <|
               condexp_of_strongly_measurable (𝒢.le _) (hfadp _) <| hfmgle.integrable _)
 #align measure_theory.submartingale.zero_le_of_predictable MeasureTheory.Submartingale.zero_le_of_predictable
+-/
 
+#print MeasureTheory.Supermartingale.le_zero_of_predictable /-
 /-- A predictable supermartingale is a.e. less equal than its initial state. -/
 theorem Supermartingale.le_zero_of_predictable [Preorder E] [SigmaFiniteFiltration μ 𝒢]
     {f : ℕ → Ω → E} (hfmgle : Supermartingale f 𝒢 μ) (hfadp : Adapted 𝒢 fun n => f (n + 1))
@@ -556,7 +675,9 @@ theorem Supermartingale.le_zero_of_predictable [Preorder E] [SigmaFiniteFiltrati
             (hfmgle.2.1 k (k + 1) k.le_succ)).trans
         ih
 #align measure_theory.supermartingale.le_zero_of_predictable MeasureTheory.Supermartingale.le_zero_of_predictable
+-/
 
+#print MeasureTheory.Martingale.eq_zero_of_predictable /-
 /-- A predictable martingale is a.e. equal to its initial state. -/
 theorem Martingale.eq_zero_of_predictable [SigmaFiniteFiltration μ 𝒢] {f : ℕ → Ω → E}
     (hfmgle : Martingale f 𝒢 μ) (hfadp : Adapted 𝒢 fun n => f (n + 1)) (n : ℕ) : f n =ᵐ[μ] f 0 :=
@@ -572,17 +693,21 @@ theorem Martingale.eq_zero_of_predictable [SigmaFiniteFiltration μ 𝒢] {f : 
             (hfmgle.2 k (k + 1) k.le_succ)).trans
         ih
 #align measure_theory.martingale.eq_zero_of_predictable MeasureTheory.Martingale.eq_zero_of_predictable
+-/
 
 namespace Submartingale
 
+#print MeasureTheory.Submartingale.integrable_stoppedValue /-
 @[protected]
 theorem integrable_stoppedValue [LE E] {f : ℕ → Ω → E} (hf : Submartingale f 𝒢 μ) {τ : Ω → ℕ}
     (hτ : IsStoppingTime 𝒢 τ) {N : ℕ} (hbdd : ∀ ω, τ ω ≤ N) : Integrable (stoppedValue f τ) μ :=
   integrable_stoppedValue ℕ hτ hf.Integrable hbdd
 #align measure_theory.submartingale.integrable_stopped_value MeasureTheory.Submartingale.integrable_stoppedValue
+-/
 
 end Submartingale
 
+#print MeasureTheory.Submartingale.sum_mul_sub /-
 theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
     (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 ξ) (hbdd : ∀ n ω, ξ n ω ≤ R)
     (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
@@ -615,7 +740,9 @@ theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ →
               hξ.strongly_measurable.ae_strongly_measurable (hξbdd _))
             ((hf.integrable _).sub (hf.integrable _))).symm.le
 #align measure_theory.submartingale.sum_mul_sub MeasureTheory.Submartingale.sum_mul_sub
+-/
 
+#print MeasureTheory.Submartingale.sum_mul_sub' /-
 /-- Given a discrete submartingale `f` and a predictable process `ξ` (i.e. `ξ (n + 1)` is adapted)
 the process defined by `λ n, ∑ k in finset.range n, ξ (k + 1) * (f (k + 1) - f k)` is also a
 submartingale. -/
@@ -625,6 +752,7 @@ theorem Submartingale.sum_mul_sub' [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ 
     Submartingale (fun n => ∑ k in Finset.range n, ξ (k + 1) * (f (k + 1) - f k)) 𝒢 μ :=
   hf.sum_mul_sub hξ (fun n => hbdd _) fun n => hnonneg _
 #align measure_theory.submartingale.sum_mul_sub' MeasureTheory.Submartingale.sum_mul_sub'
+-/
 
 end Nat
 
Diff
@@ -117,7 +117,7 @@ theorem integrable (hf : Martingale f ℱ μ) (i : ι) : Integrable (f i) μ :=
 #align measure_theory.martingale.integrable MeasureTheory.Martingale.integrable
 
 theorem set_integral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
-    {s : Set Ω} (hs : measurable_set[ℱ i] s) : (∫ ω in s, f i ω ∂μ) = ∫ ω in s, f j ω ∂μ :=
+    {s : Set Ω} (hs : measurable_set[ℱ i] s) : ∫ ω in s, f i ω ∂μ = ∫ ω in s, f j ω ∂μ :=
   by
   rw [← @set_integral_condexp _ _ _ _ _ (ℱ i) m0 _ _ _ (ℱ.le i) _ (hf.integrable j) hs]
   refine' set_integral_congr_ae (ℱ.le i s hs) _
@@ -191,7 +191,7 @@ theorem condexp_ae_le [LE E] (hf : Supermartingale f ℱ μ) {i j : ι} (hij : i
 
 theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Supermartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : measurable_set[ℱ i] s) :
-    (∫ ω in s, f j ω ∂μ) ≤ ∫ ω in s, f i ω ∂μ :=
+    ∫ ω in s, f j ω ∂μ ≤ ∫ ω in s, f i ω ∂μ :=
   by
   rw [← set_integral_condexp (ℱ.le i) (hf.integrable j) hs]
   refine' set_integral_mono_ae integrable_condexp.integrable_on (hf.integrable i).IntegrableOn _
@@ -273,7 +273,7 @@ theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submar
 /-- The converse of this lemma is `measure_theory.submartingale_of_set_integral_le`. -/
 theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : measurable_set[ℱ i] s) :
-    (∫ ω in s, f i ω ∂μ) ≤ ∫ ω in s, f j ω ∂μ :=
+    ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f j ω ∂μ :=
   by
   rw [← neg_le_neg_iff, ← integral_neg, ← integral_neg]
   exact supermartingale.set_integral_le hf.neg hij hs
@@ -320,7 +320,7 @@ theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω →
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i j : ι,
-        i ≤ j → ∀ s : Set Ω, measurable_set[ℱ i] s → (∫ ω in s, f i ω ∂μ) ≤ ∫ ω in s, f j ω ∂μ) :
+        i ≤ j → ∀ s : Set Ω, measurable_set[ℱ i] s → ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f j ω ∂μ) :
     Submartingale f ℱ μ := by
   refine' ⟨hadp, fun i j hij => _, hint⟩
   suffices f i ≤ᵐ[μ.trim (ℱ.le i)] μ[f j|ℱ i] by exact ae_le_of_ae_le_trim this
@@ -437,8 +437,7 @@ variable {𝒢 : Filtration ℕ m0}
 
 theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
-    (hf :
-      ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
+    (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
     Submartingale f 𝒢 μ :=
   by
   refine' submartingale_of_set_integral_le hadp hint fun i j hij s hs => _
@@ -449,8 +448,7 @@ theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ →
 
 theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
-    (hf :
-      ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f (i + 1) ω ∂μ) ≤ ∫ ω in s, f i ω ∂μ) :
+    (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f (i + 1) ω ∂μ ≤ ∫ ω in s, f i ω ∂μ) :
     Supermartingale f 𝒢 μ := by
   rw [← neg_neg f]
   refine' (submartingale_of_set_integral_le_succ hadp.neg (fun i => (hint i).neg) _).neg
@@ -459,8 +457,7 @@ theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ 
 
 theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ)
-    (hf :
-      ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) = ∫ ω in s, f (i + 1) ω ∂μ) :
+    (hf : ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → ∫ ω in s, f i ω ∂μ = ∫ ω in s, f (i + 1) ω ∂μ) :
     Martingale f 𝒢 μ :=
   martingale_iff.2
     ⟨supermartingale_of_set_integral_succ_le hadp hint fun i s hs => (hf i s hs).ge,
@@ -471,7 +468,7 @@ theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp :
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i ≤ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
   refine' submartingale_of_set_integral_le_succ hadp hint fun i s hs => _
-  have : (∫ ω in s, f (i + 1) ω ∂μ) = ∫ ω in s, (μ[f (i + 1)|𝒢 i]) ω ∂μ :=
+  have : ∫ ω in s, f (i + 1) ω ∂μ = ∫ ω in s, (μ[f (i + 1)|𝒢 i]) ω ∂μ :=
     (set_integral_condexp (𝒢.le i) (hint _) hs).symm
   rw [this]
   exact set_integral_mono_ae (hint i).IntegrableOn integrable_condexp.integrable_on (hf i)
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne, Kexing Ying
 
 ! This file was ported from Lean 3 source module probability.martingale.basic
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit ba074af83b6cf54c3104e59402b39410ddbd6dca
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -391,7 +391,7 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Superma
   refine' ⟨hf.1.smul c, fun i j hij => _, fun i => (hf.2.2 i).smul c⟩
   refine' (condexp_smul c (f j)).le.trans _
   filter_upwards [hf.2.1 i j hij] with _ hle
-  simp
+  simp_rw [Pi.smul_apply]
   exact smul_le_smul_of_nonneg hle hc
 #align measure_theory.supermartingale.smul_nonneg MeasureTheory.Supermartingale.smul_nonneg
 
Diff
@@ -73,12 +73,12 @@ def Submartingale [LE E] (f : ι → Ω → E) (ℱ : Filtration ι m0)
   Adapted ℱ f ∧ (∀ i j, i ≤ j → f i ≤ᵐ[μ] μ[f j|ℱ i]) ∧ ∀ i, Integrable (f i) μ
 #align measure_theory.submartingale MeasureTheory.Submartingale
 
-theorem martingale_const (ℱ : Filtration ι m0) (μ : Measure Ω) [FiniteMeasure μ] (x : E) :
+theorem martingale_const (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ] (x : E) :
     Martingale (fun _ _ => x) ℱ μ :=
   ⟨adapted_const ℱ _, fun i j hij => by rw [condexp_const (ℱ.le _)]⟩
 #align measure_theory.martingale_const MeasureTheory.martingale_const
 
-theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measure Ω) [FiniteMeasure μ]
+theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ]
     {f : Ω → E} (hf : strongly_measurable[ℱ ⊥] f) (hfint : Integrable f μ) :
     Martingale (fun _ => f) ℱ μ :=
   by
@@ -121,7 +121,7 @@ theorem set_integral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ
   by
   rw [← @set_integral_condexp _ _ _ _ _ (ℱ i) m0 _ _ _ (ℱ.le i) _ (hf.integrable j) hs]
   refine' set_integral_congr_ae (ℱ.le i s hs) _
-  filter_upwards [hf.2 i j hij]with _ heq _ using HEq.symm
+  filter_upwards [hf.2 i j hij] with _ heq _ using HEq.symm
 #align measure_theory.martingale.set_integral_eq MeasureTheory.Martingale.set_integral_eq
 
 theorem add (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f + g) ℱ μ :=
@@ -195,7 +195,7 @@ theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (
   by
   rw [← set_integral_condexp (ℱ.le i) (hf.integrable j) hs]
   refine' set_integral_mono_ae integrable_condexp.integrable_on (hf.integrable i).IntegrableOn _
-  filter_upwards [hf.2.1 i j hij]with _ heq using HEq
+  filter_upwards [hf.2.1 i j hij] with _ heq using HEq
 #align measure_theory.supermartingale.set_integral_le MeasureTheory.Supermartingale.set_integral_le
 
 theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ)
@@ -218,7 +218,7 @@ theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Superm
   by
   refine' ⟨hf.1.neg, fun i j hij => _, fun i => (hf.2.2 i).neg⟩
   refine' eventually_le.trans _ (condexp_neg (f j)).symm.le
-  filter_upwards [hf.2.1 i j hij]with _ _
+  filter_upwards [hf.2.1 i j hij] with _ _
   simpa
 #align measure_theory.supermartingale.neg MeasureTheory.Supermartingale.neg
 
@@ -266,7 +266,7 @@ theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submar
     Supermartingale (-f) ℱ μ :=
   by
   refine' ⟨hf.1.neg, fun i j hij => (condexp_neg (f j)).le.trans _, fun i => (hf.2.2 i).neg⟩
-  filter_upwards [hf.2.1 i j hij]with _ _
+  filter_upwards [hf.2.1 i j hij] with _ _
   simpa
 #align measure_theory.submartingale.neg MeasureTheory.Submartingale.neg
 
@@ -316,7 +316,7 @@ end Submartingale
 
 section Submartingale
 
-theorem submartingale_of_set_integral_le [FiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i j : ι,
@@ -326,7 +326,7 @@ theorem submartingale_of_set_integral_le [FiniteMeasure μ] {f : ι → Ω → 
   suffices f i ≤ᵐ[μ.trim (ℱ.le i)] μ[f j|ℱ i] by exact ae_le_of_ae_le_trim this
   suffices 0 ≤ᵐ[μ.trim (ℱ.le i)] μ[f j|ℱ i] - f i
     by
-    filter_upwards [this]with x hx
+    filter_upwards [this] with x hx
     rwa [← sub_nonneg]
   refine'
     ae_nonneg_of_forall_set_integral_nonneg
@@ -338,7 +338,7 @@ theorem submartingale_of_set_integral_le [FiniteMeasure μ] {f : ι → Ω → 
     set_integral_condexp (ℱ.le i) (hint j) hs]
 #align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_set_integral_le
 
-theorem submartingale_of_condexp_sub_nonneg [FiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+theorem submartingale_of_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]) :
     Submartingale f ℱ μ := by
   refine' ⟨hadp, fun i j hij => _, hint⟩
@@ -359,7 +359,7 @@ theorem Submartingale.condexp_sub_nonneg {f : ι → Ω → ℝ} (hf : Submartin
   · exact h
 #align measure_theory.submartingale.condexp_sub_nonneg MeasureTheory.Submartingale.condexp_sub_nonneg
 
-theorem submartingale_iff_condexp_sub_nonneg [FiniteMeasure μ] {f : ι → Ω → ℝ} :
+theorem submartingale_iff_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} :
     Submartingale f ℱ μ ↔
       Adapted ℱ f ∧ (∀ i, Integrable (f i) μ) ∧ ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i] :=
   ⟨fun h => ⟨h.Adapted, h.Integrable, fun i j => h.condexp_sub_nonneg⟩, fun ⟨hadp, hint, h⟩ =>
@@ -390,7 +390,7 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Superma
   by
   refine' ⟨hf.1.smul c, fun i j hij => _, fun i => (hf.2.2 i).smul c⟩
   refine' (condexp_smul c (f j)).le.trans _
-  filter_upwards [hf.2.1 i j hij]with _ hle
+  filter_upwards [hf.2.1 i j hij] with _ hle
   simp
   exact smul_le_smul_of_nonneg hle hc
 #align measure_theory.supermartingale.smul_nonneg MeasureTheory.Supermartingale.smul_nonneg
@@ -435,8 +435,8 @@ section Nat
 
 variable {𝒢 : Filtration ℕ m0}
 
-theorem submartingale_of_set_integral_le_succ [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
-    (hint : ∀ i, Integrable (f i) μ)
+theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
     Submartingale f 𝒢 μ :=
@@ -447,7 +447,7 @@ theorem submartingale_of_set_integral_le_succ [FiniteMeasure μ] {f : ℕ → Ω
   · exact le_trans hk₂ (hf k s (𝒢.mono hk₁ _ hs))
 #align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_set_integral_le_succ
 
-theorem supermartingale_of_set_integral_succ_le [FiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f (i + 1) ω ∂μ) ≤ ∫ ω in s, f i ω ∂μ) :
@@ -457,7 +457,7 @@ theorem supermartingale_of_set_integral_succ_le [FiniteMeasure μ] {f : ℕ →
   simpa only [integral_neg, Pi.neg_apply, neg_le_neg_iff]
 #align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_set_integral_succ_le
 
-theorem martingale_of_set_integral_eq_succ [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) = ∫ ω in s, f (i + 1) ω ∂μ) :
@@ -467,7 +467,7 @@ theorem martingale_of_set_integral_eq_succ [FiniteMeasure μ] {f : ℕ → Ω 
       submartingale_of_set_integral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
 #align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_set_integral_eq_succ
 
-theorem submartingale_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i ≤ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
   refine' submartingale_of_set_integral_le_succ hadp hint fun i s hs => _
@@ -477,24 +477,24 @@ theorem submartingale_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Ad
   exact set_integral_mono_ae (hint i).IntegrableOn integrable_condexp.integrable_on (hf i)
 #align measure_theory.submartingale_nat MeasureTheory.submartingale_nat
 
-theorem supermartingale_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem supermartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, μ[f (i + 1)|𝒢 i] ≤ᵐ[μ] f i) :
     Supermartingale f 𝒢 μ := by
   rw [← neg_neg f]
   refine'
     (submartingale_nat hadp.neg (fun i => (hint i).neg) fun i =>
         eventually_le.trans _ (condexp_neg _).symm.le).neg
-  filter_upwards [hf i]with x hx using neg_le_neg hx
+  filter_upwards [hf i] with x hx using neg_le_neg hx
 #align measure_theory.supermartingale_nat MeasureTheory.supermartingale_nat
 
-theorem martingale_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem martingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i =ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Martingale f 𝒢 μ :=
   martingale_iff.2
     ⟨supermartingale_nat hadp hint fun i => (hf i).symm.le,
       submartingale_nat hadp hint fun i => (hf i).le⟩
 #align measure_theory.martingale_nat MeasureTheory.martingale_nat
 
-theorem submartingale_of_condexp_sub_nonneg_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem submartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, 0 ≤ᵐ[μ] μ[f (i + 1) - f i|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
@@ -504,7 +504,7 @@ theorem submartingale_of_condexp_sub_nonneg_nat [FiniteMeasure μ] {f : ℕ →
   infer_instance
 #align measure_theory.submartingale_of_condexp_sub_nonneg_nat MeasureTheory.submartingale_of_condexp_sub_nonneg_nat
 
-theorem supermartingale_of_condexp_sub_nonneg_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem supermartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, 0 ≤ᵐ[μ] μ[f i - f (i + 1)|𝒢 i]) : Supermartingale f 𝒢 μ :=
   by
@@ -513,9 +513,9 @@ theorem supermartingale_of_condexp_sub_nonneg_nat [FiniteMeasure μ] {f : ℕ 
   simpa only [Pi.zero_apply, Pi.neg_apply, neg_sub_neg]
 #align measure_theory.supermartingale_of_condexp_sub_nonneg_nat MeasureTheory.supermartingale_of_condexp_sub_nonneg_nat
 
-theorem martingale_of_condexp_sub_eq_zero_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
-    (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) :
-    Martingale f 𝒢 μ :=
+theorem martingale_of_condexp_sub_eq_zero_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
+    (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) : Martingale f 𝒢 μ :=
   by
   refine'
     martingale_iff.2
@@ -523,7 +523,7 @@ theorem martingale_of_condexp_sub_eq_zero_nat [FiniteMeasure μ] {f : ℕ → Ω
         submartingale_of_condexp_sub_nonneg_nat hadp hint fun i => (hf i).symm.le⟩
   rw [← neg_sub]
   refine' (eventually_eq.trans _ (condexp_neg _).symm).le
-  filter_upwards [hf i]with x hx
+  filter_upwards [hf i] with x hx
   simpa only [Pi.zero_apply, Pi.neg_apply, zero_eq_neg]
 #align measure_theory.martingale_of_condexp_sub_eq_zero_nat MeasureTheory.martingale_of_condexp_sub_eq_zero_nat
 
@@ -586,7 +586,7 @@ theorem integrable_stoppedValue [LE E] {f : ℕ → Ω → E} (hf : Submartingal
 
 end Submartingale
 
-theorem Submartingale.sum_mul_sub [FiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
+theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
     (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 ξ) (hbdd : ∀ n ω, ξ n ω ≤ R)
     (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
     Submartingale (fun n => ∑ k in Finset.range n, ξ k * (f (k + 1) - f k)) 𝒢 μ :=
@@ -622,7 +622,7 @@ theorem Submartingale.sum_mul_sub [FiniteMeasure μ] {R : ℝ} {ξ f : ℕ → 
 /-- Given a discrete submartingale `f` and a predictable process `ξ` (i.e. `ξ (n + 1)` is adapted)
 the process defined by `λ n, ∑ k in finset.range n, ξ (k + 1) * (f (k + 1) - f k)` is also a
 submartingale. -/
-theorem Submartingale.sum_mul_sub' [FiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
+theorem Submartingale.sum_mul_sub' [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
     (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 fun n => ξ (n + 1)) (hbdd : ∀ n ω, ξ n ω ≤ R)
     (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
     Submartingale (fun n => ∑ k in Finset.range n, ξ (k + 1) * (f (k + 1) - f k)) 𝒢 μ :=
Diff
@@ -601,7 +601,7 @@ theorem Submartingale.sum_mul_sub [FiniteMeasure μ] {R : ℝ} {ξ f : ℕ → 
     by
     intro m
     refine' Finset.stronglyMeasurable_sum' _ fun i hi => _
-    rw [Finset.mem_range] at hi
+    rw [Finset.mem_range] at hi 
     exact
       (hξ.strongly_measurable_le hi.le).mul
         ((hf.adapted.strongly_measurable_le (Nat.succ_le_of_lt hi)).sub
Diff
@@ -43,7 +43,7 @@ The definitions of filtration and adapted can be found in `probability.stopping`
 
 open TopologicalSpace Filter
 
-open NNReal ENNReal MeasureTheory ProbabilityTheory BigOperators
+open scoped NNReal ENNReal MeasureTheory ProbabilityTheory BigOperators
 
 namespace MeasureTheory
 
Diff
@@ -90,10 +90,7 @@ theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measur
 variable (E)
 
 theorem martingale_zero (ℱ : Filtration ι m0) (μ : Measure Ω) : Martingale (0 : ι → Ω → E) ℱ μ :=
-  ⟨adapted_zero E ℱ, fun i j hij =>
-    by
-    rw [Pi.zero_apply, condexp_zero]
-    simp⟩
+  ⟨adapted_zero E ℱ, fun i j hij => by rw [Pi.zero_apply, condexp_zero]; simp⟩
 #align measure_theory.martingale_zero MeasureTheory.martingale_zero
 
 variable {E}
@@ -137,10 +134,8 @@ theorem neg (hf : Martingale f ℱ μ) : Martingale (-f) ℱ μ :=
   ⟨hf.Adapted.neg, fun i j hij => (condexp_neg (f j)).trans (hf.2 i j hij).neg⟩
 #align measure_theory.martingale.neg MeasureTheory.Martingale.neg
 
-theorem sub (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f - g) ℱ μ :=
-  by
-  rw [sub_eq_add_neg]
-  exact hf.add hg.neg
+theorem sub (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f - g) ℱ μ := by
+  rw [sub_eq_add_neg]; exact hf.add hg.neg
 #align measure_theory.martingale.sub MeasureTheory.Martingale.sub
 
 theorem smul (c : ℝ) (hf : Martingale f ℱ μ) : Martingale (c • f) ℱ μ :=
@@ -285,10 +280,8 @@ theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (
 #align measure_theory.submartingale.set_integral_le MeasureTheory.Submartingale.set_integral_le
 
 theorem sub_supermartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
-    (hf : Submartingale f ℱ μ) (hg : Supermartingale g ℱ μ) : Submartingale (f - g) ℱ μ :=
-  by
-  rw [sub_eq_add_neg]
-  exact hf.add hg.neg
+    (hf : Submartingale f ℱ μ) (hg : Supermartingale g ℱ μ) : Submartingale (f - g) ℱ μ := by
+  rw [sub_eq_add_neg]; exact hf.add hg.neg
 #align measure_theory.submartingale.sub_supermartingale MeasureTheory.Submartingale.sub_supermartingale
 
 theorem sub_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
@@ -378,10 +371,8 @@ end Submartingale
 namespace Supermartingale
 
 theorem sub_submartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
-    (hf : Supermartingale f ℱ μ) (hg : Submartingale g ℱ μ) : Supermartingale (f - g) ℱ μ :=
-  by
-  rw [sub_eq_add_neg]
-  exact hf.add hg.neg
+    (hf : Supermartingale f ℱ μ) (hg : Submartingale g ℱ μ) : Supermartingale (f - g) ℱ μ := by
+  rw [sub_eq_add_neg]; exact hf.add hg.neg
 #align measure_theory.supermartingale.sub_submartingale MeasureTheory.Supermartingale.sub_submartingale
 
 theorem sub_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
@@ -407,10 +398,7 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Superma
 theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Supermartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
-  rw [← neg_neg c,
-    (by
-      ext (i x)
-      simp : - -c • f = -(-c • f))]
+  rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
 #align measure_theory.supermartingale.smul_nonpos MeasureTheory.Supermartingale.smul_nonpos
 
@@ -428,20 +416,14 @@ variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [Complet
 theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
-  rw [← neg_neg c,
-    (by
-      ext (i x)
-      simp : - -c • f = -(c • -f))]
+  rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(c • -f))]
   exact supermartingale.neg (hf.neg.smul_nonneg hc)
 #align measure_theory.submartingale.smul_nonneg MeasureTheory.Submartingale.smul_nonneg
 
 theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Submartingale f ℱ μ) :
     Supermartingale (c • f) ℱ μ :=
   by
-  rw [← neg_neg c,
-    (by
-      ext (i x)
-      simp : - -c • f = -(-c • f))]
+  rw [← neg_neg c, (by ext (i x); simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
 #align measure_theory.submartingale.smul_nonpos MeasureTheory.Submartingale.smul_nonpos
 
Diff
@@ -73,12 +73,12 @@ def Submartingale [LE E] (f : ι → Ω → E) (ℱ : Filtration ι m0)
   Adapted ℱ f ∧ (∀ i j, i ≤ j → f i ≤ᵐ[μ] μ[f j|ℱ i]) ∧ ∀ i, Integrable (f i) μ
 #align measure_theory.submartingale MeasureTheory.Submartingale
 
-theorem martingale_const (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ] (x : E) :
+theorem martingale_const (ℱ : Filtration ι m0) (μ : Measure Ω) [FiniteMeasure μ] (x : E) :
     Martingale (fun _ _ => x) ℱ μ :=
   ⟨adapted_const ℱ _, fun i j hij => by rw [condexp_const (ℱ.le _)]⟩
 #align measure_theory.martingale_const MeasureTheory.martingale_const
 
-theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ]
+theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measure Ω) [FiniteMeasure μ]
     {f : Ω → E} (hf : strongly_measurable[ℱ ⊥] f) (hfint : Integrable f μ) :
     Martingale (fun _ => f) ℱ μ :=
   by
@@ -323,7 +323,7 @@ end Submartingale
 
 section Submartingale
 
-theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+theorem submartingale_of_set_integral_le [FiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i j : ι,
@@ -345,7 +345,7 @@ theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω →
     set_integral_condexp (ℱ.le i) (hint j) hs]
 #align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_set_integral_le
 
-theorem submartingale_of_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+theorem submartingale_of_condexp_sub_nonneg [FiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]) :
     Submartingale f ℱ μ := by
   refine' ⟨hadp, fun i j hij => _, hint⟩
@@ -366,7 +366,7 @@ theorem Submartingale.condexp_sub_nonneg {f : ι → Ω → ℝ} (hf : Submartin
   · exact h
 #align measure_theory.submartingale.condexp_sub_nonneg MeasureTheory.Submartingale.condexp_sub_nonneg
 
-theorem submartingale_iff_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} :
+theorem submartingale_iff_condexp_sub_nonneg [FiniteMeasure μ] {f : ι → Ω → ℝ} :
     Submartingale f ℱ μ ↔
       Adapted ℱ f ∧ (∀ i, Integrable (f i) μ) ∧ ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i] :=
   ⟨fun h => ⟨h.Adapted, h.Integrable, fun i j => h.condexp_sub_nonneg⟩, fun ⟨hadp, hint, h⟩ =>
@@ -453,8 +453,8 @@ section Nat
 
 variable {𝒢 : Filtration ℕ m0}
 
-theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
-    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
+theorem submartingale_of_set_integral_le_succ [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+    (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
     Submartingale f 𝒢 μ :=
@@ -465,7 +465,7 @@ theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ →
   · exact le_trans hk₂ (hf k s (𝒢.mono hk₁ _ hs))
 #align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_set_integral_le_succ
 
-theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem supermartingale_of_set_integral_succ_le [FiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f (i + 1) ω ∂μ) ≤ ∫ ω in s, f i ω ∂μ) :
@@ -475,7 +475,7 @@ theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ 
   simpa only [integral_neg, Pi.neg_apply, neg_le_neg_iff]
 #align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_set_integral_succ_le
 
-theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem martingale_of_set_integral_eq_succ [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) = ∫ ω in s, f (i + 1) ω ∂μ) :
@@ -485,7 +485,7 @@ theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω
       submartingale_of_set_integral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
 #align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_set_integral_eq_succ
 
-theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem submartingale_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i ≤ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
   refine' submartingale_of_set_integral_le_succ hadp hint fun i s hs => _
@@ -495,7 +495,7 @@ theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp :
   exact set_integral_mono_ae (hint i).IntegrableOn integrable_condexp.integrable_on (hf i)
 #align measure_theory.submartingale_nat MeasureTheory.submartingale_nat
 
-theorem supermartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem supermartingale_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, μ[f (i + 1)|𝒢 i] ≤ᵐ[μ] f i) :
     Supermartingale f 𝒢 μ := by
   rw [← neg_neg f]
@@ -505,14 +505,14 @@ theorem supermartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp
   filter_upwards [hf i]with x hx using neg_le_neg hx
 #align measure_theory.supermartingale_nat MeasureTheory.supermartingale_nat
 
-theorem martingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem martingale_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i =ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Martingale f 𝒢 μ :=
   martingale_iff.2
     ⟨supermartingale_nat hadp hint fun i => (hf i).symm.le,
       submartingale_nat hadp hint fun i => (hf i).le⟩
 #align measure_theory.martingale_nat MeasureTheory.martingale_nat
 
-theorem submartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem submartingale_of_condexp_sub_nonneg_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, 0 ≤ᵐ[μ] μ[f (i + 1) - f i|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
@@ -522,7 +522,7 @@ theorem submartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ 
   infer_instance
 #align measure_theory.submartingale_of_condexp_sub_nonneg_nat MeasureTheory.submartingale_of_condexp_sub_nonneg_nat
 
-theorem supermartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem supermartingale_of_condexp_sub_nonneg_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, 0 ≤ᵐ[μ] μ[f i - f (i + 1)|𝒢 i]) : Supermartingale f 𝒢 μ :=
   by
@@ -531,9 +531,9 @@ theorem supermartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ
   simpa only [Pi.zero_apply, Pi.neg_apply, neg_sub_neg]
 #align measure_theory.supermartingale_of_condexp_sub_nonneg_nat MeasureTheory.supermartingale_of_condexp_sub_nonneg_nat
 
-theorem martingale_of_condexp_sub_eq_zero_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
-    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
-    (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) : Martingale f 𝒢 μ :=
+theorem martingale_of_condexp_sub_eq_zero_nat [FiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+    (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) :
+    Martingale f 𝒢 μ :=
   by
   refine'
     martingale_iff.2
@@ -604,7 +604,7 @@ theorem integrable_stoppedValue [LE E] {f : ℕ → Ω → E} (hf : Submartingal
 
 end Submartingale
 
-theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
+theorem Submartingale.sum_mul_sub [FiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
     (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 ξ) (hbdd : ∀ n ω, ξ n ω ≤ R)
     (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
     Submartingale (fun n => ∑ k in Finset.range n, ξ k * (f (k + 1) - f k)) 𝒢 μ :=
@@ -640,7 +640,7 @@ theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ →
 /-- Given a discrete submartingale `f` and a predictable process `ξ` (i.e. `ξ (n + 1)` is adapted)
 the process defined by `λ n, ∑ k in finset.range n, ξ (k + 1) * (f (k + 1) - f k)` is also a
 submartingale. -/
-theorem Submartingale.sum_mul_sub' [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
+theorem Submartingale.sum_mul_sub' [FiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
     (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 fun n => ξ (n + 1)) (hbdd : ∀ n ω, ξ n ω ≤ R)
     (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
     Submartingale (fun n => ∑ k in Finset.range n, ξ (k + 1) * (f (k + 1) - f k)) 𝒢 μ :=
Diff
@@ -73,28 +73,28 @@ def Submartingale [LE E] (f : ι → Ω → E) (ℱ : Filtration ι m0)
   Adapted ℱ f ∧ (∀ i j, i ≤ j → f i ≤ᵐ[μ] μ[f j|ℱ i]) ∧ ∀ i, Integrable (f i) μ
 #align measure_theory.submartingale MeasureTheory.Submartingale
 
-theorem martingaleConst (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ] (x : E) :
+theorem martingale_const (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ] (x : E) :
     Martingale (fun _ _ => x) ℱ μ :=
   ⟨adapted_const ℱ _, fun i j hij => by rw [condexp_const (ℱ.le _)]⟩
-#align measure_theory.martingale_const MeasureTheory.martingaleConst
+#align measure_theory.martingale_const MeasureTheory.martingale_const
 
-theorem martingaleConstFun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ]
+theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measure Ω) [IsFiniteMeasure μ]
     {f : Ω → E} (hf : strongly_measurable[ℱ ⊥] f) (hfint : Integrable f μ) :
     Martingale (fun _ => f) ℱ μ :=
   by
   refine' ⟨fun i => hf.mono <| ℱ.mono bot_le, fun i j hij => _⟩
   rw [condexp_of_strongly_measurable (ℱ.le _) (hf.mono <| ℱ.mono bot_le) hfint]
   infer_instance
-#align measure_theory.martingale_const_fun MeasureTheory.martingaleConstFun
+#align measure_theory.martingale_const_fun MeasureTheory.martingale_const_fun
 
 variable (E)
 
-theorem martingaleZero (ℱ : Filtration ι m0) (μ : Measure Ω) : Martingale (0 : ι → Ω → E) ℱ μ :=
+theorem martingale_zero (ℱ : Filtration ι m0) (μ : Measure Ω) : Martingale (0 : ι → Ω → E) ℱ μ :=
   ⟨adapted_zero E ℱ, fun i j hij =>
     by
     rw [Pi.zero_apply, condexp_zero]
     simp⟩
-#align measure_theory.martingale_zero MeasureTheory.martingaleZero
+#align measure_theory.martingale_zero MeasureTheory.martingale_zero
 
 variable {E}
 
@@ -116,7 +116,7 @@ theorem condexp_ae_eq (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j) : μ
 
 @[protected]
 theorem integrable (hf : Martingale f ℱ μ) (i : ι) : Integrable (f i) μ :=
-  integrableCondexp.congr (hf.condexp_ae_eq (le_refl i))
+  integrable_condexp.congr (hf.condexp_ae_eq (le_refl i))
 #align measure_theory.martingale.integrable MeasureTheory.Martingale.integrable
 
 theorem set_integral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
@@ -166,10 +166,10 @@ theorem martingale_iff [PartialOrder E] :
     ⟨hf₁.1, fun i j hij => (hf₁.2.1 i j hij).antisymm (hf₂.2.1 i j hij)⟩⟩
 #align measure_theory.martingale_iff MeasureTheory.martingale_iff
 
-theorem martingaleCondexp (f : Ω → E) (ℱ : Filtration ι m0) (μ : Measure Ω)
+theorem martingale_condexp (f : Ω → E) (ℱ : Filtration ι m0) (μ : Measure Ω)
     [SigmaFiniteFiltration μ ℱ] : Martingale (fun i => μ[f|ℱ i]) ℱ μ :=
   ⟨fun i => stronglyMeasurable_condexp, fun i j hij => condexp_condexp_of_le (ℱ.mono hij) (ℱ.le j)⟩
-#align measure_theory.martingale_condexp MeasureTheory.martingaleCondexp
+#align measure_theory.martingale_condexp MeasureTheory.martingale_condexp
 
 namespace Supermartingale
 
@@ -213,10 +213,10 @@ theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Superm
   refine' add_le_add _ _ <;> assumption
 #align measure_theory.supermartingale.add MeasureTheory.Supermartingale.add
 
-theorem addMartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ)
-    (hg : Martingale g ℱ μ) : Supermartingale (f + g) ℱ μ :=
+theorem add_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
+    (hf : Supermartingale f ℱ μ) (hg : Martingale g ℱ μ) : Supermartingale (f + g) ℱ μ :=
   hf.add hg.Supermartingale
-#align measure_theory.supermartingale.add_martingale MeasureTheory.Supermartingale.addMartingale
+#align measure_theory.supermartingale.add_martingale MeasureTheory.Supermartingale.add_martingale
 
 theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ) :
     Submartingale (-f) ℱ μ :=
@@ -262,10 +262,10 @@ theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submar
   refine' add_le_add _ _ <;> assumption
 #align measure_theory.submartingale.add MeasureTheory.Submartingale.add
 
-theorem addMartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
+theorem add_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
     (hg : Martingale g ℱ μ) : Submartingale (f + g) ℱ μ :=
   hf.add hg.Submartingale
-#align measure_theory.submartingale.add_martingale MeasureTheory.Submartingale.addMartingale
+#align measure_theory.submartingale.add_martingale MeasureTheory.Submartingale.add_martingale
 
 theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ) :
     Supermartingale (-f) ℱ μ :=
@@ -284,17 +284,17 @@ theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (
   exact supermartingale.set_integral_le hf.neg hij hs
 #align measure_theory.submartingale.set_integral_le MeasureTheory.Submartingale.set_integral_le
 
-theorem subSupermartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
+theorem sub_supermartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
     (hf : Submartingale f ℱ μ) (hg : Supermartingale g ℱ μ) : Submartingale (f - g) ℱ μ :=
   by
   rw [sub_eq_add_neg]
   exact hf.add hg.neg
-#align measure_theory.submartingale.sub_supermartingale MeasureTheory.Submartingale.subSupermartingale
+#align measure_theory.submartingale.sub_supermartingale MeasureTheory.Submartingale.sub_supermartingale
 
-theorem subMartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
+theorem sub_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submartingale f ℱ μ)
     (hg : Martingale g ℱ μ) : Submartingale (f - g) ℱ μ :=
-  hf.subSupermartingale hg.Supermartingale
-#align measure_theory.submartingale.sub_martingale MeasureTheory.Submartingale.subMartingale
+  hf.sub_supermartingale hg.Supermartingale
+#align measure_theory.submartingale.sub_martingale MeasureTheory.Submartingale.sub_martingale
 
 protected theorem sup {f g : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) (hg : Submartingale g ℱ μ) :
     Submartingale (f ⊔ g) ℱ μ :=
@@ -316,14 +316,14 @@ protected theorem sup {f g : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) (h
 #align measure_theory.submartingale.sup MeasureTheory.Submartingale.sup
 
 protected theorem pos {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) : Submartingale (f⁺) ℱ μ :=
-  hf.sup (martingaleZero _ _ _).Submartingale
+  hf.sup (martingale_zero _ _ _).Submartingale
 #align measure_theory.submartingale.pos MeasureTheory.Submartingale.pos
 
 end Submartingale
 
 section Submartingale
 
-theorem submartingaleOfSetIntegralLe [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i j : ι,
@@ -343,16 +343,16 @@ theorem submartingaleOfSetIntegralLe [IsFiniteMeasure μ] {f : ι → Ω → ℝ
   rwa [← set_integral_trim _ (strongly_measurable_condexp.sub <| hadp i) hs,
     integral_sub' integrable_condexp.integrable_on (hint i).IntegrableOn, sub_nonneg,
     set_integral_condexp (ℱ.le i) (hint j) hs]
-#align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingaleOfSetIntegralLe
+#align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_set_integral_le
 
-theorem submartingaleOfCondexpSubNonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+theorem submartingale_of_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]) :
     Submartingale f ℱ μ := by
   refine' ⟨hadp, fun i j hij => _, hint⟩
   rw [← condexp_of_strongly_measurable (ℱ.le _) (hadp _) (hint _), ← eventually_sub_nonneg]
   exact eventually_le.trans (hf i j hij) (condexp_sub (hint _) (hint _)).le
   infer_instance
-#align measure_theory.submartingale_of_condexp_sub_nonneg MeasureTheory.submartingaleOfCondexpSubNonneg
+#align measure_theory.submartingale_of_condexp_sub_nonneg MeasureTheory.submartingale_of_condexp_sub_nonneg
 
 theorem Submartingale.condexp_sub_nonneg {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ) {i j : ι}
     (hij : i ≤ j) : 0 ≤ᵐ[μ] μ[f j - f i|ℱ i] :=
@@ -370,31 +370,31 @@ theorem submartingale_iff_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω
     Submartingale f ℱ μ ↔
       Adapted ℱ f ∧ (∀ i, Integrable (f i) μ) ∧ ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i] :=
   ⟨fun h => ⟨h.Adapted, h.Integrable, fun i j => h.condexp_sub_nonneg⟩, fun ⟨hadp, hint, h⟩ =>
-    submartingaleOfCondexpSubNonneg hadp hint h⟩
+    submartingale_of_condexp_sub_nonneg hadp hint h⟩
 #align measure_theory.submartingale_iff_condexp_sub_nonneg MeasureTheory.submartingale_iff_condexp_sub_nonneg
 
 end Submartingale
 
 namespace Supermartingale
 
-theorem subSubmartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
+theorem sub_submartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
     (hf : Supermartingale f ℱ μ) (hg : Submartingale g ℱ μ) : Supermartingale (f - g) ℱ μ :=
   by
   rw [sub_eq_add_neg]
   exact hf.add hg.neg
-#align measure_theory.supermartingale.sub_submartingale MeasureTheory.Supermartingale.subSubmartingale
+#align measure_theory.supermartingale.sub_submartingale MeasureTheory.Supermartingale.sub_submartingale
 
-theorem subMartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ)
-    (hg : Martingale g ℱ μ) : Supermartingale (f - g) ℱ μ :=
-  hf.subSubmartingale hg.Submartingale
-#align measure_theory.supermartingale.sub_martingale MeasureTheory.Supermartingale.subMartingale
+theorem sub_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
+    (hf : Supermartingale f ℱ μ) (hg : Martingale g ℱ μ) : Supermartingale (f - g) ℱ μ :=
+  hf.sub_submartingale hg.Submartingale
+#align measure_theory.supermartingale.sub_martingale MeasureTheory.Supermartingale.sub_martingale
 
 section
 
 variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
   [OrderedSMul ℝ F]
 
-theorem smulNonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Supermartingale f ℱ μ) :
+theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Supermartingale f ℱ μ) :
     Supermartingale (c • f) ℱ μ :=
   by
   refine' ⟨hf.1.smul c, fun i j hij => _, fun i => (hf.2.2 i).smul c⟩
@@ -402,9 +402,9 @@ theorem smulNonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Supermar
   filter_upwards [hf.2.1 i j hij]with _ hle
   simp
   exact smul_le_smul_of_nonneg hle hc
-#align measure_theory.supermartingale.smul_nonneg MeasureTheory.Supermartingale.smulNonneg
+#align measure_theory.supermartingale.smul_nonneg MeasureTheory.Supermartingale.smul_nonneg
 
-theorem smulNonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Supermartingale f ℱ μ) :
+theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Supermartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
   rw [← neg_neg c,
@@ -412,7 +412,7 @@ theorem smulNonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Supermar
       ext (i x)
       simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
-#align measure_theory.supermartingale.smul_nonpos MeasureTheory.Supermartingale.smulNonpos
+#align measure_theory.supermartingale.smul_nonpos MeasureTheory.Supermartingale.smul_nonpos
 
 end
 
@@ -425,7 +425,7 @@ section
 variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
   [OrderedSMul ℝ F]
 
-theorem smulNonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submartingale f ℱ μ) :
+theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submartingale f ℱ μ) :
     Submartingale (c • f) ℱ μ :=
   by
   rw [← neg_neg c,
@@ -433,9 +433,9 @@ theorem smulNonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submarti
       ext (i x)
       simp : - -c • f = -(c • -f))]
   exact supermartingale.neg (hf.neg.smul_nonneg hc)
-#align measure_theory.submartingale.smul_nonneg MeasureTheory.Submartingale.smulNonneg
+#align measure_theory.submartingale.smul_nonneg MeasureTheory.Submartingale.smul_nonneg
 
-theorem smulNonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Submartingale f ℱ μ) :
+theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Submartingale f ℱ μ) :
     Supermartingale (c • f) ℱ μ :=
   by
   rw [← neg_neg c,
@@ -443,7 +443,7 @@ theorem smulNonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Submarti
       ext (i x)
       simp : - -c • f = -(-c • f))]
   exact (hf.smul_nonneg <| neg_nonneg.2 hc).neg
-#align measure_theory.submartingale.smul_nonpos MeasureTheory.Submartingale.smulNonpos
+#align measure_theory.submartingale.smul_nonpos MeasureTheory.Submartingale.smul_nonpos
 
 end
 
@@ -453,8 +453,8 @@ section Nat
 
 variable {𝒢 : Filtration ℕ m0}
 
-theorem submartingaleOfSetIntegralLeSucc [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
-    (hint : ∀ i, Integrable (f i) μ)
+theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
     Submartingale f 𝒢 μ :=
@@ -463,29 +463,29 @@ theorem submartingaleOfSetIntegralLeSucc [IsFiniteMeasure μ] {f : ℕ → Ω 
   induction' hij with k hk₁ hk₂
   · exact le_rfl
   · exact le_trans hk₂ (hf k s (𝒢.mono hk₁ _ hs))
-#align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingaleOfSetIntegralLeSucc
+#align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_set_integral_le_succ
 
-theorem supermartingaleOfSetIntegralSuccLe [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
-    (hint : ∀ i, Integrable (f i) μ)
+theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f (i + 1) ω ∂μ) ≤ ∫ ω in s, f i ω ∂μ) :
     Supermartingale f 𝒢 μ := by
   rw [← neg_neg f]
   refine' (submartingale_of_set_integral_le_succ hadp.neg (fun i => (hint i).neg) _).neg
   simpa only [integral_neg, Pi.neg_apply, neg_le_neg_iff]
-#align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingaleOfSetIntegralSuccLe
+#align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_set_integral_succ_le
 
-theorem martingaleOfSetIntegralEqSucc [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf :
       ∀ i, ∀ s : Set Ω, measurable_set[𝒢 i] s → (∫ ω in s, f i ω ∂μ) = ∫ ω in s, f (i + 1) ω ∂μ) :
     Martingale f 𝒢 μ :=
   martingale_iff.2
-    ⟨supermartingaleOfSetIntegralSuccLe hadp hint fun i s hs => (hf i s hs).ge,
-      submartingaleOfSetIntegralLeSucc hadp hint fun i s hs => (hf i s hs).le⟩
-#align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingaleOfSetIntegralEqSucc
+    ⟨supermartingale_of_set_integral_succ_le hadp hint fun i s hs => (hf i s hs).ge,
+      submartingale_of_set_integral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
+#align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_set_integral_eq_succ
 
-theorem submartingaleNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i ≤ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
   refine' submartingale_of_set_integral_le_succ hadp hint fun i s hs => _
@@ -493,9 +493,9 @@ theorem submartingaleNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : A
     (set_integral_condexp (𝒢.le i) (hint _) hs).symm
   rw [this]
   exact set_integral_mono_ae (hint i).IntegrableOn integrable_condexp.integrable_on (hf i)
-#align measure_theory.submartingale_nat MeasureTheory.submartingaleNat
+#align measure_theory.submartingale_nat MeasureTheory.submartingale_nat
 
-theorem supermartingaleNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem supermartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, μ[f (i + 1)|𝒢 i] ≤ᵐ[μ] f i) :
     Supermartingale f 𝒢 μ := by
   rw [← neg_neg f]
@@ -503,37 +503,37 @@ theorem supermartingaleNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp :
     (submartingale_nat hadp.neg (fun i => (hint i).neg) fun i =>
         eventually_le.trans _ (condexp_neg _).symm.le).neg
   filter_upwards [hf i]with x hx using neg_le_neg hx
-#align measure_theory.supermartingale_nat MeasureTheory.supermartingaleNat
+#align measure_theory.supermartingale_nat MeasureTheory.supermartingale_nat
 
-theorem martingaleNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem martingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i =ᵐ[μ] μ[f (i + 1)|𝒢 i]) : Martingale f 𝒢 μ :=
   martingale_iff.2
-    ⟨supermartingaleNat hadp hint fun i => (hf i).symm.le,
-      submartingaleNat hadp hint fun i => (hf i).le⟩
-#align measure_theory.martingale_nat MeasureTheory.martingaleNat
+    ⟨supermartingale_nat hadp hint fun i => (hf i).symm.le,
+      submartingale_nat hadp hint fun i => (hf i).le⟩
+#align measure_theory.martingale_nat MeasureTheory.martingale_nat
 
-theorem submartingaleOfCondexpSubNonnegNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
-    (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, 0 ≤ᵐ[μ] μ[f (i + 1) - f i|𝒢 i]) :
-    Submartingale f 𝒢 μ :=
+theorem submartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
+    (hf : ∀ i, 0 ≤ᵐ[μ] μ[f (i + 1) - f i|𝒢 i]) : Submartingale f 𝒢 μ :=
   by
   refine' submartingale_nat hadp hint fun i => _
   rw [← condexp_of_strongly_measurable (𝒢.le _) (hadp _) (hint _), ← eventually_sub_nonneg]
   exact eventually_le.trans (hf i) (condexp_sub (hint _) (hint _)).le
   infer_instance
-#align measure_theory.submartingale_of_condexp_sub_nonneg_nat MeasureTheory.submartingaleOfCondexpSubNonnegNat
+#align measure_theory.submartingale_of_condexp_sub_nonneg_nat MeasureTheory.submartingale_of_condexp_sub_nonneg_nat
 
-theorem supermartingaleOfCondexpSubNonnegNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem supermartingale_of_condexp_sub_nonneg_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, 0 ≤ᵐ[μ] μ[f i - f (i + 1)|𝒢 i]) : Supermartingale f 𝒢 μ :=
   by
   rw [← neg_neg f]
   refine' (submartingale_of_condexp_sub_nonneg_nat hadp.neg (fun i => (hint i).neg) _).neg
   simpa only [Pi.zero_apply, Pi.neg_apply, neg_sub_neg]
-#align measure_theory.supermartingale_of_condexp_sub_nonneg_nat MeasureTheory.supermartingaleOfCondexpSubNonnegNat
+#align measure_theory.supermartingale_of_condexp_sub_nonneg_nat MeasureTheory.supermartingale_of_condexp_sub_nonneg_nat
 
-theorem martingaleOfCondexpSubEqZeroNat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
-    (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) :
-    Martingale f 𝒢 μ :=
+theorem martingale_of_condexp_sub_eq_zero_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+    (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
+    (hf : ∀ i, μ[f (i + 1) - f i|𝒢 i] =ᵐ[μ] 0) : Martingale f 𝒢 μ :=
   by
   refine'
     martingale_iff.2
@@ -543,7 +543,7 @@ theorem martingaleOfCondexpSubEqZeroNat [IsFiniteMeasure μ] {f : ℕ → Ω →
   refine' (eventually_eq.trans _ (condexp_neg _).symm).le
   filter_upwards [hf i]with x hx
   simpa only [Pi.zero_apply, Pi.neg_apply, zero_eq_neg]
-#align measure_theory.martingale_of_condexp_sub_eq_zero_nat MeasureTheory.martingaleOfCondexpSubEqZeroNat
+#align measure_theory.martingale_of_condexp_sub_eq_zero_nat MeasureTheory.martingale_of_condexp_sub_eq_zero_nat
 
 -- Note that one cannot use `submartingale.zero_le_of_predictable` to prove the other two
 -- corresponding lemmas without imposing more restrictions to the ordering of `E`
@@ -597,14 +597,14 @@ theorem Martingale.eq_zero_of_predictable [SigmaFiniteFiltration μ 𝒢] {f : 
 namespace Submartingale
 
 @[protected]
-theorem integrableStoppedValue [LE E] {f : ℕ → Ω → E} (hf : Submartingale f 𝒢 μ) {τ : Ω → ℕ}
+theorem integrable_stoppedValue [LE E] {f : ℕ → Ω → E} (hf : Submartingale f 𝒢 μ) {τ : Ω → ℕ}
     (hτ : IsStoppingTime 𝒢 τ) {N : ℕ} (hbdd : ∀ ω, τ ω ≤ N) : Integrable (stoppedValue f τ) μ :=
-  integrableStoppedValue ℕ hτ hf.Integrable hbdd
-#align measure_theory.submartingale.integrable_stopped_value MeasureTheory.Submartingale.integrableStoppedValue
+  integrable_stoppedValue ℕ hτ hf.Integrable hbdd
+#align measure_theory.submartingale.integrable_stopped_value MeasureTheory.Submartingale.integrable_stoppedValue
 
 end Submartingale
 
-theorem Submartingale.sumMulSub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
+theorem Submartingale.sum_mul_sub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
     (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 ξ) (hbdd : ∀ n ω, ξ n ω ≤ R)
     (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
     Submartingale (fun n => ∑ k in Finset.range n, ξ k * (f (k + 1) - f k)) 𝒢 μ :=
@@ -632,20 +632,20 @@ theorem Submartingale.sumMulSub [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → 
       (eventually_le.mul_nonneg (eventually_of_forall (hnonneg _))
         (hf.condexp_sub_nonneg (Nat.le_succ _)))
       (condexp_strongly_measurable_mul (hξ _)
-            (((hf.integrable _).sub (hf.integrable _)).bddMul
+            (((hf.integrable _).sub (hf.integrable _)).bdd_mul
               hξ.strongly_measurable.ae_strongly_measurable (hξbdd _))
             ((hf.integrable _).sub (hf.integrable _))).symm.le
-#align measure_theory.submartingale.sum_mul_sub MeasureTheory.Submartingale.sumMulSub
+#align measure_theory.submartingale.sum_mul_sub MeasureTheory.Submartingale.sum_mul_sub
 
 /-- Given a discrete submartingale `f` and a predictable process `ξ` (i.e. `ξ (n + 1)` is adapted)
 the process defined by `λ n, ∑ k in finset.range n, ξ (k + 1) * (f (k + 1) - f k)` is also a
 submartingale. -/
-theorem Submartingale.sumMulSub' [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
+theorem Submartingale.sum_mul_sub' [IsFiniteMeasure μ] {R : ℝ} {ξ f : ℕ → Ω → ℝ}
     (hf : Submartingale f 𝒢 μ) (hξ : Adapted 𝒢 fun n => ξ (n + 1)) (hbdd : ∀ n ω, ξ n ω ≤ R)
     (hnonneg : ∀ n ω, 0 ≤ ξ n ω) :
     Submartingale (fun n => ∑ k in Finset.range n, ξ (k + 1) * (f (k + 1) - f k)) 𝒢 μ :=
-  hf.sumMulSub hξ (fun n => hbdd _) fun n => hnonneg _
-#align measure_theory.submartingale.sum_mul_sub' MeasureTheory.Submartingale.sumMulSub'
+  hf.sum_mul_sub hξ (fun n => hbdd _) fun n => hnonneg _
+#align measure_theory.submartingale.sum_mul_sub' MeasureTheory.Submartingale.sum_mul_sub'
 
 end Nat
 
Diff
@@ -43,7 +43,7 @@ The definitions of filtration and adapted can be found in `probability.stopping`
 
 open TopologicalSpace Filter
 
-open NNReal Ennreal MeasureTheory ProbabilityTheory BigOperators
+open NNReal ENNReal MeasureTheory ProbabilityTheory BigOperators
 
 namespace MeasureTheory
 

Changes in mathlib4

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

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

Diff
@@ -106,12 +106,16 @@ protected theorem integrable (hf : Martingale f ℱ μ) (i : ι) : Integrable (f
   integrable_condexp.congr (hf.condexp_ae_eq (le_refl i))
 #align measure_theory.martingale.integrable MeasureTheory.Martingale.integrable
 
-theorem set_integral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
+theorem setIntegral_eq [SigmaFiniteFiltration μ ℱ] (hf : Martingale f ℱ μ) {i j : ι} (hij : i ≤ j)
     {s : Set Ω} (hs : MeasurableSet[ℱ i] s) : ∫ ω in s, f i ω ∂μ = ∫ ω in s, f j ω ∂μ := by
-  rw [← @set_integral_condexp _ _ _ _ _ (ℱ i) m0 _ _ _ (ℱ.le i) _ (hf.integrable j) hs]
-  refine' set_integral_congr_ae (ℱ.le i s hs) _
+  rw [← @setIntegral_condexp _ _ _ _ _ (ℱ i) m0 _ _ _ (ℱ.le i) _ (hf.integrable j) hs]
+  refine' setIntegral_congr_ae (ℱ.le i s hs) _
   filter_upwards [hf.2 i j hij] with _ heq _ using heq.symm
-#align measure_theory.martingale.set_integral_eq MeasureTheory.Martingale.set_integral_eq
+#align measure_theory.martingale.set_integral_eq MeasureTheory.Martingale.setIntegral_eq
+
+@[deprecated]
+alias set_integral_eq :=
+  setIntegral_eq -- deprecated on 2024-04-17
 
 theorem add (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (f + g) ℱ μ := by
   refine' ⟨hf.adapted.add hg.adapted, fun i j hij => _⟩
@@ -173,13 +177,17 @@ theorem condexp_ae_le [LE E] (hf : Supermartingale f ℱ μ) {i j : ι} (hij : i
   hf.2.1 i j hij
 #align measure_theory.supermartingale.condexp_ae_le MeasureTheory.Supermartingale.condexp_ae_le
 
-theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Supermartingale f ℱ μ)
+theorem setIntegral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Supermartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : MeasurableSet[ℱ i] s) :
     ∫ ω in s, f j ω ∂μ ≤ ∫ ω in s, f i ω ∂μ := by
-  rw [← set_integral_condexp (ℱ.le i) (hf.integrable j) hs]
-  refine' set_integral_mono_ae integrable_condexp.integrableOn (hf.integrable i).integrableOn _
+  rw [← setIntegral_condexp (ℱ.le i) (hf.integrable j) hs]
+  refine' setIntegral_mono_ae integrable_condexp.integrableOn (hf.integrable i).integrableOn _
   filter_upwards [hf.2.1 i j hij] with _ heq using heq
-#align measure_theory.supermartingale.set_integral_le MeasureTheory.Supermartingale.set_integral_le
+#align measure_theory.supermartingale.set_integral_le MeasureTheory.Supermartingale.setIntegral_le
+
+@[deprecated]
+alias set_integral_le :=
+  setIntegral_le -- deprecated on 2024-04-17
 
 theorem add [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Supermartingale f ℱ μ)
     (hg : Supermartingale g ℱ μ) : Supermartingale (f + g) ℱ μ := by
@@ -246,13 +254,17 @@ theorem neg [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)] (hf : Submar
   simpa
 #align measure_theory.submartingale.neg MeasureTheory.Submartingale.neg
 
-/-- The converse of this lemma is `MeasureTheory.submartingale_of_set_integral_le`. -/
-theorem set_integral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ)
+/-- The converse of this lemma is `MeasureTheory.submartingale_of_setIntegral_le`. -/
+theorem setIntegral_le [SigmaFiniteFiltration μ ℱ] {f : ι → Ω → ℝ} (hf : Submartingale f ℱ μ)
     {i j : ι} (hij : i ≤ j) {s : Set Ω} (hs : MeasurableSet[ℱ i] s) :
     ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f j ω ∂μ := by
   rw [← neg_le_neg_iff, ← integral_neg, ← integral_neg]
-  exact Supermartingale.set_integral_le hf.neg hij hs
-#align measure_theory.submartingale.set_integral_le MeasureTheory.Submartingale.set_integral_le
+  exact Supermartingale.setIntegral_le hf.neg hij hs
+#align measure_theory.submartingale.set_integral_le MeasureTheory.Submartingale.setIntegral_le
+
+@[deprecated]
+alias set_integral_le :=
+  setIntegral_le -- deprecated on 2024-04-17
 
 theorem sub_supermartingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
     (hf : Submartingale f ℱ μ) (hg : Supermartingale g ℱ μ) : Submartingale (f - g) ℱ μ := by
@@ -285,7 +297,7 @@ end Submartingale
 
 section Submartingale
 
-theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
+theorem submartingale_of_setIntegral_le [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j : ι,
       i ≤ j → ∀ s : Set Ω, MeasurableSet[ℱ i] s → ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f j ω ∂μ) :
     Submartingale f ℱ μ := by
@@ -294,14 +306,18 @@ theorem submartingale_of_set_integral_le [IsFiniteMeasure μ] {f : ι → Ω →
   suffices 0 ≤ᵐ[μ.trim (ℱ.le i)] μ[f j|ℱ i] - f i by
     filter_upwards [this] with x hx
     rwa [← sub_nonneg]
-  refine' ae_nonneg_of_forall_set_integral_nonneg
+  refine' ae_nonneg_of_forall_setIntegral_nonneg
     ((integrable_condexp.sub (hint i)).trim _ (stronglyMeasurable_condexp.sub <| hadp i))
       fun s hs _ => _
   specialize hf i j hij s hs
-  rwa [← set_integral_trim _ (stronglyMeasurable_condexp.sub <| hadp i) hs,
+  rwa [← setIntegral_trim _ (stronglyMeasurable_condexp.sub <| hadp i) hs,
     integral_sub' integrable_condexp.integrableOn (hint i).integrableOn, sub_nonneg,
-    set_integral_condexp (ℱ.le i) (hint j) hs]
-#align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_set_integral_le
+    setIntegral_condexp (ℱ.le i) (hint j) hs]
+#align measure_theory.submartingale_of_set_integral_le MeasureTheory.submartingale_of_setIntegral_le
+
+@[deprecated]
+alias submartingale_of_set_integral_le :=
+  submartingale_of_setIntegral_le -- deprecated on 2024-04-17
 
 theorem submartingale_of_condexp_sub_nonneg [IsFiniteMeasure μ] {f : ι → Ω → ℝ} (hadp : Adapted ℱ f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i j, i ≤ j → 0 ≤ᵐ[μ] μ[f j - f i|ℱ i]) :
@@ -393,41 +409,53 @@ section Nat
 
 variable {𝒢 : Filtration ℕ m0}
 
-theorem submartingale_of_set_integral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+theorem submartingale_of_setIntegral_le_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, MeasurableSet[𝒢 i] s → ∫ ω in s, f i ω ∂μ ≤ ∫ ω in s, f (i + 1) ω ∂μ) :
     Submartingale f 𝒢 μ := by
-  refine' submartingale_of_set_integral_le hadp hint fun i j hij s hs => _
+  refine' submartingale_of_setIntegral_le hadp hint fun i j hij s hs => _
   induction' hij with k hk₁ hk₂
   · exact le_rfl
   · exact le_trans hk₂ (hf k s (𝒢.mono hk₁ _ hs))
-#align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_set_integral_le_succ
+#align measure_theory.submartingale_of_set_integral_le_succ MeasureTheory.submartingale_of_setIntegral_le_succ
 
-theorem supermartingale_of_set_integral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
+@[deprecated]
+alias submartingale_of_set_integral_le_succ :=
+  submartingale_of_setIntegral_le_succ -- deprecated on 2024-04-17
+
+theorem supermartingale_of_setIntegral_succ_le [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ}
     (hadp : Adapted 𝒢 f) (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, MeasurableSet[𝒢 i] s → ∫ ω in s, f (i + 1) ω ∂μ ≤ ∫ ω in s, f i ω ∂μ) :
     Supermartingale f 𝒢 μ := by
   rw [← neg_neg f]
-  refine' (submartingale_of_set_integral_le_succ hadp.neg (fun i => (hint i).neg) _).neg
+  refine' (submartingale_of_setIntegral_le_succ hadp.neg (fun i => (hint i).neg) _).neg
   simpa only [integral_neg, Pi.neg_apply, neg_le_neg_iff]
-#align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_set_integral_succ_le
+#align measure_theory.supermartingale_of_set_integral_succ_le MeasureTheory.supermartingale_of_setIntegral_succ_le
+
+@[deprecated]
+alias supermartingale_of_set_integral_succ_le :=
+  supermartingale_of_setIntegral_succ_le -- deprecated on 2024-04-17
 
-theorem martingale_of_set_integral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
+theorem martingale_of_setIntegral_eq_succ [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ)
     (hf : ∀ i, ∀ s : Set Ω, MeasurableSet[𝒢 i] s → ∫ ω in s, f i ω ∂μ = ∫ ω in s, f (i + 1) ω ∂μ) :
     Martingale f 𝒢 μ :=
-  martingale_iff.2 ⟨supermartingale_of_set_integral_succ_le hadp hint fun i s hs => (hf i s hs).ge,
-    submartingale_of_set_integral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
-#align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_set_integral_eq_succ
+  martingale_iff.2 ⟨supermartingale_of_setIntegral_succ_le hadp hint fun i s hs => (hf i s hs).ge,
+    submartingale_of_setIntegral_le_succ hadp hint fun i s hs => (hf i s hs).le⟩
+#align measure_theory.martingale_of_set_integral_eq_succ MeasureTheory.martingale_of_setIntegral_eq_succ
+
+@[deprecated]
+alias martingale_of_set_integral_eq_succ :=
+  martingale_of_setIntegral_eq_succ -- deprecated on 2024-04-17
 
 theorem submartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
     (hint : ∀ i, Integrable (f i) μ) (hf : ∀ i, f i ≤ᵐ[μ] μ[f (i + 1)|𝒢 i]) :
     Submartingale f 𝒢 μ := by
-  refine' submartingale_of_set_integral_le_succ hadp hint fun i s hs => _
+  refine' submartingale_of_setIntegral_le_succ hadp hint fun i s hs => _
   have : ∫ ω in s, f (i + 1) ω ∂μ = ∫ ω in s, (μ[f (i + 1)|𝒢 i]) ω ∂μ :=
-    (set_integral_condexp (𝒢.le i) (hint _) hs).symm
+    (setIntegral_condexp (𝒢.le i) (hint _) hs).symm
   rw [this]
-  exact set_integral_mono_ae (hint i).integrableOn integrable_condexp.integrableOn (hf i)
+  exact setIntegral_mono_ae (hint i).integrableOn integrable_condexp.integrableOn (hf i)
 #align measure_theory.submartingale_nat MeasureTheory.submartingale_nat
 
 theorem supermartingale_nat [IsFiniteMeasure μ] {f : ℕ → Ω → ℝ} (hadp : Adapted 𝒢 f)
chore: mark EventuallyEq.refl as simp (#11475)

Fixes #11441.

Diff
@@ -82,7 +82,7 @@ theorem martingale_const_fun [OrderBot ι] (ℱ : Filtration ι m0) (μ : Measur
 variable (E)
 
 theorem martingale_zero (ℱ : Filtration ι m0) (μ : Measure Ω) : Martingale (0 : ι → Ω → E) ℱ μ :=
-  ⟨adapted_zero E ℱ, fun i j _ => by rw [Pi.zero_apply, condexp_zero]; simp; rfl⟩
+  ⟨adapted_zero E ℱ, fun i j _ => by rw [Pi.zero_apply, condexp_zero]; simp⟩
 #align measure_theory.martingale_zero MeasureTheory.martingale_zero
 
 variable {E}
chore: clean up uses of Pi.smul_apply (#9970)

After #9949, Pi.smul_apply can be used in simp again. This PR cleans up some workarounds.

Diff
@@ -129,7 +129,7 @@ theorem sub (hf : Martingale f ℱ μ) (hg : Martingale g ℱ μ) : Martingale (
 theorem smul (c : ℝ) (hf : Martingale f ℱ μ) : Martingale (c • f) ℱ μ := by
   refine' ⟨hf.adapted.smul c, fun i j hij => _⟩
   refine' (condexp_smul c (f j)).trans ((hf.2 i j hij).mono fun x hx => _)
-  rw [Pi.smul_apply, hx, Pi.smul_apply, Pi.smul_apply]
+  simp only [Pi.smul_apply, hx]
 #align measure_theory.martingale.smul MeasureTheory.Martingale.smul
 
 theorem supermartingale [Preorder E] (hf : Martingale f ℱ μ) : Supermartingale f ℱ μ :=
refactor: Deduplicate monotonicity of lemmas (#9179)

Remove the duplicates introduced in #8869 by sorting the lemmas in Algebra.Order.SMul into three files:

  • Algebra.Order.Module.Defs for the order isomorphism induced by scalar multiplication by a positivity element
  • Algebra.Order.Module.Pointwise for the order properties of scalar multiplication of sets. This file is new. I credit myself for https://github.com/leanprover-community/mathlib/pull/9078
  • Algebra.Order.Module.OrderedSMul: The material about OrderedSMul per se. Inherits the copyright header from Algebra.Order.SMul. This file should eventually be deleted.

I move each #align to the correct file. On top of that, I delete unused redundant OrderedSMul instances (they were useful in Lean 3, but not anymore) and eq_of_smul_eq_smul_of_pos_of_le/eq_of_smul_eq_smul_of_neg_of_le since those lemmas are weird and unused.

Diff
@@ -353,7 +353,7 @@ theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Superma
   refine' (condexp_smul c (f j)).le.trans _
   filter_upwards [hf.2.1 i j hij] with _ hle
   simp_rw [Pi.smul_apply]
-  exact smul_le_smul_of_nonneg hle hc
+  exact smul_le_smul_of_nonneg_left hle hc
 #align measure_theory.supermartingale.smul_nonneg MeasureTheory.Supermartingale.smul_nonneg
 
 theorem smul_nonpos {f : ι → Ω → F} {c : ℝ} (hc : c ≤ 0) (hf : Supermartingale f ℱ μ) :
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
@@ -44,7 +44,7 @@ open scoped NNReal ENNReal MeasureTheory ProbabilityTheory BigOperators
 
 namespace MeasureTheory
 
-variable {Ω E ι : Type _} [Preorder ι] {m0 : MeasurableSpace Ω} {μ : Measure Ω}
+variable {Ω E ι : Type*} [Preorder ι] {m0 : MeasurableSpace Ω} {μ : Measure Ω}
   [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {f g : ι → Ω → E} {ℱ : Filtration ι m0}
 
 /-- A family of functions `f : ι → Ω → E` is a martingale with respect to a filtration `ℱ` if `f`
@@ -344,7 +344,7 @@ theorem sub_martingale [Preorder E] [CovariantClass E E (· + ·) (· ≤ ·)]
 
 section
 
-variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
+variable {F : Type*} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
   [OrderedSMul ℝ F]
 
 theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Supermartingale f ℱ μ) :
@@ -370,7 +370,7 @@ namespace Submartingale
 
 section
 
-variable {F : Type _} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
+variable {F : Type*} [NormedLatticeAddCommGroup F] [NormedSpace ℝ F] [CompleteSpace F]
   [OrderedSMul ℝ F]
 
 theorem smul_nonneg {f : ι → Ω → F} {c : ℝ} (hc : 0 ≤ c) (hf : Submartingale f ℱ μ) :
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) 2021 Rémy Degenne. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Rémy Degenne, Kexing Ying
-
-! This file was ported from Lean 3 source module probability.martingale.basic
-! leanprover-community/mathlib commit ba074af83b6cf54c3104e59402b39410ddbd6dca
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Probability.Notation
 import Mathlib.Probability.Process.Stopping
 
+#align_import probability.martingale.basic from "leanprover-community/mathlib"@"ba074af83b6cf54c3104e59402b39410ddbd6dca"
+
 /-!
 # Martingales
 
feat: port Probability.Martingale.Basic (#5215)

Dependencies 12 + 1005

1006 files ported (98.8%)
459369 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