l3lab/ntp-mathlib huggingface dataset:
theorem add {f : Filtration ℕ m} {τ π : Ω → ℕ} (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) :
    IsStoppingTime f (τ + π) := by
  intro i
  rw [(_ : {ω | (τ + π) ω ≤ i} = ⋃ k ≤ i, {ω | π ω = k} ∩ {ω | τ ω + k ≤ i})]
  · exact MeasurableSet.iUnion fun k =>
      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⟩, _⟩
  rintro ⟨j, hj, rfl, h⟩
  

Proof state:
case h.intro.intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
f : Filtration ℕ m
τ π : Ω → ℕ
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
i : ℕ
ω : Ω
hj : π ω ≤ i
h : τ ω + π ω ≤ i
⊢ τ ω + π ω ≤ i

Next tactic:
assumption
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s
i : ι
⊢ MeasurableSet (sᶜ ∩ {ω | τ ω ≤ i})

Next tactic:
rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s
i : ι
⊢ MeasurableSet ((sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})

Next tactic:
refine' MeasurableSet.inter _ _
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · 

Proof state:
case refine'_1
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s
i : ι
⊢ MeasurableSet (sᶜ ∪ {ω | τ ω ≤ i}ᶜ)

Next tactic:
rw [← Set.compl_inter]
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · rw [← Set.compl_inter]
        

Proof state:
case refine'_1
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s
i : ι
⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i})ᶜ

Next tactic:
exact (hs i).compl
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · rw [← Set.compl_inter]
        exact (hs i).compl
      · 

Proof state:
case refine'_2
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s
i : ι
⊢ MeasurableSet {ω | τ ω ≤ i}

Next tactic:
exact hτ i
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · rw [← Set.compl_inter]
        exact (hs i).compl
      · exact hτ i
    · 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s
i : ι
⊢ sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i}

Next tactic:
rw [Set.union_inter_distrib_right]
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · rw [← Set.compl_inter]
        exact (hs i).compl
      · exact hτ i
    · rw [Set.union_inter_distrib_right]
      

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) s
i : ι
⊢ sᶜ ∩ {ω | τ ω ≤ i} = sᶜ ∩ {ω | τ ω ≤ i} ∪ {ω | τ ω ≤ i}ᶜ ∩ {ω | τ ω ≤ i}

Next tactic:
simp only [Set.compl_inter_self, Set.union_empty]
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · rw [← Set.compl_inter]
        exact (hs i).compl
      · exact hτ i
    · rw [Set.union_inter_distrib_right]
      simp only [Set.compl_inter_self, Set.union_empty]
  measurableSet_iUnion s hs i := by
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : ℕ → Set Ω
hs : ∀ (i : ℕ), (fun s => ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})) (s i)
i : ι
⊢ MeasurableSet ((⋃ i, s i) ∩ {ω | τ ω ≤ i})

Next tactic:
rw [forall_swap] at hs
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · rw [← Set.compl_inter]
        exact (hs i).compl
      · exact hτ i
    · rw [Set.union_inter_distrib_right]
      simp only [Set.compl_inter_self, Set.union_empty]
  measurableSet_iUnion s hs i := by
    rw [forall_swap] at hs
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : ℕ → Set Ω
hs : ∀ (y : ι) (x : ℕ), MeasurableSet (s x ∩ {ω | τ ω ≤ y})
i : ι
⊢ MeasurableSet ((⋃ i, s i) ∩ {ω | τ ω ≤ i})

Next tactic:
rw [Set.iUnion_inter]
/-- The associated σ-algebra with a stopping time. -/
protected def measurableSpace (hτ : IsStoppingTime f τ) : MeasurableSpace Ω where
  MeasurableSet' s := ∀ i : ι, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i})
  measurableSet_empty i := (Set.empty_inter {ω | τ ω ≤ i}).symm ▸ @MeasurableSet.empty _ (f i)
  measurableSet_compl s hs i := by
    rw [(_ : sᶜ ∩ {ω | τ ω ≤ i} = (sᶜ ∪ {ω | τ ω ≤ i}ᶜ) ∩ {ω | τ ω ≤ i})]
    · refine' MeasurableSet.inter _ _
      · rw [← Set.compl_inter]
        exact (hs i).compl
      · exact hτ i
    · rw [Set.union_inter_distrib_right]
      simp only [Set.compl_inter_self, Set.union_empty]
  measurableSet_iUnion s hs i := by
    rw [forall_swap] at hs
    rw [Set.iUnion_inter]
    

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
s : ℕ → Set Ω
hs : ∀ (y : ι) (x : ℕ), MeasurableSet (s x ∩ {ω | τ ω ≤ y})
i : ι
⊢ MeasurableSet (⋃ i_1, s i_1 ∩ {ω | τ ω ≤ i})

Next tactic:
exact MeasurableSet.iUnion (hs i)
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
⊢ IsStoppingTime.measurableSpace hτ ≤ IsStoppingTime.measurableSpace hπ

Next tactic:
intro s hs i
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace := by
  intro s hs i
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
⊢ MeasurableSet (s ∩ {ω | π ω ≤ i})

Next tactic:
rw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace := by
  intro s hs i
  rw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]
  · 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
⊢ MeasurableSet (s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})

Next tactic:
exact (hs i).inter (hπ i)
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace := by
  intro s hs i
  rw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]
  · exact (hs i).inter (hπ i)
  · 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
⊢ s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i}

Next tactic:
ext
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace := by
  intro s hs i
  rw [(_ : s ∩ {ω | π ω ≤ i} = s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i})]
  · exact (hs i).inter (hπ i)
  · ext
    

Proof state:
case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
x✝ : Ω
⊢ x✝ ∈ s ∩ {ω | π ω ≤ i} ↔ x✝ ∈ s ∩ {ω | τ ω ≤ i} ∩ {ω | π ω ≤ i}

Next tactic:
simp only [Set.mem_inter_iff, iff_self_and, and_congr_left_iff, Set.mem_setOf_eq]
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace := by
  intro s hs 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]
    

Proof state:
case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
x✝ : Ω
⊢ π x✝ ≤ i → x✝ ∈ s → τ x✝ ≤ i

Next tactic:
intro hle' _
theorem measurableSpace_mono (hτ : IsStoppingTime f τ) (hπ : IsStoppingTime f π) (hle : τ ≤ π) :
    hτ.measurableSpace ≤ hπ.measurableSpace := by
  intro s hs 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]
    intro hle' _
    

Proof state:
case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
hle : τ ≤ π
s : Set Ω
hs : MeasurableSet s
i : ι
x✝ : Ω
hle' : π x✝ ≤ i
a✝ : x✝ ∈ s
⊢ τ x✝ ≤ i

Next tactic:
exact le_trans (hle _) hle'
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
⊢ IsStoppingTime.measurableSpace hτ ≤ m

Next tactic:
intro s hs
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : MeasurableSet s
⊢ MeasurableSet s

Next tactic:
change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
⊢ MeasurableSet s

Next tactic:
rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
  rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
  · 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
⊢ MeasurableSet (⋃ i, s ∩ {ω | τ ω ≤ i})

Next tactic:
exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
  rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
  · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
  · 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
⊢ s = ⋃ i, s ∩ {ω | τ ω ≤ i}

Next tactic:
ext ω
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
  rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
  · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
  · ext ω; 

Proof state:
case h
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
ω : Ω
⊢ ω ∈ s ↔ ω ∈ ⋃ i, s ∩ {ω | τ ω ≤ i}

Next tactic:
constructor
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
  rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
  · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
  · ext ω; constructor <;> 

Proof state:
case h.mp
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
ω : Ω
⊢ ω ∈ s → ω ∈ ⋃ i, s ∩ {ω | τ ω ≤ i}

Next tactic:
rw [Set.mem_iUnion]
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
  rw [(_ : s = ⋃ i, s ∩ {ω | τ ω ≤ i})]
  · exact MeasurableSet.iUnion fun i => f.le i _ (hs i)
  · ext ω; constructor <;> 

Proof state:
case h.mpr
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
ω : Ω
⊢ ω ∈ ⋃ i, s ∩ {ω | τ ω ≤ i} → ω ∈ s

Next tactic:
rw [Set.mem_iUnion]
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[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]
    · 

Proof state:
case h.mp
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
ω : Ω
⊢ ω ∈ s → ∃ i, ω ∈ s ∩ {ω | τ ω ≤ i}

Next tactic:
exact fun hx => ⟨τ ω, hx, le_rfl⟩
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[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⟩
    · 

Proof state:
case h.mpr
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
ω : Ω
⊢ (∃ i, ω ∈ s ∩ {ω | τ ω ≤ i}) → ω ∈ s

Next tactic:
rintro ⟨_, hx, _⟩
theorem measurableSpace_le_of_countable [Countable ι] (hτ : IsStoppingTime f τ) :
    hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[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⟩
    · rintro ⟨_, hx, _⟩
      

Proof state:
case h.mpr.intro.intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝¹ : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝ : Countable ι
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
ω : Ω
w✝ : ι
hx : ω ∈ s
right✝ : ω ∈ {ω | τ ω ≤ w✝}
⊢ ω ∈ s

Next tactic:
exact hx
theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
    (hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m := by
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝² : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝¹ : IsCountablyGenerated atTop
inst✝ : NeBot atTop
hτ : IsStoppingTime f τ
⊢ IsStoppingTime.measurableSpace hτ ≤ m

Next tactic:
intro s hs
theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
    (hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m := by
  intro s hs
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝² : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝¹ : IsCountablyGenerated atTop
inst✝ : NeBot atTop
hτ : IsStoppingTime f τ
s : Set Ω
hs : MeasurableSet s
⊢ MeasurableSet s

Next tactic:
change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
    (hτ : IsStoppingTime f τ) : hτ.measurableSpace ≤ m := by
  intro s hs
  change ∀ i, MeasurableSet[f i] (s ∩ {ω | τ ω ≤ i}) at hs
  

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝² : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝¹ : IsCountablyGenerated atTop
inst✝ : NeBot atTop
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
⊢ MeasurableSet s

Next tactic:
obtain ⟨seq : ℕ → ι, h_seq_tendsto⟩ := (atTop : Filter ι).exists_seq_tendsto
theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
    (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 : Filter ι).exists_seq_tendsto
  

Proof state:
case intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝² : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝¹ : IsCountablyGenerated atTop
inst✝ : NeBot atTop
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
seq : ℕ → ι
h_seq_tendsto : Tendsto seq atTop atTop
⊢ MeasurableSet s

Next tactic:
rw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]
theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
    (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 : Filter ι).exists_seq_tendsto
  rw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]
  · 

Proof state:
case intro
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝² : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝¹ : IsCountablyGenerated atTop
inst✝ : NeBot atTop
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
seq : ℕ → ι
h_seq_tendsto : Tendsto seq atTop atTop
⊢ MeasurableSet (⋃ n, s ∩ {ω | τ ω ≤ seq n})

Next tactic:
exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
theorem measurableSpace_le' [IsCountablyGenerated (atTop : Filter ι)] [(atTop : Filter ι).NeBot]
    (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 : Filter ι).exists_seq_tendsto
  rw [(_ : s = ⋃ n, s ∩ {ω | τ ω ≤ seq n})]
  · exact MeasurableSet.iUnion fun i => f.le (seq i) _ (hs (seq i))
  · 

Proof state:
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝² : Preorder ι
f : Filtration ι m
τ π : Ω → ι
inst✝¹ : IsCountablyGenerated atTop
inst✝ : NeBot atTop
hτ : IsStoppingTime f τ
s : Set Ω
hs : ∀ (i : ι), MeasurableSet (s ∩ {ω | τ ω ≤ i})
seq : ℕ → ι
h_seq_tendsto : Tendsto seq atTop atTop
⊢ s = ⋃ n, s ∩ {ω | τ ω ≤ seq n}

Next tactic:
ext ω