Theorem: MeasureTheory.ae_nonneg_of_forall_setIntegral_nonneg
File: Mathlib/MeasureTheory/Function/AEEqOfIntegral.lean

tactic: rcases hf.1 with ⟨f', hf'_meas, hf_ae⟩
state_before: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
⊢ 0 ≤ᶠ[ae μ] f
state_after: case intro.intro
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
⊢ 0 ≤ᶠ[ae μ] f

tactic: have hf'_integrable : Integrable f' μ := Integrable.congr hf hf_ae
state_before: case intro.intro
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
⊢ 0 ≤ᶠ[ae μ] f
state_after: case intro.intro
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
⊢ 0 ≤ᶠ[ae μ] f

tactic: have hf'_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f' x ∂μ := by
  intro s hs h's
  rw [setIntegral_congr_ae hs (hf_ae.mono fun x hx _ => hx.symm)]
  exact hf_zero s hs h's
state_before: case intro.intro
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
⊢ 0 ≤ᶠ[ae μ] f
state_after: case intro.intro
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
hf'_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f' x ∂μ
⊢ 0 ≤ᶠ[ae μ] f

tactic: exact
  (ae_nonneg_of_forall_setIntegral_nonneg_of_stronglyMeasurable hf'_meas hf'_integrable
        hf'_zero).trans
    hf_ae.symm.le
state_before: case intro.intro
α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
hf'_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f' x ∂μ
⊢ 0 ≤ᶠ[ae μ] f
state_after: no goals

tactic: intro s hs h's
state_before: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
⊢ ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f' x ∂μ
state_after: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
s : Set α
hs : MeasurableSet s
h's : μ s < ⊤
⊢ 0 ≤ ∫ (x : α) in s, f' x ∂μ

tactic: rw [setIntegral_congr_ae hs (hf_ae.mono fun x hx _ => hx.symm)]
state_before: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
s : Set α
hs : MeasurableSet s
h's : μ s < ⊤
⊢ 0 ≤ ∫ (x : α) in s, f' x ∂μ
state_after: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
s : Set α
hs : MeasurableSet s
h's : μ s < ⊤
⊢ 0 ≤ ∫ (x : α) in s, f x ∂μ

tactic: exact hf_zero s hs h's
state_before: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hf : Integrable f μ
hf_zero : ∀ (s : Set α), MeasurableSet s → μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
f' : α → ℝ
hf'_meas : StronglyMeasurable f'
hf_ae : f =ᶠ[ae μ] f'
hf'_integrable : Integrable f' μ
s : Set α
hs : MeasurableSet s
h's : μ s < ⊤
⊢ 0 ≤ ∫ (x : α) in s, f x ∂μ
state_after: no goals