l3lab/ntp-mathlib huggingface dataset:
/-- Lebesgue dominated convergence theorem for filters with a countable basis -/
nonrec theorem tendsto_integral_filter_of_dominated_convergence {ι} {l : Filter ι}
    [l.IsCountablyGenerated] {F : ι → ℝ → E} (bound : ℝ → ℝ)
    (hF_meas : ∀ᶠ n in l, AEStronglyMeasurable (F n) (μ.restrict (Ι a b)))
    (h_bound : ∀ᶠ n in l, ∀ᵐ x ∂μ, x ∈ Ι a b → ‖F n x‖ ≤ bound x)
    (bound_integrable : IntervalIntegrable bound μ a b)
    (h_lim : ∀ᵐ x ∂μ, x ∈ Ι a b → Tendsto (fun n => F n x) l (𝓝 (f x))) :
    Tendsto (fun n => ∫ x in a..b, F n x ∂μ) l (𝓝 <| ∫ x in a..b, f x ∂μ) := by
  

Proof state:
ι✝ : Type u_1
𝕜 : Type u_2
E : Type u_3
F✝ : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f g : ℝ → E
μ : Measure ℝ
ι : Type u_6
l : Filter ι
inst✝ : IsCountablyGenerated l
F : ι → ℝ → E
bound : ℝ → ℝ
hF_meas : ∀ᶠ (n : ι) in l, AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))
h_bound : ∀ᶠ (n : ι) in l, ∀ᵐ (x : ℝ) ∂μ, x ∈ Ι a b → ‖F n x‖ ≤ bound x
bound_integrable : IntervalIntegrable bound μ a b
h_lim : ∀ᵐ (x : ℝ) ∂μ, x ∈ Ι a b → Tendsto (fun n => F n x) l (𝓝 (f x))
⊢ Tendsto (fun n => ∫ (x : ℝ) in a..b, F n x ∂μ) l (𝓝 (∫ (x : ℝ) in a..b, f x ∂μ))

Next tactic:
simp only [intervalIntegrable_iff, intervalIntegral_eq_integral_uIoc,
    ← ae_restrict_iff' (α := ℝ) (μ := μ) measurableSet_uIoc] at *
/-- Lebesgue dominated convergence theorem for filters with a countable basis -/
nonrec theorem tendsto_integral_filter_of_dominated_convergence {ι} {l : Filter ι}
    [l.IsCountablyGenerated] {F : ι → ℝ → E} (bound : ℝ → ℝ)
    (hF_meas : ∀ᶠ n in l, AEStronglyMeasurable (F n) (μ.restrict (Ι a b)))
    (h_bound : ∀ᶠ n in l, ∀ᵐ x ∂μ, x ∈ Ι a b → ‖F n x‖ ≤ bound x)
    (bound_integrable : IntervalIntegrable bound μ a b)
    (h_lim : ∀ᵐ x ∂μ, x ∈ Ι a b → Tendsto (fun n => F n x) l (𝓝 (f x))) :
    Tendsto (fun n => ∫ x in a..b, F n x ∂μ) l (𝓝 <| ∫ x in a..b, f x ∂μ) := by
  simp only [intervalIntegrable_iff, intervalIntegral_eq_integral_uIoc,
    ← ae_restrict_iff' (α := ℝ) (μ := μ) measurableSet_uIoc] at *
  

Proof state:
ι✝ : Type u_1
𝕜 : Type u_2
E : Type u_3
F✝ : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f g : ℝ → E
μ : Measure ℝ
ι : Type u_6
l : Filter ι
inst✝ : IsCountablyGenerated l
F : ι → ℝ → E
bound : ℝ → ℝ
hF_meas : ∀ᶠ (n : ι) in l, AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))
h_bound : ∀ᶠ (n : ι) in l, ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ‖F n x‖ ≤ bound x
bound_integrable : IntegrableOn bound (Ι a b)
h_lim : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), Tendsto (fun n => F n x) l (𝓝 (f x))
⊢ Tendsto (fun n => (if a ≤ b then 1 else -1) • ∫ (x : ℝ) in Ι a b, F n x ∂μ) l
    (𝓝 ((if a ≤ b then 1 else -1) • ∫ (x : ℝ) in Ι a b, f x ∂μ))

Next tactic:
exact tendsto_const_nhds.smul <|
    tendsto_integral_filter_of_dominated_convergence bound hF_meas h_bound bound_integrable h_lim
/-- Lebesgue dominated convergence theorem for series. -/
nonrec theorem hasSum_integral_of_dominated_convergence {ι} [Countable ι] {F : ι → ℝ → E}
    (bound : ι → ℝ → ℝ) (hF_meas : ∀ n, AEStronglyMeasurable (F n) (μ.restrict (Ι a b)))
    (h_bound : ∀ n, ∀ᵐ t ∂μ, t ∈ Ι a b → ‖F n t‖ ≤ bound n t)
    (bound_summable : ∀ᵐ t ∂μ, t ∈ Ι a b → Summable fun n => bound n t)
    (bound_integrable : IntervalIntegrable (fun t => ∑' n, bound n t) μ a b)
    (h_lim : ∀ᵐ t ∂μ, t ∈ Ι a b → HasSum (fun n => F n t) (f t)) :
    HasSum (fun n => ∫ t in a..b, F n t ∂μ) (∫ t in a..b, f t ∂μ) := by
  

Proof state:
ι✝ : Type u_1
𝕜 : Type u_2
E : Type u_3
F✝ : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f g : ℝ → E
μ : Measure ℝ
ι : Type u_6
inst✝ : Countable ι
F : ι → ℝ → E
bound : ι → ℝ → ℝ
hF_meas : ∀ (n : ι), AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))
h_bound : ∀ (n : ι), ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → ‖F n t‖ ≤ bound n t
bound_summable : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → Summable fun n => bound n t
bound_integrable : IntervalIntegrable (fun t => ∑' (n : ι), bound n t) μ a b
h_lim : ∀ᵐ (t : ℝ) ∂μ, t ∈ Ι a b → HasSum (fun n => F n t) (f t)
⊢ HasSum (fun n => ∫ (t : ℝ) in a..b, F n t ∂μ) (∫ (t : ℝ) in a..b, f t ∂μ)

Next tactic:
simp only [intervalIntegrable_iff, intervalIntegral_eq_integral_uIoc, ←
    ae_restrict_iff' (α := ℝ) (μ := μ) measurableSet_uIoc] at *
/-- Lebesgue dominated convergence theorem for series. -/
nonrec theorem hasSum_integral_of_dominated_convergence {ι} [Countable ι] {F : ι → ℝ → E}
    (bound : ι → ℝ → ℝ) (hF_meas : ∀ n, AEStronglyMeasurable (F n) (μ.restrict (Ι a b)))
    (h_bound : ∀ n, ∀ᵐ t ∂μ, t ∈ Ι a b → ‖F n t‖ ≤ bound n t)
    (bound_summable : ∀ᵐ t ∂μ, t ∈ Ι a b → Summable fun n => bound n t)
    (bound_integrable : IntervalIntegrable (fun t => ∑' n, bound n t) μ a b)
    (h_lim : ∀ᵐ t ∂μ, t ∈ Ι a b → HasSum (fun n => F n t) (f t)) :
    HasSum (fun n => ∫ t in a..b, F n t ∂μ) (∫ t in a..b, f t ∂μ) := by
  simp only [intervalIntegrable_iff, intervalIntegral_eq_integral_uIoc, ←
    ae_restrict_iff' (α := ℝ) (μ := μ) measurableSet_uIoc] at *
  

Proof state:
ι✝ : Type u_1
𝕜 : Type u_2
E : Type u_3
F✝ : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f g : ℝ → E
μ : Measure ℝ
ι : Type u_6
inst✝ : Countable ι
F : ι → ℝ → E
bound : ι → ℝ → ℝ
hF_meas : ∀ (n : ι), AEStronglyMeasurable (F n) (Measure.restrict μ (Ι a b))
h_bound : ∀ (n : ι), ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), ‖F n x‖ ≤ bound n x
bound_summable : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), Summable fun n => bound n x
bound_integrable : IntegrableOn (fun t => ∑' (n : ι), bound n t) (Ι a b)
h_lim : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ι a b), HasSum (fun n => F n x) (f x)
⊢ HasSum (fun n => (if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, F n t ∂μ)
    ((if a ≤ b then 1 else -1) • ∫ (t : ℝ) in Ι a b, f t ∂μ)

Next tactic:
exact
    (hasSum_integral_of_dominated_convergence bound hF_meas h_bound bound_summable bound_integrable
          h_lim).const_smul
      _
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  

Proof state:
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
⊢ HasSum (fun i => ∫ (x : ℝ) in a..b, (f i) x) (∫ (x : ℝ) in a..b, ∑' (i : ι), (f i) x)

Next tactic:
apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · 

Proof state:
case h_bound
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
⊢ ∀ (n : ι),
    ∀ᵐ (t : ℝ) ∂volume,
      t ∈ Ι a b →
        ‖(f n) t‖ ≤ ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f n)‖

Next tactic:
refine fun i => ae_of_all _ fun x hx => ?_
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    

Proof state:
case h_bound
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
i : ι
x : ℝ
hx : x ∈ Ι a b
⊢ ‖(f i) x‖ ≤ ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖

Next tactic:
apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    

Proof state:
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
i : ι
x : ℝ
hx : x ∈ Ι a b
⊢ x ∈ ↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }

Next tactic:
exact ⟨hx.1.le, hx.2⟩
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · 

Proof state:
case bound_summable
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
⊢ ∀ᵐ (t : ℝ) ∂volume,
    t ∈ Ι a b →
      Summable fun n =>
        ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f n)‖

Next tactic:
exact ae_of_all _ fun x _ => hf_sum
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · exact ae_of_all _ fun x _ => hf_sum
  · 

Proof state:
case bound_integrable
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
⊢ IntervalIntegrable
    (fun t =>
      ∑' (n : ι), ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f n)‖)
    volume a b

Next tactic:
exact intervalIntegrable_const
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · exact ae_of_all _ fun x _ => hf_sum
  · exact intervalIntegrable_const
  · 

Proof state:
case h_lim
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
⊢ ∀ᵐ (t : ℝ) ∂volume, t ∈ Ι a b → HasSum (fun n => (f n) t) (∑' (i : ι), (f i) t)

Next tactic:
refine ae_of_all _ fun x hx => Summable.hasSum ?_
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · exact ae_of_all _ fun x _ => hf_sum
  · exact intervalIntegrable_const
  · refine ae_of_all _ fun x hx => Summable.hasSum ?_
    

Proof state:
case h_lim
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
x : ℝ
hx : x ∈ Ι a b
⊢ Summable fun n => (f n) x

Next tactic:
let x : (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ) := ⟨x, ?_⟩
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · exact ae_of_all _ fun x _ => hf_sum
  · exact intervalIntegrable_const
  · refine ae_of_all _ fun x hx => Summable.hasSum ?_
    let x : (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ) := ⟨x, ?_⟩; 

Proof state:
case h_lim.refine_2
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
x✝ : ℝ
hx : x✝ ∈ Ι a b
x : ↥{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } := { val := x✝, property := ?h_lim.refine_1 }
⊢ Summable fun n => (f n) x✝
case h_lim.refine_1
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
x : ℝ
hx : x ∈ Ι a b
⊢ x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }

Next tactic:
swap
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · exact ae_of_all _ fun x _ => hf_sum
  · exact intervalIntegrable_const
  · refine ae_of_all _ fun x hx => Summable.hasSum ?_
    let x : (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ) := ⟨x, ?_⟩; swap; 

Proof state:
case h_lim.refine_1
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
x : ℝ
hx : x ∈ Ι a b
⊢ x ∈ { carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }
case h_lim.refine_2
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
x✝ : ℝ
hx : x✝ ∈ Ι a b
x : ↥{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } := { val := x✝, property := ?h_lim.refine_1 }
⊢ Summable fun n => (f n) x✝

Next tactic:
exact ⟨hx.1.le, hx.2⟩
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · exact ae_of_all _ fun x _ => hf_sum
  · exact intervalIntegrable_const
  · refine ae_of_all _ fun x hx => Summable.hasSum ?_
    let x : (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ) := ⟨x, ?_⟩; swap; exact ⟨hx.1.le, hx.2⟩
    

Proof state:
case h_lim.refine_2
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
x✝ : ℝ
hx : x✝ ∈ Ι a b
x : ↥{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } :=
  { val := x✝, property := (_ : a ⊓ b ≤ x✝ ∧ x✝ ≤ a ⊔ b) }
⊢ Summable fun n => (f n) x✝

Next tactic:
have := hf_sum.of_norm
/-- Interval integrals commute with countable sums, when the supremum norms are summable (a
special case of the dominated convergence theorem). -/
theorem hasSum_intervalIntegral_of_summable_norm [Countable ι] {f : ι → C(ℝ, E)}
    (hf_sum : Summable fun i : ι => ‖(f i).restrict (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖) :
    HasSum (fun i : ι => ∫ x in a..b, f i x) (∫ x in a..b, ∑' i : ι, f i x) := by
  apply hasSum_integral_of_dominated_convergence
    (fun i (x : ℝ) => ‖(f i).restrict ↑(⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ)‖)
    (fun i => (map_continuous <| f i).aestronglyMeasurable)
  · refine fun i => ae_of_all _ fun x hx => ?_
    apply ContinuousMap.norm_coe_le_norm ((f i).restrict _) ⟨x, _⟩
    exact ⟨hx.1.le, hx.2⟩
  · exact ae_of_all _ fun x _ => hf_sum
  · exact intervalIntegrable_const
  · refine ae_of_all _ fun x hx => Summable.hasSum ?_
    let x : (⟨uIcc a b, isCompact_uIcc⟩ : Compacts ℝ) := ⟨x, ?_⟩; swap; exact ⟨hx.1.le, hx.2⟩
    have := hf_sum.of_norm
    

Proof state:
case h_lim.refine_2
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝³ : NormedAddCommGroup E
inst✝² : CompleteSpace E
inst✝¹ : NormedSpace ℝ E
a b c d : ℝ
f✝ g : ℝ → E
μ : Measure ℝ
inst✝ : Countable ι
f : ι → C(ℝ, E)
hf_sum :
  Summable fun i => ‖ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)‖
x✝ : ℝ
hx : x✝ ∈ Ι a b
x : ↥{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) } :=
  { val := x✝, property := (_ : a ⊓ b ≤ x✝ ∧ x✝ ≤ a ⊔ b) }
this : Summable fun i => ContinuousMap.restrict (↑{ carrier := [[a, b]], isCompact' := (_ : IsCompact [[a, b]]) }) (f i)
⊢ Summable fun n => (f n) x✝

Next tactic:
simpa only [Compacts.coe_mk, ContinuousMap.restrict_apply]
      using ContinuousMap.summable_apply this x
theorem continuousWithinAt_primitive (hb₀ : μ {b₀} = 0)
    (h_int : IntervalIntegrable f μ (min a b₁) (max a b₂)) :
    ContinuousWithinAt (fun b => ∫ x in a..b, f x ∂μ) (Icc b₁ b₂) b₀ := by
  

Proof state:
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b b₀ b₁ b₂ : ℝ
μ : Measure ℝ
f g : ℝ → E
hb₀ : ↑↑μ {b₀} = 0
h_int : IntervalIntegrable f μ (min a b₁) (max a b₂)
⊢ ContinuousWithinAt (fun b => ∫ (x : ℝ) in a..b, f x ∂μ) (Icc b₁ b₂) b₀

Next tactic:
by_cases h₀ : b₀ ∈ Icc b₁ b₂