l3lab/ntp-mathlib huggingface dataset:
theorem lintegral_add_right' (f : α → ℝ≥0∞) {g : α → ℝ≥0∞} (hg : AEMeasurable g μ) :
    ∫⁻ a, f a + g a ∂μ = ∫⁻ a, f a ∂μ + ∫⁻ a, g a ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hg : AEMeasurable g
⊢ ∫⁻ (a : α), f a + g a ∂μ = ∫⁻ (a : α), f a ∂μ + ∫⁻ (a : α), g a ∂μ

Next tactic:
simpa only [add_comm] using lintegral_add_left' hg f
@[simp]
theorem lintegral_smul_measure (c : ℝ≥0∞) (f : α → ℝ≥0∞) : ∫⁻ a, f a ∂c • μ = c * ∫⁻ a, f a ∂μ :=
  by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
f : α → ℝ≥0∞
⊢ ∫⁻ (a : α), f a ∂c • μ = c * ∫⁻ (a : α), f a ∂μ

Next tactic:
simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_smul, ENNReal.mul_iSup, smul_eq_mul]
lemma set_lintegral_smul_measure (c : ℝ≥0∞) (f : α → ℝ≥0∞) (s : Set α) :
    ∫⁻ a in s, f a ∂(c • μ) = c * ∫⁻ a in s, f a ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
c : ℝ≥0∞
f : α → ℝ≥0∞
s : Set α
⊢ ∫⁻ (a : α) in s, f a ∂c • μ = c * ∫⁻ (a : α) in s, f a ∂μ

Next tactic:
rw [Measure.restrict_smul, lintegral_smul_measure]
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ ∫⁻ (a : α), f a ∂Measure.sum μ = ∑' (i : ι), ∫⁻ (a : α), f a ∂μ i

Next tactic:
simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ ⨆ x, ⨆ s, ∑ i in s, SimpleFunc.lintegral (↑x) (μ i) = ⨆ s, ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)

Next tactic:
rw [iSup_comm]
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ ⨆ j, ⨆ i, ∑ i_1 in j, SimpleFunc.lintegral (↑i) (μ i_1) = ⨆ s, ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)

Next tactic:
congr
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; 

Proof state:
case e_s
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ (fun j => ⨆ i, ∑ i_1 in j, SimpleFunc.lintegral (↑i) (μ i_1)) = fun s =>
    ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)

Next tactic:
funext s
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; funext s
  

Proof state:
case e_s.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
s : Finset ι
⊢ ⨆ i, ∑ i_1 in s, SimpleFunc.lintegral (↑i) (μ i_1) = ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)

Next tactic:
induction' s using Finset.induction_on with i s hi hs
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; funext s
  induction' s using Finset.induction_on with i s hi hs
  · 

Proof state:
case e_s.h.empty
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ ⨆ i, ∑ i_1 in ∅, SimpleFunc.lintegral (↑i) (μ i_1) = ∑ a in ∅, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)

Next tactic:
apply bot_unique
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; funext s
  induction' s using Finset.induction_on with i s hi hs
  · apply bot_unique
    

Proof state:
case e_s.h.empty.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ ⨆ i, ∑ i_1 in ∅, SimpleFunc.lintegral (↑i) (μ i_1) ≤ ⊥

Next tactic:
simp
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; funext s
  induction' s using Finset.induction_on with i s hi hs
  · apply bot_unique
    simp
  

Proof state:
case e_s.h.insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
i : ι
s : Finset ι
hi : i ∉ s
hs : ⨆ i, ∑ i_1 in s, SimpleFunc.lintegral (↑i) (μ i_1) = ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)
⊢ ⨆ i_1, ∑ i in insert i s, SimpleFunc.lintegral (↑i_1) (μ i) = ∑ a in insert i s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)

Next tactic:
simp only [Finset.sum_insert hi, ← hs]
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; funext s
  induction' s using Finset.induction_on with i s hi hs
  · apply bot_unique
    simp
  simp only [Finset.sum_insert hi, ← hs]
  

Proof state:
case e_s.h.insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
i : ι
s : Finset ι
hi : i ∉ s
hs : ⨆ i, ∑ i_1 in s, SimpleFunc.lintegral (↑i) (μ i_1) = ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)
⊢ ⨆ i_1, SimpleFunc.lintegral (↑i_1) (μ i) + ∑ i in s, SimpleFunc.lintegral (↑i_1) (μ i) =
    (⨆ x, SimpleFunc.lintegral (↑x) (μ i)) + ⨆ i, ∑ i_1 in s, SimpleFunc.lintegral (↑i) (μ i_1)

Next tactic:
refine' (ENNReal.iSup_add_iSup _).symm
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; funext s
  induction' s using Finset.induction_on with i s hi hs
  · apply bot_unique
    simp
  simp only [Finset.sum_insert hi, ← hs]
  refine' (ENNReal.iSup_add_iSup _).symm
  

Proof state:
case e_s.h.insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
i : ι
s : Finset ι
hi : i ∉ s
hs : ⨆ i, ∑ i_1 in s, SimpleFunc.lintegral (↑i) (μ i_1) = ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)
⊢ ∀ (i_1 j : { i // ↑i ≤ fun a => f a }),
    ∃ k,
      SimpleFunc.lintegral (↑i_1) (μ i) + ∑ i in s, SimpleFunc.lintegral (↑j) (μ i) ≤
        SimpleFunc.lintegral (↑k) (μ i) + ∑ i in s, SimpleFunc.lintegral (↑k) (μ i)

Next tactic:
intro φ ψ
@[simp]
theorem lintegral_sum_measure {m : MeasurableSpace α} {ι} (f : α → ℝ≥0∞) (μ : ι → Measure α) :
    ∫⁻ a, f a ∂Measure.sum μ = ∑' i, ∫⁻ a, f a ∂μ i := by
  simp only [lintegral, iSup_subtype', SimpleFunc.lintegral_sum, ENNReal.tsum_eq_iSup_sum]
  rw [iSup_comm]
  congr; funext s
  induction' s using Finset.induction_on with i s hi hs
  · apply bot_unique
    simp
  simp only [Finset.sum_insert hi, ← hs]
  refine' (ENNReal.iSup_add_iSup _).symm
  intro φ ψ
  

Proof state:
case e_s.h.insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
m : MeasurableSpace α
ι : Type u_5
f : α → ℝ≥0∞
μ : ι → Measure α
i : ι
s : Finset ι
hi : i ∉ s
hs : ⨆ i, ∑ i_1 in s, SimpleFunc.lintegral (↑i) (μ i_1) = ∑ a in s, ⨆ x, SimpleFunc.lintegral (↑x) (μ a)
φ ψ : { i // ↑i ≤ fun a => f a }
⊢ ∃ k,
    SimpleFunc.lintegral (↑φ) (μ i) + ∑ i in s, SimpleFunc.lintegral (↑ψ) (μ i) ≤
      SimpleFunc.lintegral (↑k) (μ i) + ∑ i in s, SimpleFunc.lintegral (↑k) (μ i)

Next tactic:
exact
    ⟨⟨φ ⊔ ψ, fun x => sup_le (φ.2 x) (ψ.2 x)⟩,
      add_le_add (SimpleFunc.lintegral_mono le_sup_left le_rfl)
        (Finset.sum_le_sum fun j _ => SimpleFunc.lintegral_mono le_sup_right le_rfl)⟩
@[simp]
theorem lintegral_add_measure {m : MeasurableSpace α} (f : α → ℝ≥0∞) (μ ν : Measure α) :
    ∫⁻ a, f a ∂(μ + ν) = ∫⁻ a, f a ∂μ + ∫⁻ a, f a ∂ν := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν✝ : Measure α
m : MeasurableSpace α
f : α → ℝ≥0∞
μ ν : Measure α
⊢ ∫⁻ (a : α), f a ∂(μ + ν) = ∫⁻ (a : α), f a ∂μ + ∫⁻ (a : α), f a ∂ν

Next tactic:
simpa [tsum_fintype] using lintegral_sum_measure f fun b => cond b μ ν
@[simp]
theorem lintegral_finset_sum_measure {ι} {m : MeasurableSpace α} (s : Finset ι) (f : α → ℝ≥0∞)
    (μ : ι → Measure α) : ∫⁻ a, f a ∂(∑ i in s, μ i) = ∑ i in s, ∫⁻ a, f a ∂μ i := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_5
m : MeasurableSpace α
s : Finset ι
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ ∫⁻ (a : α), f a ∂∑ i in s, μ i = ∑ i in s, ∫⁻ (a : α), f a ∂μ i

Next tactic:
rw [← Measure.sum_coe_finset, lintegral_sum_measure, ← Finset.tsum_subtype']
@[simp]
theorem lintegral_finset_sum_measure {ι} {m : MeasurableSpace α} (s : Finset ι) (f : α → ℝ≥0∞)
    (μ : ι → Measure α) : ∫⁻ a, f a ∂(∑ i in s, μ i) = ∑ i in s, ∫⁻ a, f a ∂μ i := by
  rw [← Measure.sum_coe_finset, lintegral_sum_measure, ← Finset.tsum_subtype']
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_5
m : MeasurableSpace α
s : Finset ι
f : α → ℝ≥0∞
μ : ι → Measure α
⊢ ∑' (i : { x // x ∈ s }), ∫⁻ (a : α), f a ∂μ ↑i = ∑' (x : ↑↑s), ∫⁻ (a : α), f a ∂μ ↑x

Next tactic:
rfl
@[simp]
theorem lintegral_zero_measure {m : MeasurableSpace α} (f : α → ℝ≥0∞) :
    (∫⁻ a, f a ∂(0 : Measure α)) = 0 :=
  bot_unique <| by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ ν : Measure α
m : MeasurableSpace α
f : α → ℝ≥0∞
⊢ ∫⁻ (a : α), f a ∂0 ≤ ⊥

Next tactic:
simp [lintegral]
@[simp]
theorem lintegral_of_isEmpty {α} [MeasurableSpace α] [IsEmpty α] (μ : Measure α) (f : α → ℝ≥0∞) :
    ∫⁻ x, f x ∂μ = 0 := by 

Proof state:
α✝ : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α✝
μ✝ ν : Measure α✝
α : Type u_5
inst✝¹ : MeasurableSpace α
inst✝ : IsEmpty α
μ : Measure α
f : α → ℝ≥0∞
⊢ ∫⁻ (x : α), f x ∂μ = 0

Next tactic:
convert lintegral_zero_measure f
theorem set_lintegral_empty (f : α → ℝ≥0∞) : ∫⁻ x in ∅, f x ∂μ = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ∫⁻ (x : α) in ∅, f x ∂μ = 0

Next tactic:
rw [Measure.restrict_empty, lintegral_zero_measure]
theorem set_lintegral_univ (f : α → ℝ≥0∞) : ∫⁻ x in univ, f x ∂μ = ∫⁻ x, f x ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ∫⁻ (x : α) in univ, f x ∂μ = ∫⁻ (x : α), f x ∂μ

Next tactic:
rw [Measure.restrict_univ]
theorem set_lintegral_measure_zero (s : Set α) (f : α → ℝ≥0∞) (hs' : μ s = 0) :
    ∫⁻ x in s, f x ∂μ = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Set α
f : α → ℝ≥0∞
hs' : ↑↑μ s = 0
⊢ ∫⁻ (x : α) in s, f x ∂μ = 0

Next tactic:
convert lintegral_zero_measure _
theorem set_lintegral_measure_zero (s : Set α) (f : α → ℝ≥0∞) (hs' : μ s = 0) :
    ∫⁻ x in s, f x ∂μ = 0 := by
  convert lintegral_zero_measure _
  

Proof state:
case h.e'_2.h.e'_3.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Set α
f : α → ℝ≥0∞
hs' : ↑↑μ s = 0
⊢ Measure.restrict μ s = 0

Next tactic:
exact Measure.restrict_eq_zero.2 hs'
theorem lintegral_finset_sum' (s : Finset β) {f : β → α → ℝ≥0∞}
    (hf : ∀ b ∈ s, AEMeasurable (f b) μ) :
    ∫⁻ a, ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ a, f b a ∂μ := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
s : Finset β
f : β → α → ℝ≥0∞
hf : ∀ b ∈ s, AEMeasurable (f b)
⊢ ∫⁻ (a : α), ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ (a : α), f b a ∂μ

Next tactic:
induction' s using Finset.induction_on with a s has ih
theorem lintegral_finset_sum' (s : Finset β) {f : β → α → ℝ≥0∞}
    (hf : ∀ b ∈ s, AEMeasurable (f b) μ) :
    ∫⁻ a, ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ a, f b a ∂μ := by
  induction' s using Finset.induction_on with a s has ih
  · 

Proof state:
case empty
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : β → α → ℝ≥0∞
hf : ∀ b ∈ ∅, AEMeasurable (f b)
⊢ ∫⁻ (a : α), ∑ b in ∅, f b a ∂μ = ∑ b in ∅, ∫⁻ (a : α), f b a ∂μ

Next tactic:
simp
theorem lintegral_finset_sum' (s : Finset β) {f : β → α → ℝ≥0∞}
    (hf : ∀ b ∈ s, AEMeasurable (f b) μ) :
    ∫⁻ a, ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ a, f b a ∂μ := by
  induction' s using Finset.induction_on with a s has ih
  · simp
  · 

Proof state:
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : β → α → ℝ≥0∞
a : β
s : Finset β
has : a ∉ s
ih : (∀ b ∈ s, AEMeasurable (f b)) → ∫⁻ (a : α), ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ (a : α), f b a ∂μ
hf : ∀ b ∈ insert a s, AEMeasurable (f b)
⊢ ∫⁻ (a_1 : α), ∑ b in insert a s, f b a_1 ∂μ = ∑ b in insert a s, ∫⁻ (a : α), f b a ∂μ

Next tactic:
simp only [Finset.sum_insert has]
theorem lintegral_finset_sum' (s : Finset β) {f : β → α → ℝ≥0∞}
    (hf : ∀ b ∈ s, AEMeasurable (f b) μ) :
    ∫⁻ a, ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ a, f b a ∂μ := by
  induction' s using Finset.induction_on with a s has ih
  · simp
  · simp only [Finset.sum_insert has]
    

Proof state:
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : β → α → ℝ≥0∞
a : β
s : Finset β
has : a ∉ s
ih : (∀ b ∈ s, AEMeasurable (f b)) → ∫⁻ (a : α), ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ (a : α), f b a ∂μ
hf : ∀ b ∈ insert a s, AEMeasurable (f b)
⊢ ∫⁻ (a_1 : α), f a a_1 + ∑ b in s, f b a_1 ∂μ = ∫⁻ (a_1 : α), f a a_1 ∂μ + ∑ b in s, ∫⁻ (a : α), f b a ∂μ

Next tactic:
rw [Finset.forall_mem_insert] at hf
theorem lintegral_finset_sum' (s : Finset β) {f : β → α → ℝ≥0∞}
    (hf : ∀ b ∈ s, AEMeasurable (f b) μ) :
    ∫⁻ a, ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ a, f b a ∂μ := by
  induction' s using Finset.induction_on with a s has ih
  · simp
  · simp only [Finset.sum_insert has]
    rw [Finset.forall_mem_insert] at hf
    

Proof state:
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : β → α → ℝ≥0∞
a : β
s : Finset β
has : a ∉ s
ih : (∀ b ∈ s, AEMeasurable (f b)) → ∫⁻ (a : α), ∑ b in s, f b a ∂μ = ∑ b in s, ∫⁻ (a : α), f b a ∂μ
hf : AEMeasurable (f a) ∧ ∀ x ∈ s, AEMeasurable (f x)
⊢ ∫⁻ (a_1 : α), f a a_1 + ∑ b in s, f b a_1 ∂μ = ∫⁻ (a_1 : α), f a a_1 ∂μ + ∑ b in s, ∫⁻ (a : α), f b a ∂μ

Next tactic:
rw [lintegral_add_left' hf.1, ih hf.2]
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
⊢ ∫⁻ (a : α), r * f a ∂μ = ∫⁻ (a : α), ⨆ n, ↑(const α r * eapprox f n) a ∂μ

Next tactic:
congr
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      

Proof state:
case e_f
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
⊢ (fun a => r * f a) = fun a => ⨆ n, ↑(const α r * eapprox f n) a

Next tactic:
funext a
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      

Proof state:
case e_f.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
a : α
⊢ r * f a = ⨆ n, ↑(const α r * eapprox f n) a

Next tactic:
rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      

Proof state:
case e_f.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
a : α
⊢ ⨆ i, r * ↑(eapprox f i) a = ⨆ n, ↑(const α r * eapprox f n) a

Next tactic:
rfl
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
⊢ ∫⁻ (a : α), ⨆ n, ↑(const α r * eapprox f n) a ∂μ = ⨆ n, r * SimpleFunc.lintegral (eapprox f n) μ

Next tactic:
rw [lintegral_iSup]
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      rw [lintegral_iSup]
      · 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
⊢ ⨆ n, ∫⁻ (a : α), ↑(const α r * eapprox f n) a ∂μ = ⨆ n, r * SimpleFunc.lintegral (eapprox f n) μ

Next tactic:
congr
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      rw [lintegral_iSup]
      · congr
        

Proof state:
case e_s
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
⊢ (fun n => ∫⁻ (a : α), ↑(const α r * eapprox f n) a ∂μ) = fun n => r * SimpleFunc.lintegral (eapprox f n) μ

Next tactic:
funext n
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      rw [lintegral_iSup]
      · congr
        funext n
        

Proof state:
case e_s.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
n : ℕ
⊢ ∫⁻ (a : α), ↑(const α r * eapprox f n) a ∂μ = r * SimpleFunc.lintegral (eapprox f n) μ

Next tactic:
rw [← SimpleFunc.const_mul_lintegral, ← SimpleFunc.lintegral_eq_lintegral]
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      rw [lintegral_iSup]
      · congr
        funext n
        rw [← SimpleFunc.const_mul_lintegral, ← SimpleFunc.lintegral_eq_lintegral]
      · 

Proof state:
case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
⊢ ∀ (n : ℕ), Measurable fun a => ↑(const α r * eapprox f n) a

Next tactic:
intro n
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      rw [lintegral_iSup]
      · congr
        funext n
        rw [← SimpleFunc.const_mul_lintegral, ← SimpleFunc.lintegral_eq_lintegral]
      · intro n
        

Proof state:
case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
n : ℕ
⊢ Measurable fun a => ↑(const α r * eapprox f n) a

Next tactic:
exact SimpleFunc.measurable _
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      rw [lintegral_iSup]
      · congr
        funext n
        rw [← SimpleFunc.const_mul_lintegral, ← SimpleFunc.lintegral_eq_lintegral]
      · intro n
        exact SimpleFunc.measurable _
      · 

Proof state:
case h_mono
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
⊢ Monotone fun n a => ↑(const α r * eapprox f n) a

Next tactic:
intro i j h a
@[simp]
theorem lintegral_const_mul (r : ℝ≥0∞) {f : α → ℝ≥0∞} (hf : Measurable f) :
    ∫⁻ a, r * f a ∂μ = r * ∫⁻ a, f a ∂μ :=
  calc
    ∫⁻ a, r * f a ∂μ = ∫⁻ a, ⨆ n, (const α r * eapprox f n) a ∂μ := by
      congr
      funext a
      rw [← iSup_eapprox_apply f hf, ENNReal.mul_iSup]
      rfl
    _ = ⨆ n, r * (eapprox f n).lintegral μ := by
      rw [lintegral_iSup]
      · congr
        funext n
        rw [← SimpleFunc.const_mul_lintegral, ← SimpleFunc.lintegral_eq_lintegral]
      · intro n
        exact SimpleFunc.measurable _
      · intro i j h a
        

Proof state:
case h_mono
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
r : ℝ≥0∞
f : α → ℝ≥0∞
hf : Measurable f
i j : ℕ
h : i ≤ j
a : α
⊢ (fun n a => ↑(const α r * eapprox f n) a) i a ≤ (fun n a => ↑(const α r * eapprox f n) a) j a

Next tactic:
exact mul_le_mul_left' (monotone_eapprox _ h _) _