probability.process.stoppingMathlib.Probability.Process.Stopping

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
@@ -618,7 +618,7 @@ protected theorem measurableSet_ge' [TopologicalSpace ι] [OrderTopology ι]
     by
     ext1 ω
     simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]
-    rw [@eq_comm _ i, or_comm']
+    rw [@eq_comm _ i, or_comm]
   rw [this]
   exact (hτ.measurable_set_eq' i).union (hτ.measurable_set_gt' i)
 #align measure_theory.is_stopping_time.measurable_set_ge' MeasureTheory.IsStoppingTime.measurableSet_ge'
@@ -666,7 +666,7 @@ protected theorem measurableSet_ge_of_countable_range' (hτ : IsStoppingTime f 
     by
     ext1 ω
     simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]
-    rw [@eq_comm _ i, or_comm']
+    rw [@eq_comm _ i, or_comm]
   rw [this]
   exact (hτ.measurable_set_eq_of_countable_range' h_countable i).union (hτ.measurable_set_gt' i)
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range'
Diff
@@ -86,7 +86,7 @@ theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStopping
   · suffices {ω : Ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
     ext1 ω
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
-    rw [isMin_iff_forall_not_lt] at hi_min 
+    rw [isMin_iff_forall_not_lt] at hi_min
     exact hi_min (τ ω)
   have : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iio i := rfl
   rw [this, ← Iic_pred_of_not_is_min hi_min]
@@ -213,7 +213,7 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
     ext1 k
     simp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]
     refine' ⟨fun hk_lt_i => _, fun h_exists_k_le_seq => _⟩
-    · rw [tendsto_at_top'] at h_tendsto 
+    · rw [tendsto_at_top'] at h_tendsto
       have h_nhds : Set.Ici k ∈ 𝓝 i :=
         mem_nhds_iff.mpr ⟨Set.Ioi k, Set.Ioi_subset_Ici le_rfl, isOpen_Ioi, hk_lt_i⟩
       obtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, b ≥ a → k ≤ seq b := h_tendsto (Set.Ici k) h_nhds
@@ -354,7 +354,7 @@ theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStopping
   by_cases hij : i ≤ j
   · simp_rw [eq_comm, ← Nat.sub_eq_iff_eq_add hij, eq_comm]
     exact f.mono (j.sub_le i) _ (hτ.measurable_set_eq (j - i))
-  · rw [not_le] at hij 
+  · rw [not_le] at hij
     convert MeasurableSet.empty
     ext ω
     simp only [Set.mem_empty_iff_false, iff_false_iff]
@@ -401,7 +401,7 @@ protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω
     · rw [Set.union_inter_distrib_right]
       simp only [Set.compl_inter_self, Set.union_empty]
   measurable_set_iUnion s hs i := by
-    rw [forall_swap] at hs 
+    rw [forall_swap] at hs
     rw [Set.iUnion_inter]
     exact MeasurableSet.iUnion (hs i)
 #align measure_theory.is_stopping_time.measurable_space MeasureTheory.IsStoppingTime.measurableSpace
@@ -432,7 +432,7 @@ theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
 theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
     hτ.MeasurableSpace ≤ m := by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs 
+  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs
   rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
   · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
   · ext ω; constructor <;> rw [Set.mem_iUnion]
@@ -447,14 +447,14 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
     (hτ : IsStoppingTime f τ) : hτ.MeasurableSpace ≤ m :=
   by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs 
+  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs
   obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := at_top.exists_seq_tendsto
   rw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]
   · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
   · ext ω; constructor <;> rw [Set.mem_iUnion]
     · intro hx
       suffices : ∃ i, τ ω ≤ seq i; exact ⟨this.some, hx, this.some_spec⟩
-      rw [tendsto_at_top] at h_seq_tendsto 
+      rw [tendsto_at_top] at h_seq_tendsto
       exact (h_seq_tendsto (τ ω)).exists
     · rintro ⟨_, hx, _⟩
       exact hx
@@ -705,7 +705,7 @@ protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f
     (h_countable : (Set.range τ).Countable) : hτ.MeasurableSpace ≤ m :=
   by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs 
+  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs
   rw [(_ : s = ⋃ i ∈ Set.range τ, s ∩ {ω | τ ω ≤ i})]
   · exact MeasurableSet.biUnion h_countable fun i _ => f.le i _ (hs i)
   · ext ω
@@ -713,7 +713,7 @@ protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f
     · exact fun hx => ⟨τ ω, by simpa using hx⟩
     · rintro ⟨i, hx⟩
       simp only [Set.mem_range, Set.iUnion_exists, Set.mem_iUnion, Set.mem_inter_iff,
-        Set.mem_setOf_eq, exists_prop, exists_and_right] at hx 
+        Set.mem_setOf_eq, exists_prop, exists_and_right] at hx
       exact hx.1.2
 #align measure_theory.is_stopping_time.measurable_space_le_of_countable_range MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable_range
 -/
@@ -828,7 +828,7 @@ theorem measurableSet_inter_le_iff [TopologicalSpace ι] [SecondCountableTopolog
       rw [Set.inter_assoc, Set.inter_self]
     rw [this]
     exact measurable_set_inter_le _ _ _ h
-  · rw [measurable_set_min_iff] at h 
+  · rw [measurable_set_min_iff] at h
     exact h.1
 #align measure_theory.is_stopping_time.measurable_set_inter_le_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_iff
 -/
@@ -842,7 +842,7 @@ theorem measurableSet_inter_le_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω
     is_stopping_time.measurable_space_const, is_stopping_time.measurable_set]
   refine' ⟨fun h => ⟨h, _⟩, fun h j => h.1 j⟩
   specialize h i
-  rwa [Set.inter_assoc, Set.inter_self] at h 
+  rwa [Set.inter_assoc, Set.inter_self] at h
 #align measure_theory.is_stopping_time.measurable_set_inter_le_const_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_const_iff
 -/
 
@@ -877,7 +877,7 @@ theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTop
     (hπ : IsStoppingTime f π) : measurable_set[hπ.MeasurableSpace] {ω | τ ω ≤ π ω} :=
   by
   suffices measurable_set[(hτ.min hπ).MeasurableSpace] {ω : Ω | τ ω ≤ π ω} by
-    rw [measurable_set_min_iff hτ hπ] at this ; exact this.2
+    rw [measurable_set_min_iff hτ hπ] at this; exact this.2
   rw [← Set.univ_inter {ω : Ω | τ ω ≤ π ω}, ← hτ.measurable_set_inter_le_iff hπ, Set.univ_inter]
   exact measurable_set_le_stopping_time hτ hπ
 #align measure_theory.is_stopping_time.measurable_set_stopping_time_le MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le
@@ -902,7 +902,7 @@ theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [Meas
     · rw [← h.1]; exact h.2
     · cases' h with h' hσ_le
       cases' h' with h_eq hτ_le
-      rwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq 
+      rwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq
   rw [this]
   refine'
     MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurable_set_le j)) (hπ.measurable_set_le j)
@@ -931,7 +931,7 @@ theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalS
     · rw [← h.1]; exact h.2
     · cases' h with h' hπ_le
       cases' h' with h_eq hτ_le
-      rwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq 
+      rwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq
   rw [this]
   refine'
     MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurable_set_le j)) (hπ.measurable_set_le j)
@@ -1148,7 +1148,7 @@ theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s :
   · rw [stopped_process_eq_of_le h, Set.indicator_of_mem, Finset.sum_eq_zero, add_zero]
     · intro m hm
       refine' Set.indicator_of_not_mem _ _
-      rw [Finset.mem_filter] at hm 
+      rw [Finset.mem_filter] at hm
       exact (hm.2.trans_le h).ne'
     · exact h
   · rw [stopped_process_eq_of_ge (le_of_lt h), Finset.sum_eq_single_of_mem (τ ω)]
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2021 Kexing Ying. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying, Rémy Degenne
 -/
-import Mathbin.Probability.Process.Adapted
+import Probability.Process.Adapted
 
 #align_import probability.process.stopping from "leanprover-community/mathlib"@"e160cefedc932ce41c7049bf0c4b0f061d06216e"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Kexing Ying. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying, Rémy Degenne
-
-! This file was ported from Lean 3 source module probability.process.stopping
-! leanprover-community/mathlib commit e160cefedc932ce41c7049bf0c4b0f061d06216e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Probability.Process.Adapted
 
+#align_import probability.process.stopping from "leanprover-community/mathlib"@"e160cefedc932ce41c7049bf0c4b0f061d06216e"
+
 /-!
 # Stopping times, stopped processes and stopped values
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying, Rémy Degenne
 
 ! This file was ported from Lean 3 source module probability.process.stopping
-! leanprover-community/mathlib commit ba074af83b6cf54c3104e59402b39410ddbd6dca
+! leanprover-community/mathlib commit e160cefedc932ce41c7049bf0c4b0f061d06216e
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.Probability.Process.Adapted
 /-!
 # Stopping times, stopped processes and stopped values
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 Definition and properties of stopping times.
 
 ## Main definitions
Diff
@@ -47,6 +47,7 @@ variable {Ω β ι : Type _} {m : MeasurableSpace Ω}
 /-! ### Stopping times -/
 
 
+#print MeasureTheory.IsStoppingTime /-
 /-- A stopping time with respect to some filtration `f` is a function
 `τ` such that for all `i`, the preimage of `{j | j ≤ i}` along `τ` is measurable
 with respect to `f i`.
@@ -56,10 +57,13 @@ Intuitively, the stopping time `τ` describes some stopping rule such that at ti
 def IsStoppingTime [Preorder ι] (f : Filtration ι m) (τ : Ω → ι) :=
   ∀ i : ι, measurable_set[f i] <| {ω | τ ω ≤ i}
 #align measure_theory.is_stopping_time MeasureTheory.IsStoppingTime
+-/
 
+#print MeasureTheory.isStoppingTime_const /-
 theorem isStoppingTime_const [Preorder ι] (f : Filtration ι m) (i : ι) :
     IsStoppingTime f fun ω => i := fun j => by simp only [MeasurableSet.const]
 #align measure_theory.is_stopping_time_const MeasureTheory.isStoppingTime_const
+-/
 
 section MeasurableSet
 
@@ -67,11 +71,14 @@ section Preorder
 
 variable [Preorder ι] {f : Filtration ι m} {τ : Ω → ι}
 
+#print MeasureTheory.IsStoppingTime.measurableSet_le /-
 protected theorem IsStoppingTime.measurableSet_le (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | τ ω ≤ i} :=
   hτ i
 #align measure_theory.is_stopping_time.measurable_set_le MeasureTheory.IsStoppingTime.measurableSet_le
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt_of_pred /-
 theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | τ ω < i} :=
   by
@@ -85,6 +92,7 @@ theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStopping
   rw [this, ← Iic_pred_of_not_is_min hi_min]
   exact f.mono (pred_le i) _ (hτ.measurable_set_le <| pred i)
 #align measure_theory.is_stopping_time.measurable_set_lt_of_pred MeasureTheory.IsStoppingTime.measurableSet_lt_of_pred
+-/
 
 end Preorder
 
@@ -94,6 +102,7 @@ namespace IsStoppingTime
 
 variable [PartialOrder ι] {τ : Ω → ι} {f : Filtration ι m}
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range /-
 protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) : measurable_set[f i] {ω | τ ω = i} :=
   by
@@ -118,12 +127,16 @@ protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ
   · simp only [hji, Set.iUnion_false]
     exact @MeasurableSet.empty _ (f i)
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable /-
 protected theorem measurableSet_eq_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | τ ω = i} :=
   hτ.measurableSet_eq_of_countable_range (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range /-
 protected theorem measurableSet_lt_of_countable_range (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) : measurable_set[f i] {ω | τ ω < i} :=
   by
@@ -131,12 +144,16 @@ protected theorem measurableSet_lt_of_countable_range (hτ : IsStoppingTime f τ
   rw [this]
   exact (hτ.measurable_set_le i).diffₓ (hτ.measurable_set_eq_of_countable_range h_countable i)
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable /-
 protected theorem measurableSet_lt_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | τ ω < i} :=
   hτ.measurableSet_lt_of_countable_range (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range /-
 protected theorem measurableSet_ge_of_countable_range {ι} [LinearOrder ι] {τ : Ω → ι}
     {f : Filtration ι m} (hτ : IsStoppingTime f τ) (h_countable : (Set.range τ).Countable) (i : ι) :
     measurable_set[f i] {ω | i ≤ τ ω} :=
@@ -146,11 +163,14 @@ protected theorem measurableSet_ge_of_countable_range {ι} [LinearOrder ι] {τ
   rw [this]
   exact (hτ.measurable_set_lt_of_countable_range h_countable i).compl
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable /-
 protected theorem measurableSet_ge_of_countable {ι} [LinearOrder ι] {τ : Ω → ι} {f : Filtration ι m}
     [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) : measurable_set[f i] {ω | i ≤ τ ω} :=
   hτ.measurableSet_ge_of_countable_range (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable
+-/
 
 end IsStoppingTime
 
@@ -160,6 +180,7 @@ section LinearOrder
 
 variable [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
 
+#print MeasureTheory.IsStoppingTime.measurableSet_gt /-
 theorem IsStoppingTime.measurableSet_gt (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | i < τ ω} :=
   by
@@ -168,11 +189,13 @@ theorem IsStoppingTime.measurableSet_gt (hτ : IsStoppingTime f τ) (i : ι) :
   rw [this]
   exact (hτ.measurable_set_le i).compl
 #align measure_theory.is_stopping_time.measurable_set_gt MeasureTheory.IsStoppingTime.measurableSet_gt
+-/
 
 section TopologicalSpace
 
 variable [TopologicalSpace ι] [OrderTopology ι] [FirstCountableTopology ι]
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt_of_isLUB /-
 /-- Auxiliary lemma for `is_stopping_time.measurable_set_lt`. -/
 theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i : ι)
     (h_lub : IsLUB (Set.Iio i) i) : measurable_set[f i] {ω | τ ω < i} :=
@@ -203,7 +226,9 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
   simp only [Set.preimage_iUnion, Set.preimage_setOf_eq]
   exact MeasurableSet.iUnion fun n => f.mono (h_bound n).le _ (hτ.measurable_set_le (seq n))
 #align measure_theory.is_stopping_time.measurable_set_lt_of_is_lub MeasureTheory.IsStoppingTime.measurableSet_lt_of_isLUB
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt /-
 theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | τ ω < i} :=
   by
@@ -215,7 +240,9 @@ theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
     rw [h_lt_eq_preimage, h_Iio_eq_Iic]
     exact f.mono (lub_Iio_le i hi'_lub) _ (hτ.measurable_set_le i')
 #align measure_theory.is_stopping_time.measurable_set_lt MeasureTheory.IsStoppingTime.measurableSet_lt
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_ge /-
 theorem IsStoppingTime.measurableSet_ge (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | i ≤ τ ω} :=
   by
@@ -224,7 +251,9 @@ theorem IsStoppingTime.measurableSet_ge (hτ : IsStoppingTime f τ) (i : ι) :
   rw [this]
   exact (hτ.measurable_set_lt i).compl
 #align measure_theory.is_stopping_time.measurable_set_ge MeasureTheory.IsStoppingTime.measurableSet_ge
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq /-
 theorem IsStoppingTime.measurableSet_eq (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] {ω | τ ω = i} :=
   by
@@ -233,16 +262,21 @@ theorem IsStoppingTime.measurableSet_eq (hτ : IsStoppingTime f τ) (i : ι) :
   rw [this]
   exact (hτ.measurable_set_le i).inter (hτ.measurable_set_ge i)
 #align measure_theory.is_stopping_time.measurable_set_eq MeasureTheory.IsStoppingTime.measurableSet_eq
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq_le /-
 theorem IsStoppingTime.measurableSet_eq_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
     measurable_set[f j] {ω | τ ω = i} :=
   f.mono hle _ <| hτ.measurableSet_eq i
 #align measure_theory.is_stopping_time.measurable_set_eq_le MeasureTheory.IsStoppingTime.measurableSet_eq_le
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt_le /-
 theorem IsStoppingTime.measurableSet_lt_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
     measurable_set[f j] {ω | τ ω < i} :=
   f.mono hle _ <| hτ.measurableSet_lt i
 #align measure_theory.is_stopping_time.measurable_set_lt_le MeasureTheory.IsStoppingTime.measurableSet_lt_le
+-/
 
 end TopologicalSpace
 
@@ -250,6 +284,7 @@ end LinearOrder
 
 section Countable
 
+#print MeasureTheory.isStoppingTime_of_measurableSet_eq /-
 theorem isStoppingTime_of_measurableSet_eq [Preorder ι] [Countable ι] {f : Filtration ι m}
     {τ : Ω → ι} (hτ : ∀ i, measurable_set[f i] {ω | τ ω = i}) : IsStoppingTime f τ :=
   by
@@ -258,6 +293,7 @@ theorem isStoppingTime_of_measurableSet_eq [Preorder ι] [Countable ι] {f : Fil
   refine' MeasurableSet.biUnion (Set.to_countable _) fun k hk => _
   exact f.mono hk _ (hτ k)
 #align measure_theory.is_stopping_time_of_measurable_set_eq MeasureTheory.isStoppingTime_of_measurableSet_eq
+-/
 
 end Countable
 
@@ -265,6 +301,7 @@ end MeasurableSet
 
 namespace IsStoppingTime
 
+#print MeasureTheory.IsStoppingTime.max /-
 protected theorem max [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι} (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) : IsStoppingTime f fun ω => max (τ ω) (π ω) :=
   by
@@ -272,12 +309,16 @@ protected theorem max [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι}
   simp_rw [max_le_iff, Set.setOf_and]
   exact (hτ i).inter (hπ i)
 #align measure_theory.is_stopping_time.max MeasureTheory.IsStoppingTime.max
+-/
 
+#print MeasureTheory.IsStoppingTime.max_const /-
 protected theorem max_const [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
     (hτ : IsStoppingTime f τ) (i : ι) : IsStoppingTime f fun ω => max (τ ω) i :=
   hτ.max (isStoppingTime_const f i)
 #align measure_theory.is_stopping_time.max_const MeasureTheory.IsStoppingTime.max_const
+-/
 
+#print MeasureTheory.IsStoppingTime.min /-
 protected theorem min [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι} (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) : IsStoppingTime f fun ω => min (τ ω) (π ω) :=
   by
@@ -285,12 +326,16 @@ protected theorem min [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι}
   simp_rw [min_le_iff, Set.setOf_or]
   exact (hτ i).union (hπ i)
 #align measure_theory.is_stopping_time.min MeasureTheory.IsStoppingTime.min
+-/
 
+#print MeasureTheory.IsStoppingTime.min_const /-
 protected theorem min_const [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
     (hτ : IsStoppingTime f τ) (i : ι) : IsStoppingTime f fun ω => min (τ ω) i :=
   hτ.min (isStoppingTime_const f i)
 #align measure_theory.is_stopping_time.min_const MeasureTheory.IsStoppingTime.min_const
+-/
 
+#print MeasureTheory.IsStoppingTime.add_const /-
 theorem add_const [AddGroup ι] [Preorder ι] [CovariantClass ι ι (Function.swap (· + ·)) (· ≤ ·)]
     [CovariantClass ι ι (· + ·) (· ≤ ·)] {f : Filtration ι m} {τ : Ω → ι} (hτ : IsStoppingTime f τ)
     {i : ι} (hi : 0 ≤ i) : IsStoppingTime f fun ω => τ ω + i :=
@@ -299,7 +344,9 @@ theorem add_const [AddGroup ι] [Preorder ι] [CovariantClass ι ι (Function.sw
   simp_rw [← le_sub_iff_add_le]
   exact f.mono (sub_le_self j hi) _ (hτ (j - i))
 #align measure_theory.is_stopping_time.add_const MeasureTheory.IsStoppingTime.add_const
+-/
 
+#print MeasureTheory.IsStoppingTime.add_const_nat /-
 theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStoppingTime f τ) {i : ℕ} :
     IsStoppingTime f fun ω => τ ω + i :=
   by
@@ -314,7 +361,9 @@ theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStopping
     rintro (hx : τ ω + i = j)
     linarith
 #align measure_theory.is_stopping_time.add_const_nat MeasureTheory.IsStoppingTime.add_const_nat
+-/
 
+#print MeasureTheory.IsStoppingTime.add /-
 -- generalize to certain countable type?
 theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
     IsStoppingTime f (τ + π) := by
@@ -330,11 +379,13 @@ theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f
   rintro ⟨j, hj, rfl, h⟩
   assumption
 #align measure_theory.is_stopping_time.add MeasureTheory.IsStoppingTime.add
+-/
 
 section Preorder
 
 variable [Preorder ι] {f : Filtration ι m} {τ π : Ω → ι}
 
+#print MeasureTheory.IsStoppingTime.measurableSpace /-
 /-- The associated σ-algebra with a stopping time. -/
 protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω
     where
@@ -354,12 +405,16 @@ protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω
     rw [Set.iUnion_inter]
     exact MeasurableSet.iUnion (hs i)
 #align measure_theory.is_stopping_time.measurable_space MeasureTheory.IsStoppingTime.measurableSpace
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet /-
 protected theorem measurableSet (hτ : IsStoppingTime f τ) (s : Set Ω) :
     measurable_set[hτ.MeasurableSpace] s ↔ ∀ i : ι, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) :=
   Iff.rfl
 #align measure_theory.is_stopping_time.measurable_set MeasureTheory.IsStoppingTime.measurableSet
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_mono /-
 theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
     hτ.MeasurableSpace ≤ hπ.MeasurableSpace :=
   by
@@ -371,7 +426,9 @@ theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
     intro hle' _
     exact le_trans (hle _) hle'
 #align measure_theory.is_stopping_time.measurable_space_mono MeasureTheory.IsStoppingTime.measurableSpace_mono
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable /-
 theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
     hτ.MeasurableSpace ≤ m := by
   intro s hs
@@ -383,7 +440,9 @@ theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f 
     · rintro ⟨_, hx, _⟩
       exact hx
 #align measure_theory.is_stopping_time.measurable_space_le_of_countable MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_le' /-
 theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).ne_bot]
     (hτ : IsStoppingTime f τ) : hτ.MeasurableSpace ≤ m :=
   by
@@ -401,7 +460,9 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
       exact hx
   all_goals infer_instance
 #align measure_theory.is_stopping_time.measurable_space_le' MeasureTheory.IsStoppingTime.measurableSpace_le'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_le /-
 theorem measurableSpace_le {ι} [SemilatticeSup ι] {f : Filtration ι m} {τ : Ω → ι}
     [IsCountablyGenerated (atTop : Filter ι)] (hτ : IsStoppingTime f τ) : hτ.MeasurableSpace ≤ m :=
   by
@@ -413,6 +474,7 @@ theorem measurableSpace_le {ι} [SemilatticeSup ι] {f : Filtration ι m} {τ :
     rw [Unique.eq_default s, Unique.eq_default ∅]
   exact measurable_space_le' hτ
 #align measure_theory.is_stopping_time.measurable_space_le MeasureTheory.IsStoppingTime.measurableSpace_le
+-/
 
 example {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStoppingTime f τ) : hτ.MeasurableSpace ≤ m :=
   hτ.measurableSpace_le
@@ -420,6 +482,7 @@ example {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStoppingTime f τ) : h
 example {f : Filtration ℝ m} {τ : Ω → ℝ} (hτ : IsStoppingTime f τ) : hτ.MeasurableSpace ≤ m :=
   hτ.measurableSpace_le
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_const /-
 @[simp]
 theorem measurableSpace_const (f : Filtration ι m) (i : ι) :
     (isStoppingTime_const f i).MeasurableSpace = f i :=
@@ -436,7 +499,9 @@ theorem measurableSpace_const (f : Filtration ι m) (i : ι) :
       exact f.mono hij _ h
     · simp only [hij, Set.setOf_false, Set.inter_empty, MeasurableSet.empty]
 #align measure_theory.is_stopping_time.measurable_space_const MeasureTheory.IsStoppingTime.measurableSpace_const
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_inter_eq_iff /-
 theorem measurableSet_inter_eq_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i : ι) :
     measurable_set[hτ.MeasurableSpace] (s ∩ {ω | τ ω = i}) ↔
       measurable_set[f i] (s ∩ {ω | τ ω = i}) :=
@@ -458,24 +523,32 @@ theorem measurableSet_inter_eq_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i :
       exact f.mono hij _ h
     · simp [hij]
 #align measure_theory.is_stopping_time.measurable_set_inter_eq_iff MeasureTheory.IsStoppingTime.measurableSet_inter_eq_iff
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_le_of_le_const /-
 theorem measurableSpace_le_of_le_const (hτ : IsStoppingTime f τ) {i : ι} (hτ_le : ∀ ω, τ ω ≤ i) :
     hτ.MeasurableSpace ≤ f i :=
   (measurableSpace_mono hτ _ hτ_le).trans (measurableSpace_const _ _).le
 #align measure_theory.is_stopping_time.measurable_space_le_of_le_const MeasureTheory.IsStoppingTime.measurableSpace_le_of_le_const
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_le_of_le /-
 theorem measurableSpace_le_of_le (hτ : IsStoppingTime f τ) {n : ι} (hτ_le : ∀ ω, τ ω ≤ n) :
     hτ.MeasurableSpace ≤ m :=
   (hτ.measurableSpace_le_of_le_const hτ_le).trans (f.le n)
 #align measure_theory.is_stopping_time.measurable_space_le_of_le MeasureTheory.IsStoppingTime.measurableSpace_le_of_le
+-/
 
+#print MeasureTheory.IsStoppingTime.le_measurableSpace_of_const_le /-
 theorem le_measurableSpace_of_const_le (hτ : IsStoppingTime f τ) {i : ι} (hτ_le : ∀ ω, i ≤ τ ω) :
     f i ≤ hτ.MeasurableSpace :=
   (measurableSpace_const _ _).symm.le.trans (measurableSpace_mono _ hτ hτ_le)
 #align measure_theory.is_stopping_time.le_measurable_space_of_const_le MeasureTheory.IsStoppingTime.le_measurableSpace_of_const_le
+-/
 
 end Preorder
 
+#print MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time /-
 instance sigmaFinite_stopping_time {ι} [SemilatticeSup ι] [OrderBot ι]
     [(Filter.atTop : Filter ι).IsCountablyGenerated] {μ : Measure Ω} {f : Filtration ι m}
     {τ : Ω → ι} [SigmaFiniteFiltration μ f] (hτ : IsStoppingTime f τ) :
@@ -486,7 +559,9 @@ instance sigmaFinite_stopping_time {ι} [SemilatticeSup ι] [OrderBot ι]
   · exact hτ.le_measurable_space_of_const_le fun _ => bot_le
   · infer_instance
 #align measure_theory.is_stopping_time.sigma_finite_stopping_time MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time
+-/
 
+#print MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time_of_le /-
 instance sigmaFinite_stopping_time_of_le {ι} [SemilatticeSup ι] [OrderBot ι] {μ : Measure Ω}
     {f : Filtration ι m} {τ : Ω → ι} [SigmaFiniteFiltration μ f] (hτ : IsStoppingTime f τ) {n : ι}
     (hτ_le : ∀ ω, τ ω ≤ n) : SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le)) :=
@@ -496,11 +571,13 @@ instance sigmaFinite_stopping_time_of_le {ι} [SemilatticeSup ι] [OrderBot ι]
   · exact hτ.le_measurable_space_of_const_le fun _ => bot_le
   · infer_instance
 #align measure_theory.is_stopping_time.sigma_finite_stopping_time_of_le MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time_of_le
+-/
 
 section LinearOrder
 
 variable [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι}
 
+#print MeasureTheory.IsStoppingTime.measurableSet_le' /-
 protected theorem measurableSet_le' (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | τ ω ≤ i} :=
   by
@@ -510,7 +587,9 @@ protected theorem measurableSet_le' (hτ : IsStoppingTime f τ) (i : ι) :
   rw [this]
   exact f.mono (min_le_right i j) _ (hτ _)
 #align measure_theory.is_stopping_time.measurable_set_le' MeasureTheory.IsStoppingTime.measurableSet_le'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_gt' /-
 protected theorem measurableSet_gt' (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | i < τ ω} :=
   by
@@ -518,7 +597,9 @@ protected theorem measurableSet_gt' (hτ : IsStoppingTime f τ) (i : ι) :
   rw [this]
   exact (hτ.measurable_set_le' i).compl
 #align measure_theory.is_stopping_time.measurable_set_gt' MeasureTheory.IsStoppingTime.measurableSet_gt'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq' /-
 protected theorem measurableSet_eq' [TopologicalSpace ι] [OrderTopology ι]
     [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | τ ω = i} :=
@@ -526,7 +607,9 @@ protected theorem measurableSet_eq' [TopologicalSpace ι] [OrderTopology ι]
   rw [← Set.univ_inter {ω | τ ω = i}, measurable_set_inter_eq_iff, Set.univ_inter]
   exact hτ.measurable_set_eq i
 #align measure_theory.is_stopping_time.measurable_set_eq' MeasureTheory.IsStoppingTime.measurableSet_eq'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_ge' /-
 protected theorem measurableSet_ge' [TopologicalSpace ι] [OrderTopology ι]
     [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | i ≤ τ ω} :=
@@ -539,7 +622,9 @@ protected theorem measurableSet_ge' [TopologicalSpace ι] [OrderTopology ι]
   rw [this]
   exact (hτ.measurable_set_eq' i).union (hτ.measurable_set_gt' i)
 #align measure_theory.is_stopping_time.measurable_set_ge' MeasureTheory.IsStoppingTime.measurableSet_ge'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt' /-
 protected theorem measurableSet_lt' [TopologicalSpace ι] [OrderTopology ι]
     [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | τ ω < i} :=
@@ -551,9 +636,11 @@ protected theorem measurableSet_lt' [TopologicalSpace ι] [OrderTopology ι]
   rw [this]
   exact (hτ.measurable_set_le' i).diffₓ (hτ.measurable_set_eq' i)
 #align measure_theory.is_stopping_time.measurable_set_lt' MeasureTheory.IsStoppingTime.measurableSet_lt'
+-/
 
 section Countable
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range' /-
 protected theorem measurableSet_eq_of_countable_range' (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | τ ω = i} :=
@@ -561,12 +648,16 @@ protected theorem measurableSet_eq_of_countable_range' (hτ : IsStoppingTime f 
   rw [← Set.univ_inter {ω | τ ω = i}, measurable_set_inter_eq_iff, Set.univ_inter]
   exact hτ.measurable_set_eq_of_countable_range h_countable i
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable' /-
 protected theorem measurableSet_eq_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | τ ω = i} :=
   hτ.measurableSet_eq_of_countable_range' (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable' MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range' /-
 protected theorem measurableSet_ge_of_countable_range' (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | i ≤ τ ω} :=
@@ -579,12 +670,16 @@ protected theorem measurableSet_ge_of_countable_range' (hτ : IsStoppingTime f 
   rw [this]
   exact (hτ.measurable_set_eq_of_countable_range' h_countable i).union (hτ.measurable_set_gt' i)
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable' /-
 protected theorem measurableSet_ge_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | i ≤ τ ω} :=
   hτ.measurableSet_ge_of_countable_range' (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable' MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range' /-
 protected theorem measurableSet_lt_of_countable_range' (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | τ ω < i} :=
@@ -596,12 +691,16 @@ protected theorem measurableSet_lt_of_countable_range' (hτ : IsStoppingTime f 
   rw [this]
   exact (hτ.measurable_set_le' i).diffₓ (hτ.measurable_set_eq_of_countable_range' h_countable i)
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable' /-
 protected theorem measurableSet_lt_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] {ω | τ ω < i} :=
   hτ.measurableSet_lt_of_countable_range' (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable' MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable'
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable_range /-
 protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) : hτ.MeasurableSpace ≤ m :=
   by
@@ -617,21 +716,27 @@ protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f
         Set.mem_setOf_eq, exists_prop, exists_and_right] at hx 
       exact hx.1.2
 #align measure_theory.is_stopping_time.measurable_space_le_of_countable_range MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable_range
+-/
 
 end Countable
 
+#print MeasureTheory.IsStoppingTime.measurable /-
 protected theorem measurable [TopologicalSpace ι] [MeasurableSpace ι] [BorelSpace ι]
     [OrderTopology ι] [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) :
     measurable[hτ.MeasurableSpace] τ :=
   @measurable_of_Iic ι Ω _ _ _ hτ.MeasurableSpace _ _ _ _ fun i => hτ.measurableSet_le' i
 #align measure_theory.is_stopping_time.measurable MeasureTheory.IsStoppingTime.measurable
+-/
 
+#print MeasureTheory.IsStoppingTime.measurable_of_le /-
 protected theorem measurable_of_le [TopologicalSpace ι] [MeasurableSpace ι] [BorelSpace ι]
     [OrderTopology ι] [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) {i : ι}
     (hτ_le : ∀ ω, τ ω ≤ i) : measurable[f i] τ :=
   hτ.Measurable.mono (measurableSpace_le_of_le_const _ hτ_le) le_rfl
 #align measure_theory.is_stopping_time.measurable_of_le MeasureTheory.IsStoppingTime.measurable_of_le
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_min /-
 theorem measurableSpace_min (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
     (hτ.min hπ).MeasurableSpace = hτ.MeasurableSpace ⊓ hπ.MeasurableSpace :=
   by
@@ -650,24 +755,32 @@ theorem measurableSpace_min (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
     simp_rw [this, Set.inter_union_distrib_left]
     exact fun h i => (h.left i).union (h.right i)
 #align measure_theory.is_stopping_time.measurable_space_min MeasureTheory.IsStoppingTime.measurableSpace_min
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_min_iff /-
 theorem measurableSet_min_iff (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (s : Set Ω) :
     measurable_set[(hτ.min hπ).MeasurableSpace] s ↔
       measurable_set[hτ.MeasurableSpace] s ∧ measurable_set[hπ.MeasurableSpace] s :=
   by rw [measurable_space_min]; rfl
 #align measure_theory.is_stopping_time.measurable_set_min_iff MeasureTheory.IsStoppingTime.measurableSet_min_iff
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSpace_min_const /-
 theorem measurableSpace_min_const (hτ : IsStoppingTime f τ) {i : ι} :
     (hτ.min_const i).MeasurableSpace = hτ.MeasurableSpace ⊓ f i := by
   rw [hτ.measurable_space_min (is_stopping_time_const _ i), measurable_space_const]
 #align measure_theory.is_stopping_time.measurable_space_min_const MeasureTheory.IsStoppingTime.measurableSpace_min_const
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_min_const_iff /-
 theorem measurableSet_min_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω) {i : ι} :
     measurable_set[(hτ.min_const i).MeasurableSpace] s ↔
       measurable_set[hτ.MeasurableSpace] s ∧ measurable_set[f i] s :=
   by rw [measurable_space_min_const, MeasurableSpace.measurableSet_inf]
 #align measure_theory.is_stopping_time.measurable_set_min_const_iff MeasureTheory.IsStoppingTime.measurableSet_min_const_iff
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_inter_le /-
 theorem measurableSet_inter_le [TopologicalSpace ι] [SecondCountableTopology ι] [OrderTopology ι]
     [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π)
     (s : Set Ω) (hs : measurable_set[hτ.MeasurableSpace] s) :
@@ -701,7 +814,9 @@ theorem measurableSet_inter_le [TopologicalSpace ι] [SecondCountableTopology ι
   · exact (hτ.min_const i).measurable_of_le fun _ => min_le_right _ _
   · exact ((hτ.min hπ).min_const i).measurable_of_le fun _ => min_le_right _ _
 #align measure_theory.is_stopping_time.measurable_set_inter_le MeasureTheory.IsStoppingTime.measurableSet_inter_le
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_inter_le_iff /-
 theorem measurableSet_inter_le_iff [TopologicalSpace ι] [SecondCountableTopology ι]
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) (s : Set Ω) :
@@ -716,7 +831,9 @@ theorem measurableSet_inter_le_iff [TopologicalSpace ι] [SecondCountableTopolog
   · rw [measurable_set_min_iff] at h 
     exact h.1
 #align measure_theory.is_stopping_time.measurable_set_inter_le_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_iff
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_inter_le_const_iff /-
 theorem measurableSet_inter_le_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i : ι) :
     measurable_set[hτ.MeasurableSpace] (s ∩ {ω | τ ω ≤ i}) ↔
       measurable_set[(hτ.min_const i).MeasurableSpace] (s ∩ {ω | τ ω ≤ i}) :=
@@ -727,7 +844,9 @@ theorem measurableSet_inter_le_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω
   specialize h i
   rwa [Set.inter_assoc, Set.inter_self] at h 
 #align measure_theory.is_stopping_time.measurable_set_inter_le_const_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_const_iff
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_le_stopping_time /-
 theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTopology ι]
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) : measurable_set[hτ.MeasurableSpace] {ω | τ ω ≤ π ω} :=
@@ -750,7 +869,9 @@ theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTop
   · exact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _
   · exact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _
 #align measure_theory.is_stopping_time.measurable_set_le_stopping_time MeasureTheory.IsStoppingTime.measurableSet_le_stopping_time
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le /-
 theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTopology ι]
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) : measurable_set[hπ.MeasurableSpace] {ω | τ ω ≤ π ω} :=
@@ -760,7 +881,9 @@ theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTop
   rw [← Set.univ_inter {ω : Ω | τ ω ≤ π ω}, ← hτ.measurable_set_inter_le_iff hπ, Set.univ_inter]
   exact measurable_set_le_stopping_time hτ hπ
 #align measure_theory.is_stopping_time.measurable_set_stopping_time_le MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq_stopping_time /-
 theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [MeasurableSpace ι]
     [BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι] [SecondCountableTopology ι]
     [MeasurableSub₂ ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
@@ -787,7 +910,9 @@ theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [Meas
   · exact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _
   · exact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _
 #align measure_theory.is_stopping_time.measurable_set_eq_stopping_time MeasureTheory.IsStoppingTime.measurableSet_eq_stopping_time
+-/
 
+#print MeasureTheory.IsStoppingTime.measurableSet_eq_stopping_time_of_countable /-
 theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalSpace ι]
     [MeasurableSpace ι] [BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι]
     [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
@@ -814,6 +939,7 @@ theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalS
   · exact (hτ.min_const j).measurable_of_le fun _ => min_le_right _ _
   · exact (hπ.min_const j).measurable_of_le fun _ => min_le_right _ _
 #align measure_theory.is_stopping_time.measurable_set_eq_stopping_time_of_countable MeasureTheory.IsStoppingTime.measurableSet_eq_stopping_time_of_countable
+-/
 
 end LinearOrder
 
@@ -824,47 +950,62 @@ section LinearOrder
 /-! ## Stopped value and stopped process -/
 
 
+#print MeasureTheory.stoppedValue /-
 /-- Given a map `u : ι → Ω → E`, its stopped value with respect to the stopping
 time `τ` is the map `x ↦ u (τ ω) ω`. -/
 def stoppedValue (u : ι → Ω → β) (τ : Ω → ι) : Ω → β := fun ω => u (τ ω) ω
 #align measure_theory.stopped_value MeasureTheory.stoppedValue
+-/
 
+#print MeasureTheory.stoppedValue_const /-
 theorem stoppedValue_const (u : ι → Ω → β) (i : ι) : (stoppedValue u fun ω => i) = u i :=
   rfl
 #align measure_theory.stopped_value_const MeasureTheory.stoppedValue_const
+-/
 
 variable [LinearOrder ι]
 
+#print MeasureTheory.stoppedProcess /-
 /-- Given a map `u : ι → Ω → E`, the stopped process with respect to `τ` is `u i ω` if
 `i ≤ τ ω`, and `u (τ ω) ω` otherwise.
 
 Intuitively, the stopped process stops evolving once the stopping time has occured. -/
 def stoppedProcess (u : ι → Ω → β) (τ : Ω → ι) : ι → Ω → β := fun i ω => u (min i (τ ω)) ω
 #align measure_theory.stopped_process MeasureTheory.stoppedProcess
+-/
 
+#print MeasureTheory.stoppedProcess_eq_stoppedValue /-
 theorem stoppedProcess_eq_stoppedValue {u : ι → Ω → β} {τ : Ω → ι} :
     stoppedProcess u τ = fun i => stoppedValue u fun ω => min i (τ ω) :=
   rfl
 #align measure_theory.stopped_process_eq_stopped_value MeasureTheory.stoppedProcess_eq_stoppedValue
+-/
 
+#print MeasureTheory.stoppedValue_stoppedProcess /-
 theorem stoppedValue_stoppedProcess {u : ι → Ω → β} {τ σ : Ω → ι} :
     stoppedValue (stoppedProcess u τ) σ = stoppedValue u fun ω => min (σ ω) (τ ω) :=
   rfl
 #align measure_theory.stopped_value_stopped_process MeasureTheory.stoppedValue_stoppedProcess
+-/
 
+#print MeasureTheory.stoppedProcess_eq_of_le /-
 theorem stoppedProcess_eq_of_le {u : ι → Ω → β} {τ : Ω → ι} {i : ι} {ω : Ω} (h : i ≤ τ ω) :
     stoppedProcess u τ i ω = u i ω := by simp [stopped_process, min_eq_left h]
 #align measure_theory.stopped_process_eq_of_le MeasureTheory.stoppedProcess_eq_of_le
+-/
 
+#print MeasureTheory.stoppedProcess_eq_of_ge /-
 theorem stoppedProcess_eq_of_ge {u : ι → Ω → β} {τ : Ω → ι} {i : ι} {ω : Ω} (h : τ ω ≤ i) :
     stoppedProcess u τ i ω = u (τ ω) ω := by simp [stopped_process, min_eq_right h]
 #align measure_theory.stopped_process_eq_of_ge MeasureTheory.stoppedProcess_eq_of_ge
+-/
 
 section ProgMeasurable
 
 variable [MeasurableSpace ι] [TopologicalSpace ι] [OrderTopology ι] [SecondCountableTopology ι]
   [BorelSpace ι] [TopologicalSpace β] {u : ι → Ω → β} {τ : Ω → ι} {f : Filtration ι m}
 
+#print MeasureTheory.progMeasurable_min_stopping_time /-
 theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingTime f τ) :
     ProgMeasurable f fun i ω => min i (τ ω) :=
   by
@@ -904,23 +1045,31 @@ theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingT
     convert ω.prop
     simp only [not_le, Set.mem_compl_iff, Set.mem_setOf_eq]
 #align measure_theory.prog_measurable_min_stopping_time MeasureTheory.progMeasurable_min_stopping_time
+-/
 
+#print MeasureTheory.ProgMeasurable.stoppedProcess /-
 theorem ProgMeasurable.stoppedProcess [MetrizableSpace ι] (h : ProgMeasurable f u)
     (hτ : IsStoppingTime f τ) : ProgMeasurable f (stoppedProcess u τ) :=
   h.comp (progMeasurable_min_stopping_time hτ) fun i x => min_le_left _ _
 #align measure_theory.prog_measurable.stopped_process MeasureTheory.ProgMeasurable.stoppedProcess
+-/
 
+#print MeasureTheory.ProgMeasurable.adapted_stoppedProcess /-
 theorem ProgMeasurable.adapted_stoppedProcess [MetrizableSpace ι] (h : ProgMeasurable f u)
     (hτ : IsStoppingTime f τ) : Adapted f (stoppedProcess u τ) :=
   (h.stoppedProcess hτ).Adapted
 #align measure_theory.prog_measurable.adapted_stopped_process MeasureTheory.ProgMeasurable.adapted_stoppedProcess
+-/
 
+#print MeasureTheory.ProgMeasurable.stronglyMeasurable_stoppedProcess /-
 theorem ProgMeasurable.stronglyMeasurable_stoppedProcess [MetrizableSpace ι]
     (hu : ProgMeasurable f u) (hτ : IsStoppingTime f τ) (i : ι) :
     StronglyMeasurable (stoppedProcess u τ i) :=
   (hu.adapted_stoppedProcess hτ i).mono (f.le _)
 #align measure_theory.prog_measurable.strongly_measurable_stopped_process MeasureTheory.ProgMeasurable.stronglyMeasurable_stoppedProcess
+-/
 
+#print MeasureTheory.stronglyMeasurable_stoppedValue_of_le /-
 theorem stronglyMeasurable_stoppedValue_of_le (h : ProgMeasurable f u) (hτ : IsStoppingTime f τ)
     {n : ι} (hτ_le : ∀ ω, τ ω ≤ n) : strongly_measurable[f n] (stoppedValue u τ) :=
   by
@@ -932,7 +1081,9 @@ theorem stronglyMeasurable_stoppedValue_of_le (h : ProgMeasurable f u) (hτ : Is
   refine' strongly_measurable.comp_measurable (h n) _
   exact (hτ.measurable_of_le hτ_le).subtype_mk.prod_mk measurable_id
 #align measure_theory.strongly_measurable_stopped_value_of_le MeasureTheory.stronglyMeasurable_stoppedValue_of_le
+-/
 
+#print MeasureTheory.measurable_stoppedValue /-
 theorem measurable_stoppedValue [MetrizableSpace β] [MeasurableSpace β] [BorelSpace β]
     (hf_prog : ProgMeasurable f u) (hτ : IsStoppingTime f τ) :
     measurable[hτ.MeasurableSpace] (stoppedValue u τ) :=
@@ -950,6 +1101,7 @@ theorem measurable_stoppedValue [MetrizableSpace β] [MeasurableSpace β] [Borel
   intro h
   rw [min_eq_left h]
 #align measure_theory.measurable_stopped_value MeasureTheory.measurable_stoppedValue
+-/
 
 end ProgMeasurable
 
@@ -959,6 +1111,7 @@ section StoppedValueOfMemFinset
 
 variable {μ : Measure Ω} {τ σ : Ω → ι} {E : Type _} {p : ℝ≥0∞} {u : ι → Ω → E}
 
+#print MeasureTheory.stoppedValue_eq_of_mem_finset /-
 theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
     stoppedValue u τ = ∑ i in s, Set.indicator {ω | τ ω = i} (u i) :=
   by
@@ -972,13 +1125,17 @@ theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd :
   · exact h.2.symm
   · refine' ⟨_, h.symm⟩; rw [h]; exact hbdd y
 #align measure_theory.stopped_value_eq_of_mem_finset MeasureTheory.stoppedValue_eq_of_mem_finset
+-/
 
+#print MeasureTheory.stoppedValue_eq' /-
 theorem stoppedValue_eq' [Preorder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] {N : ι}
     (hbdd : ∀ ω, τ ω ≤ N) :
     stoppedValue u τ = ∑ i in Finset.Iic N, Set.indicator {ω | τ ω = i} (u i) :=
   stoppedValue_eq_of_mem_finset fun ω => Finset.mem_Iic.mpr (hbdd ω)
 #align measure_theory.stopped_value_eq' MeasureTheory.stoppedValue_eq'
+-/
 
+#print MeasureTheory.stoppedProcess_eq_of_mem_finset /-
 theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s : Finset ι} (n : ι)
     (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) :
     stoppedProcess u τ n =
@@ -1005,7 +1162,9 @@ theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s :
       rw [Set.indicator_of_not_mem]
       exact hneq.symm
 #align measure_theory.stopped_process_eq_of_mem_finset MeasureTheory.stoppedProcess_eq_of_mem_finset
+-/
 
+#print MeasureTheory.stoppedProcess_eq'' /-
 theorem stoppedProcess_eq'' [LinearOrder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] (n : ι) :
     stoppedProcess u τ n =
       Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.Iio n, Set.indicator {ω | τ ω = i} (u i) :=
@@ -1016,11 +1175,13 @@ theorem stoppedProcess_eq'' [LinearOrder ι] [LocallyFiniteOrderBot ι] [AddComm
   congr with i
   simp only [Finset.Iio_filter_lt, min_eq_right]
 #align measure_theory.stopped_process_eq'' MeasureTheory.stoppedProcess_eq''
+-/
 
 section StoppedValue
 
 variable [PartialOrder ι] {ℱ : Filtration ι m} [NormedAddCommGroup E]
 
+#print MeasureTheory.memℒp_stoppedValue_of_mem_finset /-
 theorem memℒp_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
     {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) : Memℒp (stoppedValue u τ) p μ :=
   by
@@ -1032,12 +1193,16 @@ theorem memℒp_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : 
   obtain ⟨y, rfl⟩ := hω
   exact hbdd y
 #align measure_theory.mem_ℒp_stopped_value_of_mem_finset MeasureTheory.memℒp_stoppedValue_of_mem_finset
+-/
 
+#print MeasureTheory.memℒp_stoppedValue /-
 theorem memℒp_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Memℒp (u n) p μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) : Memℒp (stoppedValue u τ) p μ :=
   memℒp_stoppedValue_of_mem_finset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
 #align measure_theory.mem_ℒp_stopped_value MeasureTheory.memℒp_stoppedValue
+-/
 
+#print MeasureTheory.integrable_stoppedValue_of_mem_finset /-
 theorem integrable_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
     Integrable (stoppedValue u τ) μ :=
@@ -1045,14 +1210,17 @@ theorem integrable_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ)
   simp_rw [← mem_ℒp_one_iff_integrable] at hu ⊢
   exact mem_ℒp_stopped_value_of_mem_finset hτ hu hbdd
 #align measure_theory.integrable_stopped_value_of_mem_finset MeasureTheory.integrable_stoppedValue_of_mem_finset
+-/
 
 variable (ι)
 
+#print MeasureTheory.integrable_stoppedValue /-
 theorem integrable_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) :
     Integrable (stoppedValue u τ) μ :=
   integrable_stoppedValue_of_mem_finset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
 #align measure_theory.integrable_stopped_value MeasureTheory.integrable_stoppedValue
+-/
 
 end StoppedValue
 
@@ -1061,6 +1229,7 @@ section StoppedProcess
 variable [LinearOrder ι] [TopologicalSpace ι] [OrderTopology ι] [FirstCountableTopology ι]
   {ℱ : Filtration ι m} [NormedAddCommGroup E]
 
+#print MeasureTheory.memℒp_stoppedProcess_of_mem_finset /-
 theorem memℒp_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
     (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) : Memℒp (stoppedProcess u τ n) p μ :=
   by
@@ -1073,12 +1242,16 @@ theorem memℒp_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu :
     refine' mem_ℒp_finset_sum _ fun i hi => mem_ℒp.indicator _ (hu i)
     exact ℱ.le i {a : Ω | τ a = i} (hτ.measurable_set_eq i)
 #align measure_theory.mem_ℒp_stopped_process_of_mem_finset MeasureTheory.memℒp_stoppedProcess_of_mem_finset
+-/
 
+#print MeasureTheory.memℒp_stoppedProcess /-
 theorem memℒp_stoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Memℒp (u n) p μ) (n : ι) : Memℒp (stoppedProcess u τ n) p μ :=
   memℒp_stoppedProcess_of_mem_finset hτ hu n fun ω h => Finset.mem_Iio.mpr h
 #align measure_theory.mem_ℒp_stopped_process MeasureTheory.memℒp_stoppedProcess
+-/
 
+#print MeasureTheory.integrable_stoppedProcess_of_mem_finset /-
 theorem integrable_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) :
     Integrable (stoppedProcess u τ n) μ :=
@@ -1086,11 +1259,14 @@ theorem integrable_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ)
   simp_rw [← mem_ℒp_one_iff_integrable] at hu ⊢
   exact mem_ℒp_stopped_process_of_mem_finset hτ hu n hbdd
 #align measure_theory.integrable_stopped_process_of_mem_finset MeasureTheory.integrable_stoppedProcess_of_mem_finset
+-/
 
+#print MeasureTheory.integrable_stoppedProcess /-
 theorem integrable_stoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) (n : ι) : Integrable (stoppedProcess u τ n) μ :=
   integrable_stoppedProcess_of_mem_finset hτ hu n fun ω h => Finset.mem_Iio.mpr h
 #align measure_theory.integrable_stopped_process MeasureTheory.integrable_stoppedProcess
+-/
 
 end StoppedProcess
 
@@ -1102,31 +1278,39 @@ variable [TopologicalSpace β] [PseudoMetrizableSpace β] [LinearOrder ι] [Topo
   [SecondCountableTopology ι] [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι]
   {f : Filtration ι m} {u : ι → Ω → β} {τ : Ω → ι}
 
+#print MeasureTheory.Adapted.stoppedProcess /-
 /-- The stopped process of an adapted process with continuous paths is adapted. -/
 theorem Adapted.stoppedProcess [MetrizableSpace ι] (hu : Adapted f u)
     (hu_cont : ∀ ω, Continuous fun i => u i ω) (hτ : IsStoppingTime f τ) :
     Adapted f (stoppedProcess u τ) :=
   ((hu.progMeasurable_of_continuous hu_cont).stoppedProcess hτ).Adapted
 #align measure_theory.adapted.stopped_process MeasureTheory.Adapted.stoppedProcess
+-/
 
+#print MeasureTheory.Adapted.stoppedProcess_of_discrete /-
 /-- If the indexing order has the discrete topology, then the stopped process of an adapted process
 is adapted. -/
 theorem Adapted.stoppedProcess_of_discrete [DiscreteTopology ι] (hu : Adapted f u)
     (hτ : IsStoppingTime f τ) : Adapted f (stoppedProcess u τ) :=
   (hu.progMeasurable_of_discrete.stoppedProcess hτ).Adapted
 #align measure_theory.adapted.stopped_process_of_discrete MeasureTheory.Adapted.stoppedProcess_of_discrete
+-/
 
+#print MeasureTheory.Adapted.stronglyMeasurable_stoppedProcess /-
 theorem Adapted.stronglyMeasurable_stoppedProcess [MetrizableSpace ι] (hu : Adapted f u)
     (hu_cont : ∀ ω, Continuous fun i => u i ω) (hτ : IsStoppingTime f τ) (n : ι) :
     StronglyMeasurable (stoppedProcess u τ n) :=
   (hu.progMeasurable_of_continuous hu_cont).stronglyMeasurable_stoppedProcess hτ n
 #align measure_theory.adapted.strongly_measurable_stopped_process MeasureTheory.Adapted.stronglyMeasurable_stoppedProcess
+-/
 
+#print MeasureTheory.Adapted.stronglyMeasurable_stoppedProcess_of_discrete /-
 theorem Adapted.stronglyMeasurable_stoppedProcess_of_discrete [DiscreteTopology ι]
     (hu : Adapted f u) (hτ : IsStoppingTime f τ) (n : ι) :
     StronglyMeasurable (stoppedProcess u τ n) :=
   hu.progMeasurable_of_discrete.stronglyMeasurable_stoppedProcess hτ n
 #align measure_theory.adapted.strongly_measurable_stopped_process_of_discrete MeasureTheory.Adapted.stronglyMeasurable_stoppedProcess_of_discrete
+-/
 
 end AdaptedStoppedProcess
 
@@ -1139,6 +1323,7 @@ open Filtration
 
 variable {f : Filtration ℕ m} {u : ℕ → Ω → β} {τ π : Ω → ℕ}
 
+#print MeasureTheory.stoppedValue_sub_eq_sum /-
 theorem stoppedValue_sub_eq_sum [AddCommGroup β] (hle : τ ≤ π) :
     stoppedValue u π - stoppedValue u τ = fun ω =>
       (∑ i in Finset.Ico (τ ω) (π ω), (u (i + 1) - u i)) ω :=
@@ -1147,7 +1332,9 @@ theorem stoppedValue_sub_eq_sum [AddCommGroup β] (hle : τ ≤ π) :
   rw [Finset.sum_Ico_eq_sub _ (hle ω), Finset.sum_range_sub, Finset.sum_range_sub]
   simp [stopped_value]
 #align measure_theory.stopped_value_sub_eq_sum MeasureTheory.stoppedValue_sub_eq_sum
+-/
 
+#print MeasureTheory.stoppedValue_sub_eq_sum' /-
 theorem stoppedValue_sub_eq_sum' [AddCommGroup β] (hle : τ ≤ π) {N : ℕ} (hbdd : ∀ ω, π ω ≤ N) :
     stoppedValue u π - stoppedValue u τ = fun ω =>
       (∑ i in Finset.range (N + 1), Set.indicator {ω | τ ω ≤ i ∧ i < π ω} (u (i + 1) - u i)) ω :=
@@ -1160,17 +1347,21 @@ theorem stoppedValue_sub_eq_sum' [AddCommGroup β] (hle : τ ≤ π) {N : ℕ} (
   simp only [Finset.mem_filter, Set.mem_setOf_eq, Finset.mem_range, Finset.mem_Ico]
   exact ⟨fun h => ⟨lt_trans h.2 (Nat.lt_succ_iff.2 <| hbdd _), h⟩, fun h => h.2⟩
 #align measure_theory.stopped_value_sub_eq_sum' MeasureTheory.stoppedValue_sub_eq_sum'
+-/
 
 section AddCommMonoid
 
 variable [AddCommMonoid β]
 
+#print MeasureTheory.stoppedValue_eq /-
 theorem stoppedValue_eq {N : ℕ} (hbdd : ∀ ω, τ ω ≤ N) :
     stoppedValue u τ = fun x =>
       (∑ i in Finset.range (N + 1), Set.indicator {ω | τ ω = i} (u i)) x :=
   stoppedValue_eq_of_mem_finset fun ω => Finset.mem_range_succ_iff.mpr (hbdd ω)
 #align measure_theory.stopped_value_eq MeasureTheory.stoppedValue_eq
+-/
 
+#print MeasureTheory.stoppedProcess_eq /-
 theorem stoppedProcess_eq (n : ℕ) :
     stoppedProcess u τ n =
       Set.indicator {a | n ≤ τ a} (u n) +
@@ -1181,7 +1372,9 @@ theorem stoppedProcess_eq (n : ℕ) :
   congr with i
   rw [Finset.mem_Iio, Finset.mem_range]
 #align measure_theory.stopped_process_eq MeasureTheory.stoppedProcess_eq
+-/
 
+#print MeasureTheory.stoppedProcess_eq' /-
 theorem stoppedProcess_eq' (n : ℕ) :
     stoppedProcess u τ n =
       Set.indicator {a | n + 1 ≤ τ a} (u n) +
@@ -1199,6 +1392,7 @@ theorem stoppedProcess_eq' (n : ℕ) :
       exact (Nat.succ_le_iff.1 h₂).Ne h₁.symm
   rw [stopped_process_eq, this, Finset.sum_range_succ_comm, ← add_assoc]
 #align measure_theory.stopped_process_eq' MeasureTheory.stoppedProcess_eq'
+-/
 
 end AddCommMonoid
 
@@ -1209,6 +1403,7 @@ section PiecewiseConst
 variable [Preorder ι] {𝒢 : Filtration ι m} {τ η : Ω → ι} {i j : ι} {s : Set Ω}
   [DecidablePred (· ∈ s)]
 
+#print MeasureTheory.IsStoppingTime.piecewise_of_le /-
 /-- Given stopping times `τ` and `η` which are bounded below, `set.piecewise s τ η` is also
 a stopping time with respect to the same filtration. -/
 theorem IsStoppingTime.piecewise_of_le (hτ_st : IsStoppingTime 𝒢 τ) (hη_st : IsStoppingTime 𝒢 η)
@@ -1228,22 +1423,29 @@ theorem IsStoppingTime.piecewise_of_le (hτ_st : IsStoppingTime 𝒢 τ) (hη_st
     have hηn : ∀ ω, ¬η ω ≤ n := fun ω hηn => hin ((hη ω).trans hηn)
     simp [hτn, hηn]
 #align measure_theory.is_stopping_time.piecewise_of_le MeasureTheory.IsStoppingTime.piecewise_of_le
+-/
 
+#print MeasureTheory.isStoppingTime_piecewise_const /-
 theorem isStoppingTime_piecewise_const (hij : i ≤ j) (hs : measurable_set[𝒢 i] s) :
     IsStoppingTime 𝒢 (s.piecewise (fun _ => i) fun _ => j) :=
   (isStoppingTime_const 𝒢 i).piecewise_of_le (isStoppingTime_const 𝒢 j) (fun x => le_rfl)
     (fun _ => hij) hs
 #align measure_theory.is_stopping_time_piecewise_const MeasureTheory.isStoppingTime_piecewise_const
+-/
 
+#print MeasureTheory.stoppedValue_piecewise_const /-
 theorem stoppedValue_piecewise_const {ι' : Type _} {i j : ι'} {f : ι' → Ω → ℝ} :
     stoppedValue f (s.piecewise (fun _ => i) fun _ => j) = s.piecewise (f i) (f j) := by ext ω;
   rw [stopped_value]; by_cases hx : ω ∈ s <;> simp [hx]
 #align measure_theory.stopped_value_piecewise_const MeasureTheory.stoppedValue_piecewise_const
+-/
 
+#print MeasureTheory.stoppedValue_piecewise_const' /-
 theorem stoppedValue_piecewise_const' {ι' : Type _} {i j : ι'} {f : ι' → Ω → ℝ} :
     stoppedValue f (s.piecewise (fun _ => i) fun _ => j) = s.indicator (f i) + sᶜ.indicator (f j) :=
   by ext ω; rw [stopped_value]; by_cases hx : ω ∈ s <;> simp [hx]
 #align measure_theory.stopped_value_piecewise_const' MeasureTheory.stoppedValue_piecewise_const'
+-/
 
 end PiecewiseConst
 
@@ -1255,6 +1457,7 @@ section Condexp
 variable [LinearOrder ι] {μ : Measure Ω} {ℱ : Filtration ι m} {τ σ : Ω → ι} {E : Type _}
   [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {f : Ω → E}
 
+#print MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq_of_countable_range /-
 theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable_range [SigmaFiniteFiltration μ ℱ]
     (hτ : IsStoppingTime ℱ τ) (h_countable : (Set.range τ).Countable)
     [SigmaFinite (μ.trim (hτ.measurableSpace_le_of_countable_range h_countable))] (i : ι) :
@@ -1266,16 +1469,20 @@ theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable_range [SigmaFiniteF
       (hτ.measurable_set_eq_of_countable_range' h_countable i) fun t => _
   rw [Set.inter_comm _ t, is_stopping_time.measurable_set_inter_eq_iff]
 #align measure_theory.condexp_stopping_time_ae_eq_restrict_eq_of_countable_range MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq_of_countable_range
+-/
 
+#print MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq_of_countable /-
 theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable [Countable ι]
     [SigmaFiniteFiltration μ ℱ] (hτ : IsStoppingTime ℱ τ)
     [SigmaFinite (μ.trim hτ.measurableSpace_le_of_countable)] (i : ι) :
     μ[f|hτ.MeasurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|ℱ i] :=
   condexp_stopping_time_ae_eq_restrict_eq_of_countable_range hτ (Set.to_countable _) i
 #align measure_theory.condexp_stopping_time_ae_eq_restrict_eq_of_countable MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq_of_countable
+-/
 
 variable [(Filter.atTop : Filter ι).IsCountablyGenerated]
 
+#print MeasureTheory.condexp_min_stopping_time_ae_eq_restrict_le_const /-
 theorem condexp_min_stopping_time_ae_eq_restrict_le_const (hτ : IsStoppingTime ℱ τ) (i : ι)
     [SigmaFinite (μ.trim (hτ.min_const i).measurableSpace_le)] :
     μ[f|(hτ.min_const i).MeasurableSpace] =ᵐ[μ.restrict {x | τ x ≤ i}] μ[f|hτ.MeasurableSpace] :=
@@ -1291,9 +1498,11 @@ theorem condexp_min_stopping_time_ae_eq_restrict_le_const (hτ : IsStoppingTime
         (hτ.min_const i).measurableSpace_le (hτ.measurable_set_le' i) fun t => _).symm
   rw [Set.inter_comm _ t, hτ.measurable_set_inter_le_const_iff]
 #align measure_theory.condexp_min_stopping_time_ae_eq_restrict_le_const MeasureTheory.condexp_min_stopping_time_ae_eq_restrict_le_const
+-/
 
 variable [TopologicalSpace ι] [OrderTopology ι]
 
+#print MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq /-
 theorem condexp_stopping_time_ae_eq_restrict_eq [FirstCountableTopology ι]
     [SigmaFiniteFiltration μ ℱ] (hτ : IsStoppingTime ℱ τ)
     [SigmaFinite (μ.trim hτ.measurableSpace_le)] (i : ι) :
@@ -1304,7 +1513,9 @@ theorem condexp_stopping_time_ae_eq_restrict_eq [FirstCountableTopology ι]
       (hτ.measurable_set_eq' i) fun t => _
   rw [Set.inter_comm _ t, is_stopping_time.measurable_set_inter_eq_iff]
 #align measure_theory.condexp_stopping_time_ae_eq_restrict_eq MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq
+-/
 
+#print MeasureTheory.condexp_min_stopping_time_ae_eq_restrict_le /-
 theorem condexp_min_stopping_time_ae_eq_restrict_le [MeasurableSpace ι] [SecondCountableTopology ι]
     [BorelSpace ι] (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ)
     [SigmaFinite (μ.trim (hτ.min hσ).measurableSpace_le)] :
@@ -1321,6 +1532,7 @@ theorem condexp_min_stopping_time_ae_eq_restrict_le [MeasurableSpace ι] [Second
         (hτ.min hσ).measurableSpace_le (hτ.measurable_set_le_stopping_time hσ) fun t => _).symm
   rw [Set.inter_comm _ t, is_stopping_time.measurable_set_inter_le_iff]
 #align measure_theory.condexp_min_stopping_time_ae_eq_restrict_le MeasureTheory.condexp_min_stopping_time_ae_eq_restrict_le
+-/
 
 end Condexp
 
Diff
@@ -1141,7 +1141,7 @@ variable {f : Filtration ℕ m} {u : ℕ → Ω → β} {τ π : Ω → ℕ}
 
 theorem stoppedValue_sub_eq_sum [AddCommGroup β] (hle : τ ≤ π) :
     stoppedValue u π - stoppedValue u τ = fun ω =>
-      (∑ i in Finset.Ico (τ ω) (π ω), u (i + 1) - u i) ω :=
+      (∑ i in Finset.Ico (τ ω) (π ω), (u (i + 1) - u i)) ω :=
   by
   ext ω
   rw [Finset.sum_Ico_eq_sub _ (hle ω), Finset.sum_range_sub, Finset.sum_range_sub]
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying, Rémy Degenne
 
 ! This file was ported from Lean 3 source module probability.process.stopping
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit ba074af83b6cf54c3104e59402b39410ddbd6dca
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1247,5 +1247,82 @@ theorem stoppedValue_piecewise_const' {ι' : Type _} {i j : ι'} {f : ι' → Ω
 
 end PiecewiseConst
 
+section Condexp
+
+/-! ### Conditional expectation with respect to the σ-algebra generated by a stopping time -/
+
+
+variable [LinearOrder ι] {μ : Measure Ω} {ℱ : Filtration ι m} {τ σ : Ω → ι} {E : Type _}
+  [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {f : Ω → E}
+
+theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable_range [SigmaFiniteFiltration μ ℱ]
+    (hτ : IsStoppingTime ℱ τ) (h_countable : (Set.range τ).Countable)
+    [SigmaFinite (μ.trim (hτ.measurableSpace_le_of_countable_range h_countable))] (i : ι) :
+    μ[f|hτ.MeasurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|ℱ i] :=
+  by
+  refine'
+    condexp_ae_eq_restrict_of_measurable_space_eq_on
+      (hτ.measurable_space_le_of_countable_range h_countable) (ℱ.le i)
+      (hτ.measurable_set_eq_of_countable_range' h_countable i) fun t => _
+  rw [Set.inter_comm _ t, is_stopping_time.measurable_set_inter_eq_iff]
+#align measure_theory.condexp_stopping_time_ae_eq_restrict_eq_of_countable_range MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq_of_countable_range
+
+theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable [Countable ι]
+    [SigmaFiniteFiltration μ ℱ] (hτ : IsStoppingTime ℱ τ)
+    [SigmaFinite (μ.trim hτ.measurableSpace_le_of_countable)] (i : ι) :
+    μ[f|hτ.MeasurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|ℱ i] :=
+  condexp_stopping_time_ae_eq_restrict_eq_of_countable_range hτ (Set.to_countable _) i
+#align measure_theory.condexp_stopping_time_ae_eq_restrict_eq_of_countable MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq_of_countable
+
+variable [(Filter.atTop : Filter ι).IsCountablyGenerated]
+
+theorem condexp_min_stopping_time_ae_eq_restrict_le_const (hτ : IsStoppingTime ℱ τ) (i : ι)
+    [SigmaFinite (μ.trim (hτ.min_const i).measurableSpace_le)] :
+    μ[f|(hτ.min_const i).MeasurableSpace] =ᵐ[μ.restrict {x | τ x ≤ i}] μ[f|hτ.MeasurableSpace] :=
+  by
+  have : sigma_finite (μ.trim hτ.measurable_space_le) :=
+    haveI h_le : (hτ.min_const i).MeasurableSpace ≤ hτ.measurable_space :=
+      by
+      rw [is_stopping_time.measurable_space_min_const]
+      exact inf_le_left
+    sigma_finite_trim_mono _ h_le
+  refine'
+    (condexp_ae_eq_restrict_of_measurable_space_eq_on hτ.measurable_space_le
+        (hτ.min_const i).measurableSpace_le (hτ.measurable_set_le' i) fun t => _).symm
+  rw [Set.inter_comm _ t, hτ.measurable_set_inter_le_const_iff]
+#align measure_theory.condexp_min_stopping_time_ae_eq_restrict_le_const MeasureTheory.condexp_min_stopping_time_ae_eq_restrict_le_const
+
+variable [TopologicalSpace ι] [OrderTopology ι]
+
+theorem condexp_stopping_time_ae_eq_restrict_eq [FirstCountableTopology ι]
+    [SigmaFiniteFiltration μ ℱ] (hτ : IsStoppingTime ℱ τ)
+    [SigmaFinite (μ.trim hτ.measurableSpace_le)] (i : ι) :
+    μ[f|hτ.MeasurableSpace] =ᵐ[μ.restrict {x | τ x = i}] μ[f|ℱ i] :=
+  by
+  refine'
+    condexp_ae_eq_restrict_of_measurable_space_eq_on hτ.measurable_space_le (ℱ.le i)
+      (hτ.measurable_set_eq' i) fun t => _
+  rw [Set.inter_comm _ t, is_stopping_time.measurable_set_inter_eq_iff]
+#align measure_theory.condexp_stopping_time_ae_eq_restrict_eq MeasureTheory.condexp_stopping_time_ae_eq_restrict_eq
+
+theorem condexp_min_stopping_time_ae_eq_restrict_le [MeasurableSpace ι] [SecondCountableTopology ι]
+    [BorelSpace ι] (hτ : IsStoppingTime ℱ τ) (hσ : IsStoppingTime ℱ σ)
+    [SigmaFinite (μ.trim (hτ.min hσ).measurableSpace_le)] :
+    μ[f|(hτ.min hσ).MeasurableSpace] =ᵐ[μ.restrict {x | τ x ≤ σ x}] μ[f|hτ.MeasurableSpace] :=
+  by
+  have : sigma_finite (μ.trim hτ.measurable_space_le) :=
+    haveI h_le : (hτ.min hσ).MeasurableSpace ≤ hτ.measurable_space :=
+      by
+      rw [is_stopping_time.measurable_space_min]
+      exact inf_le_left
+    sigma_finite_trim_mono _ h_le
+  refine'
+    (condexp_ae_eq_restrict_of_measurable_space_eq_on hτ.measurable_space_le
+        (hτ.min hσ).measurableSpace_le (hτ.measurable_set_le_stopping_time hσ) fun t => _).symm
+  rw [Set.inter_comm _ t, is_stopping_time.measurable_set_inter_le_iff]
+#align measure_theory.condexp_min_stopping_time_ae_eq_restrict_le MeasureTheory.condexp_min_stopping_time_ae_eq_restrict_le
+
+end Condexp
+
 end MeasureTheory
 
Diff
@@ -54,7 +54,7 @@ with respect to `f i`.
 Intuitively, the stopping time `τ` describes some stopping rule such that at time
 `i`, we may determine it with the information we have at time `i`. -/
 def IsStoppingTime [Preorder ι] (f : Filtration ι m) (τ : Ω → ι) :=
-  ∀ i : ι, measurable_set[f i] <| { ω | τ ω ≤ i }
+  ∀ i : ι, measurable_set[f i] <| {ω | τ ω ≤ i}
 #align measure_theory.is_stopping_time MeasureTheory.IsStoppingTime
 
 theorem isStoppingTime_const [Preorder ι] (f : Filtration ι m) (i : ι) :
@@ -68,20 +68,20 @@ section Preorder
 variable [Preorder ι] {f : Filtration ι m} {τ : Ω → ι}
 
 protected theorem IsStoppingTime.measurableSet_le (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | τ ω ≤ i } :=
+    measurable_set[f i] {ω | τ ω ≤ i} :=
   hτ i
 #align measure_theory.is_stopping_time.measurable_set_le MeasureTheory.IsStoppingTime.measurableSet_le
 
 theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | τ ω < i } :=
+    measurable_set[f i] {ω | τ ω < i} :=
   by
   by_cases hi_min : IsMin i
-  · suffices { ω : Ω | τ ω < i } = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
+  · suffices {ω : Ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
     ext1 ω
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
     rw [isMin_iff_forall_not_lt] at hi_min 
     exact hi_min (τ ω)
-  have : { ω : Ω | τ ω < i } = τ ⁻¹' Set.Iio i := rfl
+  have : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iio i := rfl
   rw [this, ← Iic_pred_of_not_is_min hi_min]
   exact f.mono (pred_le i) _ (hτ.measurable_set_le <| pred i)
 #align measure_theory.is_stopping_time.measurable_set_lt_of_pred MeasureTheory.IsStoppingTime.measurableSet_lt_of_pred
@@ -95,9 +95,9 @@ namespace IsStoppingTime
 variable [PartialOrder ι] {τ : Ω → ι} {f : Filtration ι m}
 
 protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ)
-    (h_countable : (Set.range τ).Countable) (i : ι) : measurable_set[f i] { ω | τ ω = i } :=
+    (h_countable : (Set.range τ).Countable) (i : ι) : measurable_set[f i] {ω | τ ω = i} :=
   by
-  have : { ω | τ ω = i } = { ω | τ ω ≤ i } \ ⋃ (j ∈ Set.range τ) (hj : j < i), { ω | τ ω ≤ j } :=
+  have : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ (j ∈ Set.range τ) (hj : j < i), {ω | τ ω ≤ j} :=
     by
     ext1 a
     simp only [Set.mem_setOf_eq, Set.mem_range, Set.iUnion_exists, Set.iUnion_iUnion_eq',
@@ -120,35 +120,35 @@ protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range
 
 protected theorem measurableSet_eq_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | τ ω = i } :=
+    measurable_set[f i] {ω | τ ω = i} :=
   hτ.measurableSet_eq_of_countable_range (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable
 
 protected theorem measurableSet_lt_of_countable_range (hτ : IsStoppingTime f τ)
-    (h_countable : (Set.range τ).Countable) (i : ι) : measurable_set[f i] { ω | τ ω < i } :=
+    (h_countable : (Set.range τ).Countable) (i : ι) : measurable_set[f i] {ω | τ ω < i} :=
   by
-  have : { ω | τ ω < i } = { ω | τ ω ≤ i } \ { ω | τ ω = i } := by ext1 ω; simp [lt_iff_le_and_ne]
+  have : {ω | τ ω < i} = {ω | τ ω ≤ i} \ {ω | τ ω = i} := by ext1 ω; simp [lt_iff_le_and_ne]
   rw [this]
   exact (hτ.measurable_set_le i).diffₓ (hτ.measurable_set_eq_of_countable_range h_countable i)
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range
 
 protected theorem measurableSet_lt_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | τ ω < i } :=
+    measurable_set[f i] {ω | τ ω < i} :=
   hτ.measurableSet_lt_of_countable_range (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable
 
 protected theorem measurableSet_ge_of_countable_range {ι} [LinearOrder ι] {τ : Ω → ι}
     {f : Filtration ι m} (hτ : IsStoppingTime f τ) (h_countable : (Set.range τ).Countable) (i : ι) :
-    measurable_set[f i] { ω | i ≤ τ ω } :=
+    measurable_set[f i] {ω | i ≤ τ ω} :=
   by
-  have : { ω | i ≤ τ ω } = { ω | τ ω < i }ᶜ := by ext1 ω;
+  have : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]
   rw [this]
   exact (hτ.measurable_set_lt_of_countable_range h_countable i).compl
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range
 
 protected theorem measurableSet_ge_of_countable {ι} [LinearOrder ι] {τ : Ω → ι} {f : Filtration ι m}
-    [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) : measurable_set[f i] { ω | i ≤ τ ω } :=
+    [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) : measurable_set[f i] {ω | i ≤ τ ω} :=
   hτ.measurableSet_ge_of_countable_range (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable
 
@@ -161,9 +161,9 @@ section LinearOrder
 variable [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
 
 theorem IsStoppingTime.measurableSet_gt (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | i < τ ω } :=
+    measurable_set[f i] {ω | i < τ ω} :=
   by
-  have : { ω | i < τ ω } = { ω | τ ω ≤ i }ᶜ := by ext1 ω;
+  have : {ω | i < τ ω} = {ω | τ ω ≤ i}ᶜ := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_le]
   rw [this]
   exact (hτ.measurable_set_le i).compl
@@ -175,17 +175,17 @@ variable [TopologicalSpace ι] [OrderTopology ι] [FirstCountableTopology ι]
 
 /-- Auxiliary lemma for `is_stopping_time.measurable_set_lt`. -/
 theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i : ι)
-    (h_lub : IsLUB (Set.Iio i) i) : measurable_set[f i] { ω | τ ω < i } :=
+    (h_lub : IsLUB (Set.Iio i) i) : measurable_set[f i] {ω | τ ω < i} :=
   by
   by_cases hi_min : IsMin i
-  · suffices { ω | τ ω < i } = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
+  · suffices {ω | τ ω < i} = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
     ext1 ω
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
     exact is_min_iff_forall_not_lt.mp hi_min (τ ω)
   obtain ⟨seq, -, -, h_tendsto, h_bound⟩ :
     ∃ seq : ℕ → ι, Monotone seq ∧ (∀ j, seq j ≤ i) ∧ tendsto seq at_top (𝓝 i) ∧ ∀ j, seq j < i
   exact h_lub.exists_seq_monotone_tendsto (not_is_min_iff.mp hi_min)
-  have h_Ioi_eq_Union : Set.Iio i = ⋃ j, { k | k ≤ seq j } :=
+  have h_Ioi_eq_Union : Set.Iio i = ⋃ j, {k | k ≤ seq j} :=
     by
     ext1 k
     simp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]
@@ -197,7 +197,7 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
       exact ⟨a, ha a le_rfl⟩
     · obtain ⟨j, hk_seq_j⟩ := h_exists_k_le_seq
       exact hk_seq_j.trans_lt (h_bound j)
-  have h_lt_eq_preimage : { ω | τ ω < i } = τ ⁻¹' Set.Iio i := by ext1 ω;
+  have h_lt_eq_preimage : {ω | τ ω < i} = τ ⁻¹' Set.Iio i := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_preimage, Set.mem_Iio]
   rw [h_lt_eq_preimage, h_Ioi_eq_Union]
   simp only [Set.preimage_iUnion, Set.preimage_setOf_eq]
@@ -205,42 +205,42 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
 #align measure_theory.is_stopping_time.measurable_set_lt_of_is_lub MeasureTheory.IsStoppingTime.measurableSet_lt_of_isLUB
 
 theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | τ ω < i } :=
+    measurable_set[f i] {ω | τ ω < i} :=
   by
   obtain ⟨i', hi'_lub⟩ : ∃ i', IsLUB (Set.Iio i) i'; exact exists_lub_Iio i
   cases' lub_Iio_eq_self_or_Iio_eq_Iic i hi'_lub with hi'_eq_i h_Iio_eq_Iic
   · rw [← hi'_eq_i] at hi'_lub ⊢
     exact hτ.measurable_set_lt_of_is_lub i' hi'_lub
-  · have h_lt_eq_preimage : { ω : Ω | τ ω < i } = τ ⁻¹' Set.Iio i := rfl
+  · have h_lt_eq_preimage : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iio i := rfl
     rw [h_lt_eq_preimage, h_Iio_eq_Iic]
     exact f.mono (lub_Iio_le i hi'_lub) _ (hτ.measurable_set_le i')
 #align measure_theory.is_stopping_time.measurable_set_lt MeasureTheory.IsStoppingTime.measurableSet_lt
 
 theorem IsStoppingTime.measurableSet_ge (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | i ≤ τ ω } :=
+    measurable_set[f i] {ω | i ≤ τ ω} :=
   by
-  have : { ω | i ≤ τ ω } = { ω | τ ω < i }ᶜ := by ext1 ω;
+  have : {ω | i ≤ τ ω} = {ω | τ ω < i}ᶜ := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]
   rw [this]
   exact (hτ.measurable_set_lt i).compl
 #align measure_theory.is_stopping_time.measurable_set_ge MeasureTheory.IsStoppingTime.measurableSet_ge
 
 theorem IsStoppingTime.measurableSet_eq (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[f i] { ω | τ ω = i } :=
+    measurable_set[f i] {ω | τ ω = i} :=
   by
-  have : { ω | τ ω = i } = { ω | τ ω ≤ i } ∩ { ω | τ ω ≥ i } := by ext1 ω;
+  have : {ω | τ ω = i} = {ω | τ ω ≤ i} ∩ {ω | τ ω ≥ i} := by ext1 ω;
     simp only [Set.mem_setOf_eq, ge_iff_le, Set.mem_inter_iff, le_antisymm_iff]
   rw [this]
   exact (hτ.measurable_set_le i).inter (hτ.measurable_set_ge i)
 #align measure_theory.is_stopping_time.measurable_set_eq MeasureTheory.IsStoppingTime.measurableSet_eq
 
 theorem IsStoppingTime.measurableSet_eq_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
-    measurable_set[f j] { ω | τ ω = i } :=
+    measurable_set[f j] {ω | τ ω = i} :=
   f.mono hle _ <| hτ.measurableSet_eq i
 #align measure_theory.is_stopping_time.measurable_set_eq_le MeasureTheory.IsStoppingTime.measurableSet_eq_le
 
 theorem IsStoppingTime.measurableSet_lt_le (hτ : IsStoppingTime f τ) {i j : ι} (hle : i ≤ j) :
-    measurable_set[f j] { ω | τ ω < i } :=
+    measurable_set[f j] {ω | τ ω < i} :=
   f.mono hle _ <| hτ.measurableSet_lt i
 #align measure_theory.is_stopping_time.measurable_set_lt_le MeasureTheory.IsStoppingTime.measurableSet_lt_le
 
@@ -251,10 +251,10 @@ end LinearOrder
 section Countable
 
 theorem isStoppingTime_of_measurableSet_eq [Preorder ι] [Countable ι] {f : Filtration ι m}
-    {τ : Ω → ι} (hτ : ∀ i, measurable_set[f i] { ω | τ ω = i }) : IsStoppingTime f τ :=
+    {τ : Ω → ι} (hτ : ∀ i, measurable_set[f i] {ω | τ ω = i}) : IsStoppingTime f τ :=
   by
   intro i
-  rw [show { ω | τ ω ≤ i } = ⋃ k ≤ i, { ω | τ ω = k } by ext; simp]
+  rw [show {ω | τ ω ≤ i} = ⋃ k ≤ i, {ω | τ ω = k} by ext; simp]
   refine' MeasurableSet.biUnion (Set.to_countable _) fun k hk => _
   exact f.mono hk _ (hτ k)
 #align measure_theory.is_stopping_time_of_measurable_set_eq MeasureTheory.isStoppingTime_of_measurableSet_eq
@@ -319,7 +319,7 @@ theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStopping
 theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
     IsStoppingTime f (τ + π) := by
   intro i
-  rw [(_ : { ω | (τ + π) ω ≤ i } = ⋃ k ≤ i, { ω | π ω = k } ∩ { ω | τ ω + k ≤ i })]
+  rw [(_ : {ω | (τ + π) ω ≤ i} = ⋃ k ≤ i, {ω | π ω = k} ∩ {ω | τ ω + k ≤ i})]
   ·
     exact
       MeasurableSet.iUnion fun k =>
@@ -338,11 +338,11 @@ variable [Preorder ι] {f : Filtration ι m} {τ π : Ω → ι}
 /-- The associated σ-algebra with a stopping time. -/
 protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω
     where
-  MeasurableSet' s := ∀ i : ι, measurable_set[f i] (s ∩ { ω | τ ω ≤ i })
-  measurable_set_empty i := (Set.empty_inter { ω | τ ω ≤ i }).symm ▸ @MeasurableSet.empty _ (f i)
+  MeasurableSet' s := ∀ i : ι, measurable_set[f i] (s ∩ {ω | τ ω ≤ i})
+  measurable_set_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
   measurable_set_compl s hs i :=
     by
-    rw [(_ : sᶜ ∩ { ω | τ ω ≤ i } = (sᶜ ∪ { ω | τ ω ≤ i }ᶜ) ∩ { ω | τ ω ≤ i })]
+    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
     · refine' MeasurableSet.inter _ _
       · rw [← Set.compl_inter]
         exact (hs i).compl
@@ -356,7 +356,7 @@ protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω
 #align measure_theory.is_stopping_time.measurable_space MeasureTheory.IsStoppingTime.measurableSpace
 
 protected theorem measurableSet (hτ : IsStoppingTime f τ) (s : Set Ω) :
-    measurable_set[hτ.MeasurableSpace] s ↔ ∀ i : ι, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) :=
+    measurable_set[hτ.MeasurableSpace] s ↔ ∀ i : ι, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) :=
   Iff.rfl
 #align measure_theory.is_stopping_time.measurable_set MeasureTheory.IsStoppingTime.measurableSet
 
@@ -364,7 +364,7 @@ theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
     hτ.MeasurableSpace ≤ hπ.MeasurableSpace :=
   by
   intro s hs i
-  rw [(_ : s ∩ { ω | π ω ≤ i } = s ∩ { ω | τ ω ≤ i } ∩ { ω | π ω ≤ i })]
+  rw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]
   · exact (hs i).inter (hπ i)
   · ext
     simp only [Set.mem_inter_iff, iff_self_and, and_congr_left_iff, Set.mem_setOf_eq]
@@ -375,8 +375,8 @@ theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
 theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
     hτ.MeasurableSpace ≤ m := by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs 
-  rw [(_ : s = ⋃ i, s ∩ { ω | τ ω ≤ i })]
+  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs 
+  rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
   · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
   · ext ω; constructor <;> rw [Set.mem_iUnion]
     · exact fun hx => ⟨τ ω, hx, le_rfl⟩
@@ -388,9 +388,9 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
     (hτ : IsStoppingTime f τ) : hτ.MeasurableSpace ≤ m :=
   by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs 
+  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs 
   obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := at_top.exists_seq_tendsto
-  rw [(_ : s = ⋃ n, s ∩ { ω | τ ω ≤ seq n })]
+  rw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]
   · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
   · ext ω; constructor <;> rw [Set.mem_iUnion]
     · intro hx
@@ -438,10 +438,10 @@ theorem measurableSpace_const (f : Filtration ι m) (i : ι) :
 #align measure_theory.is_stopping_time.measurable_space_const MeasureTheory.IsStoppingTime.measurableSpace_const
 
 theorem measurableSet_inter_eq_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] (s ∩ { ω | τ ω = i }) ↔
-      measurable_set[f i] (s ∩ { ω | τ ω = i }) :=
+    measurable_set[hτ.MeasurableSpace] (s ∩ {ω | τ ω = i}) ↔
+      measurable_set[f i] (s ∩ {ω | τ ω = i}) :=
   by
-  have : ∀ j, { ω : Ω | τ ω = i } ∩ { ω : Ω | τ ω ≤ j } = { ω : Ω | τ ω = i } ∩ { ω | i ≤ j } :=
+  have : ∀ j, {ω : Ω | τ ω = i} ∩ {ω : Ω | τ ω ≤ j} = {ω : Ω | τ ω = i} ∩ {ω | i ≤ j} :=
     by
     intro j
     ext1 ω
@@ -502,36 +502,36 @@ section LinearOrder
 variable [LinearOrder ι] {f : Filtration ι m} {τ π : Ω → ι}
 
 protected theorem measurableSet_le' (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω ≤ i } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω ≤ i} :=
   by
   intro j
-  have : { ω : Ω | τ ω ≤ i } ∩ { ω : Ω | τ ω ≤ j } = { ω : Ω | τ ω ≤ min i j } := by ext1 ω;
+  have : {ω : Ω | τ ω ≤ i} ∩ {ω : Ω | τ ω ≤ j} = {ω : Ω | τ ω ≤ min i j} := by ext1 ω;
     simp only [Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff]
   rw [this]
   exact f.mono (min_le_right i j) _ (hτ _)
 #align measure_theory.is_stopping_time.measurable_set_le' MeasureTheory.IsStoppingTime.measurableSet_le'
 
 protected theorem measurableSet_gt' (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | i < τ ω } :=
+    measurable_set[hτ.MeasurableSpace] {ω | i < τ ω} :=
   by
-  have : { ω : Ω | i < τ ω } = { ω : Ω | τ ω ≤ i }ᶜ := by ext1 ω; simp
+  have : {ω : Ω | i < τ ω} = {ω : Ω | τ ω ≤ i}ᶜ := by ext1 ω; simp
   rw [this]
   exact (hτ.measurable_set_le' i).compl
 #align measure_theory.is_stopping_time.measurable_set_gt' MeasureTheory.IsStoppingTime.measurableSet_gt'
 
 protected theorem measurableSet_eq' [TopologicalSpace ι] [OrderTopology ι]
     [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω = i } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω = i} :=
   by
-  rw [← Set.univ_inter { ω | τ ω = i }, measurable_set_inter_eq_iff, Set.univ_inter]
+  rw [← Set.univ_inter {ω | τ ω = i}, measurable_set_inter_eq_iff, Set.univ_inter]
   exact hτ.measurable_set_eq i
 #align measure_theory.is_stopping_time.measurable_set_eq' MeasureTheory.IsStoppingTime.measurableSet_eq'
 
 protected theorem measurableSet_ge' [TopologicalSpace ι] [OrderTopology ι]
     [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | i ≤ τ ω } :=
+    measurable_set[hτ.MeasurableSpace] {ω | i ≤ τ ω} :=
   by
-  have : { ω | i ≤ τ ω } = { ω | τ ω = i } ∪ { ω | i < τ ω } :=
+  have : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω} :=
     by
     ext1 ω
     simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]
@@ -542,9 +542,9 @@ protected theorem measurableSet_ge' [TopologicalSpace ι] [OrderTopology ι]
 
 protected theorem measurableSet_lt' [TopologicalSpace ι] [OrderTopology ι]
     [FirstCountableTopology ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω < i } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω < i} :=
   by
-  have : { ω | τ ω < i } = { ω | τ ω ≤ i } \ { ω | τ ω = i } :=
+  have : {ω | τ ω < i} = {ω | τ ω ≤ i} \ {ω | τ ω = i} :=
     by
     ext1 ω
     simp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]
@@ -556,22 +556,22 @@ section Countable
 
 protected theorem measurableSet_eq_of_countable_range' (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω = i } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω = i} :=
   by
-  rw [← Set.univ_inter { ω | τ ω = i }, measurable_set_inter_eq_iff, Set.univ_inter]
+  rw [← Set.univ_inter {ω | τ ω = i}, measurable_set_inter_eq_iff, Set.univ_inter]
   exact hτ.measurable_set_eq_of_countable_range h_countable i
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range'
 
 protected theorem measurableSet_eq_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω = i } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω = i} :=
   hτ.measurableSet_eq_of_countable_range' (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable' MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable'
 
 protected theorem measurableSet_ge_of_countable_range' (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | i ≤ τ ω } :=
+    measurable_set[hτ.MeasurableSpace] {ω | i ≤ τ ω} :=
   by
-  have : { ω | i ≤ τ ω } = { ω | τ ω = i } ∪ { ω | i < τ ω } :=
+  have : {ω | i ≤ τ ω} = {ω | τ ω = i} ∪ {ω | i < τ ω} :=
     by
     ext1 ω
     simp only [le_iff_lt_or_eq, Set.mem_setOf_eq, Set.mem_union]
@@ -581,15 +581,15 @@ protected theorem measurableSet_ge_of_countable_range' (hτ : IsStoppingTime f 
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable_range'
 
 protected theorem measurableSet_ge_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | i ≤ τ ω } :=
+    measurable_set[hτ.MeasurableSpace] {ω | i ≤ τ ω} :=
   hτ.measurableSet_ge_of_countable_range' (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_ge_of_countable' MeasureTheory.IsStoppingTime.measurableSet_ge_of_countable'
 
 protected theorem measurableSet_lt_of_countable_range' (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω < i } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω < i} :=
   by
-  have : { ω | τ ω < i } = { ω | τ ω ≤ i } \ { ω | τ ω = i } :=
+  have : {ω | τ ω < i} = {ω | τ ω ≤ i} \ {ω | τ ω = i} :=
     by
     ext1 ω
     simp only [lt_iff_le_and_ne, Set.mem_setOf_eq, Set.mem_diff]
@@ -598,7 +598,7 @@ protected theorem measurableSet_lt_of_countable_range' (hτ : IsStoppingTime f 
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable_range' MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range'
 
 protected theorem measurableSet_lt_of_countable' [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω < i } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω < i} :=
   hτ.measurableSet_lt_of_countable_range' (Set.to_countable _) i
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable' MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable'
 
@@ -606,8 +606,8 @@ protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f
     (h_countable : (Set.range τ).Countable) : hτ.MeasurableSpace ≤ m :=
   by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs 
-  rw [(_ : s = ⋃ i ∈ Set.range τ, s ∩ { ω | τ ω ≤ i })]
+  change ∀ i, measurable_set[f i] (s ∩ {ω | τ ω ≤ i}) at hs 
+  rw [(_ : s = ⋃ i ∈ Set.range τ, s ∩ {ω | τ ω ≤ i})]
   · exact MeasurableSet.biUnion h_countable fun i _ => f.le i _ (hs i)
   · ext ω
     constructor <;> rw [Set.mem_iUnion]
@@ -645,8 +645,8 @@ theorem measurableSpace_min (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
       measurable_set[hτ.measurable_space] s ∧ measurable_set[hπ.measurable_space] s →
         measurable_set[(hτ.min hπ).MeasurableSpace] s
     simp_rw [is_stopping_time.measurable_set]
-    have : ∀ i, { ω | min (τ ω) (π ω) ≤ i } = { ω | τ ω ≤ i } ∪ { ω | π ω ≤ i } := by intro i;
-      ext1 ω; simp
+    have : ∀ i, {ω | min (τ ω) (π ω) ≤ i} = {ω | τ ω ≤ i} ∪ {ω | π ω ≤ i} := by intro i; ext1 ω;
+      simp
     simp_rw [this, Set.inter_union_distrib_left]
     exact fun h i => (h.left i).union (h.right i)
 #align measure_theory.is_stopping_time.measurable_space_min MeasureTheory.IsStoppingTime.measurableSpace_min
@@ -671,14 +671,13 @@ theorem measurableSet_min_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω) {i
 theorem measurableSet_inter_le [TopologicalSpace ι] [SecondCountableTopology ι] [OrderTopology ι]
     [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π)
     (s : Set Ω) (hs : measurable_set[hτ.MeasurableSpace] s) :
-    measurable_set[(hτ.min hπ).MeasurableSpace] (s ∩ { ω | τ ω ≤ π ω }) :=
+    measurable_set[(hτ.min hπ).MeasurableSpace] (s ∩ {ω | τ ω ≤ π ω}) :=
   by
   simp_rw [is_stopping_time.measurable_set] at hs ⊢
   intro i
   have :
-    s ∩ { ω | τ ω ≤ π ω } ∩ { ω | min (τ ω) (π ω) ≤ i } =
-      s ∩ { ω | τ ω ≤ i } ∩ { ω | min (τ ω) (π ω) ≤ i } ∩
-        { ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i } :=
+    s ∩ {ω | τ ω ≤ π ω} ∩ {ω | min (τ ω) (π ω) ≤ i} =
+      s ∩ {ω | τ ω ≤ i} ∩ {ω | min (τ ω) (π ω) ≤ i} ∩ {ω | min (τ ω) i ≤ min (min (τ ω) (π ω)) i} :=
     by
     ext1 ω
     simp only [min_le_iff, Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff, le_refl, true_and_iff,
@@ -706,11 +705,11 @@ theorem measurableSet_inter_le [TopologicalSpace ι] [SecondCountableTopology ι
 theorem measurableSet_inter_le_iff [TopologicalSpace ι] [SecondCountableTopology ι]
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) (s : Set Ω) :
-    measurable_set[hτ.MeasurableSpace] (s ∩ { ω | τ ω ≤ π ω }) ↔
-      measurable_set[(hτ.min hπ).MeasurableSpace] (s ∩ { ω | τ ω ≤ π ω }) :=
+    measurable_set[hτ.MeasurableSpace] (s ∩ {ω | τ ω ≤ π ω}) ↔
+      measurable_set[(hτ.min hπ).MeasurableSpace] (s ∩ {ω | τ ω ≤ π ω}) :=
   by
   constructor <;> intro h
-  · have : s ∩ { ω | τ ω ≤ π ω } = s ∩ { ω | τ ω ≤ π ω } ∩ { ω | τ ω ≤ π ω } := by
+  · have : s ∩ {ω | τ ω ≤ π ω} = s ∩ {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ π ω} := by
       rw [Set.inter_assoc, Set.inter_self]
     rw [this]
     exact measurable_set_inter_le _ _ _ h
@@ -719,8 +718,8 @@ theorem measurableSet_inter_le_iff [TopologicalSpace ι] [SecondCountableTopolog
 #align measure_theory.is_stopping_time.measurable_set_inter_le_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_iff
 
 theorem measurableSet_inter_le_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i : ι) :
-    measurable_set[hτ.MeasurableSpace] (s ∩ { ω | τ ω ≤ i }) ↔
-      measurable_set[(hτ.min_const i).MeasurableSpace] (s ∩ { ω | τ ω ≤ i }) :=
+    measurable_set[hτ.MeasurableSpace] (s ∩ {ω | τ ω ≤ i}) ↔
+      measurable_set[(hτ.min_const i).MeasurableSpace] (s ∩ {ω | τ ω ≤ i}) :=
   by
   rw [is_stopping_time.measurable_set_min_iff hτ (is_stopping_time_const _ i),
     is_stopping_time.measurable_space_const, is_stopping_time.measurable_set]
@@ -731,12 +730,11 @@ theorem measurableSet_inter_le_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω
 
 theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTopology ι]
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
-    (hπ : IsStoppingTime f π) : measurable_set[hτ.MeasurableSpace] { ω | τ ω ≤ π ω } :=
+    (hπ : IsStoppingTime f π) : measurable_set[hτ.MeasurableSpace] {ω | τ ω ≤ π ω} :=
   by
   rw [hτ.measurable_set]
   intro j
-  have :
-    { ω | τ ω ≤ π ω } ∩ { ω | τ ω ≤ j } = { ω | min (τ ω) j ≤ min (π ω) j } ∩ { ω | τ ω ≤ j } :=
+  have : {ω | τ ω ≤ π ω} ∩ {ω | τ ω ≤ j} = {ω | min (τ ω) j ≤ min (π ω) j} ∩ {ω | τ ω ≤ j} :=
     by
     ext1 ω
     simp only [Set.mem_inter_iff, Set.mem_setOf_eq, min_le_iff, le_min_iff, le_refl, and_true_iff,
@@ -755,24 +753,24 @@ theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTop
 
 theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTopology ι]
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
-    (hπ : IsStoppingTime f π) : measurable_set[hπ.MeasurableSpace] { ω | τ ω ≤ π ω } :=
+    (hπ : IsStoppingTime f π) : measurable_set[hπ.MeasurableSpace] {ω | τ ω ≤ π ω} :=
   by
-  suffices measurable_set[(hτ.min hπ).MeasurableSpace] { ω : Ω | τ ω ≤ π ω } by
+  suffices measurable_set[(hτ.min hπ).MeasurableSpace] {ω : Ω | τ ω ≤ π ω} by
     rw [measurable_set_min_iff hτ hπ] at this ; exact this.2
-  rw [← Set.univ_inter { ω : Ω | τ ω ≤ π ω }, ← hτ.measurable_set_inter_le_iff hπ, Set.univ_inter]
+  rw [← Set.univ_inter {ω : Ω | τ ω ≤ π ω}, ← hτ.measurable_set_inter_le_iff hπ, Set.univ_inter]
   exact measurable_set_le_stopping_time hτ hπ
 #align measure_theory.is_stopping_time.measurable_set_stopping_time_le MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le
 
 theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [MeasurableSpace ι]
     [BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι] [SecondCountableTopology ι]
     [MeasurableSub₂ ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω = π ω } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω = π ω} :=
   by
   rw [hτ.measurable_set]
   intro j
   have :
-    { ω | τ ω = π ω } ∩ { ω | τ ω ≤ j } =
-      { ω | min (τ ω) j = min (π ω) j } ∩ { ω | τ ω ≤ j } ∩ { ω | π ω ≤ j } :=
+    {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} =
+      {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j} :=
     by
     ext1 ω
     simp only [Set.mem_inter_iff, Set.mem_setOf_eq]
@@ -793,13 +791,13 @@ theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [Meas
 theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalSpace ι]
     [MeasurableSpace ι] [BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι]
     [SecondCountableTopology ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
-    measurable_set[hτ.MeasurableSpace] { ω | τ ω = π ω } :=
+    measurable_set[hτ.MeasurableSpace] {ω | τ ω = π ω} :=
   by
   rw [hτ.measurable_set]
   intro j
   have :
-    { ω | τ ω = π ω } ∩ { ω | τ ω ≤ j } =
-      { ω | min (τ ω) j = min (π ω) j } ∩ { ω | τ ω ≤ j } ∩ { ω | π ω ≤ j } :=
+    {ω | τ ω = π ω} ∩ {ω | τ ω ≤ j} =
+      {ω | min (τ ω) j = min (π ω) j} ∩ {ω | τ ω ≤ j} ∩ {ω | π ω ≤ j} :=
     by
     ext1 ω
     simp only [Set.mem_inter_iff, Set.mem_setOf_eq]
@@ -874,7 +872,7 @@ theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingT
   let m_prod : MeasurableSpace (Set.Iic i × Ω) := MeasurableSpace.prod _ (f i)
   let m_set : ∀ t : Set (Set.Iic i × Ω), MeasurableSpace t := fun _ =>
     @Subtype.instMeasurableSpace (Set.Iic i × Ω) _ m_prod
-  let s := { p : Set.Iic i × Ω | τ p.2 ≤ i }
+  let s := {p : Set.Iic i × Ω | τ p.2 ≤ i}
   have hs : measurable_set[m_prod] s := @measurable_snd (Set.Iic i) Ω _ (f i) _ (hτ i)
   have h_meas_fst :
     ∀ t : Set (Set.Iic i × Ω), measurable[m_set t] fun x : t => ((x : Set.Iic i × Ω).fst : ι) :=
@@ -885,7 +883,7 @@ theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingT
     refine' @measurable_of_Iic ι s _ _ _ (m_set s) _ _ _ _ fun j => _
     have h_set_eq :
       (fun x : s => τ (x : Set.Iic i × Ω).snd) ⁻¹' Set.Iic j =
-        (fun x : s => (x : Set.Iic i × Ω).snd) ⁻¹' { ω | τ ω ≤ min i j } :=
+        (fun x : s => (x : Set.Iic i × Ω).snd) ⁻¹' {ω | τ ω ≤ min i j} :=
       by
       ext1 ω
       simp only [Set.mem_preimage, Set.mem_Iic, iff_and_self, le_min_iff, Set.mem_setOf_eq]
@@ -943,8 +941,8 @@ theorem measurable_stoppedValue [MetrizableSpace β] [MeasurableSpace β] [Borel
     strongly_measurable_stopped_value_of_le hf_prog (hτ.min_const i) fun _ => min_le_right _ _
   intro t ht i
   suffices
-    stopped_value u τ ⁻¹' t ∩ { ω : Ω | τ ω ≤ i } =
-      (stopped_value u fun ω => min (τ ω) i) ⁻¹' t ∩ { ω : Ω | τ ω ≤ i }
+    stopped_value u τ ⁻¹' t ∩ {ω : Ω | τ ω ≤ i} =
+      (stopped_value u fun ω => min (τ ω) i) ⁻¹' t ∩ {ω : Ω | τ ω ≤ i}
     by rw [this]; exact ((h_str_meas i).Measurable ht).inter (hτ.measurable_set_le i)
   ext1 ω
   simp only [stopped_value, Set.mem_inter_iff, Set.mem_preimage, Set.mem_setOf_eq,
@@ -962,11 +960,11 @@ section StoppedValueOfMemFinset
 variable {μ : Measure Ω} {τ σ : Ω → ι} {E : Type _} {p : ℝ≥0∞} {u : ι → Ω → E}
 
 theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
-    stoppedValue u τ = ∑ i in s, Set.indicator { ω | τ ω = i } (u i) :=
+    stoppedValue u τ = ∑ i in s, Set.indicator {ω | τ ω = i} (u i) :=
   by
   ext y
   rw [stopped_value, Finset.sum_apply, Finset.sum_indicator_eq_sum_filter]
-  suffices Finset.filter (fun i => y ∈ { ω : Ω | τ ω = i }) s = ({τ y} : Finset ι) by
+  suffices Finset.filter (fun i => y ∈ {ω : Ω | τ ω = i}) s = ({τ y} : Finset ι) by
     rw [this, Finset.sum_singleton]
   ext1 ω
   simp only [Set.mem_setOf_eq, Finset.mem_filter, Finset.mem_singleton]
@@ -977,15 +975,15 @@ theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd :
 
 theorem stoppedValue_eq' [Preorder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] {N : ι}
     (hbdd : ∀ ω, τ ω ≤ N) :
-    stoppedValue u τ = ∑ i in Finset.Iic N, Set.indicator { ω | τ ω = i } (u i) :=
+    stoppedValue u τ = ∑ i in Finset.Iic N, Set.indicator {ω | τ ω = i} (u i) :=
   stoppedValue_eq_of_mem_finset fun ω => Finset.mem_Iic.mpr (hbdd ω)
 #align measure_theory.stopped_value_eq' MeasureTheory.stoppedValue_eq'
 
 theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s : Finset ι} (n : ι)
     (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) :
     stoppedProcess u τ n =
-      Set.indicator { a | n ≤ τ a } (u n) +
-        ∑ i in s.filterₓ (· < n), Set.indicator { ω | τ ω = i } (u i) :=
+      Set.indicator {a | n ≤ τ a} (u n) +
+        ∑ i in s.filterₓ (· < n), Set.indicator {ω | τ ω = i} (u i) :=
   by
   ext ω
   rw [Pi.add_apply, Finset.sum_apply]
@@ -1010,8 +1008,7 @@ theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s :
 
 theorem stoppedProcess_eq'' [LinearOrder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] (n : ι) :
     stoppedProcess u τ n =
-      Set.indicator { a | n ≤ τ a } (u n) +
-        ∑ i in Finset.Iio n, Set.indicator { ω | τ ω = i } (u i) :=
+      Set.indicator {a | n ≤ τ a} (u n) + ∑ i in Finset.Iio n, Set.indicator {ω | τ ω = i} (u i) :=
   by
   have h_mem : ∀ ω, τ ω < n → τ ω ∈ Finset.Iio n := fun ω h => finset.mem_Iio.mpr h
   rw [stopped_process_eq_of_mem_finset n h_mem]
@@ -1030,7 +1027,7 @@ theorem memℒp_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : 
   rw [stopped_value_eq_of_mem_finset hbdd]
   swap; infer_instance
   refine' mem_ℒp_finset_sum' _ fun i hi => mem_ℒp.indicator _ (hu i)
-  refine' ℱ.le i { a : Ω | τ a = i } (hτ.measurable_set_eq_of_countable_range _ i)
+  refine' ℱ.le i {a : Ω | τ a = i} (hτ.measurable_set_eq_of_countable_range _ i)
   refine' ((Finset.finite_toSet s).Subset fun ω hω => _).Countable
   obtain ⟨y, rfl⟩ := hω
   exact hbdd y
@@ -1070,11 +1067,11 @@ theorem memℒp_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu :
   rw [stopped_process_eq_of_mem_finset n hbdd]
   swap; · infer_instance
   refine' mem_ℒp.add _ _
-  · exact mem_ℒp.indicator (ℱ.le n { a : Ω | n ≤ τ a } (hτ.measurable_set_ge n)) (hu n)
-  · suffices mem_ℒp (fun ω => ∑ i in s.filter (· < n), { a : Ω | τ a = i }.indicator (u i) ω) p μ by
+  · exact mem_ℒp.indicator (ℱ.le n {a : Ω | n ≤ τ a} (hτ.measurable_set_ge n)) (hu n)
+  · suffices mem_ℒp (fun ω => ∑ i in s.filter (· < n), {a : Ω | τ a = i}.indicator (u i) ω) p μ by
       convert this; ext1 ω; simp only [Finset.sum_apply]
     refine' mem_ℒp_finset_sum _ fun i hi => mem_ℒp.indicator _ (hu i)
-    exact ℱ.le i { a : Ω | τ a = i } (hτ.measurable_set_eq i)
+    exact ℱ.le i {a : Ω | τ a = i} (hτ.measurable_set_eq i)
 #align measure_theory.mem_ℒp_stopped_process_of_mem_finset MeasureTheory.memℒp_stoppedProcess_of_mem_finset
 
 theorem memℒp_stoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
@@ -1153,7 +1150,7 @@ theorem stoppedValue_sub_eq_sum [AddCommGroup β] (hle : τ ≤ π) :
 
 theorem stoppedValue_sub_eq_sum' [AddCommGroup β] (hle : τ ≤ π) {N : ℕ} (hbdd : ∀ ω, π ω ≤ N) :
     stoppedValue u π - stoppedValue u τ = fun ω =>
-      (∑ i in Finset.range (N + 1), Set.indicator { ω | τ ω ≤ i ∧ i < π ω } (u (i + 1) - u i)) ω :=
+      (∑ i in Finset.range (N + 1), Set.indicator {ω | τ ω ≤ i ∧ i < π ω} (u (i + 1) - u i)) ω :=
   by
   rw [stopped_value_sub_eq_sum hle]
   ext ω
@@ -1170,14 +1167,14 @@ variable [AddCommMonoid β]
 
 theorem stoppedValue_eq {N : ℕ} (hbdd : ∀ ω, τ ω ≤ N) :
     stoppedValue u τ = fun x =>
-      (∑ i in Finset.range (N + 1), Set.indicator { ω | τ ω = i } (u i)) x :=
+      (∑ i in Finset.range (N + 1), Set.indicator {ω | τ ω = i} (u i)) x :=
   stoppedValue_eq_of_mem_finset fun ω => Finset.mem_range_succ_iff.mpr (hbdd ω)
 #align measure_theory.stopped_value_eq MeasureTheory.stoppedValue_eq
 
 theorem stoppedProcess_eq (n : ℕ) :
     stoppedProcess u τ n =
-      Set.indicator { a | n ≤ τ a } (u n) +
-        ∑ i in Finset.range n, Set.indicator { ω | τ ω = i } (u i) :=
+      Set.indicator {a | n ≤ τ a} (u n) +
+        ∑ i in Finset.range n, Set.indicator {ω | τ ω = i} (u i) :=
   by
   rw [stopped_process_eq'' n]
   swap; · infer_instance
@@ -1187,12 +1184,12 @@ theorem stoppedProcess_eq (n : ℕ) :
 
 theorem stoppedProcess_eq' (n : ℕ) :
     stoppedProcess u τ n =
-      Set.indicator { a | n + 1 ≤ τ a } (u n) +
-        ∑ i in Finset.range (n + 1), Set.indicator { a | τ a = i } (u i) :=
+      Set.indicator {a | n + 1 ≤ τ a} (u n) +
+        ∑ i in Finset.range (n + 1), Set.indicator {a | τ a = i} (u i) :=
   by
   have :
-    { a | n ≤ τ a }.indicator (u n) =
-      { a | n + 1 ≤ τ a }.indicator (u n) + { a | τ a = n }.indicator (u n) :=
+    {a | n ≤ τ a}.indicator (u n) =
+      {a | n + 1 ≤ τ a}.indicator (u n) + {a | τ a = n}.indicator (u n) :=
     by
     ext x
     rw [add_comm, Pi.add_apply, ← Set.indicator_union_of_not_mem_inter]
@@ -1218,7 +1215,7 @@ theorem IsStoppingTime.piecewise_of_le (hτ_st : IsStoppingTime 𝒢 τ) (hη_st
     (hτ : ∀ ω, i ≤ τ ω) (hη : ∀ ω, i ≤ η ω) (hs : measurable_set[𝒢 i] s) :
     IsStoppingTime 𝒢 (s.piecewise τ η) := by
   intro n
-  have : { ω | s.piecewise τ η ω ≤ n } = s ∩ { ω | τ ω ≤ n } ∪ sᶜ ∩ { ω | η ω ≤ n } :=
+  have : {ω | s.piecewise τ η ω ≤ n} = s ∩ {ω | τ ω ≤ n} ∪ sᶜ ∩ {ω | η ω ≤ n} :=
     by
     ext1 ω
     simp only [Set.piecewise, Set.mem_inter_iff, Set.mem_setOf_eq, and_congr_right_iff]
Diff
@@ -79,7 +79,7 @@ theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStopping
   · suffices { ω : Ω | τ ω < i } = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
     ext1 ω
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
-    rw [isMin_iff_forall_not_lt] at hi_min
+    rw [isMin_iff_forall_not_lt] at hi_min 
     exact hi_min (τ ω)
   have : { ω : Ω | τ ω < i } = τ ⁻¹' Set.Iio i := rfl
   rw [this, ← Iic_pred_of_not_is_min hi_min]
@@ -190,7 +190,7 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
     ext1 k
     simp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]
     refine' ⟨fun hk_lt_i => _, fun h_exists_k_le_seq => _⟩
-    · rw [tendsto_at_top'] at h_tendsto
+    · rw [tendsto_at_top'] at h_tendsto 
       have h_nhds : Set.Ici k ∈ 𝓝 i :=
         mem_nhds_iff.mpr ⟨Set.Ioi k, Set.Ioi_subset_Ici le_rfl, isOpen_Ioi, hk_lt_i⟩
       obtain ⟨a, ha⟩ : ∃ a : ℕ, ∀ b : ℕ, b ≥ a → k ≤ seq b := h_tendsto (Set.Ici k) h_nhds
@@ -209,7 +209,7 @@ theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
   by
   obtain ⟨i', hi'_lub⟩ : ∃ i', IsLUB (Set.Iio i) i'; exact exists_lub_Iio i
   cases' lub_Iio_eq_self_or_Iio_eq_Iic i hi'_lub with hi'_eq_i h_Iio_eq_Iic
-  · rw [← hi'_eq_i] at hi'_lub⊢
+  · rw [← hi'_eq_i] at hi'_lub ⊢
     exact hτ.measurable_set_lt_of_is_lub i' hi'_lub
   · have h_lt_eq_preimage : { ω : Ω | τ ω < i } = τ ⁻¹' Set.Iio i := rfl
     rw [h_lt_eq_preimage, h_Iio_eq_Iic]
@@ -307,7 +307,7 @@ theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStopping
   by_cases hij : i ≤ j
   · simp_rw [eq_comm, ← Nat.sub_eq_iff_eq_add hij, eq_comm]
     exact f.mono (j.sub_le i) _ (hτ.measurable_set_eq (j - i))
-  · rw [not_le] at hij
+  · rw [not_le] at hij 
     convert MeasurableSet.empty
     ext ω
     simp only [Set.mem_empty_iff_false, iff_false_iff]
@@ -350,7 +350,7 @@ protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω
     · rw [Set.union_inter_distrib_right]
       simp only [Set.compl_inter_self, Set.union_empty]
   measurable_set_iUnion s hs i := by
-    rw [forall_swap] at hs
+    rw [forall_swap] at hs 
     rw [Set.iUnion_inter]
     exact MeasurableSet.iUnion (hs i)
 #align measure_theory.is_stopping_time.measurable_space MeasureTheory.IsStoppingTime.measurableSpace
@@ -375,7 +375,7 @@ theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
 theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
     hτ.MeasurableSpace ≤ m := by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs
+  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs 
   rw [(_ : s = ⋃ i, s ∩ { ω | τ ω ≤ i })]
   · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
   · ext ω; constructor <;> rw [Set.mem_iUnion]
@@ -388,14 +388,14 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
     (hτ : IsStoppingTime f τ) : hτ.MeasurableSpace ≤ m :=
   by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs
+  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs 
   obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := at_top.exists_seq_tendsto
   rw [(_ : s = ⋃ n, s ∩ { ω | τ ω ≤ seq n })]
   · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
   · ext ω; constructor <;> rw [Set.mem_iUnion]
     · intro hx
       suffices : ∃ i, τ ω ≤ seq i; exact ⟨this.some, hx, this.some_spec⟩
-      rw [tendsto_at_top] at h_seq_tendsto
+      rw [tendsto_at_top] at h_seq_tendsto 
       exact (h_seq_tendsto (τ ω)).exists
     · rintro ⟨_, hx, _⟩
       exact hx
@@ -606,7 +606,7 @@ protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f
     (h_countable : (Set.range τ).Countable) : hτ.MeasurableSpace ≤ m :=
   by
   intro s hs
-  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs
+  change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs 
   rw [(_ : s = ⋃ i ∈ Set.range τ, s ∩ { ω | τ ω ≤ i })]
   · exact MeasurableSet.biUnion h_countable fun i _ => f.le i _ (hs i)
   · ext ω
@@ -614,7 +614,7 @@ protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f
     · exact fun hx => ⟨τ ω, by simpa using hx⟩
     · rintro ⟨i, hx⟩
       simp only [Set.mem_range, Set.iUnion_exists, Set.mem_iUnion, Set.mem_inter_iff,
-        Set.mem_setOf_eq, exists_prop, exists_and_right] at hx
+        Set.mem_setOf_eq, exists_prop, exists_and_right] at hx 
       exact hx.1.2
 #align measure_theory.is_stopping_time.measurable_space_le_of_countable_range MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable_range
 
@@ -673,7 +673,7 @@ theorem measurableSet_inter_le [TopologicalSpace ι] [SecondCountableTopology ι
     (s : Set Ω) (hs : measurable_set[hτ.MeasurableSpace] s) :
     measurable_set[(hτ.min hπ).MeasurableSpace] (s ∩ { ω | τ ω ≤ π ω }) :=
   by
-  simp_rw [is_stopping_time.measurable_set] at hs⊢
+  simp_rw [is_stopping_time.measurable_set] at hs ⊢
   intro i
   have :
     s ∩ { ω | τ ω ≤ π ω } ∩ { ω | min (τ ω) (π ω) ≤ i } =
@@ -714,7 +714,7 @@ theorem measurableSet_inter_le_iff [TopologicalSpace ι] [SecondCountableTopolog
       rw [Set.inter_assoc, Set.inter_self]
     rw [this]
     exact measurable_set_inter_le _ _ _ h
-  · rw [measurable_set_min_iff] at h
+  · rw [measurable_set_min_iff] at h 
     exact h.1
 #align measure_theory.is_stopping_time.measurable_set_inter_le_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_iff
 
@@ -726,7 +726,7 @@ theorem measurableSet_inter_le_const_iff (hτ : IsStoppingTime f τ) (s : Set Ω
     is_stopping_time.measurable_space_const, is_stopping_time.measurable_set]
   refine' ⟨fun h => ⟨h, _⟩, fun h j => h.1 j⟩
   specialize h i
-  rwa [Set.inter_assoc, Set.inter_self] at h
+  rwa [Set.inter_assoc, Set.inter_self] at h 
 #align measure_theory.is_stopping_time.measurable_set_inter_le_const_iff MeasureTheory.IsStoppingTime.measurableSet_inter_le_const_iff
 
 theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTopology ι]
@@ -758,7 +758,7 @@ theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTop
     (hπ : IsStoppingTime f π) : measurable_set[hπ.MeasurableSpace] { ω | τ ω ≤ π ω } :=
   by
   suffices measurable_set[(hτ.min hπ).MeasurableSpace] { ω : Ω | τ ω ≤ π ω } by
-    rw [measurable_set_min_iff hτ hπ] at this; exact this.2
+    rw [measurable_set_min_iff hτ hπ] at this ; exact this.2
   rw [← Set.univ_inter { ω : Ω | τ ω ≤ π ω }, ← hτ.measurable_set_inter_le_iff hπ, Set.univ_inter]
   exact measurable_set_le_stopping_time hτ hπ
 #align measure_theory.is_stopping_time.measurable_set_stopping_time_le MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le
@@ -781,7 +781,7 @@ theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [Meas
     · rw [← h.1]; exact h.2
     · cases' h with h' hσ_le
       cases' h' with h_eq hτ_le
-      rwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq
+      rwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq 
   rw [this]
   refine'
     MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurable_set_le j)) (hπ.measurable_set_le j)
@@ -808,7 +808,7 @@ theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalS
     · rw [← h.1]; exact h.2
     · cases' h with h' hπ_le
       cases' h' with h_eq hτ_le
-      rwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq
+      rwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq 
   rw [this]
   refine'
     MeasurableSet.inter (MeasurableSet.inter _ (hτ.measurable_set_le j)) (hπ.measurable_set_le j)
@@ -993,7 +993,7 @@ theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s :
   · rw [stopped_process_eq_of_le h, Set.indicator_of_mem, Finset.sum_eq_zero, add_zero]
     · intro m hm
       refine' Set.indicator_of_not_mem _ _
-      rw [Finset.mem_filter] at hm
+      rw [Finset.mem_filter] at hm 
       exact (hm.2.trans_le h).ne'
     · exact h
   · rw [stopped_process_eq_of_ge (le_of_lt h), Finset.sum_eq_single_of_mem (τ ω)]
@@ -1045,7 +1045,7 @@ theorem integrable_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
     Integrable (stoppedValue u τ) μ :=
   by
-  simp_rw [← mem_ℒp_one_iff_integrable] at hu⊢
+  simp_rw [← mem_ℒp_one_iff_integrable] at hu ⊢
   exact mem_ℒp_stopped_value_of_mem_finset hτ hu hbdd
 #align measure_theory.integrable_stopped_value_of_mem_finset MeasureTheory.integrable_stoppedValue_of_mem_finset
 
@@ -1086,7 +1086,7 @@ theorem integrable_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) :
     Integrable (stoppedProcess u τ n) μ :=
   by
-  simp_rw [← mem_ℒp_one_iff_integrable] at hu⊢
+  simp_rw [← mem_ℒp_one_iff_integrable] at hu ⊢
   exact mem_ℒp_stopped_process_of_mem_finset hτ hu n hbdd
 #align measure_theory.integrable_stopped_process_of_mem_finset MeasureTheory.integrable_stoppedProcess_of_mem_finset
 
Diff
@@ -38,7 +38,7 @@ stopping time, stochastic process
 
 open Filter Order TopologicalSpace
 
-open Classical MeasureTheory NNReal ENNReal Topology BigOperators
+open scoped Classical MeasureTheory NNReal ENNReal Topology BigOperators
 
 namespace MeasureTheory
 
Diff
@@ -76,9 +76,7 @@ theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStopping
     measurable_set[f i] { ω | τ ω < i } :=
   by
   by_cases hi_min : IsMin i
-  · suffices { ω : Ω | τ ω < i } = ∅ by
-      rw [this]
-      exact @MeasurableSet.empty _ (f i)
+  · suffices { ω : Ω | τ ω < i } = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
     ext1 ω
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
     rw [isMin_iff_forall_not_lt] at hi_min
@@ -129,10 +127,7 @@ protected theorem measurableSet_eq_of_countable [Countable ι] (hτ : IsStopping
 protected theorem measurableSet_lt_of_countable_range (hτ : IsStoppingTime f τ)
     (h_countable : (Set.range τ).Countable) (i : ι) : measurable_set[f i] { ω | τ ω < i } :=
   by
-  have : { ω | τ ω < i } = { ω | τ ω ≤ i } \ { ω | τ ω = i } :=
-    by
-    ext1 ω
-    simp [lt_iff_le_and_ne]
+  have : { ω | τ ω < i } = { ω | τ ω ≤ i } \ { ω | τ ω = i } := by ext1 ω; simp [lt_iff_le_and_ne]
   rw [this]
   exact (hτ.measurable_set_le i).diffₓ (hτ.measurable_set_eq_of_countable_range h_countable i)
 #align measure_theory.is_stopping_time.measurable_set_lt_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_lt_of_countable_range
@@ -146,8 +141,7 @@ protected theorem measurableSet_ge_of_countable_range {ι} [LinearOrder ι] {τ
     {f : Filtration ι m} (hτ : IsStoppingTime f τ) (h_countable : (Set.range τ).Countable) (i : ι) :
     measurable_set[f i] { ω | i ≤ τ ω } :=
   by
-  have : { ω | i ≤ τ ω } = { ω | τ ω < i }ᶜ := by
-    ext1 ω
+  have : { ω | i ≤ τ ω } = { ω | τ ω < i }ᶜ := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]
   rw [this]
   exact (hτ.measurable_set_lt_of_countable_range h_countable i).compl
@@ -169,8 +163,7 @@ variable [LinearOrder ι] {f : Filtration ι m} {τ : Ω → ι}
 theorem IsStoppingTime.measurableSet_gt (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] { ω | i < τ ω } :=
   by
-  have : { ω | i < τ ω } = { ω | τ ω ≤ i }ᶜ := by
-    ext1 ω
+  have : { ω | i < τ ω } = { ω | τ ω ≤ i }ᶜ := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_le]
   rw [this]
   exact (hτ.measurable_set_le i).compl
@@ -185,9 +178,7 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
     (h_lub : IsLUB (Set.Iio i) i) : measurable_set[f i] { ω | τ ω < i } :=
   by
   by_cases hi_min : IsMin i
-  · suffices { ω | τ ω < i } = ∅ by
-      rw [this]
-      exact @MeasurableSet.empty _ (f i)
+  · suffices { ω | τ ω < i } = ∅ by rw [this]; exact @MeasurableSet.empty _ (f i)
     ext1 ω
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
     exact is_min_iff_forall_not_lt.mp hi_min (τ ω)
@@ -206,9 +197,7 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
       exact ⟨a, ha a le_rfl⟩
     · obtain ⟨j, hk_seq_j⟩ := h_exists_k_le_seq
       exact hk_seq_j.trans_lt (h_bound j)
-  have h_lt_eq_preimage : { ω | τ ω < i } = τ ⁻¹' Set.Iio i :=
-    by
-    ext1 ω
+  have h_lt_eq_preimage : { ω | τ ω < i } = τ ⁻¹' Set.Iio i := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_preimage, Set.mem_Iio]
   rw [h_lt_eq_preimage, h_Ioi_eq_Union]
   simp only [Set.preimage_iUnion, Set.preimage_setOf_eq]
@@ -230,8 +219,7 @@ theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
 theorem IsStoppingTime.measurableSet_ge (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] { ω | i ≤ τ ω } :=
   by
-  have : { ω | i ≤ τ ω } = { ω | τ ω < i }ᶜ := by
-    ext1 ω
+  have : { ω | i ≤ τ ω } = { ω | τ ω < i }ᶜ := by ext1 ω;
     simp only [Set.mem_setOf_eq, Set.mem_compl_iff, not_lt]
   rw [this]
   exact (hτ.measurable_set_lt i).compl
@@ -240,9 +228,7 @@ theorem IsStoppingTime.measurableSet_ge (hτ : IsStoppingTime f τ) (i : ι) :
 theorem IsStoppingTime.measurableSet_eq (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[f i] { ω | τ ω = i } :=
   by
-  have : { ω | τ ω = i } = { ω | τ ω ≤ i } ∩ { ω | τ ω ≥ i } :=
-    by
-    ext1 ω
+  have : { ω | τ ω = i } = { ω | τ ω ≤ i } ∩ { ω | τ ω ≥ i } := by ext1 ω;
     simp only [Set.mem_setOf_eq, ge_iff_le, Set.mem_inter_iff, le_antisymm_iff]
   rw [this]
   exact (hτ.measurable_set_le i).inter (hτ.measurable_set_ge i)
@@ -268,10 +254,7 @@ theorem isStoppingTime_of_measurableSet_eq [Preorder ι] [Countable ι] {f : Fil
     {τ : Ω → ι} (hτ : ∀ i, measurable_set[f i] { ω | τ ω = i }) : IsStoppingTime f τ :=
   by
   intro i
-  rw [show { ω | τ ω ≤ i } = ⋃ k ≤ i, { ω | τ ω = k }
-      by
-      ext
-      simp]
+  rw [show { ω | τ ω ≤ i } = ⋃ k ≤ i, { ω | τ ω = k } by ext; simp]
   refine' MeasurableSet.biUnion (Set.to_countable _) fun k hk => _
   exact f.mono hk _ (hτ k)
 #align measure_theory.is_stopping_time_of_measurable_set_eq MeasureTheory.isStoppingTime_of_measurableSet_eq
@@ -395,8 +378,7 @@ theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f 
   change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs
   rw [(_ : s = ⋃ i, s ∩ { ω | τ ω ≤ i })]
   · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
-  · ext ω
-    constructor <;> rw [Set.mem_iUnion]
+  · ext ω; constructor <;> rw [Set.mem_iUnion]
     · exact fun hx => ⟨τ ω, hx, le_rfl⟩
     · rintro ⟨_, hx, _⟩
       exact hx
@@ -410,11 +392,9 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
   obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := at_top.exists_seq_tendsto
   rw [(_ : s = ⋃ n, s ∩ { ω | τ ω ≤ seq n })]
   · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
-  · ext ω
-    constructor <;> rw [Set.mem_iUnion]
+  · ext ω; constructor <;> rw [Set.mem_iUnion]
     · intro hx
-      suffices : ∃ i, τ ω ≤ seq i
-      exact ⟨this.some, hx, this.some_spec⟩
+      suffices : ∃ i, τ ω ≤ seq i; exact ⟨this.some, hx, this.some_spec⟩
       rw [tendsto_at_top] at h_seq_tendsto
       exact (h_seq_tendsto (τ ω)).exists
     · rintro ⟨_, hx, _⟩
@@ -428,9 +408,7 @@ theorem measurableSpace_le {ι} [SemilatticeSup ι] {f : Filtration ι m} {τ :
   cases isEmpty_or_nonempty ι
   · haveI : IsEmpty Ω := ⟨fun ω => IsEmpty.false (τ ω)⟩
     intro s hsτ
-    suffices hs : s = ∅
-    · rw [hs]
-      exact MeasurableSet.empty
+    suffices hs : s = ∅; · rw [hs]; exact MeasurableSet.empty
     haveI : Unique (Set Ω) := Set.uniqueEmpty
     rw [Unique.eq_default s, Unique.eq_default ∅]
   exact measurable_space_le' hτ
@@ -527,9 +505,7 @@ protected theorem measurableSet_le' (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] { ω | τ ω ≤ i } :=
   by
   intro j
-  have : { ω : Ω | τ ω ≤ i } ∩ { ω : Ω | τ ω ≤ j } = { ω : Ω | τ ω ≤ min i j } :=
-    by
-    ext1 ω
+  have : { ω : Ω | τ ω ≤ i } ∩ { ω : Ω | τ ω ≤ j } = { ω : Ω | τ ω ≤ min i j } := by ext1 ω;
     simp only [Set.mem_inter_iff, Set.mem_setOf_eq, le_min_iff]
   rw [this]
   exact f.mono (min_le_right i j) _ (hτ _)
@@ -538,10 +514,7 @@ protected theorem measurableSet_le' (hτ : IsStoppingTime f τ) (i : ι) :
 protected theorem measurableSet_gt' (hτ : IsStoppingTime f τ) (i : ι) :
     measurable_set[hτ.MeasurableSpace] { ω | i < τ ω } :=
   by
-  have : { ω : Ω | i < τ ω } = { ω : Ω | τ ω ≤ i }ᶜ :=
-    by
-    ext1 ω
-    simp
+  have : { ω : Ω | i < τ ω } = { ω : Ω | τ ω ≤ i }ᶜ := by ext1 ω; simp
   rw [this]
   exact (hτ.measurable_set_le' i).compl
 #align measure_theory.is_stopping_time.measurable_set_gt' MeasureTheory.IsStoppingTime.measurableSet_gt'
@@ -672,11 +645,8 @@ theorem measurableSpace_min (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
       measurable_set[hτ.measurable_space] s ∧ measurable_set[hπ.measurable_space] s →
         measurable_set[(hτ.min hπ).MeasurableSpace] s
     simp_rw [is_stopping_time.measurable_set]
-    have : ∀ i, { ω | min (τ ω) (π ω) ≤ i } = { ω | τ ω ≤ i } ∪ { ω | π ω ≤ i } :=
-      by
-      intro i
-      ext1 ω
-      simp
+    have : ∀ i, { ω | min (τ ω) (π ω) ≤ i } = { ω | τ ω ≤ i } ∪ { ω | π ω ≤ i } := by intro i;
+      ext1 ω; simp
     simp_rw [this, Set.inter_union_distrib_left]
     exact fun h i => (h.left i).union (h.right i)
 #align measure_theory.is_stopping_time.measurable_space_min MeasureTheory.IsStoppingTime.measurableSpace_min
@@ -684,9 +654,7 @@ theorem measurableSpace_min (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f
 theorem measurableSet_min_iff (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (s : Set Ω) :
     measurable_set[(hτ.min hπ).MeasurableSpace] s ↔
       measurable_set[hτ.MeasurableSpace] s ∧ measurable_set[hπ.MeasurableSpace] s :=
-  by
-  rw [measurable_space_min]
-  rfl
+  by rw [measurable_space_min]; rfl
 #align measure_theory.is_stopping_time.measurable_set_min_iff MeasureTheory.IsStoppingTime.measurableSet_min_iff
 
 theorem measurableSpace_min_const (hτ : IsStoppingTime f τ) {i : ι} :
@@ -789,10 +757,8 @@ theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTop
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) : measurable_set[hπ.MeasurableSpace] { ω | τ ω ≤ π ω } :=
   by
-  suffices measurable_set[(hτ.min hπ).MeasurableSpace] { ω : Ω | τ ω ≤ π ω }
-    by
-    rw [measurable_set_min_iff hτ hπ] at this
-    exact this.2
+  suffices measurable_set[(hτ.min hπ).MeasurableSpace] { ω : Ω | τ ω ≤ π ω } by
+    rw [measurable_set_min_iff hτ hπ] at this; exact this.2
   rw [← Set.univ_inter { ω : Ω | τ ω ≤ π ω }, ← hτ.measurable_set_inter_le_iff hπ, Set.univ_inter]
   exact measurable_set_le_stopping_time hτ hπ
 #align measure_theory.is_stopping_time.measurable_set_stopping_time_le MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le
@@ -812,8 +778,7 @@ theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [Meas
     simp only [Set.mem_inter_iff, Set.mem_setOf_eq]
     refine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩
     · rw [h.1]
-    · rw [← h.1]
-      exact h.2
+    · rw [← h.1]; exact h.2
     · cases' h with h' hσ_le
       cases' h' with h_eq hτ_le
       rwa [min_eq_left hτ_le, min_eq_left hσ_le] at h_eq
@@ -840,8 +805,7 @@ theorem measurableSet_eq_stopping_time_of_countable [Countable ι] [TopologicalS
     simp only [Set.mem_inter_iff, Set.mem_setOf_eq]
     refine' ⟨fun h => ⟨⟨_, h.2⟩, _⟩, fun h => ⟨_, h.1.2⟩⟩
     · rw [h.1]
-    · rw [← h.1]
-      exact h.2
+    · rw [← h.1]; exact h.2
     · cases' h with h' hπ_le
       cases' h' with h_eq hτ_le
       rwa [min_eq_left hτ_le, min_eq_left hπ_le] at h_eq
@@ -965,9 +929,7 @@ theorem stronglyMeasurable_stoppedValue_of_le (h : ProgMeasurable f u) (hτ : Is
   have :
     stopped_value u τ =
       (fun p : Set.Iic n × Ω => u (↑p.fst) p.snd) ∘ fun ω => (⟨τ ω, hτ_le ω⟩, ω) :=
-    by
-    ext1 ω
-    simp only [stopped_value, Function.comp_apply, Subtype.coe_mk]
+    by ext1 ω; simp only [stopped_value, Function.comp_apply, Subtype.coe_mk]
   rw [this]
   refine' strongly_measurable.comp_measurable (h n) _
   exact (hτ.measurable_of_le hτ_le).subtype_mk.prod_mk measurable_id
@@ -983,9 +945,7 @@ theorem measurable_stoppedValue [MetrizableSpace β] [MeasurableSpace β] [Borel
   suffices
     stopped_value u τ ⁻¹' t ∩ { ω : Ω | τ ω ≤ i } =
       (stopped_value u fun ω => min (τ ω) i) ⁻¹' t ∩ { ω : Ω | τ ω ≤ i }
-    by
-    rw [this]
-    exact ((h_str_meas i).Measurable ht).inter (hτ.measurable_set_le i)
+    by rw [this]; exact ((h_str_meas i).Measurable ht).inter (hτ.measurable_set_le i)
   ext1 ω
   simp only [stopped_value, Set.mem_inter_iff, Set.mem_preimage, Set.mem_setOf_eq,
     and_congr_left_iff]
@@ -1012,9 +972,7 @@ theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd :
   simp only [Set.mem_setOf_eq, Finset.mem_filter, Finset.mem_singleton]
   constructor <;> intro h
   · exact h.2.symm
-  · refine' ⟨_, h.symm⟩
-    rw [h]
-    exact hbdd y
+  · refine' ⟨_, h.symm⟩; rw [h]; exact hbdd y
 #align measure_theory.stopped_value_eq_of_mem_finset MeasureTheory.stoppedValue_eq_of_mem_finset
 
 theorem stoppedValue_eq' [Preorder ι] [LocallyFiniteOrderBot ι] [AddCommMonoid E] {N : ι}
@@ -1113,11 +1071,8 @@ theorem memℒp_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu :
   swap; · infer_instance
   refine' mem_ℒp.add _ _
   · exact mem_ℒp.indicator (ℱ.le n { a : Ω | n ≤ τ a } (hτ.measurable_set_ge n)) (hu n)
-  · suffices mem_ℒp (fun ω => ∑ i in s.filter (· < n), { a : Ω | τ a = i }.indicator (u i) ω) p μ
-      by
-      convert this
-      ext1 ω
-      simp only [Finset.sum_apply]
+  · suffices mem_ℒp (fun ω => ∑ i in s.filter (· < n), { a : Ω | τ a = i }.indicator (u i) ω) p μ by
+      convert this; ext1 ω; simp only [Finset.sum_apply]
     refine' mem_ℒp_finset_sum _ fun i hi => mem_ℒp.indicator _ (hu i)
     exact ℱ.le i { a : Ω | τ a = i } (hτ.measurable_set_eq i)
 #align measure_theory.mem_ℒp_stopped_process_of_mem_finset MeasureTheory.memℒp_stoppedProcess_of_mem_finset
@@ -1284,19 +1239,13 @@ theorem isStoppingTime_piecewise_const (hij : i ≤ j) (hs : measurable_set[𝒢
 #align measure_theory.is_stopping_time_piecewise_const MeasureTheory.isStoppingTime_piecewise_const
 
 theorem stoppedValue_piecewise_const {ι' : Type _} {i j : ι'} {f : ι' → Ω → ℝ} :
-    stoppedValue f (s.piecewise (fun _ => i) fun _ => j) = s.piecewise (f i) (f j) :=
-  by
-  ext ω
-  rw [stopped_value]
-  by_cases hx : ω ∈ s <;> simp [hx]
+    stoppedValue f (s.piecewise (fun _ => i) fun _ => j) = s.piecewise (f i) (f j) := by ext ω;
+  rw [stopped_value]; by_cases hx : ω ∈ s <;> simp [hx]
 #align measure_theory.stopped_value_piecewise_const MeasureTheory.stoppedValue_piecewise_const
 
 theorem stoppedValue_piecewise_const' {ι' : Type _} {i j : ι'} {f : ι' → Ω → ℝ} :
     stoppedValue f (s.piecewise (fun _ => i) fun _ => j) = s.indicator (f i) + sᶜ.indicator (f j) :=
-  by
-  ext ω
-  rw [stopped_value]
-  by_cases hx : ω ∈ s <;> simp [hx]
+  by ext ω; rw [stopped_value]; by_cases hx : ω ∈ s <;> simp [hx]
 #align measure_theory.stopped_value_piecewise_const' MeasureTheory.stoppedValue_piecewise_const'
 
 end PiecewiseConst
Diff
@@ -102,8 +102,8 @@ protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ
   have : { ω | τ ω = i } = { ω | τ ω ≤ i } \ ⋃ (j ∈ Set.range τ) (hj : j < i), { ω | τ ω ≤ j } :=
     by
     ext1 a
-    simp only [Set.mem_setOf_eq, Set.mem_range, Set.unionᵢ_exists, Set.unionᵢ_unionᵢ_eq',
-      Set.mem_diff, Set.mem_unionᵢ, exists_prop, not_exists, not_and, not_le]
+    simp only [Set.mem_setOf_eq, Set.mem_range, Set.iUnion_exists, Set.iUnion_iUnion_eq',
+      Set.mem_diff, Set.mem_iUnion, exists_prop, not_exists, not_and, not_le]
     constructor <;> intro h
     · simp only [h, lt_iff_le_not_le, le_refl, and_imp, imp_self, imp_true_iff, and_self_iff]
     · have h_lt_or_eq : τ a < i ∨ τ a = i := lt_or_eq_of_le h.1
@@ -113,11 +113,11 @@ protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ
       · rfl
   rw [this]
   refine' (hτ.measurable_set_le i).diffₓ _
-  refine' MeasurableSet.bunionᵢ h_countable fun j hj => _
+  refine' MeasurableSet.biUnion h_countable fun j hj => _
   by_cases hji : j < i
-  · simp only [hji, Set.unionᵢ_true]
+  · simp only [hji, Set.iUnion_true]
     exact f.mono hji.le _ (hτ.measurable_set_le j)
-  · simp only [hji, Set.unionᵢ_false]
+  · simp only [hji, Set.iUnion_false]
     exact @MeasurableSet.empty _ (f i)
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range
 
@@ -197,7 +197,7 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
   have h_Ioi_eq_Union : Set.Iio i = ⋃ j, { k | k ≤ seq j } :=
     by
     ext1 k
-    simp only [Set.mem_Iio, Set.mem_unionᵢ, Set.mem_setOf_eq]
+    simp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]
     refine' ⟨fun hk_lt_i => _, fun h_exists_k_le_seq => _⟩
     · rw [tendsto_at_top'] at h_tendsto
       have h_nhds : Set.Ici k ∈ 𝓝 i :=
@@ -211,8 +211,8 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
     ext1 ω
     simp only [Set.mem_setOf_eq, Set.mem_preimage, Set.mem_Iio]
   rw [h_lt_eq_preimage, h_Ioi_eq_Union]
-  simp only [Set.preimage_unionᵢ, Set.preimage_setOf_eq]
-  exact MeasurableSet.unionᵢ fun n => f.mono (h_bound n).le _ (hτ.measurable_set_le (seq n))
+  simp only [Set.preimage_iUnion, Set.preimage_setOf_eq]
+  exact MeasurableSet.iUnion fun n => f.mono (h_bound n).le _ (hτ.measurable_set_le (seq n))
 #align measure_theory.is_stopping_time.measurable_set_lt_of_is_lub MeasureTheory.IsStoppingTime.measurableSet_lt_of_isLUB
 
 theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
@@ -272,7 +272,7 @@ theorem isStoppingTime_of_measurableSet_eq [Preorder ι] [Countable ι] {f : Fil
       by
       ext
       simp]
-  refine' MeasurableSet.bunionᵢ (Set.to_countable _) fun k hk => _
+  refine' MeasurableSet.biUnion (Set.to_countable _) fun k hk => _
   exact f.mono hk _ (hτ k)
 #align measure_theory.is_stopping_time_of_measurable_set_eq MeasureTheory.isStoppingTime_of_measurableSet_eq
 
@@ -339,10 +339,10 @@ theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f
   rw [(_ : { ω | (τ + π) ω ≤ i } = ⋃ k ≤ i, { ω | π ω = k } ∩ { ω | τ ω + k ≤ i })]
   ·
     exact
-      MeasurableSet.unionᵢ fun k =>
-        MeasurableSet.unionᵢ fun hk => (hπ.measurable_set_eq_le hk).inter (hτ.add_const_nat i)
+      MeasurableSet.iUnion fun k =>
+        MeasurableSet.iUnion fun hk => (hπ.measurable_set_eq_le hk).inter (hτ.add_const_nat i)
   ext ω
-  simp only [Pi.add_apply, Set.mem_setOf_eq, Set.mem_unionᵢ, Set.mem_inter_iff, exists_prop]
+  simp only [Pi.add_apply, Set.mem_setOf_eq, Set.mem_iUnion, Set.mem_inter_iff, exists_prop]
   refine' ⟨fun h => ⟨π ω, by linarith, rfl, h⟩, _⟩
   rintro ⟨j, hj, rfl, h⟩
   assumption
@@ -366,10 +366,10 @@ protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω
       · exact hτ i
     · rw [Set.union_inter_distrib_right]
       simp only [Set.compl_inter_self, Set.union_empty]
-  measurable_set_unionᵢ s hs i := by
+  measurable_set_iUnion s hs i := by
     rw [forall_swap] at hs
-    rw [Set.unionᵢ_inter]
-    exact MeasurableSet.unionᵢ (hs i)
+    rw [Set.iUnion_inter]
+    exact MeasurableSet.iUnion (hs i)
 #align measure_theory.is_stopping_time.measurable_space MeasureTheory.IsStoppingTime.measurableSpace
 
 protected theorem measurableSet (hτ : IsStoppingTime f τ) (s : Set Ω) :
@@ -394,9 +394,9 @@ theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f 
   intro s hs
   change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs
   rw [(_ : s = ⋃ i, s ∩ { ω | τ ω ≤ i })]
-  · exact MeasurableSet.unionᵢ fun i => f.le i _ (hs i)
+  · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
   · ext ω
-    constructor <;> rw [Set.mem_unionᵢ]
+    constructor <;> rw [Set.mem_iUnion]
     · exact fun hx => ⟨τ ω, hx, le_rfl⟩
     · rintro ⟨_, hx, _⟩
       exact hx
@@ -409,9 +409,9 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
   change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs
   obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := at_top.exists_seq_tendsto
   rw [(_ : s = ⋃ n, s ∩ { ω | τ ω ≤ seq n })]
-  · exact MeasurableSet.unionᵢ fun i => f.le (seq i) _ (hs (seq i))
+  · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
   · ext ω
-    constructor <;> rw [Set.mem_unionᵢ]
+    constructor <;> rw [Set.mem_iUnion]
     · intro hx
       suffices : ∃ i, τ ω ≤ seq i
       exact ⟨this.some, hx, this.some_spec⟩
@@ -635,12 +635,12 @@ protected theorem measurableSpace_le_of_countable_range (hτ : IsStoppingTime f
   intro s hs
   change ∀ i, measurable_set[f i] (s ∩ { ω | τ ω ≤ i }) at hs
   rw [(_ : s = ⋃ i ∈ Set.range τ, s ∩ { ω | τ ω ≤ i })]
-  · exact MeasurableSet.bunionᵢ h_countable fun i _ => f.le i _ (hs i)
+  · exact MeasurableSet.biUnion h_countable fun i _ => f.le i _ (hs i)
   · ext ω
-    constructor <;> rw [Set.mem_unionᵢ]
+    constructor <;> rw [Set.mem_iUnion]
     · exact fun hx => ⟨τ ω, by simpa using hx⟩
     · rintro ⟨i, hx⟩
-      simp only [Set.mem_range, Set.unionᵢ_exists, Set.mem_unionᵢ, Set.mem_inter_iff,
+      simp only [Set.mem_range, Set.iUnion_exists, Set.mem_iUnion, Set.mem_inter_iff,
         Set.mem_setOf_eq, exists_prop, exists_and_right] at hx
       exact hx.1.2
 #align measure_theory.is_stopping_time.measurable_space_le_of_countable_range MeasureTheory.IsStoppingTime.measurableSpace_le_of_countable_range
Diff
@@ -799,7 +799,7 @@ theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTop
 
 theorem measurableSet_eq_stopping_time [AddGroup ι] [TopologicalSpace ι] [MeasurableSpace ι]
     [BorelSpace ι] [OrderTopology ι] [MeasurableSingletonClass ι] [SecondCountableTopology ι]
-    [HasMeasurableSub₂ ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
+    [MeasurableSub₂ ι] (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
     measurable_set[hτ.MeasurableSpace] { ω | τ ω = π ω } :=
   by
   rw [hτ.measurable_set]
Diff
@@ -909,7 +909,7 @@ theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingT
   intro i
   let m_prod : MeasurableSpace (Set.Iic i × Ω) := MeasurableSpace.prod _ (f i)
   let m_set : ∀ t : Set (Set.Iic i × Ω), MeasurableSpace t := fun _ =>
-    @Subtype.measurableSpace (Set.Iic i × Ω) _ m_prod
+    @Subtype.instMeasurableSpace (Set.Iic i × Ω) _ m_prod
   let s := { p : Set.Iic i × Ω | τ p.2 ≤ i }
   have hs : measurable_set[m_prod] s := @measurable_snd (Set.Iic i) Ω _ (f i) _ (hτ i)
   have h_meas_fst :
Diff
@@ -498,7 +498,7 @@ theorem le_measurableSpace_of_const_le (hτ : IsStoppingTime f τ) {i : ι} (hτ
 
 end Preorder
 
-instance sigmaFiniteStoppingTime {ι} [SemilatticeSup ι] [OrderBot ι]
+instance sigmaFinite_stopping_time {ι} [SemilatticeSup ι] [OrderBot ι]
     [(Filter.atTop : Filter ι).IsCountablyGenerated] {μ : Measure Ω} {f : Filtration ι m}
     {τ : Ω → ι} [SigmaFiniteFiltration μ f] (hτ : IsStoppingTime f τ) :
     SigmaFinite (μ.trim hτ.measurableSpace_le) :=
@@ -507,9 +507,9 @@ instance sigmaFiniteStoppingTime {ι} [SemilatticeSup ι] [OrderBot ι]
   · exact f ⊥
   · exact hτ.le_measurable_space_of_const_le fun _ => bot_le
   · infer_instance
-#align measure_theory.is_stopping_time.sigma_finite_stopping_time MeasureTheory.IsStoppingTime.sigmaFiniteStoppingTime
+#align measure_theory.is_stopping_time.sigma_finite_stopping_time MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time
 
-instance sigmaFiniteStoppingTimeOfLe {ι} [SemilatticeSup ι] [OrderBot ι] {μ : Measure Ω}
+instance sigmaFinite_stopping_time_of_le {ι} [SemilatticeSup ι] [OrderBot ι] {μ : Measure Ω}
     {f : Filtration ι m} {τ : Ω → ι} [SigmaFiniteFiltration μ f] (hτ : IsStoppingTime f τ) {n : ι}
     (hτ_le : ∀ ω, τ ω ≤ n) : SigmaFinite (μ.trim (hτ.measurableSpace_le_of_le hτ_le)) :=
   by
@@ -517,7 +517,7 @@ instance sigmaFiniteStoppingTimeOfLe {ι} [SemilatticeSup ι] [OrderBot ι] {μ
   · exact f ⊥
   · exact hτ.le_measurable_space_of_const_le fun _ => bot_le
   · infer_instance
-#align measure_theory.is_stopping_time.sigma_finite_stopping_time_of_le MeasureTheory.IsStoppingTime.sigmaFiniteStoppingTimeOfLe
+#align measure_theory.is_stopping_time.sigma_finite_stopping_time_of_le MeasureTheory.IsStoppingTime.sigmaFinite_stopping_time_of_le
 
 section LinearOrder
 
@@ -1066,7 +1066,7 @@ section StoppedValue
 
 variable [PartialOrder ι] {ℱ : Filtration ι m} [NormedAddCommGroup E]
 
-theorem memℒpStoppedValueOfMemFinset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
+theorem memℒp_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
     {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) : Memℒp (stoppedValue u τ) p μ :=
   by
   rw [stopped_value_eq_of_mem_finset hbdd]
@@ -1076,27 +1076,28 @@ theorem memℒpStoppedValueOfMemFinset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n
   refine' ((Finset.finite_toSet s).Subset fun ω hω => _).Countable
   obtain ⟨y, rfl⟩ := hω
   exact hbdd y
-#align measure_theory.mem_ℒp_stopped_value_of_mem_finset MeasureTheory.memℒpStoppedValueOfMemFinset
+#align measure_theory.mem_ℒp_stopped_value_of_mem_finset MeasureTheory.memℒp_stoppedValue_of_mem_finset
 
-theorem memℒpStoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
+theorem memℒp_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Memℒp (u n) p μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) : Memℒp (stoppedValue u τ) p μ :=
-  memℒpStoppedValueOfMemFinset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
-#align measure_theory.mem_ℒp_stopped_value MeasureTheory.memℒpStoppedValue
+  memℒp_stoppedValue_of_mem_finset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
+#align measure_theory.mem_ℒp_stopped_value MeasureTheory.memℒp_stoppedValue
 
-theorem integrableStoppedValueOfMemFinset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Integrable (u n) μ)
-    {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) : Integrable (stoppedValue u τ) μ :=
+theorem integrable_stoppedValue_of_mem_finset (hτ : IsStoppingTime ℱ τ)
+    (hu : ∀ n, Integrable (u n) μ) {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
+    Integrable (stoppedValue u τ) μ :=
   by
   simp_rw [← mem_ℒp_one_iff_integrable] at hu⊢
   exact mem_ℒp_stopped_value_of_mem_finset hτ hu hbdd
-#align measure_theory.integrable_stopped_value_of_mem_finset MeasureTheory.integrableStoppedValueOfMemFinset
+#align measure_theory.integrable_stopped_value_of_mem_finset MeasureTheory.integrable_stoppedValue_of_mem_finset
 
 variable (ι)
 
-theorem integrableStoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
+theorem integrable_stoppedValue [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) {N : ι} (hbdd : ∀ ω, τ ω ≤ N) :
     Integrable (stoppedValue u τ) μ :=
-  integrableStoppedValueOfMemFinset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
-#align measure_theory.integrable_stopped_value MeasureTheory.integrableStoppedValue
+  integrable_stoppedValue_of_mem_finset hτ hu fun ω => Finset.mem_Iic.mpr (hbdd ω)
+#align measure_theory.integrable_stopped_value MeasureTheory.integrable_stoppedValue
 
 end StoppedValue
 
@@ -1105,8 +1106,8 @@ section StoppedProcess
 variable [LinearOrder ι] [TopologicalSpace ι] [OrderTopology ι] [FirstCountableTopology ι]
   {ℱ : Filtration ι m} [NormedAddCommGroup E]
 
-theorem memℒpStoppedProcessOfMemFinset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ) (n : ι)
-    {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) : Memℒp (stoppedProcess u τ n) p μ :=
+theorem memℒp_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Memℒp (u n) p μ)
+    (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) : Memℒp (stoppedProcess u τ n) p μ :=
   by
   rw [stopped_process_eq_of_mem_finset n hbdd]
   swap; · infer_instance
@@ -1119,24 +1120,25 @@ theorem memℒpStoppedProcessOfMemFinset (hτ : IsStoppingTime ℱ τ) (hu : ∀
       simp only [Finset.sum_apply]
     refine' mem_ℒp_finset_sum _ fun i hi => mem_ℒp.indicator _ (hu i)
     exact ℱ.le i { a : Ω | τ a = i } (hτ.measurable_set_eq i)
-#align measure_theory.mem_ℒp_stopped_process_of_mem_finset MeasureTheory.memℒpStoppedProcessOfMemFinset
+#align measure_theory.mem_ℒp_stopped_process_of_mem_finset MeasureTheory.memℒp_stoppedProcess_of_mem_finset
 
-theorem memℒpStoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
+theorem memℒp_stoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Memℒp (u n) p μ) (n : ι) : Memℒp (stoppedProcess u τ n) p μ :=
-  memℒpStoppedProcessOfMemFinset hτ hu n fun ω h => Finset.mem_Iio.mpr h
-#align measure_theory.mem_ℒp_stopped_process MeasureTheory.memℒpStoppedProcess
+  memℒp_stoppedProcess_of_mem_finset hτ hu n fun ω h => Finset.mem_Iio.mpr h
+#align measure_theory.mem_ℒp_stopped_process MeasureTheory.memℒp_stoppedProcess
 
-theorem integrableStoppedProcessOfMemFinset (hτ : IsStoppingTime ℱ τ) (hu : ∀ n, Integrable (u n) μ)
-    (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) : Integrable (stoppedProcess u τ n) μ :=
+theorem integrable_stoppedProcess_of_mem_finset (hτ : IsStoppingTime ℱ τ)
+    (hu : ∀ n, Integrable (u n) μ) (n : ι) {s : Finset ι} (hbdd : ∀ ω, τ ω < n → τ ω ∈ s) :
+    Integrable (stoppedProcess u τ n) μ :=
   by
   simp_rw [← mem_ℒp_one_iff_integrable] at hu⊢
   exact mem_ℒp_stopped_process_of_mem_finset hτ hu n hbdd
-#align measure_theory.integrable_stopped_process_of_mem_finset MeasureTheory.integrableStoppedProcessOfMemFinset
+#align measure_theory.integrable_stopped_process_of_mem_finset MeasureTheory.integrable_stoppedProcess_of_mem_finset
 
-theorem integrableStoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
+theorem integrable_stoppedProcess [LocallyFiniteOrderBot ι] (hτ : IsStoppingTime ℱ τ)
     (hu : ∀ n, Integrable (u n) μ) (n : ι) : Integrable (stoppedProcess u τ n) μ :=
-  integrableStoppedProcessOfMemFinset hτ hu n fun ω h => Finset.mem_Iio.mpr h
-#align measure_theory.integrable_stopped_process MeasureTheory.integrableStoppedProcess
+  integrable_stoppedProcess_of_mem_finset hτ hu n fun ω h => Finset.mem_Iio.mpr h
+#align measure_theory.integrable_stopped_process MeasureTheory.integrable_stoppedProcess
 
 end StoppedProcess
 
Diff
@@ -38,7 +38,7 @@ stopping time, stochastic process
 
 open Filter Order TopologicalSpace
 
-open Classical MeasureTheory NNReal Ennreal Topology BigOperators
+open Classical MeasureTheory NNReal ENNReal Topology BigOperators
 
 namespace MeasureTheory
 

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 2 (#12361)

A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -1207,7 +1207,8 @@ theorem condexp_min_stopping_time_ae_eq_restrict_le [MeasurableSpace ι] [Second
   have : SigmaFinite (μ.trim hτ.measurableSpace_le) :=
     haveI h_le : (hτ.min hσ).measurableSpace ≤ hτ.measurableSpace := by
       rw [IsStoppingTime.measurableSpace_min]
-      exact inf_le_left; simp_all only
+      · exact inf_le_left
+      · simp_all only
     sigmaFiniteTrim_mono _ h_le
   refine' (condexp_ae_eq_restrict_of_measurableSpace_eq_on hτ.measurableSpace_le
     (hτ.min hσ).measurableSpace_le (hτ.measurableSet_le_stopping_time hσ) fun t => _).symm
chore: move Mathlib to v4.7.0-rc1 (#11162)

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

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

Diff
@@ -421,7 +421,8 @@ theorem measurableSet_inter_eq_iff (hτ : IsStoppingTime f τ) (s : Set Ω) (i :
     by_cases hij : i ≤ j
     · simp only [hij, Set.setOf_true, Set.inter_univ]
       exact f.mono hij _ h
-    · simp [hij]; convert @MeasurableSet.empty _ (Filtration.seq f j)
+    · set_option tactic.skipAssignedInstances false in simp [hij]
+      convert @MeasurableSet.empty _ (Filtration.seq f j)
 #align measure_theory.is_stopping_time.measurable_set_inter_eq_iff MeasureTheory.IsStoppingTime.measurableSet_inter_eq_iff
 
 theorem measurableSpace_le_of_le_const (hτ : IsStoppingTime f τ) {i : ι} (hτ_le : ∀ ω, τ ω ≤ i) :
refactor: optimize proofs with omega (#11093)

I ran tryAtEachStep on all files under Mathlib to find all locations where omega succeeds. For each that was a linarith without an only, I tried replacing it with omega, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesops along the way.

Diff
@@ -287,8 +287,7 @@ theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStopping
     convert @MeasurableSet.empty _ (f.1 j)
     ext ω
     simp only [Set.mem_empty_iff_false, iff_false_iff, Set.mem_setOf]
-    intro hx
-    linarith
+    omega
 #align measure_theory.is_stopping_time.add_const_nat MeasureTheory.IsStoppingTime.add_const_nat
 
 -- generalize to certain countable type?
@@ -300,7 +299,7 @@ theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f
       MeasurableSet.iUnion fun hk => (hπ.measurableSet_eq_le hk).inter (hτ.add_const_nat i)
   ext ω
   simp only [Pi.add_apply, Set.mem_setOf_eq, Set.mem_iUnion, Set.mem_inter_iff, exists_prop]
-  refine' ⟨fun h => ⟨π ω, by linarith, rfl, h⟩, _⟩
+  refine' ⟨fun h => ⟨π ω, by omega, rfl, h⟩, _⟩
   rintro ⟨j, hj, rfl, h⟩
   assumption
 #align measure_theory.is_stopping_time.add MeasureTheory.IsStoppingTime.add
chore: remove stream-of-conciousness syntax for obtain (#11045)

This covers many instances, but is not exhaustive.

Independently of whether that syntax should be avoided (similar to #10534), I think all these changes are small improvements.

Diff
@@ -190,7 +190,7 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
 
 theorem IsStoppingTime.measurableSet_lt (hτ : IsStoppingTime f τ) (i : ι) :
     MeasurableSet[f i] {ω | τ ω < i} := by
-  obtain ⟨i', hi'_lub⟩ : ∃ i', IsLUB (Set.Iio i) i'; exact exists_lub_Iio i
+  obtain ⟨i', hi'_lub⟩ : ∃ i', IsLUB (Set.Iio i) i' := exists_lub_Iio i
   cases' lub_Iio_eq_self_or_Iio_eq_Iic i hi'_lub with hi'_eq_i h_Iio_eq_Iic
   · rw [← hi'_eq_i] at hi'_lub ⊢
     exact hτ.measurableSet_lt_of_isLUB i' hi'_lub
chore: more backporting of simp changes from #10995 (#11001)

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

Diff
@@ -833,7 +833,7 @@ theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingT
     have hx_fst_le : ↑(ω : Set.Iic i × Ω).fst ≤ i := (ω : Set.Iic i × Ω).fst.prop
     refine' hx_fst_le.trans (le_of_lt _)
     convert ω.prop
-    simp only [not_le, Set.mem_compl_iff, Set.mem_setOf_eq]
+    simp only [sc, s, not_le, Set.mem_compl_iff, Set.mem_setOf_eq]
 #align measure_theory.prog_measurable_min_stopping_time MeasureTheory.progMeasurable_min_stopping_time
 
 theorem ProgMeasurable.stoppedProcess [MetrizableSpace ι] (h : ProgMeasurable f u)
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -364,7 +364,7 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
   · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
   · ext ω; constructor <;> rw [Set.mem_iUnion]
     · intro hx
-      suffices : ∃ i, τ ω ≤ seq i; exact ⟨this.choose, hx, this.choose_spec⟩
+      suffices ∃ i, τ ω ≤ seq i from ⟨this.choose, hx, this.choose_spec⟩
       rw [tendsto_atTop] at h_seq_tendsto
       exact (h_seq_tendsto (τ ω)).exists
     · rintro ⟨_, hx, _⟩
@@ -819,14 +819,14 @@ theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingT
       simp only [Set.mem_preimage, Set.mem_Iic, iff_and_self, le_min_iff, Set.mem_setOf_eq]
       exact fun _ => ω.prop
     rw [h_set_eq]
-    suffices h_meas : @Measurable _ _ (m_set s) (f i) fun x : s => (x : Set.Iic i × Ω).snd
-    exact h_meas (f.mono (min_le_left _ _) _ (hτ.measurableSet_le (min i j)))
+    suffices h_meas : @Measurable _ _ (m_set s) (f i) fun x : s ↦ (x : Set.Iic i × Ω).snd from
+      h_meas (f.mono (min_le_left _ _) _ (hτ.measurableSet_le (min i j)))
     exact measurable_snd.comp (@measurable_subtype_coe _ m_prod _)
   · letI sc := sᶜ
     suffices h_min_eq_left :
       (fun x : sc => min (↑(x : Set.Iic i × Ω).fst) (τ (x : Set.Iic i × Ω).snd)) = fun x : sc =>
-        ↑(x : Set.Iic i × Ω).fst
-    · simp (config := { unfoldPartialApp := true }) only [Set.restrict, h_min_eq_left]
+        ↑(x : Set.Iic i × Ω).fst by
+      simp (config := { unfoldPartialApp := true }) only [Set.restrict, h_min_eq_left]
       exact h_meas_fst _
     ext1 ω
     rw [min_eq_left]
chore: tidy various files (#9851)
Diff
@@ -77,8 +77,8 @@ theorem IsStoppingTime.measurableSet_lt_of_pred [PredOrder ι] (hτ : IsStopping
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
     rw [isMin_iff_forall_not_lt] at hi_min
     exact hi_min (τ ω)
-  have : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iio i := rfl
-  rw [this, ← Iic_pred_of_not_isMin hi_min]
+  have : {ω : Ω | τ ω < i} = τ ⁻¹' Set.Iic (pred i) := by ext; simp [Iic_pred_of_not_isMin hi_min]
+  rw [this]
   exact f.mono (pred_le i) _ (hτ.measurableSet_le <| pred i)
 #align measure_theory.is_stopping_time.measurable_set_lt_of_pred MeasureTheory.IsStoppingTime.measurableSet_lt_of_pred
 
@@ -98,19 +98,14 @@ protected theorem measurableSet_eq_of_countable_range (hτ : IsStoppingTime f τ
       Set.mem_diff, Set.mem_iUnion, exists_prop, not_exists, not_and, not_le]
     constructor <;> intro h
     · simp only [h, lt_iff_le_not_le, le_refl, and_imp, imp_self, imp_true_iff, and_self_iff]
-    · have h_lt_or_eq : τ a < i ∨ τ a = i := lt_or_eq_of_le h.1
-      rcases h_lt_or_eq with (h_lt | rfl)
-      · exfalso
-        exact h.2 a h_lt (le_refl (τ a))
-      · rfl
+    · exact h.1.eq_or_lt.resolve_right fun h_lt => h.2 a h_lt le_rfl
   rw [this]
   refine' (hτ.measurableSet_le i).diff _
   refine' MeasurableSet.biUnion h_countable fun j _ => _
-  by_cases hji : j < i
-  · simp only [hji, Set.iUnion_true]
-    exact f.mono hji.le _ (hτ.measurableSet_le j)
-  · simp only [hji, Set.iUnion_false]
-    exact @MeasurableSet.empty _ (f i)
+  rw [Set.iUnion_eq_if]
+  split_ifs with hji
+  · exact f.mono hji.le _ (hτ.measurableSet_le j)
+  · exact @MeasurableSet.empty _ (f i)
 #align measure_theory.is_stopping_time.measurable_set_eq_of_countable_range MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range
 
 protected theorem measurableSet_eq_of_countable [Countable ι] (hτ : IsStoppingTime f τ) (i : ι) :
@@ -164,7 +159,7 @@ section TopologicalSpace
 
 variable [TopologicalSpace ι] [OrderTopology ι] [FirstCountableTopology ι]
 
-/-- Auxiliary lemma for `is_stopping_time.measurable_set_lt`. -/
+/-- Auxiliary lemma for `MeasureTheory.IsStoppingTime.measurableSet_lt`. -/
 theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i : ι)
     (h_lub : IsLUB (Set.Iio i) i) : MeasurableSet[f i] {ω | τ ω < i} := by
   by_cases hi_min : IsMin i
@@ -173,8 +168,8 @@ theorem IsStoppingTime.measurableSet_lt_of_isLUB (hτ : IsStoppingTime f τ) (i
     simp only [Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false_iff]
     exact isMin_iff_forall_not_lt.mp hi_min (τ ω)
   obtain ⟨seq, -, -, h_tendsto, h_bound⟩ :
-    ∃ seq : ℕ → ι, Monotone seq ∧ (∀ j, seq j ≤ i) ∧ Tendsto seq atTop (𝓝 i) ∧ ∀ j, seq j < i
-  exact h_lub.exists_seq_monotone_tendsto (not_isMin_iff.mp hi_min)
+      ∃ seq : ℕ → ι, Monotone seq ∧ (∀ j, seq j ≤ i) ∧ Tendsto seq atTop (𝓝 i) ∧ ∀ j, seq j < i :=
+    h_lub.exists_seq_monotone_tendsto (not_isMin_iff.mp hi_min)
   have h_Ioi_eq_Union : Set.Iio i = ⋃ j, {k | k ≤ seq j} := by
     ext1 k
     simp only [Set.mem_Iio, Set.mem_iUnion, Set.mem_setOf_eq]
@@ -291,8 +286,8 @@ theorem add_const_nat {f : Filtration ℕ m} {τ : Ω → ℕ} (hτ : IsStopping
   · rw [not_le] at hij
     convert @MeasurableSet.empty _ (f.1 j)
     ext ω
-    simp only [Set.mem_empty_iff_false, iff_false_iff]
-    rintro (hx : τ ω + i = j)
+    simp only [Set.mem_empty_iff_false, iff_false_iff, Set.mem_setOf]
+    intro hx
     linarith
 #align measure_theory.is_stopping_time.add_const_nat MeasureTheory.IsStoppingTime.add_const_nat
 
@@ -382,7 +377,7 @@ theorem measurableSpace_le {ι} [SemilatticeSup ι] {f : Filtration ι m} {τ :
   cases isEmpty_or_nonempty ι
   · haveI : IsEmpty Ω := ⟨fun ω => IsEmpty.false (τ ω)⟩
     intro s _
-    suffices hs : s = ∅; · rw [hs]; exact MeasurableSet.empty
+    suffices hs : s = ∅ by rw [hs]; exact MeasurableSet.empty
     haveI : Unique (Set Ω) := Set.uniqueEmpty
     rw [Unique.eq_default s, Unique.eq_default ∅]
   exact measurableSpace_le' hτ
@@ -687,9 +682,8 @@ theorem measurableSet_le_stopping_time [TopologicalSpace ι] [SecondCountableTop
       and_congr_left_iff]
     intro h
     simp only [h, or_self_iff, and_true_iff]
-    by_cases hj : j ≤ π ω
-    · simp only [hj, h.trans hj, or_self_iff]
-    · simp only [hj, or_false_iff]
+    rw [Iff.comm, or_iff_left_iff_imp]
+    exact h.trans
   rw [this]
   refine' MeasurableSet.inter _ (hτ.measurableSet_le j)
   apply @measurableSet_le _ _ _ _ _ (Filtration.seq f j) _ _ _ _ _ ?_ ?_
@@ -924,14 +918,13 @@ theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s :
       exact (hm.2.trans_le h).ne'
     · exact h
   · rw [stoppedProcess_eq_of_ge (le_of_lt h), Finset.sum_eq_single_of_mem (τ ω)]
-    · rw [Set.indicator_of_not_mem, zero_add, Set.indicator_of_mem]
-      · exact rfl
-      -- refl does not work
-      · exact not_le.2 h
+    · rw [Set.indicator_of_not_mem, zero_add, Set.indicator_of_mem] <;> rw [Set.mem_setOf]
+      exact not_le.2 h
     · rw [Finset.mem_filter]
       exact ⟨hbdd ω h, h⟩
     · intro b _ hneq
       rw [Set.indicator_of_not_mem]
+      rw [Set.mem_setOf]
       exact hneq.symm
 #align measure_theory.stopped_process_eq_of_mem_finset MeasureTheory.stoppedProcess_eq_of_mem_finset
 
@@ -1102,9 +1095,9 @@ theorem stoppedProcess_eq' (n : ℕ) : stoppedProcess u τ n = Set.indicator {a
       {a | n + 1 ≤ τ a}.indicator (u n) + {a | τ a = n}.indicator (u n) := by
     ext x
     rw [add_comm, Pi.add_apply, ← Set.indicator_union_of_not_mem_inter]
-    · simp_rw [@eq_comm _ _ n, @le_iff_eq_or_lt _ _ n, Nat.succ_le_iff]
-      rfl
+    · simp_rw [@eq_comm _ _ n, @le_iff_eq_or_lt _ _ n, Nat.succ_le_iff, Set.setOf_or]
     · rintro ⟨h₁, h₂⟩
+      rw [Set.mem_setOf] at h₁ h₂
       exact (Nat.succ_le_iff.1 h₂).ne h₁.symm
   rw [stoppedProcess_eq, this, Finset.sum_range_succ_comm, ← add_assoc]
 #align measure_theory.stopped_process_eq' MeasureTheory.stoppedProcess_eq'
chore: remove uses of cases' (#9171)

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

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

Diff
@@ -916,7 +916,7 @@ theorem stoppedProcess_eq_of_mem_finset [LinearOrder ι] [AddCommMonoid E] {s :
       ∑ i in s.filter (· < n), Set.indicator {ω | τ ω = i} (u i) := by
   ext ω
   rw [Pi.add_apply, Finset.sum_apply]
-  cases' le_or_lt n (τ ω) with h h
+  rcases le_or_lt n (τ ω) with h | h
   · rw [stoppedProcess_eq_of_le h, Set.indicator_of_mem, Finset.sum_eq_zero, add_zero]
     · intro m hm
       refine' Set.indicator_of_not_mem _ _
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

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

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

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

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

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

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

leanprover/lean4#2722

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

leanprover/lean4#2783

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

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

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

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

Diff
@@ -832,7 +832,7 @@ theorem progMeasurable_min_stopping_time [MetrizableSpace ι] (hτ : IsStoppingT
     suffices h_min_eq_left :
       (fun x : sc => min (↑(x : Set.Iic i × Ω).fst) (τ (x : Set.Iic i × Ω).snd)) = fun x : sc =>
         ↑(x : Set.Iic i × Ω).fst
-    · simp_rw [Set.restrict, h_min_eq_left]
+    · simp (config := { unfoldPartialApp := true }) only [Set.restrict, h_min_eq_left]
       exact h_meas_fst _
     ext1 ω
     rw [min_eq_left]
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
@@ -39,7 +39,7 @@ open scoped Classical MeasureTheory NNReal ENNReal Topology BigOperators
 
 namespace MeasureTheory
 
-variable {Ω β ι : Type _} {m : MeasurableSpace Ω}
+variable {Ω β ι : Type*} {m : MeasurableSpace Ω}
 
 /-! ### Stopping times -/
 
@@ -890,7 +890,7 @@ end LinearOrder
 
 section StoppedValueOfMemFinset
 
-variable {μ : Measure Ω} {τ σ : Ω → ι} {E : Type _} {p : ℝ≥0∞} {u : ι → Ω → E}
+variable {μ : Measure Ω} {τ σ : Ω → ι} {E : Type*} {p : ℝ≥0∞} {u : ι → Ω → E}
 
 theorem stoppedValue_eq_of_mem_finset [AddCommMonoid E] {s : Finset ι} (hbdd : ∀ ω, τ ω ∈ s) :
     stoppedValue u τ = ∑ i in s, Set.indicator {ω | τ ω = i} (u i) := by
@@ -1143,12 +1143,12 @@ theorem isStoppingTime_piecewise_const (hij : i ≤ j) (hs : MeasurableSet[𝒢
     (fun _ => hij) hs
 #align measure_theory.is_stopping_time_piecewise_const MeasureTheory.isStoppingTime_piecewise_const
 
-theorem stoppedValue_piecewise_const {ι' : Type _} {i j : ι'} {f : ι' → Ω → ℝ} :
+theorem stoppedValue_piecewise_const {ι' : Type*} {i j : ι'} {f : ι' → Ω → ℝ} :
     stoppedValue f (s.piecewise (fun _ => i) fun _ => j) = s.piecewise (f i) (f j) := by
   ext ω; rw [stoppedValue]; by_cases hx : ω ∈ s <;> simp [hx]
 #align measure_theory.stopped_value_piecewise_const MeasureTheory.stoppedValue_piecewise_const
 
-theorem stoppedValue_piecewise_const' {ι' : Type _} {i j : ι'} {f : ι' → Ω → ℝ} :
+theorem stoppedValue_piecewise_const' {ι' : Type*} {i j : ι'} {f : ι' → Ω → ℝ} :
     stoppedValue f (s.piecewise (fun _ => i) fun _ => j) =
     s.indicator (f i) + sᶜ.indicator (f j) := by
   ext ω; rw [stoppedValue]; by_cases hx : ω ∈ s <;> simp [hx]
@@ -1161,7 +1161,7 @@ section Condexp
 /-! ### Conditional expectation with respect to the σ-algebra generated by a stopping time -/
 
 
-variable [LinearOrder ι] {μ : Measure Ω} {ℱ : Filtration ι m} {τ σ : Ω → ι} {E : Type _}
+variable [LinearOrder ι] {μ : Measure Ω} {ℱ : Filtration ι m} {τ σ : Ω → ι} {E : Type*}
   [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {f : Ω → E}
 
 theorem condexp_stopping_time_ae_eq_restrict_eq_of_countable_range [SigmaFiniteFiltration μ ℱ]
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,14 +2,11 @@
 Copyright (c) 2021 Kexing Ying. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying, Rémy Degenne
-
-! This file was ported from Lean 3 source module probability.process.stopping
-! 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.Process.Adapted
 
+#align_import probability.process.stopping from "leanprover-community/mathlib"@"ba074af83b6cf54c3104e59402b39410ddbd6dca"
+
 /-!
 # Stopping times, stopped processes and stopped values
 
chore: bump to nightly-2023-07-01 (#5409)

Open in Gitpod

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

Diff
@@ -367,7 +367,7 @@ theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop :
     (hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m := by
   intro s hs
   change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
-  obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := atTop.exists_seq_tendsto
+  obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := (atTop : Filter ι).exists_seq_tendsto
   rw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]
   · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
   · ext ω; constructor <;> rw [Set.mem_iUnion]
chore: remove occurrences of semicolon after space (#5713)

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

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

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

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

Diff
@@ -704,7 +704,7 @@ theorem measurableSet_stopping_time_le [TopologicalSpace ι] [SecondCountableTop
     [OrderTopology ι] [MeasurableSpace ι] [BorelSpace ι] (hτ : IsStoppingTime f τ)
     (hπ : IsStoppingTime f π) : MeasurableSet[hπ.measurableSpace] {ω | τ ω ≤ π ω} := by
   suffices MeasurableSet[(hτ.min hπ).measurableSpace] {ω : Ω | τ ω ≤ π ω} by
-    rw [measurableSet_min_iff hτ hπ] at this ; exact this.2
+    rw [measurableSet_min_iff hτ hπ] at this; exact this.2
   rw [← Set.univ_inter {ω : Ω | τ ω ≤ π ω}, ← hτ.measurableSet_inter_le_iff hπ, Set.univ_inter]
   exact measurableSet_le_stopping_time hτ hπ
 #align measure_theory.is_stopping_time.measurable_set_stopping_time_le MeasureTheory.IsStoppingTime.measurableSet_stopping_time_le
feat: port Probability.Process.Stopping (#5213)

Dependencies 12 + 1002

1003 files ported (98.8%)
458404 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