Theorem: stronglyMeasurable_iff_measurable_separable
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: refine' ⟨fun H => ⟨H.measurable, H.isSeparable_range⟩, _⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
⊢ StronglyMeasurable f ↔ Measurable f ∧ IsSeparable (range f)

tactic: rintro ⟨H, H'⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
⊢ Measurable f ∧ IsSeparable (range f) → StronglyMeasurable f

tactic: letI := pseudoMetrizableSpacePseudoMetric β
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
⊢ StronglyMeasurable f

tactic: let g := codRestrict f (closure (range f)) fun x => subset_closure (mem_range_self x)
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
⊢ StronglyMeasurable f

tactic: have fg : f = ((↑) : closure (range f) → β) ∘ g := by
  ext x
  rfl
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
⊢ StronglyMeasurable f

tactic: have T : MeasurableEmbedding ((↑) : closure (range f) → β) := by
  apply ClosedEmbedding.measurableEmbedding
  exact closedEmbedding_subtype_val isClosed_closure
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
⊢ StronglyMeasurable f

tactic: have g_meas : Measurable g := by
  rw [fg] at H
  exact T.measurable_comp_iff.1 H
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
⊢ StronglyMeasurable f

tactic: have : SecondCountableTopology (closure (range f)) := by
  suffices SeparableSpace (closure (range f)) by
    exact UniformSpace.secondCountable_of_separable _
  exact (IsSeparable.closure H').separableSpace
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
g_meas : Measurable g
⊢ StronglyMeasurable f

tactic: have g_smeas : StronglyMeasurable g := Measurable.stronglyMeasurable g_meas
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
g_meas : Measurable g
this : SecondCountableTopology ↑(closure (range f))
⊢ StronglyMeasurable f

tactic: rw [fg]
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
g_meas : Measurable g
this : SecondCountableTopology ↑(closure (range f))
g_smeas : StronglyMeasurable g
⊢ StronglyMeasurable f

tactic: exact continuous_subtype_val.comp_stronglyMeasurable g_smeas
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
g_meas : Measurable g
this : SecondCountableTopology ↑(closure (range f))
g_smeas : StronglyMeasurable g
⊢ StronglyMeasurable (Subtype.val ∘ g)

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
⊢ f = Subtype.val ∘ g

tactic: rfl
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
x : α
⊢ f x = (Subtype.val ∘ g) x

tactic: apply ClosedEmbedding.measurableEmbedding
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
⊢ MeasurableEmbedding Subtype.val

tactic: exact closedEmbedding_subtype_val isClosed_closure
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
⊢ ClosedEmbedding Subtype.val

tactic: rw [fg] at H
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
⊢ Measurable g

tactic: exact T.measurable_comp_iff.1 H
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
H : Measurable (Subtype.val ∘ g)
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
⊢ Measurable g

tactic: suffices SeparableSpace (closure (range f)) by
  exact UniformSpace.secondCountable_of_separable _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
g_meas : Measurable g
⊢ SecondCountableTopology ↑(closure (range f))

tactic: exact (IsSeparable.closure H').separableSpace
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
g_meas : Measurable g
⊢ SeparableSpace ↑(closure (range f))

tactic: exact UniformSpace.secondCountable_of_separable _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136321
ι : Type ?u.136324
inst✝⁴ : Countable ι
f g✝ : α → β
m : MeasurableSpace α
inst✝³ : TopologicalSpace β
inst✝² : PseudoMetrizableSpace β
inst✝¹ : MeasurableSpace β
inst✝ : BorelSpace β
H : Measurable f
H' : IsSeparable (range f)
this✝ : PseudoMetricSpace β := pseudoMetrizableSpacePseudoMetric β
g : α → ↑(closure (range f)) := codRestrict f (closure (range f)) (_ : ∀ (x : α), f x ∈ closure (range f))
fg : f = Subtype.val ∘ g
T : MeasurableEmbedding Subtype.val
g_meas : Measurable g
this : SeparableSpace ↑(closure (range f))
⊢ SecondCountableTopology ↑(closure (range f))