Theorem: integrableOn_peak_smul_of_integrableOn_of_continuousWithinAt
File: Mathlib/MeasureTheory/Integral/PeakFunction.lean

tactic: obtain ⟨u, u_open, x₀u, hu⟩ : ∃ u, IsOpen u ∧ x₀ ∈ u ∧ ∀ x ∈ u ∩ s, g x ∈ ball (g x₀) 1
state_before: α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
⊢ ∀ᶠ (i : ι) in l, IntegrableOn (fun x => φ i x • g x) s

tactic: exact mem_nhdsWithin.1 (hcg (ball_mem_nhds _ zero_lt_one))
state_before: α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
⊢ ∃ u, IsOpen u ∧ x₀ ∈ u ∧ ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1

case intro.intro.intro
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
⊢ ∀ᶠ (i : ι) in l, IntegrableOn (fun x => φ i x • g x) s

tactic: filter_upwards [tendstoUniformlyOn_iff.1 (hlφ u u_open x₀u) 1 zero_lt_one, hiφ] with i hi h'i
state_before: case intro.intro.intro
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
⊢ ∀ᶠ (i : ι) in l, IntegrableOn (fun x => φ i x • g x) s

tactic: have A : IntegrableOn (fun x => φ i x • g x) (s \ u) μ := by
  refine' Integrable.smul_of_top_right (hmg.mono (diff_subset _ _) le_rfl) _
  apply
    memℒp_top_of_bound
      ((integrable_of_integral_eq_one h'i).aestronglyMeasurable.mono_set (diff_subset _ _)) 1
  filter_upwards [self_mem_ae_restrict (hs.diff u_open.measurableSet)] with x hx
  simpa only [Pi.zero_apply, dist_zero_left] using (hi x hx).le
state_before: case h
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
⊢ IntegrableOn (fun x => φ i x • g x) s

tactic: convert A.union B
state_before: case h
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
B : IntegrableOn (fun x => φ i x • g x) (s ∩ u)
⊢ IntegrableOn (fun x => φ i x • g x) s

tactic: simp only [diff_union_inter]
state_before: case h.e'_6
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
B : IntegrableOn (fun x => φ i x • g x) (s ∩ u)
⊢ s = s \ u ∪ s ∩ u

tactic: refine' Integrable.smul_of_top_right (hmg.mono (diff_subset _ _) le_rfl) _
state_before: α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
⊢ IntegrableOn (fun x => φ i x • g x) (s \ u)

tactic: apply
  memℒp_top_of_bound
    ((integrable_of_integral_eq_one h'i).aestronglyMeasurable.mono_set (diff_subset _ _)) 1
state_before: α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
⊢ Memℒp (fun x => φ i x) ⊤

tactic: filter_upwards [self_mem_ae_restrict (hs.diff u_open.measurableSet)] with x hx
state_before: α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ (s \ u), ‖φ i x‖ ≤ 1

tactic: simpa only [Pi.zero_apply, dist_zero_left] using (hi x hx).le
state_before: case h
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
x : α
hx : x ∈ s \ u
⊢ ‖φ i x‖ ≤ 1

tactic: apply Integrable.smul_of_top_left
state_before: α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
⊢ IntegrableOn (fun x => φ i x • g x) (s ∩ u)

tactic: exact IntegrableOn.mono_set (integrable_of_integral_eq_one h'i) (inter_subset_left _ _)
state_before: case hφ
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
⊢ Integrable fun x => φ i x

tactic: apply
  memℒp_top_of_bound (hmg.mono_set (inter_subset_left _ _)).aestronglyMeasurable (‖g x₀‖ + 1)
state_before: case hf
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
⊢ Memℒp (fun x => g x) ⊤

tactic: filter_upwards [self_mem_ae_restrict (hs.inter u_open.measurableSet)] with x hx
state_before: case hf
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ (s ∩ u), ‖g x‖ ≤ ‖g x₀‖ + 1

tactic: rw [inter_comm] at hx
state_before: case h
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
x : α
hx : x ∈ s ∩ u
⊢ ‖g x‖ ≤ ‖g x₀‖ + 1

tactic: exact (norm_lt_of_mem_ball (hu x hx)).le
state_before: case h
α : Type u_1
E : Type u_3
ι : Type u_2
hm : MeasurableSpace α
μ : MeasureTheory.Measure α
inst✝³ : TopologicalSpace α
inst✝² : BorelSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
g : α → E
l : Filter ι
x₀ : α
s : Set α
φ : ι → α → ℝ
hs : MeasurableSet s
hlφ : ∀ (u : Set α), IsOpen u → x₀ ∈ u → TendstoUniformlyOn φ 0 l (s \ u)
hiφ : ∀ᶠ (i : ι) in l, (∫ (x : α) in s, φ i x ∂μ) = 1
hmg : IntegrableOn g s
hcg : ContinuousWithinAt g s x₀
u : Set α
u_open : IsOpen u
x₀u : x₀ ∈ u
hu : ∀ (x : α), x ∈ u ∩ s → g x ∈ ball (g x₀) 1
i : ι
hi : ∀ (x : α), x ∈ s \ u → dist (OfNat.ofNat 0 x) (φ i x) < 1
h'i : (∫ (x : α) in s, φ i x ∂μ) = 1
A : IntegrableOn (fun x => φ i x • g x) (s \ u)
x : α
hx : x ∈ u ∩ s
⊢ ‖g x‖ ≤ ‖g x₀‖ + 1