Theorem: MeasureTheory.tendsto_Lp_of_tendsto_ae
File: Mathlib/MeasureTheory/Function/UniformIntegrable.lean

tactic: have : ∀ n, snorm (f n - g) p μ = snorm ((hf n).mk (f n) - hg.1.mk g) p μ :=
  fun n => snorm_congr_ae ((hf n).ae_eq_mk.sub hg.1.ae_eq_mk)
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
⊢ Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)

tactic: simp_rw [this]
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
⊢ Tendsto (fun n => snorm (f n - g) p μ) atTop (𝓝 0)

tactic: refine' tendsto_Lp_of_tendsto_ae_of_meas μ hp hp' (fun n => (hf n).stronglyMeasurable_mk)
  hg.1.stronglyMeasurable_mk (hg.ae_eq hg.1.ae_eq_mk) (hui.ae_eq fun n => (hf n).ae_eq_mk) _
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
⊢ Tendsto
    (fun n =>
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ)
    atTop (𝓝 0)

tactic: have h_ae_forall_eq : ∀ᵐ x ∂μ, ∀ n, f n x = (hf n).mk (f n) x := by
  rw [ae_all_iff]
  exact fun n => (hf n).ae_eq_mk
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
⊢ ∀ᵐ (x : α) ∂μ,
    Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop
      (𝓝 (AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x))

tactic: filter_upwards [hfg, h_ae_forall_eq, hg.1.ae_eq_mk] with x hx_tendsto hxf_eq hxg_eq
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
h_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
⊢ ∀ᵐ (x : α) ∂μ,
    Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop
      (𝓝 (AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x))

tactic: rw [← hxg_eq]
state_before: case h
α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
h_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
x : α
hx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))
hxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
hxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x
⊢ Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop
    (𝓝 (AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x))

tactic: convert hx_tendsto using 1
state_before: case h
α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
h_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
x : α
hx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))
hxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
hxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x
⊢ Tendsto (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) atTop (𝓝 (g x))

tactic: ext1 n
state_before: case h.e'_3
α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
h_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
x : α
hx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))
hxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
hxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x
⊢ (fun n => AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x) = fun n => f n x

tactic: exact (hxf_eq n).symm
state_before: case h.e'_3.h
α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
h_ae_forall_eq : ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
x : α
hx_tendsto : Tendsto (fun n => f n x) atTop (𝓝 (g x))
hxf_eq : ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x
hxg_eq : g x = AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ) x
n : ℕ
⊢ AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x = f n x

tactic: rw [ae_all_iff]
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
⊢ ∀ᵐ (x : α) ∂μ, ∀ (n : ℕ), f n x = AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) x

tactic: exact fun n => (hf n).ae_eq_mk
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.487716
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup β
p : ℝ≥0∞
inst✝ : IsFiniteMeasure μ
hp : 1 ≤ p
hp' : p ≠ ⊤
f : ℕ → α → β
g : α → β
hf : ∀ (n : ℕ), AEStronglyMeasurable (f n) μ
hg : Memℒp g p
hui : UnifIntegrable f p μ
hfg : ∀ᵐ (x : α) ∂μ, Tendsto (fun n => f n x) atTop (𝓝 (g x))
this :
  ∀ (n : ℕ),
    snorm (f n - g) p μ =
      snorm
        (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) -
          AEStronglyMeasurable.mk g (_ : AEStronglyMeasurable g μ))
        p μ
⊢ ∀ (i : ℕ), ∀ᵐ (a : α) ∂μ, f i a = AEStronglyMeasurable.mk (f i) (_ : AEStronglyMeasurable (f i) μ) a