l3lab/ntp-mathlib huggingface dataset:
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  

Proof state:
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
⊢ 0 ≤ᵐ[μ] f

Next tactic:
let t := hf.sigmaFiniteSet
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  

Proof state:
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
⊢ 0 ≤ᵐ[μ] f

Next tactic:
suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  

Proof state:
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
⊢ 0 ≤ᵐ[Measure.restrict μ t] f

Next tactic:
haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
  

Proof state:
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
this : SigmaFinite (Measure.restrict μ t)
⊢ 0 ≤ᵐ[Measure.restrict μ t] f

Next tactic:
refine'
    ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite (fun s hs hμts => _) fun s hs hμts => _
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
  refine'
    ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite (fun s hs hμts => _) fun s hs hμts => _
  · 

Proof state:
case refine'_1
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
this : SigmaFinite (Measure.restrict μ t)
s : Set α
hs : MeasurableSet s
hμts : ↑↑(Measure.restrict μ t) s < ⊤
⊢ IntegrableOn f s

Next tactic:
rw [IntegrableOn, Measure.restrict_restrict hs]
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
  refine'
    ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite (fun s hs hμts => _) fun s hs hμts => _
  · rw [IntegrableOn, Measure.restrict_restrict hs]
    

Proof state:
case refine'_1
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
this : SigmaFinite (Measure.restrict μ t)
s : Set α
hs : MeasurableSet s
hμts : ↑↑(Measure.restrict μ t) s < ⊤
⊢ Integrable f

Next tactic:
rw [Measure.restrict_apply hs] at hμts
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
  refine'
    ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite (fun s hs hμts => _) fun s hs hμts => _
  · rw [IntegrableOn, Measure.restrict_restrict hs]
    rw [Measure.restrict_apply hs] at hμts
    

Proof state:
case refine'_1
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
this : SigmaFinite (Measure.restrict μ t)
s : Set α
hs : MeasurableSet s
hμts : ↑↑μ (s ∩ t) < ⊤
⊢ Integrable f

Next tactic:
exact hf_int_finite (s ∩ t) (hs.inter hf.measurableSet) hμts
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
  refine'
    ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite (fun s hs hμts => _) fun s hs hμts => _
  · rw [IntegrableOn, Measure.restrict_restrict hs]
    rw [Measure.restrict_apply hs] at hμts
    exact hf_int_finite (s ∩ t) (hs.inter hf.measurableSet) hμts
  · 

Proof state:
case refine'_2
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
this : SigmaFinite (Measure.restrict μ t)
s : Set α
hs : MeasurableSet s
hμts : ↑↑(Measure.restrict μ t) s < ⊤
⊢ 0 ≤ ∫ (x : α) in s, f x ∂Measure.restrict μ t

Next tactic:
rw [Measure.restrict_restrict hs]
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
  refine'
    ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite (fun s hs hμts => _) fun s hs hμts => _
  · rw [IntegrableOn, Measure.restrict_restrict hs]
    rw [Measure.restrict_apply hs] at hμts
    exact hf_int_finite (s ∩ t) (hs.inter hf.measurableSet) hμts
  · rw [Measure.restrict_restrict hs]
    

Proof state:
case refine'_2
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
this : SigmaFinite (Measure.restrict μ t)
s : Set α
hs : MeasurableSet s
hμts : ↑↑(Measure.restrict μ t) s < ⊤
⊢ 0 ≤ ∫ (x : α) in s ∩ t, f x ∂μ

Next tactic:
rw [Measure.restrict_apply hs] at hμts
theorem AEFinStronglyMeasurable.ae_nonneg_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf : AEFinStronglyMeasurable f μ)
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) : 0 ≤ᵐ[μ] f := by
  let t := hf.sigmaFiniteSet
  suffices 0 ≤ᵐ[μ.restrict t] f from
    ae_of_ae_restrict_of_ae_restrict_compl _ this hf.ae_eq_zero_compl.symm.le
  haveI : SigmaFinite (μ.restrict t) := hf.sigmaFinite_restrict
  refine'
    ae_nonneg_of_forall_set_integral_nonneg_of_sigmaFinite (fun s hs hμts => _) fun s hs hμts => _
  · rw [IntegrableOn, Measure.restrict_restrict hs]
    rw [Measure.restrict_apply hs] at hμts
    exact hf_int_finite (s ∩ t) (hs.inter hf.measurableSet) hμts
  · rw [Measure.restrict_restrict hs]
    rw [Measure.restrict_apply hs] at hμts
    

Proof state:
case refine'_2
α : 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✝ f : α → ℝ
hf : AEFinStronglyMeasurable f μ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α := sigmaFiniteSet hf
this : SigmaFinite (Measure.restrict μ t)
s : Set α
hs : MeasurableSet s
hμts : ↑↑μ (s ∩ t) < ⊤
⊢ 0 ≤ ∫ (x : α) in s ∩ t, f x ∂μ

Next tactic:
exact hf_zero (s ∩ t) (hs.inter hf.measurableSet) hμts
theorem ae_nonneg_restrict_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : 0 ≤ᵐ[μ.restrict t] f := by
  

Proof state:
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
⊢ 0 ≤ᵐ[Measure.restrict μ t] f

Next tactic:
refine'
    ae_nonneg_restrict_of_forall_set_integral_nonneg_inter
      (hf_int_finite t ht (lt_top_iff_ne_top.mpr hμt)) fun s hs _ => _
theorem ae_nonneg_restrict_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : 0 ≤ᵐ[μ.restrict t] f := by
  refine'
    ae_nonneg_restrict_of_forall_set_integral_nonneg_inter
      (hf_int_finite t ht (lt_top_iff_ne_top.mpr hμt)) fun s hs _ => _
  

Proof state:
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
s : Set α
hs : MeasurableSet s
x✝ : ↑↑μ (s ∩ t) < ⊤
⊢ 0 ≤ ∫ (x : α) in s ∩ t, f x ∂μ

Next tactic:
refine' hf_zero (s ∩ t) (hs.inter ht) _
theorem ae_nonneg_restrict_of_forall_set_integral_nonneg {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → 0 ≤ ∫ x in s, f x ∂μ) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : 0 ≤ᵐ[μ.restrict t] f := by
  refine'
    ae_nonneg_restrict_of_forall_set_integral_nonneg_inter
      (hf_int_finite t ht (lt_top_iff_ne_top.mpr hμt)) fun s hs _ => _
  refine' hf_zero (s ∩ t) (hs.inter ht) _
  

Proof state:
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → 0 ≤ ∫ (x : α) in s, f x ∂μ
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
s : Set α
hs : MeasurableSet s
x✝ : ↑↑μ (s ∩ t) < ⊤
⊢ ↑↑μ (s ∩ t) < ⊤

Next tactic:
exact (measure_mono (Set.inter_subset_right s t)).trans_lt (lt_top_iff_ne_top.mpr hμt)
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  

Proof state:
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
⊢ f =ᵐ[Measure.restrict μ t] 0

Next tactic:
suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
  

Proof state:
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
h_and : f ≤ᵐ[Measure.restrict μ t] 0 ∧ 0 ≤ᵐ[Measure.restrict μ t] f
⊢ f =ᵐ[Measure.restrict μ t] 0
case h_and
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
⊢ f ≤ᵐ[Measure.restrict μ t] 0 ∧ 0 ≤ᵐ[Measure.restrict μ t] f

Next tactic:
exact h_and.1.mp (h_and.2.mono fun x hx1 hx2 => le_antisymm hx2 hx1)
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
  exact h_and.1.mp (h_and.2.mono fun x hx1 hx2 => le_antisymm hx2 hx1)
  

Proof state:
case h_and
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
⊢ f ≤ᵐ[Measure.restrict μ t] 0 ∧ 0 ≤ᵐ[Measure.restrict μ t] f

Next tactic:
refine'
    ⟨_,
      ae_nonneg_restrict_of_forall_set_integral_nonneg hf_int_finite
        (fun s hs hμs => (hf_zero s hs hμs).symm.le) ht hμt⟩
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
  exact h_and.1.mp (h_and.2.mono fun x hx1 hx2 => le_antisymm hx2 hx1)
  refine'
    ⟨_,
      ae_nonneg_restrict_of_forall_set_integral_nonneg hf_int_finite
        (fun s hs hμs => (hf_zero s hs hμs).symm.le) ht hμt⟩
  

Proof state:
case h_and
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
⊢ f ≤ᵐ[Measure.restrict μ t] 0

Next tactic:
suffices h_neg : 0 ≤ᵐ[μ.restrict t] -f
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
  exact h_and.1.mp (h_and.2.mono fun x hx1 hx2 => le_antisymm hx2 hx1)
  refine'
    ⟨_,
      ae_nonneg_restrict_of_forall_set_integral_nonneg hf_int_finite
        (fun s hs hμs => (hf_zero s hs hμs).symm.le) ht hμt⟩
  suffices h_neg : 0 ≤ᵐ[μ.restrict t] -f
  · 

Proof state:
case h_and
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
h_neg : 0 ≤ᵐ[Measure.restrict μ t] -f
⊢ f ≤ᵐ[Measure.restrict μ t] 0

Next tactic:
refine' h_neg.mono fun x hx => _
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
  exact h_and.1.mp (h_and.2.mono fun x hx1 hx2 => le_antisymm hx2 hx1)
  refine'
    ⟨_,
      ae_nonneg_restrict_of_forall_set_integral_nonneg hf_int_finite
        (fun s hs hμs => (hf_zero s hs hμs).symm.le) ht hμt⟩
  suffices h_neg : 0 ≤ᵐ[μ.restrict t] -f
  · refine' h_neg.mono fun x hx => _
    

Proof state:
case h_and
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
h_neg : 0 ≤ᵐ[Measure.restrict μ t] -f
x : α
hx : OfNat.ofNat 0 x ≤ (-f) x
⊢ f x ≤ OfNat.ofNat 0 x

Next tactic:
rw [Pi.neg_apply] at hx
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
  exact h_and.1.mp (h_and.2.mono fun x hx1 hx2 => le_antisymm hx2 hx1)
  refine'
    ⟨_,
      ae_nonneg_restrict_of_forall_set_integral_nonneg hf_int_finite
        (fun s hs hμs => (hf_zero s hs hμs).symm.le) ht hμt⟩
  suffices h_neg : 0 ≤ᵐ[μ.restrict t] -f
  · refine' h_neg.mono fun x hx => _
    rw [Pi.neg_apply] at hx
    

Proof state:
case h_and
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
h_neg : 0 ≤ᵐ[Measure.restrict μ t] -f
x : α
hx : OfNat.ofNat 0 x ≤ -f x
⊢ f x ≤ OfNat.ofNat 0 x

Next tactic:
simpa using hx
theorem ae_eq_zero_restrict_of_forall_set_integral_eq_zero_real {f : α → ℝ}
    (hf_int_finite : ∀ s, MeasurableSet s → μ s < ∞ → IntegrableOn f s μ)
    (hf_zero : ∀ s, MeasurableSet s → μ s < ∞ → ∫ x in s, f x ∂μ = 0) {t : Set α}
    (ht : MeasurableSet t) (hμt : μ t ≠ ∞) : f =ᵐ[μ.restrict t] 0 := by
  suffices h_and : f ≤ᵐ[μ.restrict t] 0 ∧ 0 ≤ᵐ[μ.restrict t] f
  exact h_and.1.mp (h_and.2.mono fun x hx1 hx2 => le_antisymm hx2 hx1)
  refine'
    ⟨_,
      ae_nonneg_restrict_of_forall_set_integral_nonneg hf_int_finite
        (fun s hs hμs => (hf_zero s hs hμs).symm.le) ht hμt⟩
  suffices h_neg : 0 ≤ᵐ[μ.restrict t] -f
  · refine' h_neg.mono fun x hx => _
    rw [Pi.neg_apply] at hx
    simpa using hx
  

Proof state:
case h_neg
α : 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✝ f : α → ℝ
hf_int_finite : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → IntegrableOn f s
hf_zero : ∀ (s : Set α), MeasurableSet s → ↑↑μ s < ⊤ → ∫ (x : α) in s, f x ∂μ = 0
t : Set α
ht : MeasurableSet t
hμt : ↑↑μ t ≠ ⊤
⊢ 0 ≤ᵐ[Measure.restrict μ t] -f

Next tactic:
refine'
    ae_nonneg_restrict_of_forall_set_integral_nonneg (fun s hs hμs => (hf_int_finite s hs hμs).neg)
      (fun s hs hμs => _) ht hμt