-- Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean
theorem intervalIntegral_tendsto_integral_Ioi (a : ℝ) (hfi : IntegrableOn f (Ioi a) μ)
    (hb : Tendsto b l atTop) :
    Tendsto (fun i => ∫ x in a..b i, f x ∂μ) l (𝓝 <| ∫ x in Ioi a, f x ∂μ)

Proof state:
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

Tactic:
have hφ : AECover (μ.restrict <| Ioi a) l φ := aecover_Iic hb

Result:
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

Proof state:
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
⊢ (fun i => ∫ (x : ℝ) in φ i, f x ∂μ.restrict (Ioi a)) =ᶠ[l] fun i => ∫ (x : ℝ) in a..b i, f x ∂μ

Tactic:
filter_upwards [hb.eventually (eventually_ge_atTop <| a)] with i hbi

Result:
case h
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
i : ι
hbi : a ≤ b i
⊢ ∫ (x : ℝ) in φ i, f x ∂μ.restrict (Ioi a) = ∫ (x : ℝ) in a..b i, f x ∂μ

Proof state:
case h
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
i : ι
hbi : a ≤ b i
⊢ ∫ (x : ℝ) in Ioi a ∩ φ i, f x ∂μ = ∫ (x : ℝ) in Ioc a (b i), f x ∂μ

Tactic:
rfl

Result:
no goals

Proof state:
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

Tactic:
let φ i := Iic (b i)

Result:
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

Proof state:
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
⊢ Tendsto (fun i => ∫ (x : ℝ) in a..b i, f x ∂μ) l (𝓝 (∫ (x : ℝ) in Ioi a, f x ∂μ))

Tactic:
refine (hφ.integral_tendsto_of_countably_generated hfi).congr' ?_

Result:
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
⊢ (fun i => ∫ (x : ℝ) in φ i, f x ∂μ.restrict (Ioi a)) =ᶠ[l] fun i => ∫ (x : ℝ) in a..b i, f x ∂μ

Proof state:
case h
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
i : ι
hbi : a ≤ b i
⊢ ∫ (x : ℝ) in φ i, f x ∂μ.restrict (Ioi a) = ∫ (x : ℝ) in a..b i, f x ∂μ

Tactic:
rw [intervalIntegral.integral_of_le hbi, Measure.restrict_restrict (hφ.measurableSet i),
  inter_comm]

Result:
case h
ι : Type u_1
E : Type u_2
μ : Measure ℝ
l : Filter ι
inst✝² : l.IsCountablyGenerated
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
b : ι → ℝ
f : ℝ → E
a : ℝ
hfi : IntegrableOn f (Ioi a) μ
hb : Tendsto b l atTop
φ : ι → Set ℝ := fun i => Iic (b i)
hφ : AECover (μ.restrict (Ioi a)) l φ
i : ι
hbi : a ≤ b i
⊢ ∫ (x : ℝ) in Ioi a ∩ φ i, f x ∂μ = ∫ (x : ℝ) in Ioc a (b i), f x ∂μ