l3lab/ntp-mathlib huggingface dataset:
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
  

Proof state:
case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
x : α
hx :
  Tendsto
    (fun a =>
      (∫⁻ (y : α) in a,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ a)
    (filterAt v x) (𝓝 0)
h'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x
⊢ Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
apply hx.congr _
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
  apply hx.congr _
  

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
x : α
hx :
  Tendsto
    (fun a =>
      (∫⁻ (y : α) in a,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ a)
    (filterAt v x) (𝓝 0)
h'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x
⊢ ∀ (x_1 : Set α),
    (∫⁻ (y : α) in x_1,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ x_1 =
      (∫⁻ (y : α) in x_1, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ x_1

Next tactic:
intro a
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
  apply hx.congr _
  intro a
  

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
x : α
hx :
  Tendsto
    (fun a =>
      (∫⁻ (y : α) in a,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ a)
    (filterAt v x) (𝓝 0)
h'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x
a : Set α
⊢ (∫⁻ (y : α) in a,
        ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
              AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
      ↑↑μ a =
    (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a

Next tactic:
congr 1
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
  apply hx.congr _
  intro a
  congr 1
  

Proof state:
case e_a
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
x : α
hx :
  Tendsto
    (fun a =>
      (∫⁻ (y : α) in a,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ a)
    (filterAt v x) (𝓝 0)
h'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x
a : Set α
⊢ ∫⁻ (y : α) in a,
      ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
            AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ =
    ∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ

Next tactic:
apply lintegral_congr_ae
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
  apply hx.congr _
  intro a
  congr 1
  apply lintegral_congr_ae
  

Proof state:
case e_a.h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
x : α
hx :
  Tendsto
    (fun a =>
      (∫⁻ (y : α) in a,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ a)
    (filterAt v x) (𝓝 0)
h'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x
a : Set α
⊢ (fun a =>
      ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) a -
            AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊) =ᶠ[ae (Measure.restrict μ a)]
    fun a => ↑‖f a - f x‖₊

Next tactic:
apply ae_restrict_of_ae
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
  apply hx.congr _
  intro a
  congr 1
  apply lintegral_congr_ae
  apply ae_restrict_of_ae
  

Proof state:
case e_a.h.h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
x : α
hx :
  Tendsto
    (fun a =>
      (∫⁻ (y : α) in a,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ a)
    (filterAt v x) (𝓝 0)
h'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x
a : Set α
⊢ ∀ᵐ (x_1 : α) ∂μ,
    (fun a =>
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) a -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊)
        x_1 =
      (fun a => ↑‖f a - f x‖₊) x_1

Next tactic:
filter_upwards [hf.1.ae_eq_mk] with y hy
theorem ae_tendsto_lintegral_nnnorm_sub_div_of_integrable {f : α → E} (hf : Integrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  have I : Integrable (hf.1.mk f) μ := hf.congr hf.1.ae_eq_mk
  filter_upwards [v.ae_tendsto_lintegral_nnnorm_sub_div'_of_integrable I hf.1.stronglyMeasurable_mk,
    hf.1.ae_eq_mk] with x hx h'x
  apply hx.congr _
  intro a
  congr 1
  apply lintegral_congr_ae
  apply ae_restrict_of_ae
  filter_upwards [hf.1.ae_eq_mk] with y hy
  

Proof state:
case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : Integrable f
I : Integrable (AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ))
x : α
hx :
  Tendsto
    (fun a =>
      (∫⁻ (y : α) in a,
          ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
                AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ ∂μ) /
        ↑↑μ a)
    (filterAt v x) (𝓝 0)
h'x : f x = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x
a : Set α
y : α
hy : f y = AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y
⊢ ↑‖AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) y -
          AEStronglyMeasurable.mk f (_ : AEStronglyMeasurable f μ) x‖₊ =
    ↑‖f y - f x‖₊

Next tactic:
rw [hy, h'x]
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
    exact (integrable_indicator_iff (u_open n).measurableSet).2 (hu n)
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
⊢ ∀ (n : ℕ),
    ∀ᵐ (x : α) ∂μ,
      Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x)
        (𝓝 0)

Next tactic:
intro n
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
n : ℕ
⊢ ∀ᵐ (x : α) ∂μ,
    Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
    

Proof state:
case hf
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
n : ℕ
⊢ Integrable fun y => indicator (u n) f y

Next tactic:
exact (integrable_indicator_iff (u_open n).measurableSet).2 (hu n)
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
    exact (integrable_indicator_iff (u_open n).measurableSet).2 (hu n)
  

Proof state:
case intro.intro.intro
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
this :
  ∀ (n : ℕ),
    ∀ᵐ (x : α) ∂μ,
      Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x)
        (𝓝 0)
⊢ ∀ᵐ (x : α) ∂μ, Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
filter_upwards [ae_all_iff.2 this] with x hx
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
    exact (integrable_indicator_iff (u_open n).measurableSet).2 (hu n)
  filter_upwards [ae_all_iff.2 this] with x hx
  

Proof state:
case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
this :
  ∀ (n : ℕ),
    ∀ᵐ (x : α) ∂μ,
      Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x)
        (𝓝 0)
x : α
hx :
  ∀ (i : ℕ),
    Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u i) f y - indicator (u i) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)
⊢ Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
obtain ⟨n, hn⟩ : ∃ n, x ∈ u n := by simpa only [← u_univ, mem_iUnion] using mem_univ x
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
    exact (integrable_indicator_iff (u_open n).measurableSet).2 (hu n)
  filter_upwards [ae_all_iff.2 this] with x hx
  obtain ⟨n, hn⟩ : ∃ n, x ∈ u n := by 

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
this :
  ∀ (n : ℕ),
    ∀ᵐ (x : α) ∂μ,
      Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x)
        (𝓝 0)
x : α
hx :
  ∀ (i : ℕ),
    Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u i) f y - indicator (u i) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)
⊢ ∃ n, x ∈ u n

Next tactic:
simpa only [← u_univ, mem_iUnion] using mem_univ x
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
    exact (integrable_indicator_iff (u_open n).measurableSet).2 (hu n)
  filter_upwards [ae_all_iff.2 this] with x hx
  obtain ⟨n, hn⟩ : ∃ n, x ∈ u n := by simpa only [← u_univ, mem_iUnion] using mem_univ x
  

Proof state:
case h.intro
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
this :
  ∀ (n : ℕ),
    ∀ᵐ (x : α) ∂μ,
      Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x)
        (𝓝 0)
x : α
hx :
  ∀ (i : ℕ),
    Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u i) f y - indicator (u i) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)
n : ℕ
hn : x ∈ u n
⊢ Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)

Next tactic:
apply Tendsto.congr' _ (hx n)
theorem ae_tendsto_lintegral_nnnorm_sub_div {f : α → E} (hf : LocallyIntegrable f μ) :
    ∀ᵐ x ∂μ, Tendsto (fun a => (∫⁻ y in a, ‖f y - f x‖₊ ∂μ) / μ a) (v.filterAt x) (𝓝 0) := by
  rcases hf.exists_nat_integrableOn with ⟨u, u_open, u_univ, hu⟩
  have : ∀ n, ∀ᵐ x ∂μ,
      Tendsto (fun a => (∫⁻ y in a, ‖(u n).indicator f y - (u n).indicator f x‖₊ ∂μ) / μ a)
      (v.filterAt x) (𝓝 0) := by
    intro n
    apply ae_tendsto_lintegral_nnnorm_sub_div_of_integrable
    exact (integrable_indicator_iff (u_open n).measurableSet).2 (hu n)
  filter_upwards [ae_all_iff.2 this] with x hx
  obtain ⟨n, hn⟩ : ∃ n, x ∈ u n := by simpa only [← u_univ, mem_iUnion] using mem_univ x
  apply Tendsto.congr' _ (hx n)
  

Proof state:
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : Measure α
inst✝ : IsLocallyFiniteMeasure ρ
f : α → E
hf : LocallyIntegrable f
u : ℕ → Set α
u_open : ∀ (n : ℕ), IsOpen (u n)
u_univ : ⋃ n, u n = univ
hu : ∀ (n : ℕ), IntegrableOn f (u n)
this :
  ∀ (n : ℕ),
    ∀ᵐ (x : α) ∂μ,
      Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x)
        (𝓝 0)
x : α
hx :
  ∀ (i : ℕ),
    Tendsto (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u i) f y - indicator (u i) f x‖₊ ∂μ) / ↑↑μ a) (filterAt v x) (𝓝 0)
n : ℕ
hn : x ∈ u n
⊢ (fun a => (∫⁻ (y : α) in a, ↑‖indicator (u n) f y - indicator (u n) f x‖₊ ∂μ) / ↑↑μ a) =ᶠ[filterAt v x] fun a =>
    (∫⁻ (y : α) in a, ↑‖f y - f x‖₊ ∂μ) / ↑↑μ a

Next tactic:
filter_upwards [v.eventually_filterAt_subset_of_nhds ((u_open n).mem_nhds hn),
    v.eventually_filterAt_measurableSet x] with a ha h'a