l3lab/ntp-mathlib huggingface dataset:
/-- In a normed vector space, the subtraction of a measurable function and a strongly measurable
function is measurable. Note that this is not true without further second-countability assumptions
for the subtraction of two measurable functions. -/
theorem _root_.Measurable.sub_stronglyMeasurable
    {α E : Type*} {_ : MeasurableSpace α} [AddCommGroup E] [TopologicalSpace E]
    [MeasurableSpace E] [BorelSpace E] [ContinuousAdd E] [ContinuousNeg E] [PseudoMetrizableSpace E]
    {g f : α → E} (hg : Measurable g) (hf : StronglyMeasurable f) :
    Measurable (g - f) := by
  rw [sub_eq_add_neg]
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁸ : Countable ι
f✝ g✝ : α✝ → β
mα : MeasurableSpace α✝
inst✝⁷ : TopologicalSpace β
α : Type u_5
E : Type u_6
x✝ : MeasurableSpace α
inst✝⁶ : AddCommGroup E
inst✝⁵ : TopologicalSpace E
inst✝⁴ : MeasurableSpace E
inst✝³ : BorelSpace E
inst✝² : ContinuousAdd E
inst✝¹ : ContinuousNeg E
inst✝ : PseudoMetrizableSpace E
g f : α → E
hg : Measurable g
hf : StronglyMeasurable f
⊢ Measurable (g + -f)

Next tactic:
exact hg.add_stronglyMeasurable hf.neg
/-- In a normed vector space, the addition of a strongly measurable function and a measurable
function is measurable. Note that this is not true without further second-countability assumptions
for the addition of two measurable functions. -/
theorem _root_.Measurable.stronglyMeasurable_add
    {α E : Type*} {_ : MeasurableSpace α} [AddGroup E] [TopologicalSpace E]
    [MeasurableSpace E] [BorelSpace E] [ContinuousAdd E] [PseudoMetrizableSpace E]
    {g f : α → E} (hg : Measurable g) (hf : StronglyMeasurable f) :
    Measurable (f + g) := by
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁷ : Countable ι
f✝ g✝ : α✝ → β
mα : MeasurableSpace α✝
inst✝⁶ : TopologicalSpace β
α : Type u_5
E : Type u_6
x✝ : MeasurableSpace α
inst✝⁵ : AddGroup E
inst✝⁴ : TopologicalSpace E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : ContinuousAdd E
inst✝ : PseudoMetrizableSpace E
g f : α → E
hg : Measurable g
hf : StronglyMeasurable f
⊢ Measurable (f + g)

Next tactic:
rcases hf with ⟨φ, hφ⟩
/-- In a normed vector space, the addition of a strongly measurable function and a measurable
function is measurable. Note that this is not true without further second-countability assumptions
for the addition of two measurable functions. -/
theorem _root_.Measurable.stronglyMeasurable_add
    {α E : Type*} {_ : MeasurableSpace α} [AddGroup E] [TopologicalSpace E]
    [MeasurableSpace E] [BorelSpace E] [ContinuousAdd E] [PseudoMetrizableSpace E]
    {g f : α → E} (hg : Measurable g) (hf : StronglyMeasurable f) :
    Measurable (f + g) := by
  rcases hf with ⟨φ, hφ⟩
  

Proof state:
case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁷ : Countable ι
f✝ g✝ : α✝ → β
mα : MeasurableSpace α✝
inst✝⁶ : TopologicalSpace β
α : Type u_5
E : Type u_6
x✝ : MeasurableSpace α
inst✝⁵ : AddGroup E
inst✝⁴ : TopologicalSpace E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : ContinuousAdd E
inst✝ : PseudoMetrizableSpace E
g f : α → E
hg : Measurable g
φ : ℕ → α →ₛ E
hφ : ∀ (x : α), Tendsto (fun n => ↑(φ n) x) atTop (𝓝 (f x))
⊢ Measurable (f + g)

Next tactic:
have : Tendsto (fun n x ↦ φ n x + g x) atTop (𝓝 (f + g)) :=
    tendsto_pi_nhds.2 (fun x ↦ (hφ x).add tendsto_const_nhds)
/-- In a normed vector space, the addition of a strongly measurable function and a measurable
function is measurable. Note that this is not true without further second-countability assumptions
for the addition of two measurable functions. -/
theorem _root_.Measurable.stronglyMeasurable_add
    {α E : Type*} {_ : MeasurableSpace α} [AddGroup E] [TopologicalSpace E]
    [MeasurableSpace E] [BorelSpace E] [ContinuousAdd E] [PseudoMetrizableSpace E]
    {g f : α → E} (hg : Measurable g) (hf : StronglyMeasurable f) :
    Measurable (f + g) := by
  rcases hf with ⟨φ, hφ⟩
  have : Tendsto (fun n x ↦ φ n x + g x) atTop (𝓝 (f + g)) :=
    tendsto_pi_nhds.2 (fun x ↦ (hφ x).add tendsto_const_nhds)
  

Proof state:
case intro
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁷ : Countable ι
f✝ g✝ : α✝ → β
mα : MeasurableSpace α✝
inst✝⁶ : TopologicalSpace β
α : Type u_5
E : Type u_6
x✝ : MeasurableSpace α
inst✝⁵ : AddGroup E
inst✝⁴ : TopologicalSpace E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : ContinuousAdd E
inst✝ : PseudoMetrizableSpace E
g f : α → E
hg : Measurable g
φ : ℕ → α →ₛ E
hφ : ∀ (x : α), Tendsto (fun n => ↑(φ n) x) atTop (𝓝 (f x))
this : Tendsto (fun n x => ↑(φ n) x + g x) atTop (𝓝 (f + g))
⊢ Measurable (f + g)

Next tactic:
apply measurable_of_tendsto_metrizable (fun n ↦ ?_) this
/-- In a normed vector space, the addition of a strongly measurable function and a measurable
function is measurable. Note that this is not true without further second-countability assumptions
for the addition of two measurable functions. -/
theorem _root_.Measurable.stronglyMeasurable_add
    {α E : Type*} {_ : MeasurableSpace α} [AddGroup E] [TopologicalSpace E]
    [MeasurableSpace E] [BorelSpace E] [ContinuousAdd E] [PseudoMetrizableSpace E]
    {g f : α → E} (hg : Measurable g) (hf : StronglyMeasurable f) :
    Measurable (f + g) := by
  rcases hf with ⟨φ, hφ⟩
  have : Tendsto (fun n x ↦ φ n x + g x) atTop (𝓝 (f + g)) :=
    tendsto_pi_nhds.2 (fun x ↦ (hφ x).add tendsto_const_nhds)
  apply measurable_of_tendsto_metrizable (fun n ↦ ?_) this
  

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁷ : Countable ι
f✝ g✝ : α✝ → β
mα : MeasurableSpace α✝
inst✝⁶ : TopologicalSpace β
α : Type u_5
E : Type u_6
x✝ : MeasurableSpace α
inst✝⁵ : AddGroup E
inst✝⁴ : TopologicalSpace E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : ContinuousAdd E
inst✝ : PseudoMetrizableSpace E
g f : α → E
hg : Measurable g
φ : ℕ → α →ₛ E
hφ : ∀ (x : α), Tendsto (fun n => ↑(φ n) x) atTop (𝓝 (f x))
this : Tendsto (fun n x => ↑(φ n) x + g x) atTop (𝓝 (f + g))
n : ℕ
⊢ Measurable fun x => ↑(φ n) x + g x

Next tactic:
exact hg.simpleFunc_add _
theorem _root_.stronglyMeasurable_const_smul_iff {m : MeasurableSpace α} (c : G) :
    (StronglyMeasurable fun x => c • f x) ↔ StronglyMeasurable f :=
  ⟨fun h => by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹⁰ : Countable ι
f g : α → β
M : Type u_5
G : Type u_6
G₀ : Type u_7
inst✝⁹ : TopologicalSpace β
inst✝⁸ : Monoid M
inst✝⁷ : MulAction M β
inst✝⁶ : ContinuousConstSMul M β
inst✝⁵ : Group G
inst✝⁴ : MulAction G β
inst✝³ : ContinuousConstSMul G β
inst✝² : GroupWithZero G₀
inst✝¹ : MulAction G₀ β
inst✝ : ContinuousConstSMul G₀ β
m : MeasurableSpace α
c : G
h : StronglyMeasurable fun x => c • f x
⊢ StronglyMeasurable f

Next tactic:
simpa only [inv_smul_smul] using h.const_smul' c⁻¹
@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod' (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
l : List (α → M)
hl : ∀ f ∈ l, StronglyMeasurable f
⊢ StronglyMeasurable (List.prod l)

Next tactic:
induction' l with f l ihl
@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod' (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  induction' l with f l ihl; · 

Proof state:
case nil
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
hl : ∀ f ∈ [], StronglyMeasurable f
⊢ StronglyMeasurable (List.prod [])

Next tactic:
exact stronglyMeasurable_one
@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod' (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  induction' l with f l ihl; · exact stronglyMeasurable_one
  

Proof state:
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f✝ g : α → β
M : Type u_5
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
f : α → M
l : List (α → M)
ihl : (∀ f ∈ l, StronglyMeasurable f) → StronglyMeasurable (List.prod l)
hl : ∀ f_1 ∈ f :: l, StronglyMeasurable f_1
⊢ StronglyMeasurable (List.prod (f :: l))

Next tactic:
rw [List.forall_mem_cons] at hl
@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod' (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  induction' l with f l ihl; · exact stronglyMeasurable_one
  rw [List.forall_mem_cons] at hl
  

Proof state:
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f✝ g : α → β
M : Type u_5
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
f : α → M
l : List (α → M)
ihl : (∀ f ∈ l, StronglyMeasurable f) → StronglyMeasurable (List.prod l)
hl : StronglyMeasurable f ∧ ∀ x ∈ l, StronglyMeasurable x
⊢ StronglyMeasurable (List.prod (f :: l))

Next tactic:
rw [List.prod_cons]
@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod' (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  induction' l with f l ihl; · exact stronglyMeasurable_one
  rw [List.forall_mem_cons] at hl
  rw [List.prod_cons]
  

Proof state:
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f✝ g : α → β
M : Type u_5
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
f : α → M
l : List (α → M)
ihl : (∀ f ∈ l, StronglyMeasurable f) → StronglyMeasurable (List.prod l)
hl : StronglyMeasurable f ∧ ∀ x ∈ l, StronglyMeasurable x
⊢ StronglyMeasurable (f * List.prod l)

Next tactic:
exact hl.1.mul (ihl hl.2)
@[to_additive (attr := measurability)]
theorem _root_.List.stronglyMeasurable_prod (l : List (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) :
    StronglyMeasurable fun x => (l.map fun f : α → M => f x).prod := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : Monoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
l : List (α → M)
hl : ∀ f ∈ l, StronglyMeasurable f
⊢ StronglyMeasurable fun x => List.prod (List.map (fun f => f x) l)

Next tactic:
simpa only [← Pi.list_prod_apply] using l.stronglyMeasurable_prod' hl
@[to_additive (attr := measurability)]
theorem _root_.Multiset.stronglyMeasurable_prod' (l : Multiset (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : CommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
l : Multiset (α → M)
hl : ∀ f ∈ l, StronglyMeasurable f
⊢ StronglyMeasurable (Multiset.prod l)

Next tactic:
rcases l with ⟨l⟩
@[to_additive (attr := measurability)]
theorem _root_.Multiset.stronglyMeasurable_prod' (l : Multiset (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  rcases l with ⟨l⟩
  

Proof state:
case mk
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : CommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
l✝ : Multiset (α → M)
l : List (α → M)
hl : ∀ f ∈ Quot.mk Setoid.r l, StronglyMeasurable f
⊢ StronglyMeasurable (Multiset.prod (Quot.mk Setoid.r l))

Next tactic:
simpa using l.stronglyMeasurable_prod' (by simpa using hl)
@[to_additive (attr := measurability)]
theorem _root_.Multiset.stronglyMeasurable_prod' (l : Multiset (α → M))
    (hl : ∀ f ∈ l, StronglyMeasurable f) : StronglyMeasurable l.prod := by
  rcases l with ⟨l⟩
  simpa using l.stronglyMeasurable_prod' (by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : CommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
l✝ : Multiset (α → M)
l : List (α → M)
hl : ∀ f ∈ Quot.mk Setoid.r l, StronglyMeasurable f
⊢ ∀ f ∈ l, StronglyMeasurable f

Next tactic:
simpa using hl
@[to_additive (attr := measurability)]
theorem _root_.Multiset.stronglyMeasurable_prod (s : Multiset (α → M))
    (hs : ∀ f ∈ s, StronglyMeasurable f) :
    StronglyMeasurable fun x => (s.map fun f : α → M => f x).prod := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝³ : Countable ι
f g : α → β
M : Type u_5
inst✝² : CommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
s : Multiset (α → M)
hs : ∀ f ∈ s, StronglyMeasurable f
⊢ StronglyMeasurable fun x => Multiset.prod (Multiset.map (fun f => f x) s)

Next tactic:
simpa only [← Pi.multiset_prod_apply] using s.stronglyMeasurable_prod' hs
@[to_additive (attr := measurability)]
theorem _root_.Finset.stronglyMeasurable_prod {ι : Type*} {f : ι → α → M} (s : Finset ι)
    (hf : ∀ i ∈ s, StronglyMeasurable (f i)) : StronglyMeasurable fun a => ∏ i in s, f i a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι✝ : Type u_4
inst✝³ : Countable ι✝
f✝ g : α → β
M : Type u_5
inst✝² : CommMonoid M
inst✝¹ : TopologicalSpace M
inst✝ : ContinuousMul M
m : MeasurableSpace α
ι : Type u_6
f : ι → α → M
s : Finset ι
hf : ∀ i ∈ s, StronglyMeasurable (f i)
⊢ StronglyMeasurable fun a => ∏ i in s, f i a

Next tactic:
simpa only [← Finset.prod_apply] using s.stronglyMeasurable_prod' hf
/-- The range of a strongly measurable function is separable. -/
theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β] (hf : StronglyMeasurable f) :
    TopologicalSpace.IsSeparable (range f) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
hf : StronglyMeasurable f
⊢ IsSeparable (range f)

Next tactic:
have : IsSeparable (closure (⋃ n, range (hf.approx n))) :=
    (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure
/-- The range of a strongly measurable function is separable. -/
theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β] (hf : StronglyMeasurable f) :
    TopologicalSpace.IsSeparable (range f) := by
  have : IsSeparable (closure (⋃ n, range (hf.approx n))) :=
    (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
hf : StronglyMeasurable f
this : IsSeparable (closure (⋃ n, range ↑(StronglyMeasurable.approx hf n)))
⊢ IsSeparable (range f)

Next tactic:
apply this.mono
/-- The range of a strongly measurable function is separable. -/
theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β] (hf : StronglyMeasurable f) :
    TopologicalSpace.IsSeparable (range f) := by
  have : IsSeparable (closure (⋃ n, range (hf.approx n))) :=
    (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure
  apply this.mono
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
hf : StronglyMeasurable f
this : IsSeparable (closure (⋃ n, range ↑(StronglyMeasurable.approx hf n)))
⊢ range f ⊆ closure (⋃ n, range ↑(StronglyMeasurable.approx hf n))

Next tactic:
rintro _ ⟨x, rfl⟩
/-- The range of a strongly measurable function is separable. -/
theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β] (hf : StronglyMeasurable f) :
    TopologicalSpace.IsSeparable (range f) := by
  have : IsSeparable (closure (⋃ n, range (hf.approx n))) :=
    (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure
  apply this.mono
  rintro _ ⟨x, rfl⟩
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
hf : StronglyMeasurable f
this : IsSeparable (closure (⋃ n, range ↑(StronglyMeasurable.approx hf n)))
x : α
⊢ f x ∈ closure (⋃ n, range ↑(StronglyMeasurable.approx hf n))

Next tactic:
apply mem_closure_of_tendsto (hf.tendsto_approx x)
/-- The range of a strongly measurable function is separable. -/
theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β] (hf : StronglyMeasurable f) :
    TopologicalSpace.IsSeparable (range f) := by
  have : IsSeparable (closure (⋃ n, range (hf.approx n))) :=
    (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure
  apply this.mono
  rintro _ ⟨x, rfl⟩
  apply mem_closure_of_tendsto (hf.tendsto_approx x)
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
hf : StronglyMeasurable f
this : IsSeparable (closure (⋃ n, range ↑(StronglyMeasurable.approx hf n)))
x : α
⊢ ∀ᶠ (x_1 : ℕ) in atTop, ↑(StronglyMeasurable.approx hf x_1) x ∈ ⋃ n, range ↑(StronglyMeasurable.approx hf n)

Next tactic:
refine eventually_of_forall fun n => ?_
/-- The range of a strongly measurable function is separable. -/
theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β] (hf : StronglyMeasurable f) :
    TopologicalSpace.IsSeparable (range f) := by
  have : IsSeparable (closure (⋃ n, range (hf.approx n))) :=
    (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure
  apply this.mono
  rintro _ ⟨x, rfl⟩
  apply mem_closure_of_tendsto (hf.tendsto_approx x)
  refine eventually_of_forall fun n => ?_
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
hf : StronglyMeasurable f
this : IsSeparable (closure (⋃ n, range ↑(StronglyMeasurable.approx hf n)))
x : α
n : ℕ
⊢ ↑(StronglyMeasurable.approx hf n) x ∈ ⋃ n, range ↑(StronglyMeasurable.approx hf n)

Next tactic:
apply mem_iUnion_of_mem n
/-- The range of a strongly measurable function is separable. -/
theorem isSeparable_range {m : MeasurableSpace α} [TopologicalSpace β] (hf : StronglyMeasurable f) :
    TopologicalSpace.IsSeparable (range f) := by
  have : IsSeparable (closure (⋃ n, range (hf.approx n))) :=
    (isSeparable_iUnion fun n => (SimpleFunc.finite_range (hf.approx n)).isSeparable).closure
  apply this.mono
  rintro _ ⟨x, rfl⟩
  apply mem_closure_of_tendsto (hf.tendsto_approx x)
  refine eventually_of_forall fun n => ?_
  apply mem_iUnion_of_mem n
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝¹ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝ : TopologicalSpace β
hf : StronglyMeasurable f
this : IsSeparable (closure (⋃ n, range ↑(StronglyMeasurable.approx hf n)))
x : α
n : ℕ
⊢ ↑(StronglyMeasurable.approx hf n) x ∈ range ↑(StronglyMeasurable.approx hf n)

Next tactic:
exact mem_range_self _
/-- In a space with second countable topology, measurable implies strongly measurable. -/
@[aesop 90% apply (rule_sets [Measurable])]
theorem _root_.Measurable.stronglyMeasurable [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopology β] [OpensMeasurableSpace β] (hf : Measurable f) :
    StronglyMeasurable f := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁵ : Countable ι
f g : α → β
mα : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : SecondCountableTopology β
inst✝ : OpensMeasurableSpace β
hf : Measurable f
⊢ StronglyMeasurable f

Next tactic:
letI := pseudoMetrizableSpacePseudoMetric β
/-- In a space with second countable topology, measurable implies strongly measurable. -/
@[aesop 90% apply (rule_sets [Measurable])]
theorem _root_.Measurable.stronglyMeasurable [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopology β] [OpensMeasurableSpace β] (hf : Measurable f) :
    StronglyMeasurable f := by
  letI := pseudoMetrizableSpacePseudoMetric β
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁵ : Countable ι
f g : α → β
mα : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : SecondCountableTopology β
inst✝ : OpensMeasurableSpace β
hf : Measurable f
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
⊢ StronglyMeasurable f

Next tactic:
nontriviality β
/-- In a space with second countable topology, measurable implies strongly measurable. -/
@[aesop 90% apply (rule_sets [Measurable])]
theorem _root_.Measurable.stronglyMeasurable [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopology β] [OpensMeasurableSpace β] (hf : Measurable f) :
    StronglyMeasurable f := by
  letI := pseudoMetrizableSpacePseudoMetric β
  nontriviality β; 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁵ : Countable ι
f g : α → β
mα : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : SecondCountableTopology β
inst✝ : OpensMeasurableSpace β
hf : Measurable f
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
✝ : Nontrivial β
⊢ StronglyMeasurable f

Next tactic:
inhabit β
/-- In a space with second countable topology, measurable implies strongly measurable. -/
@[aesop 90% apply (rule_sets [Measurable])]
theorem _root_.Measurable.stronglyMeasurable [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopology β] [OpensMeasurableSpace β] (hf : Measurable f) :
    StronglyMeasurable f := by
  letI := pseudoMetrizableSpacePseudoMetric β
  nontriviality β; inhabit β
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁵ : Countable ι
f g : α → β
mα : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : SecondCountableTopology β
inst✝ : OpensMeasurableSpace β
hf : Measurable f
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
✝ : Nontrivial β
inhabited_h : Inhabited β
⊢ StronglyMeasurable f

Next tactic:
exact ⟨SimpleFunc.approxOn f hf Set.univ default (Set.mem_univ _), fun x ↦
    SimpleFunc.tendsto_approxOn hf (Set.mem_univ _) (by rw [closure_univ]; simp)⟩
/-- In a space with second countable topology, measurable implies strongly measurable. -/
@[aesop 90% apply (rule_sets [Measurable])]
theorem _root_.Measurable.stronglyMeasurable [TopologicalSpace β] [PseudoMetrizableSpace β]
    [SecondCountableTopology β] [OpensMeasurableSpace β] (hf : Measurable f) :
    StronglyMeasurable f := by
  letI := pseudoMetrizableSpacePseudoMetric β
  nontriviality β; inhabit β
  exact ⟨SimpleFunc.approxOn f hf Set.univ default (Set.mem_univ _), fun x ↦
    SimpleFunc.tendsto_approxOn hf (Set.mem_univ _) (by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁵ : Countable ι
f g : α → β
mα : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : SecondCountableTopology β
inst✝ : OpensMeasurableSpace β
hf : Measurable f
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
✝ : Nontrivial β
inhabited_h : Inhabited β
x : α
⊢ f x ∈ closure univ

Next tactic:
rw [closure_univ]