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

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}
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: 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 ({ω | τ ω ≤ 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 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}
⊢ 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: 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 (⋃ (_ : 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: split_ifs with hji
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: ext1 a
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 : ι
⊢ {ω | τ ω = i} = {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
state_after: case h
Ω : 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 : ι
a : Ω
⊢ a ∈ {ω | τ ω = i} ↔ a ∈ {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}

tactic: 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]
state_before: case h
Ω : 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 : ι
a : Ω
⊢ a ∈ {ω | τ ω = i} ↔ a ∈ {ω | τ ω ≤ i} \ ⋃ j ∈ Set.range τ, ⋃ (_ : j < i), {ω | τ ω ≤ j}
state_after: case h
Ω : 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 : ι
a : Ω
⊢ τ a = i ↔ τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x

tactic: constructor <;> intro h
state_before: case h
Ω : 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 : ι
a : Ω
⊢ τ a = i ↔ τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x
state_after: case h.mp
Ω : 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 : ι
a : Ω
h : τ a = i
⊢ τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x

case h.mpr
Ω : 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 : ι
a : Ω
h : τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x
⊢ τ a = i

tactic: simp only [h, lt_iff_le_not_le, le_refl, and_imp, imp_self, imp_true_iff, and_self_iff]
state_before: case h.mp
Ω : 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 : ι
a : Ω
h : τ a = i
⊢ τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x
state_after: no goals

tactic: exact h.1.eq_or_lt.resolve_right fun h_lt => h.2 a h_lt le_rfl
state_before: case h.mpr
Ω : 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 : ι
a : Ω
h : τ a ≤ i ∧ ∀ (x : Ω), τ x < i → ¬τ a ≤ τ x
⊢ τ a = i
state_after: no goals

tactic: exact f.mono hji.le _ (hτ.measurableSet_le j)
state_before: 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}
state_after: no goals

tactic: exact @MeasurableSet.empty _ (f i)
state_before: 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 ∅
state_after: no goals