Theorem: Embedding.aestronglyMeasurable_comp_iff
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: letI := pseudoMetrizableSpacePseudoMetric γ
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ

tactic: borelize β γ
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ

tactic: refine
  ⟨fun H => aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨?_, ?_⟩, fun H =>
    hg.continuous.comp_aestronglyMeasurable H⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
⊢ AEStronglyMeasurable (fun x => g (f x)) μ ↔ AEStronglyMeasurable f μ
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
⊢ AEMeasurable f μ

case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t

tactic: let G : β → range g := rangeFactorization g
state_before: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
⊢ AEMeasurable f μ
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
⊢ AEMeasurable f μ

tactic: have hG : ClosedEmbedding G :=
  { hg.codRestrict _ _ with
    isClosed_range := by rw [surjective_onto_range.range_eq]; exact isClosed_univ }
state_before: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
⊢ AEMeasurable f μ
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
hG : ClosedEmbedding G
⊢ AEMeasurable f μ

tactic: have : AEMeasurable (G ∘ f) μ := AEMeasurable.subtype_mk H.aemeasurable
state_before: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
hG : ClosedEmbedding G
⊢ AEMeasurable f μ
state_after: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this✝⁴ : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
hG : ClosedEmbedding G
this : AEMeasurable (G ∘ f) μ
⊢ AEMeasurable f μ

tactic: exact hG.measurableEmbedding.aemeasurable_comp_iff.1 this
state_before: case refine_1
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this✝⁴ : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
hG : ClosedEmbedding G
this : AEMeasurable (G ∘ f) μ
⊢ AEMeasurable f μ
state_after: no goals

tactic: rw [surjective_onto_range.range_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
⊢ IsClosed (range G)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
⊢ IsClosed univ

tactic: exact isClosed_univ
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
G : β → ↑(range g) := rangeFactorization g
⊢ IsClosed univ
state_after: no goals

tactic: rcases (aestronglyMeasurable_iff_aemeasurable_separable.1 H).2 with ⟨t, ht, h't⟩
state_before: case refine_2
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t
state_after: case refine_2.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
t : Set γ
ht : IsSeparable t
h't : ∀ᵐ (x : α) ∂μ, g (f x) ∈ t
⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t

tactic: exact ⟨g ⁻¹' t, hg.isSeparable_preimage ht, h't⟩
state_before: case refine_2.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝⁴ : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
f✝ g✝ : α → β
inst✝¹ : PseudoMetrizableSpace β
inst✝ : PseudoMetrizableSpace γ
g : β → γ
f : α → β
hg : _root_.Embedding g
this : PseudoMetricSpace γ := pseudoMetrizableSpacePseudoMetric γ
this✝³ : MeasurableSpace β := borel β
this✝² : BorelSpace β
this✝¹ : MeasurableSpace γ := borel γ
this✝ : BorelSpace γ
H : AEStronglyMeasurable (fun x => g (f x)) μ
t : Set γ
ht : IsSeparable t
h't : ∀ᵐ (x : α) ∂μ, g (f x) ∈ t
⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t
state_after: no goals