Theorem: MeasureTheory.exists_lt_lowerSemicontinuous_lintegral_ge_of_aemeasurable
File: Mathlib/MeasureTheory/Integral/VitaliCaratheodory.lean

tactic: have : ε / 2 ≠ 0 := (ENNReal.half_pos ε0).ne'
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε

tactic: rcases exists_lt_lowerSemicontinuous_lintegral_ge μ (fmeas.mk f) fmeas.measurable_mk this with
  ⟨g0, f_lt_g0, g0_cont, g0_int⟩
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε

tactic: rcases exists_measurable_superset_of_null fmeas.ae_eq_mk with ⟨s, hs, smeas, μs⟩
state_before: case intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε

tactic: rcases exists_le_lowerSemicontinuous_lintegral_ge μ (s.indicator fun _x => ∞)
    (measurable_const.indicator smeas) this with
  ⟨g1, le_g1, g1_cont, g1_int⟩
state_before: case intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε

tactic: refine' ⟨fun x => g0 x + g1 x, fun x => _, g0_cont.add g1_cont, _⟩
state_before: case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
⊢ ∃ g, (∀ (x : α), ↑(f x) < g x) ∧ LowerSemicontinuous g ∧ (∫⁻ (x : α), g x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε

tactic: by_cases h : x ∈ s
state_before: case intro.intro.intro.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 : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
⊢ ↑(f x) < (fun x => g0 x + g1 x) x

tactic: have := le_g1 x
state_before: case pos
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : x ∈ s
⊢ ↑(f x) < (fun x => g0 x + g1 x) x

tactic: simp only [h, Set.indicator_of_mem, top_le_iff] at this
state_before: case pos
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this✝ : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : x ∈ s
this : Set.indicator s (fun _x => ⊤) x ≤ g1 x
⊢ ↑(f x) < (fun x => g0 x + g1 x) x

tactic: simp [this]
state_before: case pos
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this✝ : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : x ∈ s
this : g1 x = ⊤
⊢ ↑(f x) < (fun x => g0 x + g1 x) x

tactic: have : f x = fmeas.mk f x := by rw [Set.compl_subset_comm] at hs ; exact hs h
state_before: case neg
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : ¬x ∈ s
⊢ ↑(f x) < (fun x => g0 x + g1 x) x

tactic: rw [this]
state_before: case neg
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this✝ : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : ¬x ∈ s
this : f x = AEMeasurable.mk f fmeas x
⊢ ↑(f x) < (fun x => g0 x + g1 x) x

tactic: exact (f_lt_g0 x).trans_le le_self_add
state_before: case neg
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this✝ : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : ¬x ∈ s
this : f x = AEMeasurable.mk f fmeas x
⊢ ↑(AEMeasurable.mk f fmeas x) < (fun x => g0 x + g1 x) x

tactic: rw [Set.compl_subset_comm] at hs
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : ¬x ∈ s
⊢ f x = AEMeasurable.mk f fmeas x

tactic: exact hs h
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : sᶜ ⊆ {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
x : α
h : ¬x ∈ s
⊢ f x = AEMeasurable.mk f fmeas x

tactic: refine' add_le_add _ _
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
⊢ ((∫⁻ (x : α), g0 x ∂μ) + ∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε / 2 + (0 + ε / 2)

tactic: convert g0_int using 2
state_before: case refine'_1
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(f x) ∂μ) + ε / 2

tactic: exact lintegral_congr_ae (fmeas.ae_eq_mk.fun_comp _)
state_before: case h.e'_4.h.e'_5
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(f x) ∂μ) = ∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ

tactic: convert g1_int
state_before: case refine'_2
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), g1 x ∂μ) ≤ 0 + ε / 2

tactic: simp only [smeas, μs, lintegral_const, Set.univ_inter, MeasurableSet.univ,
  lintegral_indicator, MulZeroClass.mul_zero, restrict_apply]
state_before: case h.e'_4.h.e'_5
α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
⊢ 0 = ∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ

tactic: simp only [add_assoc, ENNReal.add_halves, zero_add]
state_before: α : Type u_1
inst✝⁴ : TopologicalSpace α
inst✝³ : MeasurableSpace α
inst✝² : BorelSpace α
μ : Measure α
inst✝¹ : WeaklyRegular μ
inst✝ : SigmaFinite μ
f : α → ℝ≥0
fmeas : AEMeasurable f
ε : ℝ≥0∞
ε0 : ε ≠ 0
this : ε / 2 ≠ 0
g0 : α → ℝ≥0∞
f_lt_g0 : ∀ (x : α), ↑(AEMeasurable.mk f fmeas x) < g0 x
g0_cont : LowerSemicontinuous g0
g0_int : (∫⁻ (x : α), g0 x ∂μ) ≤ (∫⁻ (x : α), ↑(AEMeasurable.mk f fmeas x) ∂μ) + ε / 2
s : Set α
hs : {x | (fun x => f x = AEMeasurable.mk f fmeas x) x}ᶜ ⊆ s
smeas : MeasurableSet s
μs : ↑↑μ s = 0
g1 : α → ℝ≥0∞
le_g1 : ∀ (x : α), Set.indicator s (fun _x => ⊤) x ≤ g1 x
g1_cont : LowerSemicontinuous g1
g1_int : (∫⁻ (x : α), g1 x ∂μ) ≤ (∫⁻ (x : α), Set.indicator s (fun _x => ⊤) x ∂μ) + ε / 2
⊢ (∫⁻ (x : α), ↑(f x) ∂μ) + ε / 2 + (0 + ε / 2) = (∫⁻ (x : α), ↑(f x) ∂μ) + ε