l3lab/ntp-mathlib huggingface dataset:
/-- This lemma is superceded by `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` where we
allow `p = ∞`. -/
theorem tendstoInMeasure_of_tendsto_snorm_of_ne_top (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ) {l : Filter ι}
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  refine' TendstoInMeasure.congr (fun i => (hf i).ae_eq_mk.symm) hg.ae_eq_mk.symm _
  refine' tendstoInMeasure_of_tendsto_snorm_of_stronglyMeasurable
    hp_ne_zero hp_ne_top (fun i => (hf i).stronglyMeasurable_mk) hg.stronglyMeasurable_mk _
  have : (fun n => snorm ((hf n).mk (f n) - hg.mk g) p μ) = fun n => snorm (f n - g) p μ := by
    

Proof state:
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : ι → α → E
g : α → E
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
l : Filter ι
hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)
⊢ (fun n =>
      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ) =
    fun n => snorm (f n - g) p μ

Next tactic:
ext1 n
/-- This lemma is superceded by `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` where we
allow `p = ∞`. -/
theorem tendstoInMeasure_of_tendsto_snorm_of_ne_top (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ) {l : Filter ι}
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  refine' TendstoInMeasure.congr (fun i => (hf i).ae_eq_mk.symm) hg.ae_eq_mk.symm _
  refine' tendstoInMeasure_of_tendsto_snorm_of_stronglyMeasurable
    hp_ne_zero hp_ne_top (fun i => (hf i).stronglyMeasurable_mk) hg.stronglyMeasurable_mk _
  have : (fun n => snorm ((hf n).mk (f n) - hg.mk g) p μ) = fun n => snorm (f n - g) p μ := by
    ext1 n; 

Proof state:
case h
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : ι → α → E
g : α → E
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
l : Filter ι
hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)
n : ι
⊢ snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ =
    snorm (f n - g) p μ

Next tactic:
refine' snorm_congr_ae (EventuallyEq.sub (hf n).ae_eq_mk.symm hg.ae_eq_mk.symm)
/-- This lemma is superceded by `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` where we
allow `p = ∞`. -/
theorem tendstoInMeasure_of_tendsto_snorm_of_ne_top (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ) {l : Filter ι}
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  refine' TendstoInMeasure.congr (fun i => (hf i).ae_eq_mk.symm) hg.ae_eq_mk.symm _
  refine' tendstoInMeasure_of_tendsto_snorm_of_stronglyMeasurable
    hp_ne_zero hp_ne_top (fun i => (hf i).stronglyMeasurable_mk) hg.stronglyMeasurable_mk _
  have : (fun n => snorm ((hf n).mk (f n) - hg.mk g) p μ) = fun n => snorm (f n - g) p μ := by
    ext1 n; refine' snorm_congr_ae (EventuallyEq.sub (hf n).ae_eq_mk.symm hg.ae_eq_mk.symm)
  

Proof state:
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : ι → α → E
g : α → E
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
l : Filter ι
hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)
this :
  (fun n =>
      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ) =
    fun n => snorm (f n - g) p μ
⊢ Tendsto
    (fun n =>
      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ)
    l (𝓝 0)

Next tactic:
rw [this]
/-- This lemma is superceded by `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` where we
allow `p = ∞`. -/
theorem tendstoInMeasure_of_tendsto_snorm_of_ne_top (hp_ne_zero : p ≠ 0) (hp_ne_top : p ≠ ∞)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ) {l : Filter ι}
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  refine' TendstoInMeasure.congr (fun i => (hf i).ae_eq_mk.symm) hg.ae_eq_mk.symm _
  refine' tendstoInMeasure_of_tendsto_snorm_of_stronglyMeasurable
    hp_ne_zero hp_ne_top (fun i => (hf i).stronglyMeasurable_mk) hg.stronglyMeasurable_mk _
  have : (fun n => snorm ((hf n).mk (f n) - hg.mk g) p μ) = fun n => snorm (f n - g) p μ := by
    ext1 n; refine' snorm_congr_ae (EventuallyEq.sub (hf n).ae_eq_mk.symm hg.ae_eq_mk.symm)
  rw [this]
  

Proof state:
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : ι → α → E
g : α → E
hp_ne_zero : p ≠ 0
hp_ne_top : p ≠ ⊤
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
l : Filter ι
hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)
this :
  (fun n =>
      snorm (AEStronglyMeasurable.mk (f n) (_ : AEStronglyMeasurable (f n) μ) - AEStronglyMeasurable.mk g hg) p μ) =
    fun n => snorm (f n - g) p μ
⊢ Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)

Next tactic:
exact hfg
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
hfg : Tendsto (fun n => snorm (f n - g) ⊤ μ) l (𝓝 0)
⊢ TendstoInMeasure μ f l g

Next tactic:
intro δ hδ
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
hfg : Tendsto (fun n => snorm (f n - g) ⊤ μ) l (𝓝 0)
δ : ℝ
hδ : 0 < δ
⊢ Tendsto (fun i => ↑↑μ {x | δ ≤ dist (f i x) (g x)}) l (𝓝 0)

Next tactic:
simp only [snorm_exponent_top, snormEssSup] at hfg
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
hfg : Tendsto (fun n => essSup (fun x => ↑‖(f n - g) x‖₊) μ) l (𝓝 0)
⊢ Tendsto (fun i => ↑↑μ {x | δ ≤ dist (f i x) (g x)}) l (𝓝 0)

Next tactic:
rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
hfg : ∀ ε > 0, ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ε
⊢ ∀ ε > 0, ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | δ ≤ dist (f x x_1) (g x_1)} ≤ ε

Next tactic:
intro ε hε
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
hfg : ∀ ε > 0, ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ε
ε : ℝ≥0∞
hε : ε > 0
⊢ ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | δ ≤ dist (f x x_1) (g x_1)} ≤ ε

Next tactic:
specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
ε : ℝ≥0∞
hε : ε > 0
hfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ENNReal.ofReal δ / 2
⊢ ∀ᶠ (x : ι) in l, ↑↑μ {x_1 | δ ≤ dist (f x x_1) (g x_1)} ≤ ε

Next tactic:
refine' hfg.mono fun n hn => _
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
  refine' hfg.mono fun n hn => _
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
ε : ℝ≥0∞
hε : ε > 0
hfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖(f x - g) x_1‖₊) μ ≤ ENNReal.ofReal δ / 2
n : ι
hn : essSup (fun x => ↑‖(f n - g) x‖₊) μ ≤ ENNReal.ofReal δ / 2
⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} ≤ ε

Next tactic:
simp only [true_and_iff, gt_iff_lt, ge_iff_le, zero_tsub, zero_le, zero_add, Set.mem_Icc,
    Pi.sub_apply] at *
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
  refine' hfg.mono fun n hn => _
  simp only [true_and_iff, gt_iff_lt, ge_iff_le, zero_tsub, zero_le, zero_add, Set.mem_Icc,
    Pi.sub_apply] at *
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
ε : ℝ≥0∞
hfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2
n : ι
hn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2
hε : 0 < ε
⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} ≤ ε

Next tactic:
have : essSup (fun x : α => (‖f n x - g x‖₊ : ℝ≥0∞)) μ < ENNReal.ofReal δ :=
    lt_of_le_of_lt hn
      (ENNReal.half_lt_self (ENNReal.ofReal_pos.2 hδ).ne.symm ENNReal.ofReal_lt_top.ne)
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
  refine' hfg.mono fun n hn => _
  simp only [true_and_iff, gt_iff_lt, ge_iff_le, zero_tsub, zero_le, zero_add, Set.mem_Icc,
    Pi.sub_apply] at *
  have : essSup (fun x : α => (‖f n x - g x‖₊ : ℝ≥0∞)) μ < ENNReal.ofReal δ :=
    lt_of_le_of_lt hn
      (ENNReal.half_lt_self (ENNReal.ofReal_pos.2 hδ).ne.symm ENNReal.ofReal_lt_top.ne)
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
ε : ℝ≥0∞
hfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2
n : ι
hn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2
hε : 0 < ε
this : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ
⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} ≤ ε

Next tactic:
refine' ((le_of_eq _).trans (ae_lt_of_essSup_lt this).le).trans hε.le
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
  refine' hfg.mono fun n hn => _
  simp only [true_and_iff, gt_iff_lt, ge_iff_le, zero_tsub, zero_le, zero_add, Set.mem_Icc,
    Pi.sub_apply] at *
  have : essSup (fun x : α => (‖f n x - g x‖₊ : ℝ≥0∞)) μ < ENNReal.ofReal δ :=
    lt_of_le_of_lt hn
      (ENNReal.half_lt_self (ENNReal.ofReal_pos.2 hδ).ne.symm ENNReal.ofReal_lt_top.ne)
  refine' ((le_of_eq _).trans (ae_lt_of_essSup_lt this).le).trans hε.le
  

Proof state:
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
ε : ℝ≥0∞
hfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2
n : ι
hn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2
hε : 0 < ε
this : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ
⊢ ↑↑μ {x | δ ≤ dist (f n x) (g x)} = ↑↑μ {x | (fun y => ↑‖f n y - g y‖₊ < ENNReal.ofReal δ) x}ᶜ

Next tactic:
congr with x
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
  refine' hfg.mono fun n hn => _
  simp only [true_and_iff, gt_iff_lt, ge_iff_le, zero_tsub, zero_le, zero_add, Set.mem_Icc,
    Pi.sub_apply] at *
  have : essSup (fun x : α => (‖f n x - g x‖₊ : ℝ≥0∞)) μ < ENNReal.ofReal δ :=
    lt_of_le_of_lt hn
      (ENNReal.half_lt_self (ENNReal.ofReal_pos.2 hδ).ne.symm ENNReal.ofReal_lt_top.ne)
  refine' ((le_of_eq _).trans (ae_lt_of_essSup_lt this).le).trans hε.le
  congr with x
  

Proof state:
case e_a.h
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
ε : ℝ≥0∞
hfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2
n : ι
hn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2
hε : 0 < ε
this : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ
x : α
⊢ x ∈ {x | δ ≤ dist (f n x) (g x)} ↔ x ∈ {x | (fun y => ↑‖f n y - g y‖₊ < ENNReal.ofReal δ) x}ᶜ

Next tactic:
simp only [ENNReal.ofReal_le_iff_le_toReal ENNReal.coe_lt_top.ne, ENNReal.coe_toReal, not_lt,
    coe_nnnorm, Set.mem_setOf_eq, Set.mem_compl_iff]
/-- See also `MeasureTheory.tendstoInMeasure_of_tendsto_snorm` which work for general
Lp-convergence for all `p ≠ 0`. -/
theorem tendstoInMeasure_of_tendsto_snorm_top {E} [NormedAddCommGroup E] {f : ι → α → E} {g : α → E}
    {l : Filter ι} (hfg : Tendsto (fun n => snorm (f n - g) ∞ μ) l (𝓝 0)) :
    TendstoInMeasure μ f l g := by
  intro δ hδ
  simp only [snorm_exponent_top, snormEssSup] at hfg
  rw [ENNReal.tendsto_nhds_zero] at hfg ⊢
  intro ε hε
  specialize hfg (ENNReal.ofReal δ / 2)
      (ENNReal.div_pos_iff.2 ⟨(ENNReal.ofReal_pos.2 hδ).ne.symm, ENNReal.two_ne_top⟩)
  refine' hfg.mono fun n hn => _
  simp only [true_and_iff, gt_iff_lt, ge_iff_le, zero_tsub, zero_le, zero_add, Set.mem_Icc,
    Pi.sub_apply] at *
  have : essSup (fun x : α => (‖f n x - g x‖₊ : ℝ≥0∞)) μ < ENNReal.ofReal δ :=
    lt_of_le_of_lt hn
      (ENNReal.half_lt_self (ENNReal.ofReal_pos.2 hδ).ne.symm ENNReal.ofReal_lt_top.ne)
  refine' ((le_of_eq _).trans (ae_lt_of_essSup_lt this).le).trans hε.le
  congr with x
  simp only [ENNReal.ofReal_le_iff_le_toReal ENNReal.coe_lt_top.ne, ENNReal.coe_toReal, not_lt,
    coe_nnnorm, Set.mem_setOf_eq, Set.mem_compl_iff]
  

Proof state:
case e_a.h
α : Type u_1
ι : Type u_2
E✝ : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝¹ : NormedAddCommGroup E✝
p : ℝ≥0∞
f✝ : ι → α → E✝
g✝ : α → E✝
E : Type u_4
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
δ : ℝ
hδ : 0 < δ
ε : ℝ≥0∞
hfg : ∀ᶠ (x : ι) in l, essSup (fun x_1 => ↑‖f x x_1 - g x_1‖₊) μ ≤ ENNReal.ofReal δ / 2
n : ι
hn : essSup (fun x => ↑‖f n x - g x‖₊) μ ≤ ENNReal.ofReal δ / 2
hε : 0 < ε
this : essSup (fun x => ↑‖f n x - g x‖₊) μ < ENNReal.ofReal δ
x : α
⊢ δ ≤ dist (f n x) (g x) ↔ δ ≤ ‖f n x - g x‖

Next tactic:
rw [← dist_eq_norm (f n x) (g x)]
/-- Convergence in Lp implies convergence in measure. -/
theorem tendstoInMeasure_of_tendsto_snorm {l : Filter ι} (hp_ne_zero : p ≠ 0)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ)
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  

Proof state:
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : ι → α → E
g : α → E
l : Filter ι
hp_ne_zero : p ≠ 0
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)
⊢ TendstoInMeasure μ f l g

Next tactic:
by_cases hp_ne_top : p = ∞
/-- Convergence in Lp implies convergence in measure. -/
theorem tendstoInMeasure_of_tendsto_snorm {l : Filter ι} (hp_ne_zero : p ≠ 0)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ)
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  by_cases hp_ne_top : p = ∞
  · 

Proof state:
case pos
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : ι → α → E
g : α → E
l : Filter ι
hp_ne_zero : p ≠ 0
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)
hp_ne_top : p = ⊤
⊢ TendstoInMeasure μ f l g

Next tactic:
subst hp_ne_top
/-- Convergence in Lp implies convergence in measure. -/
theorem tendstoInMeasure_of_tendsto_snorm {l : Filter ι} (hp_ne_zero : p ≠ 0)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ)
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  by_cases hp_ne_top : p = ∞
  · subst hp_ne_top
    

Proof state:
case pos
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
f : ι → α → E
g : α → E
l : Filter ι
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
hp_ne_zero : ⊤ ≠ 0
hfg : Tendsto (fun n => snorm (f n - g) ⊤ μ) l (𝓝 0)
⊢ TendstoInMeasure μ f l g

Next tactic:
exact tendstoInMeasure_of_tendsto_snorm_top hfg
/-- Convergence in Lp implies convergence in measure. -/
theorem tendstoInMeasure_of_tendsto_snorm {l : Filter ι} (hp_ne_zero : p ≠ 0)
    (hf : ∀ n, AEStronglyMeasurable (f n) μ) (hg : AEStronglyMeasurable g μ)
    (hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)) : TendstoInMeasure μ f l g := by
  by_cases hp_ne_top : p = ∞
  · subst hp_ne_top
    exact tendstoInMeasure_of_tendsto_snorm_top hfg
  · 

Proof state:
case neg
α : Type u_1
ι : Type u_2
E : Type u_3
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
f : ι → α → E
g : α → E
l : Filter ι
hp_ne_zero : p ≠ 0
hf : ∀ (n : ι), AEStronglyMeasurable (f n) μ
hg : AEStronglyMeasurable g μ
hfg : Tendsto (fun n => snorm (f n - g) p μ) l (𝓝 0)
hp_ne_top : ¬p = ⊤
⊢ TendstoInMeasure μ f l g

Next tactic:
exact tendstoInMeasure_of_tendsto_snorm_of_ne_top hp_ne_zero hp_ne_top hf hg hfg
/-- Empty graphs are strongly regular. Note that `ℓ` can take any value
for empty graphs, since there are no pairs of adjacent vertices. -/
theorem bot_strongly_regular : (⊥ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 ℓ 0 where
  card := rfl
  regular := bot_degree
  of_adj := fun v w h => h.elim
  of_not_adj := fun v w _h => by
    

Proof state:
V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
v w : V
_h : v ≠ w
⊢ ¬Adj ⊥ v w → Fintype.card ↑(commonNeighbors ⊥ v w) = 0

Next tactic:
simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
/-- Empty graphs are strongly regular. Note that `ℓ` can take any value
for empty graphs, since there are no pairs of adjacent vertices. -/
theorem bot_strongly_regular : (⊥ : SimpleGraph V).IsSRGWith (Fintype.card V) 0 ℓ 0 where
  card := rfl
  regular := bot_degree
  of_adj := fun v w h => h.elim
  of_not_adj := fun v w _h => by
    simp only [card_eq_zero, Fintype.card_ofFinset, forall_true_left, not_false_iff, bot_adj]
    

Proof state:
V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
v w : V
_h : v ≠ w
⊢ filter (fun x => x ∈ commonNeighbors ⊥ v w) univ = ∅

Next tactic:
ext