α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
have : ε / 2 ≠ 0 := (ENNReal.half_pos ε0).ne'
case intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
rcases exists_pos_lintegral_lt_of_sigmaFinite μ this with ⟨w, wpos, wmeas, wint⟩
case intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
case intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
let f' x := ((f x + w x : ℝ≥0) : ℝ≥0∞)
case intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
case intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
rcases exists_le_lowerSemicontinuous_lintegral_ge μ f' (fmeas.add wmeas).coe_nnreal_ennreal
    this with
  ⟨g, le_g, gcont, gint⟩
case intro.intro.intro.intro.intro.intro.refine'_1
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
x : α
⊢ ↑(f x) < g x

case intro.intro.intro.intro.intro.intro.refine'_2
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
case intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
refine' ⟨g, fun x => _, gcont, _⟩
no goals
case intro.intro.intro.intro.intro.intro.refine'_1
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
x : α
⊢ ↑(f x) < g x
calc
  (f x : ℝ≥0∞) < f' x := by
    simpa only [← ENNReal.coe_lt_coe, add_zero] using add_lt_add_left (wpos x) (f x)
  _ ≤ g x := le_g x
no goals
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
x : α
⊢ ↑(f x) < f' x
simpa only [← ENNReal.coe_lt_coe, add_zero] using add_lt_add_left (wpos x) (f x)
no goals
case intro.intro.intro.intro.intro.intro.refine'_2
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε
calc
  (∫⁻ x : α, g x ∂μ) ≤ (∫⁻ x : α, f x + w x ∂μ) + ε / 2 := gint
  _ = ((∫⁻ x : α, f x ∂μ) + ∫⁻ x : α, w x ∂μ) + ε / 2 := by
    rw [lintegral_add_right _ wmeas.coe_nnreal_ennreal]
  _ ≤ (∫⁻ x : α, f x ∂μ) + ε / 2 + ε / 2 := (add_le_add_right (add_le_add_left wint.le _) _)
  _ = (∫⁻ x : α, f x ∂μ) + ε := by rw [add_assoc, ENNReal.add_halves]
no goals
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(f x) + ↑(w x) ∂μ) + ε / 2 = ((∫⁻ (x : α), ↑(f x) ∂μ) + ∫⁻ (x : α), ↑(w x) ∂μ) + ε / 2
rw [lintegral_add_right _ wmeas.coe_nnreal_ennreal]
no goals
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : Measurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
w : α → ℝ≥0
wpos : ∀ (x : α), 0 < w x
wmeas : Measurable w
wint : (∫⁻ (x : α), ↑(w x) ∂μ) < ε / 2
f' : α → ℝ≥0∞ := fun x => ↑(f x + w x)
g : α → ℝ≥0∞
le_g : ∀ (x : α), f' x ≤ g x
gcont : LowerSemicontinuous g
gint : (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), f' x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(f x) ∂μ) + ε / 2 + ε / 2 = (∫⁻ (x : α), ↑(f x) ∂μ) + ε
rw [add_assoc, ENNReal.add_halves]