α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
⊢ (⨆ (n : ℕ),
      ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n),
        x * ∫⁻ (μ : Measure α), ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m) =
    ∫⁻ (μ : Measure α),
      ⨆ (n : ℕ), ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n), x * ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
⊢ (∫⁻ (x : α), f x ∂join m) = ∫⁻ (μ : Measure α), ∫⁻ (x : α), f x ∂μ ∂m
simp_rw [lintegral_eq_iSup_eapprox_lintegral hf, SimpleFunc.lintegral,
  join_apply (SimpleFunc.measurableSet_preimage _ _)]
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
    ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
⊢ ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),
    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →
      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →
        (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
intro s f hf hm
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
    ⨆ (n : ℕ), ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m

α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ ∀ (n : ℕ), Measurable fun μ => ∑ r in s n, r * f n r μ
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
    ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
rw [lintegral_iSup _ hm]
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ ∀ (n : ℕ), Measurable fun μ => ∑ r in s n, r * f n r μ

α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
    ⨆ (n : ℕ), ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
    ⨆ (n : ℕ), ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m

α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ ∀ (n : ℕ), Measurable fun μ => ∑ r in s n, r * f n r μ
swap
case e_s
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (fun n => ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) = fun n => ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
    ⨆ (n : ℕ), ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m
congr
case e_s.h
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
n : ℕ
⊢ (∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) = ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m
case e_s
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ (fun n => ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) = fun n => ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m
funext n
case e_s.h
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
n : ℕ
⊢ (∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) = ∑ b in s n, ∫⁻ (a : Measure α), b * f n b a ∂m

case e_s.h
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
n : ℕ
⊢ ∀ (b : ℝ≥0∞), b ∈ s n → Measurable fun a => b * f n b a
case e_s.h
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
n : ℕ
⊢ (∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) = ∫⁻ (a : Measure α), ∑ r in s n, r * f n r a ∂m
rw [lintegral_finset_sum (s n)]
case refine'_1
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
this :
  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),
    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →
      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →
        (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
⊢ ∀ (n : ℕ) (r : ℝ≥0∞), Measurable ((fun n r μ => ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {r})) n r)

case refine'_2
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
this :
  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),
    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →
      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →
        (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
⊢ Monotone fun n μ =>
    ∑ r in (fun n => SimpleFunc.range (SimpleFunc.eapprox f n)) n,
      r * (fun n r μ => ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {r})) n r μ
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
this :
  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),
    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →
      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →
        (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
⊢ (⨆ (n : ℕ),
      ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n),
        x * ∫⁻ (μ : Measure α), ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m) =
    ∫⁻ (μ : Measure α),
      ⨆ (n : ℕ), ∑ x in SimpleFunc.range (SimpleFunc.eapprox f n), x * ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {x}) ∂m
refine'
  this (fun n => SimpleFunc.range (SimpleFunc.eapprox f n))
    (fun n r μ => μ (SimpleFunc.eapprox f n ⁻¹' {r})) _ _
no goals
case refine'_1
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
this :
  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),
    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →
      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →
        (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
⊢ ∀ (n : ℕ) (r : ℝ≥0∞), Measurable ((fun n r μ => ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {r})) n r)
exact fun n r => measurable_coe (SimpleFunc.measurableSet_preimage _ _)
no goals
case refine'_2
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f : α → ℝ≥0∞
hf : Measurable f
this :
  ∀ (s : ℕ → Finset ℝ≥0∞) (f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞),
    (∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)) →
      (Monotone fun n μ => ∑ r in s n, r * f n r μ) →
        (⨆ (n : ℕ), ∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) =
          ∫⁻ (μ : Measure α), ⨆ (n : ℕ), ∑ r in s n, r * f n r μ ∂m
⊢ Monotone fun n μ =>
    ∑ r in (fun n => SimpleFunc.range (SimpleFunc.eapprox f n)) n,
      r * (fun n r μ => ↑↑μ (↑(SimpleFunc.eapprox f n) ⁻¹' {r})) n r μ
exact fun n m h μ => SimpleFunc.lintegral_mono (SimpleFunc.monotone_eapprox _ h) le_rfl
no goals
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
⊢ ∀ (n : ℕ), Measurable fun μ => ∑ r in s n, r * f n r μ
exact fun n => Finset.measurable_sum _ fun r _ => (hf _ _).const_mul _
no goals
case e_s.h
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
n : ℕ
⊢ (∑ r in s n, r * ∫⁻ (μ : Measure α), f n r μ ∂m) = ∑ b in s n, ∫⁻ (a : Measure α), b * f n b a ∂m
simp_rw [lintegral_const_mul _ (hf _ _)]
no goals
case e_s.h
α : Type u_1
β : Type ?u.8987
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
m : Measure (Measure α)
f✝ : α → ℝ≥0∞
hf✝ : Measurable f✝
s : ℕ → Finset ℝ≥0∞
f : ℕ → ℝ≥0∞ → Measure α → ℝ≥0∞
hf : ∀ (n : ℕ) (r : ℝ≥0∞), Measurable (f n r)
hm : Monotone fun n μ => ∑ r in s n, r * f n r μ
n : ℕ
⊢ ∀ (b : ℝ≥0∞), b ∈ s n → Measurable fun a => b * f n b a
exact fun r _ => (hf _ _).const_mul _