Theorem: MeasureTheory.IsStoppingTime.measurableSet_eq_of_countable_range
File: Mathlib/Probability/Process/Stopping.lean

Proof steps:
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
⊢ MeasurableSet {ω | τ ω = i}
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
⊢ MeasurableSet ({ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j})
tactic: rw [this]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
⊢ MeasurableSet ({ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j})
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
⊢ MeasurableSet (⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j})
tactic: refine (hτ.measurableSet_le i).diff ?_
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
⊢ MeasurableSet (⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j})
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
j : ι
x✝ : j ∈ Set.range τ
⊢ MeasurableSet (⋃ (_ : j < i), {ω | τ ω ≤ j})
tactic: refine MeasurableSet.biUnion h_countable fun j _ => ?_
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
j : ι
x✝ : j ∈ Set.range τ
⊢ MeasurableSet (⋃ (_ : j < i), {ω | τ ω ≤ j})
state_after: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
j : ι
x✝ : j ∈ Set.range τ
⊢ MeasurableSet (if j < i then {ω | τ ω ≤ j} else ∅)
tactic: rw [Set.iUnion_eq_if]
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
j : ι
x✝ : j ∈ Set.range τ
⊢ MeasurableSet (if j < i then {ω | τ ω ≤ j} else ∅)
state_after: case pos
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
j : ι
x✝ : j ∈ Set.range τ
hji : j < i
⊢ MeasurableSet {ω | τ ω ≤ j}

case neg
Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : PartialOrder ι
τ : Ω → ι
f : Filtration ι m
hτ : IsStoppingTime f τ
h_countable : (Set.range τ).Countable
i : ι
this : {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
j : ι
x✝ : j ∈ Set.range τ
hji : ¬j < i
⊢ MeasurableSet ∅
tactic: split_ifs with hji