case h_ind
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε

case h_add
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ g, (∀ (x : α), g x ≤ ↑f x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
induction' f using MeasureTheory.SimpleFunc.induction with c s hs f₁ f₂ _ h₁ h₂ generalizing ε
case pos
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε

case neg
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
case h_ind
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
by_cases hc : c = 0
case neg
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
case neg
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
have μs_lt_top : μ s < ∞ := by
  classical
  simpa only [hs, hc, lt_top_iff_ne_top, true_and_iff, SimpleFunc.coe_const, or_false_iff,
    lintegral_const, ENNReal.coe_indicator, Set.univ_inter, ENNReal.coe_ne_top,
    Measure.restrict_apply MeasurableSet.univ, ENNReal.mul_eq_top, SimpleFunc.const_zero,
    Function.const_apply, lintegral_indicator, ENNReal.coe_eq_zero, Ne.def, not_false_iff,
    SimpleFunc.coe_zero, Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise,
    false_and_iff] using int_f
case neg
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
case neg
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
have : (0 : ℝ≥0∞) < ε / c := ENNReal.div_pos_iff.2 ⟨ε0, ENNReal.coe_ne_top⟩
case neg.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
case neg
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
obtain ⟨F, Fs, F_closed, μF⟩ : ∃ (F : _), F ⊆ s ∧ IsClosed F ∧ μ s < μ F + ε / c :=
  hs.exists_isClosed_lt_add μs_lt_top.ne this.ne'
case neg.intro.intro.intro.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
x : α
⊢ Set.indicator F (fun x => c) x ≤ ↑(piecewise s hs (const α c) (const α 0)) x

case neg.intro.intro.intro.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤
    (∫⁻ (x : α), ↑(Set.indicator F (fun x => c) x) ∂μ) + ε
case neg.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
refine'
  ⟨Set.indicator F fun _ => c, fun x => _, F_closed.upperSemicontinuous_indicator (zero_le _),
    _⟩
case pos.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ ∀ (x : α), (fun x => 0) x ≤ ↑(piecewise s hs (const α c) (const α 0)) x

case pos.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑((fun x => 0) x) ∂μ) + ε
case pos
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(piecewise s hs (const α c) (const α 0)) x) ∧
      UpperSemicontinuous g ∧
        (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
refine' ⟨fun _ => 0, _, upperSemicontinuous_const, _⟩
no goals
case pos.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ ∀ (x : α), (fun x => 0) x ≤ ↑(piecewise s hs (const α c) (const α 0)) x
classical
simp only [hc, Set.indicator_zero', Pi.zero_apply, SimpleFunc.const_zero, imp_true_iff,
  eq_self_iff_true, SimpleFunc.coe_zero, Set.piecewise_eq_indicator,
  SimpleFunc.coe_piecewise, le_zero_iff]
no goals
case pos.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ ∀ (x : α), (fun x => 0) x ≤ ↑(piecewise s hs (const α c) (const α 0)) x
simp only [hc, Set.indicator_zero', Pi.zero_apply, SimpleFunc.const_zero, imp_true_iff,
  eq_self_iff_true, SimpleFunc.coe_zero, Set.piecewise_eq_indicator,
  SimpleFunc.coe_piecewise, le_zero_iff]
no goals
case pos.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑((fun x => 0) x) ∂μ) + ε
classical
simp only [hc, Set.indicator_zero', lintegral_const, MulZeroClass.zero_mul, Pi.zero_apply,
  SimpleFunc.const_zero, zero_add, zero_le', SimpleFunc.coe_zero,
  Set.piecewise_eq_indicator, ENNReal.coe_zero, SimpleFunc.coe_piecewise, zero_le]
no goals
case pos.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : c = 0
⊢ (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤ (∫⁻ (x : α), ↑((fun x => 0) x) ∂μ) + ε
simp only [hc, Set.indicator_zero', lintegral_const, MulZeroClass.zero_mul, Pi.zero_apply,
  SimpleFunc.const_zero, zero_add, zero_le', SimpleFunc.coe_zero,
  Set.piecewise_eq_indicator, ENNReal.coe_zero, SimpleFunc.coe_piecewise, zero_le]
no goals
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
⊢ ↑↑μ s < ⊤
classical
simpa only [hs, hc, lt_top_iff_ne_top, true_and_iff, SimpleFunc.coe_const, or_false_iff,
  lintegral_const, ENNReal.coe_indicator, Set.univ_inter, ENNReal.coe_ne_top,
  Measure.restrict_apply MeasurableSet.univ, ENNReal.mul_eq_top, SimpleFunc.const_zero,
  Function.const_apply, lintegral_indicator, ENNReal.coe_eq_zero, Ne.def, not_false_iff,
  SimpleFunc.coe_zero, Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise,
  false_and_iff] using int_f
no goals
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
⊢ ↑↑μ s < ⊤
simpa only [hs, hc, lt_top_iff_ne_top, true_and_iff, SimpleFunc.coe_const, or_false_iff,
  lintegral_const, ENNReal.coe_indicator, Set.univ_inter, ENNReal.coe_ne_top,
  Measure.restrict_apply MeasurableSet.univ, ENNReal.mul_eq_top, SimpleFunc.const_zero,
  Function.const_apply, lintegral_indicator, ENNReal.coe_eq_zero, Ne.def, not_false_iff,
  SimpleFunc.coe_zero, Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise,
  false_and_iff] using int_f
case neg.intro.intro.intro.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
x : α
⊢ Set.indicator F (fun x => c) x ≤ Set.piecewise s (Function.const α c) 0 x
case neg.intro.intro.intro.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
x : α
⊢ Set.indicator F (fun x => c) x ≤ ↑(piecewise s hs (const α c) (const α 0)) x
simp only [SimpleFunc.coe_const, SimpleFunc.const_zero, SimpleFunc.coe_zero,
  Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise]
no goals
case neg.intro.intro.intro.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
x : α
⊢ Set.indicator F (fun x => c) x ≤ Set.piecewise s (Function.const α c) 0 x
exact Set.indicator_le_indicator_of_subset Fs (fun x => zero_le _) _
case neg.intro.intro.intro.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ↑c * ↑↑μ s ≤ ↑c * ↑↑μ F + ε
case neg.intro.intro.intro.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤
    (∫⁻ (x : α), ↑(Set.indicator F (fun x => c) x) ∂μ) + ε
suffices (c : ℝ≥0∞) * μ s ≤ c * μ F + ε by
  classical
  simpa only [hs, F_closed.measurableSet, SimpleFunc.coe_const, Function.const_apply,
    lintegral_const, ENNReal.coe_indicator, Set.univ_inter, MeasurableSet.univ,
    SimpleFunc.const_zero, lintegral_indicator, SimpleFunc.coe_zero,
    Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise, Measure.restrict_apply]
no goals
case neg.intro.intro.intro.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ↑c * ↑↑μ s ≤ ↑c * ↑↑μ F + ε
calc
  (c : ℝ≥0∞) * μ s ≤ c * (μ F + ε / c) := mul_le_mul_left' μF.le _
  _ = c * μ F + ε := by
    simp_rw [mul_add]
    rw [ENNReal.mul_div_cancel' _ ENNReal.coe_ne_top]
    simpa using hc
no goals
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this✝ : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
this : ↑c * ↑↑μ s ≤ ↑c * ↑↑μ F + ε
⊢ (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤
    (∫⁻ (x : α), ↑(Set.indicator F (fun x => c) x) ∂μ) + ε
classical
simpa only [hs, F_closed.measurableSet, SimpleFunc.coe_const, Function.const_apply,
  lintegral_const, ENNReal.coe_indicator, Set.univ_inter, MeasurableSet.univ,
  SimpleFunc.const_zero, lintegral_indicator, SimpleFunc.coe_zero,
  Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise, Measure.restrict_apply]
no goals
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this✝ : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
this : ↑c * ↑↑μ s ≤ ↑c * ↑↑μ F + ε
⊢ (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≤
    (∫⁻ (x : α), ↑(Set.indicator F (fun x => c) x) ∂μ) + ε
simpa only [hs, F_closed.measurableSet, SimpleFunc.coe_const, Function.const_apply,
  lintegral_const, ENNReal.coe_indicator, Set.univ_inter, MeasurableSet.univ,
  SimpleFunc.const_zero, lintegral_indicator, SimpleFunc.coe_zero,
  Set.piecewise_eq_indicator, SimpleFunc.coe_piecewise, Measure.restrict_apply]
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ↑c * ↑↑μ F + ↑c * (ε / ↑c) = ↑c * ↑↑μ F + ε
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ↑c * (↑↑μ F + ε / ↑c) = ↑c * ↑↑μ F + ε
simp_rw [mul_add]
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ↑c ≠ 0
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ↑c * ↑↑μ F + ↑c * (ε / ↑c) = ↑c * ↑↑μ F + ε
rw [ENNReal.mul_div_cancel' _ ENNReal.coe_ne_top]
no goals
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
c : ℝ≥0
s : Set α
hs : MeasurableSet s
int_f : (∫⁻ (x : α), ↑(↑(piecewise s hs (const α c) (const α 0)) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
hc : ¬c = 0
μs_lt_top : ↑↑μ s < ⊤
this : 0 < ε / ↑c
F : Set α
Fs : F ⊆ s
F_closed : IsClosed F
μF : ↑↑μ s < ↑↑μ F + ε / ↑c
⊢ ↑c ≠ 0
simpa using hc
case h_add
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
case h_add
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
have A : ((∫⁻ x : α, f₁ x ∂μ) + ∫⁻ x : α, f₂ x ∂μ) ≠ ⊤ := by
  rwa [← lintegral_add_left f₁.measurable.coe_nnreal_ennreal]
case h_add.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
case h_add
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
rcases h₁ (ENNReal.add_ne_top.1 A).1 (ENNReal.half_pos ε0).ne' with
  ⟨g₁, f₁_le_g₁, g₁cont, g₁int⟩
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
case h_add.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
rcases h₂ (ENNReal.add_ne_top.1 A).2 (ENNReal.half_pos ε0).ne' with
  ⟨g₂, f₂_le_g₂, g₂cont, g₂int⟩
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑((fun x => g₁ x + g₂ x) x) ∂μ) + ε
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ∃ g,
    (∀ (x : α), g x ≤ ↑(f₁ + f₂) x) ∧
      UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
refine'
  ⟨fun x => g₁ x + g₂ x, fun x => add_le_add (f₁_le_g₁ x) (f₂_le_g₂ x), g₁cont.add g₂cont, _⟩
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(↑f₁ x) + ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) + ↑(g₂ x) ∂μ) + ε
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≤ (∫⁻ (x : α), ↑((fun x => g₁ x + g₂ x) x) ∂μ) + ε
simp only [SimpleFunc.coe_add, ENNReal.coe_add, Pi.add_apply]
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(↑f₁ a) ∂μ) + ∫⁻ (a : α), ↑(↑f₂ a) ∂μ) ≤ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + ε
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(↑f₁ x) + ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) + ↑(g₂ x) ∂μ) + ε
rw [lintegral_add_left f₁.measurable.coe_nnreal_ennreal,
  lintegral_add_left g₁cont.measurable.coe_nnreal_ennreal]
case h.e'_4
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + ε =
    (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2 + ((∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2)
case h_add.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(↑f₁ a) ∂μ) + ∫⁻ (a : α), ↑(↑f₂ a) ∂μ) ≤ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + ε
convert add_le_add g₁int g₂int using 1
case h.e'_4
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + ε =
    (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2 + ((∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2)
case h.e'_4
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + ε =
    (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2 + ((∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2)
simp only
case h.e'_4
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + (ε / 2 + ε / 2) =
    (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2 + ((∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2)
case h.e'_4
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + ε =
    (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2 + ((∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2)
conv_lhs => rw [← ENNReal.add_halves ε]
no goals
case h.e'_4
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
A : ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
g₁ : α → ℝ≥0
f₁_le_g₁ : ∀ (x : α), g₁ x ≤ ↑f₁ x
g₁cont : UpperSemicontinuous g₁
g₁int : (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2
g₂ : α → ℝ≥0
f₂_le_g₂ : ∀ (x : α), g₂ x ≤ ↑f₂ x
g₂cont : UpperSemicontinuous g₂
g₂int : (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2
⊢ ((∫⁻ (a : α), ↑(g₁ a) ∂μ) + ∫⁻ (a : α), ↑(g₂ a) ∂μ) + (ε / 2 + ε / 2) =
    (∫⁻ (x : α), ↑(g₁ x) ∂μ) + ε / 2 + ((∫⁻ (x : α), ↑(g₂ x) ∂μ) + ε / 2)
abel
no goals
α : Type u_1
inst✝³ : TopologicalSpace α
inst✝² : MeasurableSpace α
inst✝¹ : BorelSpace α
μ : Measure α
inst✝ : WeaklyRegular μ
f : α →ₛ ℝ≥0
int_f✝ : (∫⁻ (x : α), ↑(↑f x) ∂μ) ≠ ⊤
ε✝ : ℝ≥0∞
ε0✝ : ε✝ ≠ 0
f₁ f₂ : α →ₛ ℝ≥0
a✝ : Disjoint (Function.support ↑f₁) (Function.support ↑f₂)
h₁ :
  (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₁ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₁ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
h₂ :
  (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤ →
    ∀ {ε : ℝ≥0∞},
      ε ≠ 0 →
        ∃ g, (∀ (x : α), g x ≤ ↑f₂ x) ∧ UpperSemicontinuous g ∧ (∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≤ (∫⁻ (x : α), ↑(g x) ∂μ) + ε
int_f : (∫⁻ (x : α), ↑(↑(f₁ + f₂) x) ∂μ) ≠ ⊤
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ((∫⁻ (x : α), ↑(↑f₁ x) ∂μ) + ∫⁻ (x : α), ↑(↑f₂ x) ∂μ) ≠ ⊤
rwa [← lintegral_add_left f₁.measurable.coe_nnreal_ennreal]