l3lab/ntp-mathlib huggingface dataset:
theorem integral_toReal {f : α → ℝ≥0∞} (hfm : AEMeasurable f μ) (hf : ∀ᵐ x ∂μ, f x < ∞) :
    ∫ a, (f a).toReal ∂μ = (∫⁻ a, f a ∂μ).toReal := by
  rw [integral_eq_lintegral_of_nonneg_ae _ hfm.ennreal_toReal.aestronglyMeasurable]
  · rw [lintegral_congr_ae]; refine' hf.mp (eventually_of_forall _)
    intro x hx; 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∀ᵐ (x : α) ∂μ, f x < ⊤
x : α
hx : f x < ⊤
⊢ (fun a => ENNReal.ofReal (ENNReal.toReal (f a))) x = (fun a => f a) x

Next tactic:
rw [lt_top_iff_ne_top] at hx
theorem integral_toReal {f : α → ℝ≥0∞} (hfm : AEMeasurable f μ) (hf : ∀ᵐ x ∂μ, f x < ∞) :
    ∫ a, (f a).toReal ∂μ = (∫⁻ a, f a ∂μ).toReal := by
  rw [integral_eq_lintegral_of_nonneg_ae _ hfm.ennreal_toReal.aestronglyMeasurable]
  · rw [lintegral_congr_ae]; refine' hf.mp (eventually_of_forall _)
    intro x hx; rw [lt_top_iff_ne_top] at hx; 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∀ᵐ (x : α) ∂μ, f x < ⊤
x : α
hx : f x ≠ ⊤
⊢ (fun a => ENNReal.ofReal (ENNReal.toReal (f a))) x = (fun a => f a) x

Next tactic:
simp [hx]
theorem integral_toReal {f : α → ℝ≥0∞} (hfm : AEMeasurable f μ) (hf : ∀ᵐ x ∂μ, f x < ∞) :
    ∫ a, (f a).toReal ∂μ = (∫⁻ a, f a ∂μ).toReal := by
  rw [integral_eq_lintegral_of_nonneg_ae _ hfm.ennreal_toReal.aestronglyMeasurable]
  · rw [lintegral_congr_ae]; refine' hf.mp (eventually_of_forall _)
    intro x hx; rw [lt_top_iff_ne_top] at hx; simp [hx]
  · 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0∞
hfm : AEMeasurable f
hf : ∀ᵐ (x : α) ∂μ, f x < ⊤
⊢ 0 ≤ᵐ[μ] fun x => ENNReal.toReal (f x)

Next tactic:
exact eventually_of_forall fun x => ENNReal.toReal_nonneg
theorem lintegral_coe_le_coe_iff_integral_le {f : α → ℝ≥0} (hfi : Integrable (fun x => (f x : ℝ)) μ)
    {b : ℝ≥0} : ∫⁻ a, f a ∂μ ≤ b ↔ ∫ a, (f a : ℝ) ∂μ ≤ b := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0
hfi : Integrable fun x => ↑(f x)
b : ℝ≥0
⊢ ∫⁻ (a : α), ↑(f a) ∂μ ≤ ↑b ↔ ∫ (a : α), ↑(f a) ∂μ ≤ ↑b

Next tactic:
rw [lintegral_coe_eq_integral f hfi, ENNReal.ofReal, ENNReal.coe_le_coe,
    Real.toNNReal_le_iff_le_coe]
theorem integral_coe_le_of_lintegral_coe_le {f : α → ℝ≥0} {b : ℝ≥0} (h : ∫⁻ a, f a ∂μ ≤ b) :
    ∫ a, (f a : ℝ) ∂μ ≤ b := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0
b : ℝ≥0
h : ∫⁻ (a : α), ↑(f a) ∂μ ≤ ↑b
⊢ ∫ (a : α), ↑(f a) ∂μ ≤ ↑b

Next tactic:
by_cases hf : Integrable (fun a => (f a : ℝ)) μ
theorem integral_coe_le_of_lintegral_coe_le {f : α → ℝ≥0} {b : ℝ≥0} (h : ∫⁻ a, f a ∂μ ≤ b) :
    ∫ a, (f a : ℝ) ∂μ ≤ b := by
  by_cases hf : Integrable (fun a => (f a : ℝ)) μ
  · 

Proof state:
case pos
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0
b : ℝ≥0
h : ∫⁻ (a : α), ↑(f a) ∂μ ≤ ↑b
hf : Integrable fun a => ↑(f a)
⊢ ∫ (a : α), ↑(f a) ∂μ ≤ ↑b

Next tactic:
exact (lintegral_coe_le_coe_iff_integral_le hf).1 h
theorem integral_coe_le_of_lintegral_coe_le {f : α → ℝ≥0} {b : ℝ≥0} (h : ∫⁻ a, f a ∂μ ≤ b) :
    ∫ a, (f a : ℝ) ∂μ ≤ b := by
  by_cases hf : Integrable (fun a => (f a : ℝ)) μ
  · exact (lintegral_coe_le_coe_iff_integral_le hf).1 h
  · 

Proof state:
case neg
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0
b : ℝ≥0
h : ∫⁻ (a : α), ↑(f a) ∂μ ≤ ↑b
hf : ¬Integrable fun a => ↑(f a)
⊢ ∫ (a : α), ↑(f a) ∂μ ≤ ↑b

Next tactic:
rw [integral_undef hf]
theorem integral_coe_le_of_lintegral_coe_le {f : α → ℝ≥0} {b : ℝ≥0} (h : ∫⁻ a, f a ∂μ ≤ b) :
    ∫ a, (f a : ℝ) ∂μ ≤ b := by
  by_cases hf : Integrable (fun a => (f a : ℝ)) μ
  · exact (lintegral_coe_le_coe_iff_integral_le hf).1 h
  · rw [integral_undef hf]; 

Proof state:
case neg
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0
b : ℝ≥0
h : ∫⁻ (a : α), ↑(f a) ∂μ ≤ ↑b
hf : ¬Integrable fun a => ↑(f a)
⊢ 0 ≤ ↑b

Next tactic:
exact b.2
theorem integral_nonpos_of_ae {f : α → ℝ} (hf : f ≤ᵐ[μ] 0) : ∫ a, f a ∂μ ≤ 0 := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : f ≤ᵐ[μ] 0
⊢ ∫ (a : α), f a ∂μ ≤ 0

Next tactic:
have hf : 0 ≤ᵐ[μ] -f := hf.mono fun a h => by rwa [Pi.neg_apply, Pi.zero_apply, neg_nonneg]
theorem integral_nonpos_of_ae {f : α → ℝ} (hf : f ≤ᵐ[μ] 0) : ∫ a, f a ∂μ ≤ 0 := by
  have hf : 0 ≤ᵐ[μ] -f := hf.mono fun a h => by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : f ≤ᵐ[μ] 0
a : α
h : f a ≤ OfNat.ofNat 0 a
⊢ OfNat.ofNat 0 a ≤ (-f) a

Next tactic:
rwa [Pi.neg_apply, Pi.zero_apply, neg_nonneg]
theorem integral_nonpos_of_ae {f : α → ℝ} (hf : f ≤ᵐ[μ] 0) : ∫ a, f a ∂μ ≤ 0 := by
  have hf : 0 ≤ᵐ[μ] -f := hf.mono fun a h => by rwa [Pi.neg_apply, Pi.zero_apply, neg_nonneg]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf✝ : f ≤ᵐ[μ] 0
hf : 0 ≤ᵐ[μ] -f
⊢ ∫ (a : α), f a ∂μ ≤ 0

Next tactic:
have : 0 ≤ ∫ a, -f a ∂μ := integral_nonneg_of_ae hf
theorem integral_nonpos_of_ae {f : α → ℝ} (hf : f ≤ᵐ[μ] 0) : ∫ a, f a ∂μ ≤ 0 := by
  have hf : 0 ≤ᵐ[μ] -f := hf.mono fun a h => by rwa [Pi.neg_apply, Pi.zero_apply, neg_nonneg]
  have : 0 ≤ ∫ a, -f a ∂μ := integral_nonneg_of_ae hf
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf✝ : f ≤ᵐ[μ] 0
hf : 0 ≤ᵐ[μ] -f
this : 0 ≤ ∫ (a : α), -f a ∂μ
⊢ ∫ (a : α), f a ∂μ ≤ 0

Next tactic:
rwa [integral_neg, neg_nonneg] at this
theorem integral_eq_zero_iff_of_nonneg_ae {f : α → ℝ} (hf : 0 ≤ᵐ[μ] f) (hfi : Integrable f μ) :
    ∫ x, f x ∂μ = 0 ↔ f =ᵐ[μ] 0 := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : 0 ≤ᵐ[μ] f
hfi : Integrable f
⊢ ∫ (x : α), f x ∂μ = 0 ↔ f =ᵐ[μ] 0

Next tactic:
simp_rw [integral_eq_lintegral_of_nonneg_ae hf hfi.1, ENNReal.toReal_eq_zero_iff,
    ← ENNReal.not_lt_top, ← hasFiniteIntegral_iff_ofReal hf, hfi.2, not_true_eq_false, or_false_iff]
theorem integral_eq_zero_iff_of_nonneg_ae {f : α → ℝ} (hf : 0 ≤ᵐ[μ] f) (hfi : Integrable f μ) :
    ∫ x, f x ∂μ = 0 ↔ f =ᵐ[μ] 0 := by
  simp_rw [integral_eq_lintegral_of_nonneg_ae hf hfi.1, ENNReal.toReal_eq_zero_iff,
    ← ENNReal.not_lt_top, ← hasFiniteIntegral_iff_ofReal hf, hfi.2, not_true_eq_false, or_false_iff]
  -- Porting note: split into parts, to make `rw` and `simp` work
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : 0 ≤ᵐ[μ] f
hfi : Integrable f
⊢ ∫⁻ (a : α), ENNReal.ofReal (f a) ∂μ = 0 ↔ f =ᵐ[μ] 0

Next tactic:
rw [lintegral_eq_zero_iff']
theorem integral_eq_zero_iff_of_nonneg_ae {f : α → ℝ} (hf : 0 ≤ᵐ[μ] f) (hfi : Integrable f μ) :
    ∫ x, f x ∂μ = 0 ↔ f =ᵐ[μ] 0 := by
  simp_rw [integral_eq_lintegral_of_nonneg_ae hf hfi.1, ENNReal.toReal_eq_zero_iff,
    ← ENNReal.not_lt_top, ← hasFiniteIntegral_iff_ofReal hf, hfi.2, not_true_eq_false, or_false_iff]
  -- Porting note: split into parts, to make `rw` and `simp` work
  rw [lintegral_eq_zero_iff']
  · 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : 0 ≤ᵐ[μ] f
hfi : Integrable f
⊢ (fun a => ENNReal.ofReal (f a)) =ᵐ[μ] 0 ↔ f =ᵐ[μ] 0

Next tactic:
rw [← hf.le_iff_eq, Filter.EventuallyEq, Filter.EventuallyLE]
theorem integral_eq_zero_iff_of_nonneg_ae {f : α → ℝ} (hf : 0 ≤ᵐ[μ] f) (hfi : Integrable f μ) :
    ∫ x, f x ∂μ = 0 ↔ f =ᵐ[μ] 0 := by
  simp_rw [integral_eq_lintegral_of_nonneg_ae hf hfi.1, ENNReal.toReal_eq_zero_iff,
    ← ENNReal.not_lt_top, ← hasFiniteIntegral_iff_ofReal hf, hfi.2, not_true_eq_false, or_false_iff]
  -- Porting note: split into parts, to make `rw` and `simp` work
  rw [lintegral_eq_zero_iff']
  · rw [← hf.le_iff_eq, Filter.EventuallyEq, Filter.EventuallyLE]
    

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : 0 ≤ᵐ[μ] f
hfi : Integrable f
⊢ (∀ᵐ (x : α) ∂μ, ENNReal.ofReal (f x) = OfNat.ofNat 0 x) ↔ ∀ᵐ (x : α) ∂μ, f x ≤ OfNat.ofNat 0 x

Next tactic:
simp only [Pi.zero_apply, ofReal_eq_zero]
theorem integral_eq_zero_iff_of_nonneg_ae {f : α → ℝ} (hf : 0 ≤ᵐ[μ] f) (hfi : Integrable f μ) :
    ∫ x, f x ∂μ = 0 ↔ f =ᵐ[μ] 0 := by
  simp_rw [integral_eq_lintegral_of_nonneg_ae hf hfi.1, ENNReal.toReal_eq_zero_iff,
    ← ENNReal.not_lt_top, ← hasFiniteIntegral_iff_ofReal hf, hfi.2, not_true_eq_false, or_false_iff]
  -- Porting note: split into parts, to make `rw` and `simp` work
  rw [lintegral_eq_zero_iff']
  · rw [← hf.le_iff_eq, Filter.EventuallyEq, Filter.EventuallyLE]
    simp only [Pi.zero_apply, ofReal_eq_zero]
  · 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : 0 ≤ᵐ[μ] f
hfi : Integrable f
⊢ AEMeasurable fun a => ENNReal.ofReal (f a)

Next tactic:
exact (ENNReal.measurable_ofReal.comp_aemeasurable hfi.1.aemeasurable)
theorem integral_pos_iff_support_of_nonneg_ae {f : α → ℝ} (hf : 0 ≤ᵐ[μ] f) (hfi : Integrable f μ) :
    (0 < ∫ x, f x ∂μ) ↔ 0 < μ (Function.support f) := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : 0 ≤ᵐ[μ] f
hfi : Integrable f
⊢ 0 < ∫ (x : α), f x ∂μ ↔ 0 < ↑↑μ (Function.support f)

Next tactic:
simp_rw [(integral_nonneg_of_ae hf).lt_iff_ne, pos_iff_ne_zero, Ne.def, @eq_comm ℝ 0,
    integral_eq_zero_iff_of_nonneg_ae hf hfi, Filter.EventuallyEq, ae_iff, Pi.zero_apply,
    Function.support]
lemma integral_exp_pos {μ : Measure α} {f : α → ℝ} [hμ : NeZero μ]
    (hf : Integrable (fun x ↦ Real.exp (f x)) μ) :
    0 < ∫ x, Real.exp (f x) ∂μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ✝ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
μ : Measure α
f : α → ℝ
hμ : NeZero μ
hf : Integrable fun x => Real.exp (f x)
⊢ 0 < ∫ (x : α), Real.exp (f x) ∂μ

Next tactic:
rw [integral_pos_iff_support_of_nonneg (fun x ↦ (Real.exp_pos _).le) hf]
lemma integral_exp_pos {μ : Measure α} {f : α → ℝ} [hμ : NeZero μ]
    (hf : Integrable (fun x ↦ Real.exp (f x)) μ) :
    0 < ∫ x, Real.exp (f x) ∂μ := by
  rw [integral_pos_iff_support_of_nonneg (fun x ↦ (Real.exp_pos _).le) hf]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ✝ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
μ : Measure α
f : α → ℝ
hμ : NeZero μ
hf : Integrable fun x => Real.exp (f x)
⊢ 0 < ↑↑μ (Function.support fun x => Real.exp (f x))

Next tactic:
suffices (Function.support fun x ↦ Real.exp (f x)) = Set.univ by simp [this, hμ.out]
lemma integral_exp_pos {μ : Measure α} {f : α → ℝ} [hμ : NeZero μ]
    (hf : Integrable (fun x ↦ Real.exp (f x)) μ) :
    0 < ∫ x, Real.exp (f x) ∂μ := by
  rw [integral_pos_iff_support_of_nonneg (fun x ↦ (Real.exp_pos _).le) hf]
  suffices (Function.support fun x ↦ Real.exp (f x)) = Set.univ by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ✝ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
μ : Measure α
f : α → ℝ
hμ : NeZero μ
hf : Integrable fun x => Real.exp (f x)
this : (Function.support fun x => Real.exp (f x)) = univ
⊢ 0 < ↑↑μ (Function.support fun x => Real.exp (f x))

Next tactic:
simp [this, hμ.out]
lemma integral_exp_pos {μ : Measure α} {f : α → ℝ} [hμ : NeZero μ]
    (hf : Integrable (fun x ↦ Real.exp (f x)) μ) :
    0 < ∫ x, Real.exp (f x) ∂μ := by
  rw [integral_pos_iff_support_of_nonneg (fun x ↦ (Real.exp_pos _).le) hf]
  suffices (Function.support fun x ↦ Real.exp (f x)) = Set.univ by simp [this, hμ.out]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ✝ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
μ : Measure α
f : α → ℝ
hμ : NeZero μ
hf : Integrable fun x => Real.exp (f x)
⊢ (Function.support fun x => Real.exp (f x)) = univ

Next tactic:
ext1 x
lemma integral_exp_pos {μ : Measure α} {f : α → ℝ} [hμ : NeZero μ]
    (hf : Integrable (fun x ↦ Real.exp (f x)) μ) :
    0 < ∫ x, Real.exp (f x) ∂μ := by
  rw [integral_pos_iff_support_of_nonneg (fun x ↦ (Real.exp_pos _).le) hf]
  suffices (Function.support fun x ↦ Real.exp (f x)) = Set.univ by simp [this, hμ.out]
  ext1 x
  

Proof state:
case h
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ✝ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
μ : Measure α
f : α → ℝ
hμ : NeZero μ
hf : Integrable fun x => Real.exp (f x)
x : α
⊢ (x ∈ Function.support fun x => Real.exp (f x)) ↔ x ∈ univ

Next tactic:
simp only [Function.mem_support, ne_eq, (Real.exp_pos _).ne', not_false_eq_true, Set.mem_univ]
theorem L1.norm_eq_integral_norm (f : α →₁[μ] H) : ‖f‖ = ∫ a, ‖f a‖ ∂μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : SMulCommClass ℝ 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℝ F
inst✝⁵ : CompleteSpace F
G : Type u_5
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
H : Type u_7
inst✝ : NormedAddCommGroup H
f : ↥(Lp H 1)
⊢ ‖f‖ = ∫ (a : α), ‖↑↑f a‖ ∂μ

Next tactic:
simp only [snorm, snorm', ENNReal.one_toReal, ENNReal.rpow_one, Lp.norm_def, if_false,
    ENNReal.one_ne_top, one_ne_zero, _root_.div_one]
theorem L1.norm_eq_integral_norm (f : α →₁[μ] H) : ‖f‖ = ∫ a, ‖f a‖ ∂μ := by
  simp only [snorm, snorm', ENNReal.one_toReal, ENNReal.rpow_one, Lp.norm_def, if_false,
    ENNReal.one_ne_top, one_ne_zero, _root_.div_one]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹² : NormedAddCommGroup E
inst✝¹¹ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NormedSpace 𝕜 E
inst✝⁸ : SMulCommClass ℝ 𝕜 E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedSpace ℝ F
inst✝⁵ : CompleteSpace F
G : Type u_5
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝² : TopologicalSpace X
inst✝¹ : FirstCountableTopology X
H : Type u_7
inst✝ : NormedAddCommGroup H
f : ↥(Lp H 1)
⊢ ENNReal.toReal (∫⁻ (a : α), ↑‖↑↑f a‖₊ ∂μ) = ∫ (a : α), ‖↑↑f a‖ ∂μ

Next tactic:
rw [integral_eq_lintegral_of_nonneg_ae (eventually_of_forall (by simp [norm_nonneg]))
      (Lp.aestronglyMeasurable f).norm]