-- Mathlib/MeasureTheory/Integral/Bochner.lean
theorem integral_add_measure {f : α → G} (hμ : Integrable f μ) (hν : Integrable f ν) :
    ∫ x, f x ∂(μ + ν) = ∫ x, f x ∂μ + ∫ x, f x ∂ν

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
⊢ setToFun (μ + ν) (weightedSMul (μ + ν)) ⋯ f =
    setToFun (μ + ν) (weightedSMul μ) hμ_dfma f + setToFun (μ + ν) (weightedSMul ν) hν_dfma f

Tactic:
refine setToFun_add_left' _ _ _ (fun s _ hμνs => ?_) f

Result:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
s : Set α
x✝ : MeasurableSet s
hμνs : (μ + ν) s < ⊤
⊢ weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s

Proof state:
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
⊢ ∫ (x : α), f x ∂(μ + ν) = ∫ (x : α), f x ∂μ + ∫ (x : α), f x ∂ν

Tactic:
by_cases hG : CompleteSpace G

Result:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
⊢ ∫ (x : α), f x ∂(μ + ν) = ∫ (x : α), f x ∂μ + ∫ (x : α), f x ∂ν

case neg
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : ¬CompleteSpace G
⊢ ∫ (x : α), f x ∂(μ + ν) = ∫ (x : α), f x ∂μ + ∫ (x : α), f x ∂ν

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
⊢ ∫ (x : α), f x ∂(μ + ν) = ∫ (x : α), f x ∂μ + ∫ (x : α), f x ∂ν

Tactic:
simp_rw [integral_eq_setToFun]

Result:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
⊢ setToFun (μ + ν) (weightedSMul (μ + ν)) ⋯ f = setToFun μ (weightedSMul μ) ⋯ f + setToFun ν (weightedSMul ν) ⋯ f

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
⊢ ∫ (x : α), f x ∂(μ + ν) = ∫ (x : α), f x ∂μ + ∫ (x : α), f x ∂ν

Tactic:
have hfi := hμ.add_measure hν

Result:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
⊢ ∫ (x : α), f x ∂(μ + ν) = ∫ (x : α), f x ∂μ + ∫ (x : α), f x ∂ν

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
s : Set α
x✝ : MeasurableSet s
hμνs : μ s < ⊤ ∧ ν s < ⊤
⊢ weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s

Tactic:
rw [weightedSMul, weightedSMul, weightedSMul, ← add_smul, Measure.coe_add, Pi.add_apply,
  toReal_add hμνs.1.ne hμνs.2.ne]

Result:
no goals

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
⊢ setToFun (μ + ν) (weightedSMul (μ + ν)) ⋯ f = setToFun μ (weightedSMul μ) ⋯ f + setToFun ν (weightedSMul ν) ⋯ f

Tactic:
have hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν : Set α → G →L[ℝ] G) 1 :=
  DominatedFinMeasAdditive.add_measure_left μ ν (dominatedFinMeasAdditive_weightedSMul ν)
    zero_le_one

Result:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
⊢ setToFun (μ + ν) (weightedSMul (μ + ν)) ⋯ f = setToFun μ (weightedSMul μ) ⋯ f + setToFun ν (weightedSMul ν) ⋯ f

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
s : Set α
x✝ : MeasurableSet s
hμνs : (μ + ν) s < ⊤
⊢ weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s

Tactic:
rw [Measure.coe_add, Pi.add_apply, add_lt_top] at hμνs

Result:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
s : Set α
x✝ : MeasurableSet s
hμνs : μ s < ⊤ ∧ ν s < ⊤
⊢ weightedSMul (μ + ν) s = weightedSMul μ s + weightedSMul ν s

Proof state:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
⊢ setToFun (μ + ν) (weightedSMul (μ + ν)) ⋯ f = setToFun μ (weightedSMul μ) ⋯ f + setToFun ν (weightedSMul ν) ⋯ f

Tactic:
rw [← setToFun_congr_measure_of_add_right hμ_dfma
      (dominatedFinMeasAdditive_weightedSMul μ) f hfi,
  ← setToFun_congr_measure_of_add_left hν_dfma (dominatedFinMeasAdditive_weightedSMul ν) f hfi]

Result:
case pos
α : Type u_1
G : Type u_5
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace ℝ G
m : MeasurableSpace α
μ ν : Measure α
f : α → G
hμ : Integrable f μ
hν : Integrable f ν
hG : CompleteSpace G
hfi : Integrable f (μ + ν)
hμ_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul μ) 1
hν_dfma : DominatedFinMeasAdditive (μ + ν) (weightedSMul ν) 1
⊢ setToFun (μ + ν) (weightedSMul (μ + ν)) ⋯ f =
    setToFun (μ + ν) (weightedSMul μ) hμ_dfma f + setToFun (μ + ν) (weightedSMul ν) hν_dfma f