-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem hasSum_integral_measure {ι} {m : MeasurableSpace α} {f : α → G} {μ : ι → Measure α}
    (hf : Integrable f (Measure.sum μ)) :
    HasSum (fun i => ∫ a, f a ∂μ i) (∫ a, f a ∂Measure.sum μ)

Proof state:
case intro.intro
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
hmem : ∀ᶠ (y : ℝ≥0∞) in 𝓝 (∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ), ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < y + ↑ε
s : Finset ι
hs : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ∑ b ∈ s, (fun i => ∫⁻ (a : α), ‖f a‖ₑ ∂μ i) b + ↑ε
ν : Measure α
hf : Integrable f (∑ i ∈ s, μ i) ∧ Integrable f ν
hν : ∑ i ∈ s, μ i + ν = Measure.sum μ
⊢ ↑(nndist (∫ (a : α), f a ∂∑ i ∈ s, μ i) (∫ (a : α), f a ∂(∑ i ∈ s, μ i + ν))) < ↑ε

Tactic:
refine (nndist_integral_add_measure_le_lintegral hf.1 hf.2).trans_lt ?_

Result:
case intro.intro
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
hmem : ∀ᶠ (y : ℝ≥0∞) in 𝓝 (∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ), ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < y + ↑ε
s : Finset ι
hs : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ∑ b ∈ s, (fun i => ∫⁻ (a : α), ‖f a‖ₑ ∂μ i) b + ↑ε
ν : Measure α
hf : Integrable f (∑ i ∈ s, μ i) ∧ Integrable f ν
hν : ∑ i ∈ s, μ i + ν = Measure.sum μ
⊢ ∫⁻ (x : α), ‖f x‖ₑ ∂ν < ↑ε

Proof state:
case intro.intro
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
hmem : ∀ᶠ (y : ℝ≥0∞) in 𝓝 (∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ), ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < y + ↑ε
s : Finset ι
hs : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ∑ b ∈ s, (fun i => ∫⁻ (a : α), ‖f a‖ₑ ∂μ i) b + ↑ε
ν : Measure α
hν : ∑ i ∈ s, μ i + ν = Measure.sum μ
⊢ ∫ (a : α), f a ∂∑ i ∈ s, μ i ∈ Metric.ball (∫ (a : α), f a ∂Measure.sum μ) ↑ε

Tactic:
rw [Metric.mem_ball, ← coe_nndist, NNReal.coe_lt_coe, ← ENNReal.coe_lt_coe, ← hν]

Result:
case intro.intro
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
hmem : ∀ᶠ (y : ℝ≥0∞) in 𝓝 (∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ), ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < y + ↑ε
s : Finset ι
hs : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ∑ b ∈ s, (fun i => ∫⁻ (a : α), ‖f a‖ₑ ∂μ i) b + ↑ε
ν : Measure α
hν : ∑ i ∈ s, μ i + ν = Measure.sum μ
⊢ ↑(nndist (∫ (a : α), f a ∂∑ i ∈ s, μ i) (∫ (a : α), f a ∂(∑ i ∈ s, μ i + ν))) < ↑ε

Proof state:
case refine_1
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
⊢ ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ ≠ ⊤

case refine_2
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
⊢ ↑ε ≠ 0

Tactic:
exacts [hf_lt.ne, ENNReal.coe_ne_zero.2 (NNReal.coe_ne_zero.1 ε0.ne')]

Result:
no goals

Proof state:
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
⊢ HasSum (fun i => ∫ (a : α), f a ∂μ i) (∫ (a : α), f a ∂Measure.sum μ)

Tactic:
have hfi : ∀ i, Integrable f (μ i) := fun i => hf.mono_measure (Measure.le_sum _ _)

Result:
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
⊢ HasSum (fun i => ∫ (a : α), f a ∂μ i) (∫ (a : α), f a ∂Measure.sum μ)

Proof state:
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
⊢ ∀ᶠ (y : ℝ≥0∞) in 𝓝 (∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ), ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < y + ↑ε

Tactic:
refine tendsto_id.add tendsto_const_nhds (lt_mem_nhds (α := ℝ≥0∞) <| ENNReal.lt_add_right ?_ ?_)

Result:
case refine_1
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
⊢ ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ ≠ ⊤

case refine_2
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
⊢ ↑ε ≠ 0

Proof state:
case intro
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
hmem : ∀ᶠ (y : ℝ≥0∞) in 𝓝 (∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ), ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < y + ↑ε
s : Finset ι
hs : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ∑ b ∈ s, (fun i => ∫⁻ (a : α), ‖f a‖ₑ ∂μ i) b + ↑ε
⊢ ∫ (a : α), f a ∂∑ i ∈ s, μ i ∈ Metric.ball (∫ (a : α), f a ∂Measure.sum μ) ↑ε

Tactic:
obtain ⟨ν, hν⟩ : ∃ ν, (∑ i ∈ s, μ i) + ν = Measure.sum μ := by
  refine ⟨Measure.sum fun i : ↥(sᶜ : Set ι) => μ i, ?_⟩
  simpa only [← Measure.sum_coe_finset] using Measure.sum_add_sum_compl (s : Set ι) μ

Result:
case intro.intro
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
ι : Type u_7
m : MeasurableSpace α
f : α → G
μ : ι → Measure α
hf : Integrable f (Measure.sum μ)
hfi : ∀ (i : ι), Integrable f (μ i)
ε : ℝ≥0
ε0 : 0 < ↑ε
hf_lt : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ⊤
hmem : ∀ᶠ (y : ℝ≥0∞) in 𝓝 (∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ), ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < y + ↑ε
s : Finset ι
hs : ∫⁻ (x : α), ‖f x‖ₑ ∂Measure.sum μ < ∑ b ∈ s, (fun i => ∫⁻ (a : α), ‖f a‖ₑ ∂μ i) b + ↑ε
ν : Measure α
hν : ∑ i ∈ s, μ i + ν = Measure.sum μ
⊢ ∫ (a : α), f a ∂∑ i ∈ s, μ i ∈ Metric.ball (∫ (a : α), f a ∂Measure.sum μ) ↑ε