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

tactic: simp_rw [EventuallyLE, Pi.zero_apply]
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
⊢ 0 ≤ᵐ[μ] f

tactic: rw [ae_const_le_iff_forall_lt_measure_zero]
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
⊢ ∀ᵐ (x : α) ∂μ, 0 ≤ f x

tactic: intro b hb_neg
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
⊢ ∀ (b : ℝ), b < 0 → ↑↑μ {x | f x ≤ b} = 0

tactic: let s := {x | f x ≤ b}
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
⊢ ↑↑μ {x | f x ≤ b} = 0

tactic: have hs : MeasurableSet s := hfm.measurableSet_le stronglyMeasurable_const
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
⊢ ↑↑μ {x | f x ≤ b} = 0

tactic: have mus : μ s < ∞ := by
  let c : ℝ≥0 := ⟨|b|, abs_nonneg _⟩
  have c_pos : (c : ℝ≥0∞) ≠ 0 := by simpa [← NNReal.coe_eq_zero] using hb_neg.ne
  calc
    μ s ≤ μ {x | (c : ℝ≥0∞) ≤ ‖f x‖₊} := by
      apply measure_mono
      intro x hx
      simp only [Set.mem_setOf_eq] at hx
      simpa only [nnnorm, abs_of_neg hb_neg, abs_of_neg (hx.trans_lt hb_neg), Real.norm_eq_abs,
        Subtype.mk_le_mk, neg_le_neg_iff, Set.mem_setOf_eq, ENNReal.coe_le_coe, NNReal] using hx
    _ ≤ (∫⁻ x, ‖f x‖₊ ∂μ) / c :=
      (meas_ge_le_lintegral_div hfm.aemeasurable.ennnorm c_pos ENNReal.coe_ne_top)
    _ < ∞ := ENNReal.div_lt_top (ne_of_lt hf.2) c_pos
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
⊢ ↑↑μ {x | f x ≤ b} = 0

tactic: have h_int_gt : (∫ x in s, f x ∂μ) ≤ b * (μ s).toReal := by
  have h_const_le : (∫ x in s, f x ∂μ) ≤ ∫ _ in s, b ∂μ := by
    refine'
      set_integral_mono_ae_restrict hf.integrableOn (integrableOn_const.mpr (Or.inr mus)) _
    rw [EventuallyLE, ae_restrict_iff hs]
    exact eventually_of_forall fun x hxs => hxs
  rwa [set_integral_const, smul_eq_mul, mul_comm] at h_const_le
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
⊢ ↑↑μ {x | f x ≤ b} = 0

tactic: by_contra h
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
⊢ ↑↑μ {x | f x ≤ b} = 0

tactic: refine' (lt_self_iff_false (∫ x in s, f x ∂μ)).mp (h_int_gt.trans_lt _)
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
⊢ False

tactic: refine' (mul_neg_iff.mpr (Or.inr ⟨hb_neg, _⟩)).trans_le _
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
⊢ b * ENNReal.toReal (↑↑μ s) < ∫ (x : α) in s, f x ∂μ

tactic: swap
state_before: case refine'_1
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
⊢ 0 < ENNReal.toReal (↑↑μ s)

case refine'_2
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
⊢ 0 ≤ ∫ (x : α) in s, f x ∂μ

tactic: refine' ENNReal.toReal_nonneg.lt_of_ne fun h_eq => h _
state_before: case refine'_1
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
⊢ 0 < ENNReal.toReal (↑↑μ s)

tactic: cases' (ENNReal.toReal_eq_zero_iff _).mp h_eq.symm with hμs_eq_zero hμs_eq_top
state_before: case refine'_1
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
h_eq : 0 = ENNReal.toReal (↑↑μ s)
⊢ ↑↑μ {x | f x ≤ b} = 0

tactic: let c : ℝ≥0 := ⟨|b|, abs_nonneg _⟩
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
⊢ ↑↑μ s < ⊤

tactic: have c_pos : (c : ℝ≥0∞) ≠ 0 := by simpa [← NNReal.coe_eq_zero] using hb_neg.ne
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
c : ℝ≥0 := { val := abs b, property := (_ : 0 ≤ abs b) }
⊢ ↑↑μ s < ⊤

tactic: calc
  μ s ≤ μ {x | (c : ℝ≥0∞) ≤ ‖f x‖₊} := by
    apply measure_mono
    intro x hx
    simp only [Set.mem_setOf_eq] at hx
    simpa only [nnnorm, abs_of_neg hb_neg, abs_of_neg (hx.trans_lt hb_neg), Real.norm_eq_abs,
      Subtype.mk_le_mk, neg_le_neg_iff, Set.mem_setOf_eq, ENNReal.coe_le_coe, NNReal] using hx
  _ ≤ (∫⁻ x, ‖f x‖₊ ∂μ) / c :=
    (meas_ge_le_lintegral_div hfm.aemeasurable.ennnorm c_pos ENNReal.coe_ne_top)
  _ < ∞ := ENNReal.div_lt_top (ne_of_lt hf.2) c_pos
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
c : ℝ≥0 := { val := abs b, property := (_ : 0 ≤ abs b) }
c_pos : ↑c ≠ 0
⊢ ↑↑μ s < ⊤

tactic: simpa [← NNReal.coe_eq_zero] using hb_neg.ne
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
c : ℝ≥0 := { val := abs b, property := (_ : 0 ≤ abs b) }
⊢ ↑c ≠ 0

tactic: apply measure_mono
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
c : ℝ≥0 := { val := abs b, property := (_ : 0 ≤ abs b) }
c_pos : ↑c ≠ 0
⊢ ↑↑μ s ≤ ↑↑μ {x | ↑c ≤ ↑‖f x‖₊}

tactic: intro x hx
state_before: case h
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
c : ℝ≥0 := { val := abs b, property := (_ : 0 ≤ abs b) }
c_pos : ↑c ≠ 0
⊢ s ⊆ {x | ↑c ≤ ↑‖f x‖₊}

tactic: simp only [Set.mem_setOf_eq] at hx
state_before: case h
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
c : ℝ≥0 := { val := abs b, property := (_ : 0 ≤ abs b) }
c_pos : ↑c ≠ 0
x : α
hx : x ∈ s
⊢ x ∈ {x | ↑c ≤ ↑‖f x‖₊}

tactic: simpa only [nnnorm, abs_of_neg hb_neg, abs_of_neg (hx.trans_lt hb_neg), Real.norm_eq_abs,
  Subtype.mk_le_mk, neg_le_neg_iff, Set.mem_setOf_eq, ENNReal.coe_le_coe, NNReal] using hx
state_before: case h
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
c : ℝ≥0 := { val := abs b, property := (_ : 0 ≤ abs b) }
c_pos : ↑c ≠ 0
x : α
hx : f x ≤ b
⊢ x ∈ {x | ↑c ≤ ↑‖f x‖₊}

tactic: have h_const_le : (∫ x in s, f x ∂μ) ≤ ∫ _ in s, b ∂μ := by
  refine'
    set_integral_mono_ae_restrict hf.integrableOn (integrableOn_const.mpr (Or.inr mus)) _
  rw [EventuallyLE, ae_restrict_iff hs]
  exact eventually_of_forall fun x hxs => hxs
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
⊢ (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)

tactic: rwa [set_integral_const, smul_eq_mul, mul_comm] at h_const_le
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_const_le : (∫ (x : α) in s, f x ∂μ) ≤ ∫ (x : α) in s, b ∂μ
⊢ (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)

tactic: refine'
  set_integral_mono_ae_restrict hf.integrableOn (integrableOn_const.mpr (Or.inr mus)) _
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
⊢ (∫ (x : α) in s, f x ∂μ) ≤ ∫ (x : α) in s, b ∂μ

tactic: rw [EventuallyLE, ae_restrict_iff hs]
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
⊢ (fun x => f x) ≤ᵐ[Measure.restrict μ s] fun x => b

tactic: exact eventually_of_forall fun x hxs => hxs
state_before: α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
⊢ ∀ᵐ (x : α) ∂μ, x ∈ s → f x ≤ b

tactic: simp_rw [Measure.restrict_restrict hs]
state_before: case refine'_2
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
⊢ 0 ≤ ∫ (x : α) in s, f x ∂μ

tactic: exact hf_zero s hs mus
state_before: case refine'_2
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
⊢ 0 ≤ ∫ (x : α) in {x | f x ≤ b}, f x ∂μ

tactic: exact hμs_eq_zero
state_before: case refine'_1.inl
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
h_eq : 0 = ENNReal.toReal (↑↑μ s)
hμs_eq_zero : ↑↑μ s = 0
⊢ ↑↑μ {x | f x ≤ b} = 0

tactic: exact absurd hμs_eq_top mus.ne
state_before: case refine'_1.inr
α : Type u_1
E : Type ?u.69084
m m0 : MeasurableSpace α
μ : Measure α
s✝ t : Set α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
p : ℝ≥0∞
f : α → ℝ
hfm : StronglyMeasurable f
hf : Integrable f
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
b : ℝ
hb_neg : b < 0
s : Set α := {x | f x ≤ b}
hs : MeasurableSet s
mus : ↑↑μ s < ⊤
h_int_gt : (∫ (x : α) in s, f x ∂μ) ≤ b * ENNReal.toReal (↑↑μ s)
h : ¬↑↑μ {x | f x ≤ b} = 0
h_eq : 0 = ENNReal.toReal (↑↑μ s)
hμs_eq_top : ↑↑μ s = ⊤
⊢ ↑↑μ {x | f x ≤ b} = 0