Skip to content

Commit 9269fad

Browse files
committed
refactor(Analysis/SpecialFunctions/ImproperIntegrals): format and golf
1 parent e9d5415 commit 9269fad

1 file changed

Lines changed: 117 additions & 177 deletions

File tree

Mathlib/Analysis/SpecialFunctions/ImproperIntegrals.lean

Lines changed: 117 additions & 177 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ Authors: David Loeffler, Louis (Yiyang) Liu
55
-/
66
module
77

8-
public import Mathlib.Analysis.SpecialFunctions.JapaneseBracket
98
public import Mathlib.Analysis.SpecialFunctions.Integrals.Basic
10-
public import Mathlib.MeasureTheory.Group.Integral
9+
public import Mathlib.Analysis.SpecialFunctions.JapaneseBracket
1110
public import Mathlib.MeasureTheory.Integral.IntegralEqImproper
1211
public import Mathlib.MeasureTheory.Measure.Lebesgue.Integral
13-
public import Mathlib.MeasureTheory.Integral.IntervalIntegral.MeanValue
1412

1513
/-!
1614
# Evaluation of specific improper integrals
@@ -294,17 +292,15 @@ variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E
294292
{a b c : ℝ} {L R : E}
295293

296294
omit [CompleteSpace E] in
297-
lemma intervalIntegrable_inv_smul (hf : ContinuousOn f (Ioi 0)) {p q : ℝ}
298-
(hp : 0 < p) (hq : 0 < q) :
299-
IntervalIntegrable (fun x ↦ x⁻¹ • f x) volume p q := by
295+
lemma intervalIntegrable_inv_smul (hf : ContinuousOn f (Ioi 0)) {p q : ℝ} (hp : 0 < p)
296+
(hq : 0 < q) : IntervalIntegrable (fun x ↦ x⁻¹ • f x) volume p q := by
300297
apply ContinuousOn.intervalIntegrable
301298
have hsub : uIcc p q ⊆ Ioi 0 := by simp [uIcc, Icc_subset_Ioi_iff, hp, hq]
302299
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).smul (hf.mono hsub)
303300

304301
omit [CompleteSpace E] in
305-
lemma intervalIntegrable_inv_smul_comp_mul (hf : ContinuousOn f (Ioi 0))
306-
{p q : ℝ} (hp : 0 < p) (hq : 0 < q) (hc : 0 < c) :
307-
IntervalIntegrable (fun x ↦ x⁻¹ • f (c * x)) volume p q := by
302+
lemma intervalIntegrable_inv_smul_comp_mul (hf : ContinuousOn f (Ioi 0)) {p q : ℝ} (hp : 0 < p)
303+
(hq : 0 < q) (hc : 0 < c) : IntervalIntegrable (fun x ↦ x⁻¹ • f (c * x)) volume p q := by
308304
apply ContinuousOn.intervalIntegrable
309305
have hsub : uIcc p q ⊆ Ioi 0 := by simp [uIcc, Icc_subset_Ioi_iff, hp, hq]
310306
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).smul
@@ -322,182 +318,126 @@ lemma integral_comp_mul_inv_smul {ε r : ℝ} (hc : 0 < c) :
322318
field_simp
323319
rw [key, intervalIntegral.integral_smul, smul_integral_comp_mul_left]
324320

325-
/-- If `f → L` as `x → 0⁺` and `f` is continuous on `(0, ∞)`, then the weighted integral
326-
`∫ x in a*ε..b*ε, x⁻¹ • f x` converges to `log(b/a) • L` as `ε → 0⁺`. -/
327-
lemma tendsto_integral_inv_smul_nhdsWithin
328-
(hf : ContinuousOn f (Ioi 0)) (ha : 0 < a) (hb : 0 < b)
329-
(hL : Tendsto f (𝓝[>] 0) (𝓝 L)) :
330-
Tendsto (fun ε ↦ ∫ x in (a * ε)..(b * ε), x⁻¹ • f x) (𝓝[>] 0)
331-
(𝓝 (log (b / a) • L)) := by
321+
lemma norm_integral_inv_smul_sub_le (hf : ContinuousOn f (Ioi 0)) {p q : ℝ} (hp : 0 < p)
322+
(hq : 0 < q) {V : E} {δ : ℝ} (hδ : 0 ≤ δ) (h : ∀ x ∈ uIoc p q, ‖f x - V‖ ≤ δ) :
323+
‖(∫ x in p..q, x⁻¹ • f x) - log (q / p) • V‖ ≤ δ * |log (q / p)| := by
324+
have hsub : uIcc p q ⊆ Ioi 0 := by simp [uIcc, Icc_subset_Ioi_iff, hp, hq]
325+
have hint_f : IntervalIntegrable (fun x ↦ x⁻¹ • f x) volume p q :=
326+
intervalIntegrable_inv_smul hf hp hq
327+
have hint_V : IntervalIntegrable (fun x ↦ x⁻¹ • V) volume p q := by
328+
apply ContinuousOn.intervalIntegrable
329+
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).smul continuousOn_const
330+
have hint_inv : IntervalIntegrable (fun x : ℝ ↦ x⁻¹ * δ) volume p q := by
331+
apply ContinuousOn.intervalIntegrable
332+
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).mul continuousOn_const
333+
calc
334+
_ = ‖∫ x in p..q, x⁻¹ • (f x - V)‖ := by
335+
congr 1
336+
have : log (q / p) • V = ∫ x in p..q, x⁻¹ • V := by
337+
rw [intervalIntegral.integral_smul_const (f := fun x ↦ (x⁻¹ : ℝ)) (c := V),
338+
integral_inv_of_pos hp hq]
339+
rw [this, ← integral_sub hint_f hint_V]
340+
congr 1
341+
funext x
342+
exact (smul_sub _ _ _).symm
343+
_ ≤ |∫ x in p..q, x⁻¹ * δ| := by
344+
apply norm_integral_le_abs_of_norm_le
345+
· exact (ae_restrict_mem measurableSet_uIoc).mono fun x hx ↦ by
346+
have hx_pos : 0 < x :=
347+
lt_of_lt_of_le (lt_min hp hq) (uIoc_subset_uIcc hx).1
348+
rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.2 hx_pos)]
349+
exact mul_le_mul_of_nonneg_left (h x hx) (inv_nonneg.2 hx_pos.le)
350+
· exact hint_inv
351+
_ = δ * |log (q / p)| := by
352+
have heq : (fun x : ℝ ↦ x⁻¹ * δ) = fun x ↦ δ * x⁻¹ := by
353+
funext x
354+
ring
355+
rw [heq, intervalIntegral.integral_const_mul, integral_inv_of_pos hp hq]
356+
exact (abs_mul δ (log (q / p))).trans (by rw [abs_of_nonneg hδ])
357+
358+
lemma tendsto_integral_inv_smul_of_tendsto_uniform (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a)
359+
(hb : 0 < b) {F : Filter ℝ} (hpos : ∀ᶠ t in F, 0 < t) {V : E}
360+
(huni : ∀ δ > 0, ∀ᶠ t in F, ∀ x ∈ uIoc (a * t) (b * t), ‖f x - V‖ ≤ δ) :
361+
Tendsto (fun t ↦ ∫ x in (a * t)..(b * t), x⁻¹ • f x) F (𝓝 (log (b / a) • V)) := by
332362
rw [Metric.tendsto_nhds]
333363
intro δ hδ
334-
by_cases hlog : log (b / a) = 0
335-
· have hab : a = b := by
336-
have hba : (0 : ℝ) < b / a := div_pos hb ha
337-
rcases log_eq_zero.1 hlog with h | h | h
338-
all_goals grind
339-
filter_upwards [self_mem_nhdsWithin] with ε _
340-
rw [hab, integral_same, div_self (ne_of_gt hb), log_one, zero_smul, dist_self]
341-
exact hδ
342-
· set C := |log (b / a)| with hC_def
343-
have hC : 0 < C := abs_pos.2 hlog
344-
set δ' := δ / (C + 1)
345-
have hδ' : 0 < δ' := div_pos hδ (by positivity)
346-
have hev : ∀ᶠ x in 𝓝[>] (0 : ℝ), dist (f x) L < δ' :=
347-
hL.eventually (ball_mem_nhds L hδ')
348-
rw [Filter.Eventually, mem_nhdsWithin_iff] at hev
349-
obtain ⟨η, hη, hη_sub⟩ := hev
350-
set M := max a b with hM_def
351-
have hM : 0 < M := lt_max_of_lt_left ha
352-
filter_upwards [self_mem_nhdsWithin,
353-
nhdsWithin_le_nhds (Iio_mem_nhds (div_pos hη hM))] with ε hε_pos hε_bound
354-
have hε_pos : 0 < ε := hε_pos
355-
have haε : 0 < a * ε := mul_pos ha hε_pos
356-
have hbε : 0 < b * ε := mul_pos hb hε_pos
357-
have hfL : ∀ x ∈ uIoc (a * ε) (b * ε), ‖f x - L‖ ≤ δ' := by
358-
intro x hx
359-
have hx_pos : 0 < x :=
360-
lt_of_lt_of_le (lt_min haε hbε) (uIoc_subset_uIcc hx).1
361-
have hx_lt_η : dist x 0 < η := by
362-
rw [Real.dist_eq, sub_zero, abs_of_pos hx_pos]
364+
set C := |log (b / a)| with hC_def
365+
set δ' := δ / (C + 1)
366+
have hδ' : 0 < δ' := div_pos hδ (by positivity)
367+
filter_upwards [hpos, huni δ' hδ'] with t ht_pos hbound
368+
have haε : 0 < a * t := mul_pos ha ht_pos
369+
have hbε : 0 < b * t := mul_pos hb ht_pos
370+
have hlog_eq : log (b * t / (a * t)) = log (b / a) := by
371+
rw [mul_div_mul_right b a (ne_of_gt ht_pos)]
372+
calc
373+
_ = ‖(∫ x in a * t..b * t, x⁻¹ • f x) - log (b / a) • V‖ := dist_eq_norm _ _
374+
_ = ‖(∫ x in a * t..b * t, x⁻¹ • f x) - log (b * t / (a * t)) • V‖ := by rw [hlog_eq]
375+
_ ≤ δ' * |log (b * t / (a * t))| :=
376+
norm_integral_inv_smul_sub_le hf haε hbε hδ'.le hbound
377+
_ = δ' * C := by rw [hlog_eq]
378+
_ < δ := by
363379
calc
364-
_ ≤ max (a * ε) (b * ε) := (uIoc_subset_uIcc hx).2
365-
_ = M * ε := by rw [hM_def, max_mul_of_nonneg _ _ hε_pos.le]
366-
_ < M * (η / M) := mul_lt_mul_of_pos_left hε_bound hM
367-
_ = η := mul_div_cancel₀ η (ne_of_gt hM)
368-
have := hη_sub ⟨mem_ball.2 hx_lt_η, hx_pos⟩
369-
rw [mem_setOf_eq, dist_eq_norm] at this
370-
exact le_of_lt this
371-
have hint_f : IntervalIntegrable (fun x ↦ x⁻¹ • f x) volume (a * ε) (b * ε) :=
372-
intervalIntegrable_inv_smul hf haε hbε
373-
have hint_L : IntervalIntegrable (fun x ↦ x⁻¹ • L) volume (a * ε) (b * ε) := by
374-
apply ContinuousOn.intervalIntegrable
375-
have hsub : uIcc (a * ε) (b * ε) ⊆ Ioi 0 := by
376-
simp [uIcc, Icc_subset_Ioi_iff, haε, hbε]
377-
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).smul continuousOn_const
378-
have hint_inv : IntervalIntegrable (fun x : ℝ ↦ x⁻¹ * δ') volume (a * ε) (b * ε) := by
379-
apply ContinuousOn.intervalIntegrable
380-
have hsub : uIcc (a * ε) (b * ε) ⊆ Ioi 0 := by
381-
simp [uIcc, Icc_subset_Ioi_iff, haε, hbε]
382-
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).mul continuousOn_const
380+
_ = δ * (C / (C + 1)) := by ring
381+
_ < δ * 1 :=
382+
mul_lt_mul_of_pos_left ((div_lt_one (by positivity)).2 (lt_add_one C)) hδ
383+
_ = δ := mul_one δ
384+
385+
lemma tendsto_integral_inv_smul_nhdsWithin (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a) (hb : 0 < b)
386+
(hL : Tendsto f (𝓝[>] 0) (𝓝 L)) :
387+
Tendsto (fun ε ↦ ∫ x in (a * ε)..(b * ε), x⁻¹ • f x) (𝓝[>] 0) (𝓝 (log (b / a) • L)) := by
388+
apply tendsto_integral_inv_smul_of_tendsto_uniform hf ha hb self_mem_nhdsWithin
389+
intro δ hδ
390+
have hev : ∀ᶠ x in 𝓝[>] (0 : ℝ), dist (f x) L < δ :=
391+
hL.eventually (ball_mem_nhds L hδ)
392+
rw [Filter.Eventually, mem_nhdsWithin_iff] at hev
393+
obtain ⟨η, hη, hη_sub⟩ := hev
394+
set M := max a b with hM_def
395+
have hM : 0 < M := lt_max_of_lt_left ha
396+
filter_upwards [self_mem_nhdsWithin,
397+
nhdsWithin_le_nhds (Iio_mem_nhds (div_pos hη hM))] with t ht_pos ht_bound
398+
intro x hx
399+
have haε : 0 < a * t := mul_pos ha ht_pos
400+
have hbε : 0 < b * t := mul_pos hb ht_pos
401+
have hx_pos : 0 < x := lt_of_lt_of_le (lt_min haε hbε) (uIoc_subset_uIcc hx).1
402+
have hx_lt_η : dist x 0 < η := by
403+
rw [Real.dist_eq, sub_zero, abs_of_pos hx_pos]
383404
calc
384-
_ = ‖(∫ x in a * ε..b * ε, x⁻¹ • f x) - log (b / a) • L‖ := dist_eq_norm _ _
385-
_ = ‖∫ x in a * ε..b * ε, x⁻¹ • (f x - L)‖ := by
386-
congr 1
387-
have : log (b / a) • L = ∫ x in a * ε..b * ε, x⁻¹ • L := by
388-
rw [intervalIntegral.integral_smul_const (f := fun x ↦ (x⁻¹ : ℝ)) (c := L),
389-
integral_inv_of_pos haε hbε, mul_div_mul_right b a (ne_of_gt hε_pos)]
390-
rw [this, ← integral_sub hint_f hint_L]
391-
congr 1
392-
funext x
393-
exact (smul_sub _ _ _).symm
394-
_ ≤ |∫ x in a * ε..b * ε, x⁻¹ * δ'| := by
395-
apply norm_integral_le_abs_of_norm_le
396-
· exact (ae_restrict_mem measurableSet_uIoc).mono fun x hx ↦ by
397-
rw [norm_smul, Real.norm_eq_abs, abs_of_pos
398-
(inv_pos.2 (lt_of_lt_of_le (lt_min haε hbε) (uIoc_subset_uIcc hx).1))]
399-
exact mul_le_mul_of_nonneg_left (hfL x hx)
400-
(inv_nonneg.2 (le_of_lt (lt_of_lt_of_le (lt_min haε hbε)
401-
(uIoc_subset_uIcc hx).1)))
402-
· exact hint_inv
403-
_ = δ' * C := by
404-
have heq : (fun x : ℝ ↦ x⁻¹ * δ') = fun x ↦ δ' * x⁻¹ := by
405-
funext x
406-
ring
407-
rw [heq, intervalIntegral.integral_const_mul, integral_inv_of_pos haε hbε,
408-
mul_div_mul_right b a (ne_of_gt hε_pos)]
409-
exact (abs_mul δ' (log (b / a))).trans (by rw [abs_of_pos hδ'])
410-
_ < δ := by
411-
calc
412-
_ = δ * (C / (C + 1)) := by ring
413-
_ < δ * 1 := by
414-
exact mul_lt_mul_of_pos_left ((div_lt_one (by positivity)).2 (lt_add_one C)) hδ
415-
_ = δ := mul_one δ
405+
_ ≤ max (a * t) (b * t) := (uIoc_subset_uIcc hx).2
406+
_ = M * t := by rw [hM_def, max_mul_of_nonneg _ _ ht_pos.le]
407+
_ < M * (η / M) := mul_lt_mul_of_pos_left ht_bound hM
408+
_ = η := mul_div_cancel₀ η (ne_of_gt hM)
409+
have := hη_sub ⟨mem_ball.2 hx_lt_η, hx_pos⟩
410+
rw [mem_setOf_eq, dist_eq_norm] at this
411+
exact le_of_lt this
416412

417413
/-- If `f → R` as `x → +∞` and `f` is continuous on `(0, ∞)`, then the weighted integral
418414
`∫ x in a*r..b*r, x⁻¹ • f x` converges to `log(b/a) • R` as `r → +∞`. -/
419-
lemma tendsto_integral_inv_smul_atTop
420-
(hf : ContinuousOn f (Ioi 0)) (ha : 0 < a) (hb : 0 < b) (hR : Tendsto f atTop (𝓝 R)) :
415+
lemma tendsto_integral_inv_smul_atTop (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a) (hb : 0 < b)
416+
(hR : Tendsto f atTop (𝓝 R)) :
421417
Tendsto (fun r ↦ ∫ x in (a * r)..(b * r), x⁻¹ • f x) atTop (𝓝 (log (b / a) • R)) := by
422-
rw [Metric.tendsto_nhds]
418+
apply tendsto_integral_inv_smul_of_tendsto_uniform hf ha hb
419+
(eventually_atTop.21, fun r hr ↦ zero_lt_one.trans_le hr⟩)
423420
intro δ hδ
424-
by_cases hlog : log (b / a) = 0
425-
· have hab : a = b := by
426-
have hba : (0 : ℝ) < b / a := div_pos hb ha
427-
rcases log_eq_zero.1 hlog with h | h | h
428-
all_goals grind
429-
filter_upwards [eventually_atTop.21, fun r _ ↦ trivial⟩] with r _
430-
rw [hab, integral_same, div_self (ne_of_gt hb), log_one, zero_smul, dist_self]
431-
exact hδ
432-
· set C := |log (b / a)| with hC_def
433-
have hC : 0 < C := abs_pos.2 hlog
434-
set δ' := δ / (C + 1)
435-
have hδ' : 0 < δ' := div_pos hδ (by positivity)
436-
have hev : ∀ᶠ x in atTop, dist (f x) R < δ' :=
437-
hR.eventually (ball_mem_nhds R hδ')
438-
rw [Filter.eventually_atTop] at hev
439-
obtain ⟨N, hN⟩ := hev
440-
have hm : 0 < min a b := lt_min ha hb
441-
filter_upwards [eventually_atTop.2 ⟨max 1 (N / min a b), fun r hr ↦ hr⟩] with r hr
442-
have hr_pos : 0 < r := lt_of_lt_of_le one_pos ((le_max_left 1 _).trans hr)
443-
have haε : 0 < a * r := mul_pos ha hr_pos
444-
have hbε : 0 < b * r := mul_pos hb hr_pos
445-
have hfR : ∀ x ∈ uIoc (a * r) (b * r), ‖f x - R‖ ≤ δ' := by
446-
intro x hx
447-
have hNx : N ≤ x :=
448-
calc
449-
_ = min a b * (N / min a b) := by field_simp
450-
_ ≤ min a b * r :=
451-
mul_le_mul_of_nonneg_left ((le_max_right _ _).trans hr) hm.le
452-
_ = min (a * r) (b * r) := by rw [min_mul_of_nonneg _ _ hr_pos.le]
453-
_ ≤ x := (uIoc_subset_uIcc hx).1
454-
have hdist := hN x hNx
455-
rw [dist_eq_norm] at hdist
456-
exact le_of_lt hdist
457-
have hint_f := intervalIntegrable_inv_smul hf haε hbε
458-
have hint_R : IntervalIntegrable (fun x ↦ x⁻¹ • R) volume (a * r) (b * r) := by
459-
apply ContinuousOn.intervalIntegrable
460-
have hsub : uIcc (a * r) (b * r) ⊆ Ioi 0 := by
461-
simp [uIcc, Icc_subset_Ioi_iff, haε, hbε]
462-
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).smul continuousOn_const
463-
have hint_inv : IntervalIntegrable (fun x : ℝ ↦ x⁻¹ * δ') volume (a * r) (b * r) := by
464-
apply ContinuousOn.intervalIntegrable
465-
have hsub : uIcc (a * r) (b * r) ⊆ Ioi 0 := by
466-
simp [uIcc, Icc_subset_Ioi_iff, haε, hbε]
467-
exact (continuousOn_inv₀.mono (fun x hx ↦ ne_of_gt (hsub hx))).mul continuousOn_const
421+
have hev : ∀ᶠ x in atTop, dist (f x) R < δ :=
422+
hR.eventually (ball_mem_nhds R hδ)
423+
rw [Filter.eventually_atTop] at hev
424+
obtain ⟨N, hN⟩ := hev
425+
have hm : 0 < min a b := lt_min ha hb
426+
filter_upwards [eventually_atTop.2 ⟨max 1 (N / min a b), fun r hr ↦ hr⟩] with t ht
427+
intro x hx
428+
have ht_pos : 0 < t := lt_of_lt_of_le one_pos ((le_max_left 1 _).trans ht)
429+
have haε : 0 < a * t := mul_pos ha ht_pos
430+
have hbε : 0 < b * t := mul_pos hb ht_pos
431+
have hNx : N ≤ x :=
468432
calc
469-
_ = ‖(∫ x in a * r..b * r, x⁻¹ • f x) - log (b / a) • R‖ := dist_eq_norm _ _
470-
_ = ‖∫ x in a * r..b * r, x⁻¹ • (f x - R)‖ := by
471-
congr 1
472-
have : log (b / a) • R = ∫ x in a * r..b * r, x⁻¹ • R := by
473-
rw [intervalIntegral.integral_smul_const (f := fun x ↦ (x⁻¹ : ℝ)) (c := R),
474-
integral_inv_of_pos haε hbε, mul_div_mul_right b a (ne_of_gt hr_pos)]
475-
rw [this, ← integral_sub hint_f hint_R]
476-
congr 1
477-
funext x
478-
exact (smul_sub _ _ _).symm
479-
_ ≤ |∫ x in a * r..b * r, x⁻¹ * δ'| := by
480-
apply norm_integral_le_abs_of_norm_le
481-
· exact (ae_restrict_mem measurableSet_uIoc).mono fun x hx ↦ by
482-
rw [norm_smul, Real.norm_eq_abs, abs_of_pos
483-
(inv_pos.2 (lt_of_lt_of_le (lt_min haε hbε) (uIoc_subset_uIcc hx).1))]
484-
exact mul_le_mul_of_nonneg_left (hfR x hx)
485-
(inv_nonneg.2 (le_of_lt (lt_of_lt_of_le (lt_min haε hbε)
486-
(uIoc_subset_uIcc hx).1)))
487-
· exact hint_inv
488-
_ = δ' * C := by
489-
have heq : (fun x : ℝ ↦ x⁻¹ * δ') = fun x ↦ δ' * x⁻¹ := by
490-
funext x
491-
ring
492-
rw [heq, intervalIntegral.integral_const_mul, integral_inv_of_pos haε hbε,
493-
mul_div_mul_right b a (ne_of_gt hr_pos)]
494-
exact (abs_mul δ' (log (b / a))).trans (by rw [abs_of_pos hδ'])
495-
_ < δ := by
496-
calc
497-
_ = δ * (C / (C + 1)) := by ring
498-
_ < δ * 1 := by
499-
exact mul_lt_mul_of_pos_left ((div_lt_one (by positivity)).2 (lt_add_one C)) hδ
500-
_ = δ := mul_one δ
433+
_ = min a b * (N / min a b) := by field_simp
434+
_ ≤ min a b * t :=
435+
mul_le_mul_of_nonneg_left ((le_max_right _ _).trans ht) hm.le
436+
_ = min (a * t) (b * t) := by rw [min_mul_of_nonneg _ _ ht_pos.le]
437+
_ ≤ x := (uIoc_subset_uIcc hx).1
438+
have hdist := hN x hNx
439+
rw [dist_eq_norm] at hdist
440+
exact le_of_lt hdist
501441

502442
/-- **Frullani's integral**, limit form, for functions valued in a complete normed space.
503443
If `f` is continuous on `(0, ∞)` with `f x → L` as `x → 0⁺` and `f x → R` as `x → +∞`,
@@ -531,8 +471,8 @@ theorem tendsto_intervalIntegral (hf : ContinuousOn f (Ioi 0)) (ha : 0 < a) (hb
531471
exact hsplit hε hr
532472
rw [tendsto_congr' h_ev, show log (b / a) • (L - R) =
533473
log (b / a) • L - log (b / a) • R from smul_sub _ _ _]
534-
exact (tendsto_integral_inv_smul_nhdsWithin hf ha hb hL |>.comp tendsto_fst).sub
535-
(tendsto_integral_inv_smul_atTop hf ha hb hR |>.comp tendsto_snd)
474+
exact ((tendsto_integral_inv_smul_nhdsWithin hf ha hb hL).comp tendsto_fst).sub
475+
((tendsto_integral_inv_smul_atTop hf ha hb hR).comp tendsto_snd)
536476

537477
/-- **Frullani's integral** for functions valued in a complete normed space.
538478
If `f` is continuous on `(0, ∞)` with `f x → L` as `x → 0⁺` and `f x → R` as `x → +∞`,

0 commit comments

Comments
 (0)