Theorem: ContinuousOn.aemeasurable
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: nontriviality α
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
⊢ AEMeasurable f (μ.restrict s)
state_after: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
⊢ AEMeasurable f (μ.restrict s)

tactic: inhabit α
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
⊢ AEMeasurable f (μ.restrict s)
state_after: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
⊢ AEMeasurable f (μ.restrict s)

tactic: have : (Set.piecewise s f fun _ => f default) =ᵐ[μ.restrict s] f := piecewise_ae_eq_restrict hs
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
⊢ AEMeasurable f (μ.restrict s)
state_after: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
⊢ AEMeasurable f (μ.restrict s)

tactic: refine ⟨Set.piecewise s f fun _ => f default, ?_, this.symm⟩
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
⊢ AEMeasurable f (μ.restrict s)
state_after: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
⊢ Measurable (s.piecewise f fun x => f default)

tactic: apply measurable_of_isOpen
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
⊢ Measurable (s.piecewise f fun x => f default)
state_after: case hf
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
⊢ ∀ (s_1 : Set β), IsOpen s_1 → MeasurableSet ((s.piecewise f fun x => f default) ⁻¹' s_1)

tactic: intro t ht
state_before: case hf
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
⊢ ∀ (s_1 : Set β), IsOpen s_1 → MeasurableSet ((s.piecewise f fun x => f default) ⁻¹' s_1)
state_after: case hf
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
t : Set β
ht : IsOpen t
⊢ MeasurableSet ((s.piecewise f fun x => f default) ⁻¹' t)

tactic: obtain ⟨u, u_open, hu⟩ : ∃ u : Set α, IsOpen u ∧ f ⁻¹' t ∩ s = u ∩ s :=
  _root_.continuousOn_iff'.1 hf t ht
state_before: case hf
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
t : Set β
ht : IsOpen t
⊢ MeasurableSet ((s.piecewise f fun x => f default) ⁻¹' t)
state_after: case hf.intro.intro
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
t : Set β
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : f ⁻¹' t ∩ s = u ∩ s
⊢ MeasurableSet ((s.piecewise f fun x => f default) ⁻¹' t)

tactic: rw [piecewise_preimage, Set.ite, hu]
state_before: case hf.intro.intro
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
t : Set β
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : f ⁻¹' t ∩ s = u ∩ s
⊢ MeasurableSet ((s.piecewise f fun x => f default) ⁻¹' t)
state_after: case hf.intro.intro
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
t : Set β
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : f ⁻¹' t ∩ s = u ∩ s
⊢ MeasurableSet (u ∩ s ∪ (fun x => f default) ⁻¹' t \ s)

tactic: exact (u_open.measurableSet.inter hs).union ((measurable_const ht.measurableSet).diff hs)
state_before: case hf.intro.intro
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝⁶ : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : TopologicalSpace α
inst✝³ : OpensMeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : TopologicalSpace β
inst✝ : BorelSpace β
f : α → β
s : Set α
μ : Measure α
hf : ContinuousOn f s
hs : MeasurableSet s
a✝ : Nontrivial α
inhabited_h : Inhabited α
this : (s.piecewise f fun x => f default) =ᶠ[ae (μ.restrict s)] f
t : Set β
ht : IsOpen t
u : Set α
u_open : IsOpen u
hu : f ⁻¹' t ∩ s = u ∩ s
⊢ MeasurableSet (u ∩ s ∪ (fun x => f default) ⁻¹' t \ s)
state_after: no goals