Theorem: MeasureTheory.ae_eq_of_ae_le_of_lintegral_le
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hfg : f ≤ᶠ[ae μ] g
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hg : AEMeasurable g μ
hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
⊢ f =ᶠ[ae μ] g
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hfg : f ≤ᶠ[ae μ] g
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hg : AEMeasurable g μ
hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
this : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, g x < f x + (↑n)⁻¹
⊢ f =ᶠ[ae μ] g
tactic: have : ∀ n : ℕ, ∀ᵐ x ∂μ, g x < f x + (n : ℝ≥0∞)⁻¹ := by
    intro n
    simp only [ae_iff, not_lt]
    have : ∫⁻ x, f x ∂μ + (↑n)⁻¹ * μ { x : α | f x + (n : ℝ≥0∞)⁻¹ ≤ g x } ≤ ∫⁻ x, f x ∂μ :=
      (lintegral_add_mul_meas_add_le_le_lintegral hfg hg n⁻¹).trans hgf
    rw [(ENNReal.cancel_of_ne hf).add_le_iff_nonpos_right, nonpos_iff_eq_zero, mul_eq_zero] at this
    exact this.resolve_left (ENNReal.inv_ne_zero.2 (ENNReal.natCast_ne_top _))
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hfg : f ≤ᶠ[ae μ] g
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hg : AEMeasurable g μ
hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
this : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, g x < f x + (↑n)⁻¹
⊢ f =ᶠ[ae μ] g
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hfg : f ≤ᶠ[ae μ] g
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hg : AEMeasurable g μ
hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
this : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, g x < f x + (↑n)⁻¹
x : α
hlt : ∀ (i : ℕ), g x < f x + (↑i)⁻¹
hle : f x ≤ g x
⊢ g x ≤ f x
tactic: refine hfg.mp ((ae_all_iff.2 this).mono fun x hlt hle => hle.antisymm ?_)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hfg : f ≤ᶠ[ae μ] g
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hg : AEMeasurable g μ
hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
this : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, g x < f x + (↑n)⁻¹
x : α
hlt : ∀ (i : ℕ), g x < f x + (↑i)⁻¹
hle : f x ≤ g x
⊢ g x ≤ f x
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hfg : f ≤ᶠ[ae μ] g
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hg : AEMeasurable g μ
hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
this : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, g x < f x + (↑n)⁻¹
x : α
hlt : ∀ (i : ℕ), g x < f x + (↑i)⁻¹
hle : f x ≤ g x
⊢ Tendsto (fun n => f x + (↑n)⁻¹) atTop (𝓝 (f x))
tactic: suffices Tendsto (fun n : ℕ => f x + (n : ℝ≥0∞)⁻¹) atTop (𝓝 (f x)) from
    ge_of_tendsto' this fun i => (hlt i).le
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
hfg : f ≤ᶠ[ae μ] g
hf : ∫⁻ (x : α), f x ∂μ ≠ ⊤
hg : AEMeasurable g μ
hgf : ∫⁻ (x : α), g x ∂μ ≤ ∫⁻ (x : α), f x ∂μ
this : ∀ (n : ℕ), ∀ᵐ (x : α) ∂μ, g x < f x + (↑n)⁻¹
x : α
hlt : ∀ (i : ℕ), g x < f x + (↑i)⁻¹
hle : f x ≤ g x
⊢ Tendsto (fun n => f x + (↑n)⁻¹) atTop (𝓝 (f x))
state_after: no goals
tactic: simpa only [inv_top, add_zero] using
    tendsto_const_nhds.add (ENNReal.tendsto_inv_iff.2 ENNReal.tendsto_nat_nhds_top)