l3lab/ntp-mathlib huggingface dataset:
/-- A linear map into `Fin n.succ → M₃` can be built out of a map into `M₃` and a map into
`Fin n → M₃`. -/
def LinearMap.vecCons {n} (f : M →ₗ[R] M₂) (g : M →ₗ[R] Fin n → M₂) : M →ₗ[R] Fin n.succ → M₂ where
  toFun m := Matrix.vecCons (f m) (g m)
  map_add' x y := by
    simp only []
    rw [f.map_add, g.map_add, Matrix.cons_add_cons (f x)]
  map_smul' c x := by
    simp only []
    

Proof state:
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
ι' : Type x'
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
n : ℕ
f : M →ₗ[R] M₂
g : M →ₗ[R] Fin n → M₂
c : R
x : M
⊢ Matrix.vecCons (f (c • x)) (g (c • x)) = (RingHom.id R) c • Matrix.vecCons (f x) (g x)

Next tactic:
rw [f.map_smul, g.map_smul, RingHom.id_apply, Matrix.smul_cons c (f x)]
/-- A bilinear map into `Fin n.succ → M₃` can be built out of a map into `M₃` and a map into
`Fin n → M₃` -/
@[simps]
def LinearMap.vecCons₂ {n} (f : M →ₗ[R] M₂ →ₗ[R] M₃) (g : M →ₗ[R] M₂ →ₗ[R] Fin n → M₃) :
    M →ₗ[R] M₂ →ₗ[R] Fin n.succ → M₃ where
  toFun m := LinearMap.vecCons (f m) (g m)
  map_add' x y :=
    LinearMap.ext fun z => by
      

Proof state:
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
ι' : Type x'
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
n : ℕ
f : M →ₗ[R] M₂ →ₗ[R] M₃
g : M →ₗ[R] M₂ →ₗ[R] Fin n → M₃
x y : M
z : M₂
⊢ ((fun m => vecCons (f m) (g m)) (x + y)) z = ((fun m => vecCons (f m) (g m)) x + (fun m => vecCons (f m) (g m)) y) z

Next tactic:
simp only [f.map_add, g.map_add, LinearMap.add_apply, LinearMap.vecCons_apply,
        Matrix.cons_add_cons (f x z)]
/-- A bilinear map into `Fin n.succ → M₃` can be built out of a map into `M₃` and a map into
`Fin n → M₃` -/
@[simps]
def LinearMap.vecCons₂ {n} (f : M →ₗ[R] M₂ →ₗ[R] M₃) (g : M →ₗ[R] M₂ →ₗ[R] Fin n → M₃) :
    M →ₗ[R] M₂ →ₗ[R] Fin n.succ → M₃ where
  toFun m := LinearMap.vecCons (f m) (g m)
  map_add' x y :=
    LinearMap.ext fun z => by
      simp only [f.map_add, g.map_add, LinearMap.add_apply, LinearMap.vecCons_apply,
        Matrix.cons_add_cons (f x z)]
  map_smul' r x := LinearMap.ext fun z => by 

Proof state:
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
ι' : Type x'
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
n : ℕ
f : M →ₗ[R] M₂ →ₗ[R] M₃
g : M →ₗ[R] M₂ →ₗ[R] Fin n → M₃
r : R
x : M
z : M₂
⊢ (AddHom.toFun
        { toFun := fun m => vecCons (f m) (g m),
          map_add' :=
            (_ :
              ∀ (x y : M),
                (fun m => vecCons (f m) (g m)) (x + y) =
                  (fun m => vecCons (f m) (g m)) x + (fun m => vecCons (f m) (g m)) y) }
        (r • x))
      z =
    ((RingHom.id R) r •
        AddHom.toFun
          { toFun := fun m => vecCons (f m) (g m),
            map_add' :=
              (_ :
                ∀ (x y : M),
                  (fun m => vecCons (f m) (g m)) (x + y) =
                    (fun m => vecCons (f m) (g m)) x + (fun m => vecCons (f m) (g m)) y) }
          x)
      z

Next tactic:
simp [Matrix.smul_cons r (f x z)]
theorem not_iff : (¬ (p ↔ q)) = ((p ∧ ¬ q) ∨ (¬ p ∧ q)) := propext <|
  _root_.not_iff.trans <| iff_iff_and_or_not_and_not.trans <| by 

Proof state:
α : Sort ?u.352
p q : Prop
s : α → Prop
⊢ ¬p ∧ q ∨ ¬¬p ∧ ¬q ↔ p ∧ ¬q ∨ ¬p ∧ q

Next tactic:
rw [not_not, or_comm]
theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by
  

Proof state:
α : Sort ?u.827
p q : Prop
s✝ : α → Prop
β : Type u
inst✝ : LinearOrder β
γ : Type u_1
s : Set γ
⊢ (¬Set.Nonempty s) = (s = ∅)

Next tactic:
have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id
theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by
  have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id
  

Proof state:
α : Sort ?u.827
p q : Prop
s✝ : α → Prop
β : Type u
inst✝ : LinearOrder β
γ : Type u_1
s : Set γ
A : ∀ (x : γ), ¬x ∈ ∅
⊢ (¬Set.Nonempty s) = (s = ∅)

Next tactic:
simp only [Set.Nonempty, not_exists, eq_iff_iff]
theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by
  have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id
  simp only [Set.Nonempty, not_exists, eq_iff_iff]
  

Proof state:
α : Sort ?u.827
p q : Prop
s✝ : α → Prop
β : Type u
inst✝ : LinearOrder β
γ : Type u_1
s : Set γ
A : ∀ (x : γ), ¬x ∈ ∅
⊢ (∀ (x : γ), ¬x ∈ s) ↔ s = ∅

Next tactic:
exact ⟨fun h ↦ Set.ext (fun x ↦ by simp only [h x, false_iff, A]), fun h ↦ by rwa [h]⟩
theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by
  have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id
  simp only [Set.Nonempty, not_exists, eq_iff_iff]
  exact ⟨fun h ↦ Set.ext (fun x ↦ by 

Proof state:
α : Sort ?u.827
p q : Prop
s✝ : α → Prop
β : Type u
inst✝ : LinearOrder β
γ : Type u_1
s : Set γ
A : ∀ (x : γ), ¬x ∈ ∅
h : ∀ (x : γ), ¬x ∈ s
x : γ
⊢ x ∈ s ↔ x ∈ ∅

Next tactic:
simp only [h x, false_iff, A]
theorem not_nonempty_eq (s : Set γ) : (¬ s.Nonempty) = (s = ∅) := by
  have A : ∀ (x : γ), ¬(x ∈ (∅ : Set γ)) := fun x ↦ id
  simp only [Set.Nonempty, not_exists, eq_iff_iff]
  exact ⟨fun h ↦ Set.ext (fun x ↦ by simp only [h x, false_iff, A]), fun h ↦ by 

Proof state:
α : Sort ?u.827
p q : Prop
s✝ : α → Prop
β : Type u
inst✝ : LinearOrder β
γ : Type u_1
s : Set γ
A : ∀ (x : γ), ¬x ∈ ∅
h : s = ∅
⊢ ∀ (x : γ), ¬x ∈ s

Next tactic:
rwa [h]
theorem ne_empty_eq_nonempty (s : Set γ) : (s ≠ ∅) = s.Nonempty := by
  

Proof state:
α : Sort ?u.1246
p q : Prop
s✝ : α → Prop
β : Type u
inst✝ : LinearOrder β
γ : Type u_1
s : Set γ
⊢ (s ≠ ∅) = Set.Nonempty s

Next tactic:
rw [ne_eq, ← not_nonempty_eq s, not_not]
theorem empty_ne_eq_nonempty (s : Set γ) : (∅ ≠ s) = s.Nonempty := by
  

Proof state:
α : Sort ?u.1368
p q : Prop
s✝ : α → Prop
β : Type u
inst✝ : LinearOrder β
γ : Type u_1
s : Set γ
⊢ (∅ ≠ s) = Set.Nonempty s

Next tactic:
rw [ne_comm, ne_empty_eq_nonempty]
theorem mem_notConvergentSeq_iff [Preorder ι] {x : α} :
    x ∈ notConvergentSeq f g n j ↔ ∃ k ≥ j, 1 / (n + 1 : ℝ) < dist (f k x) (g x) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝¹ : MetricSpace β
μ : Measure α
n : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝ : Preorder ι
x : α
⊢ x ∈ notConvergentSeq f g n j ↔ ∃ k ≥ j, 1 / (↑n + 1) < dist (f k x) (g x)

Next tactic:
simp_rw [notConvergentSeq, Set.mem_iUnion, exists_prop]
theorem mem_notConvergentSeq_iff [Preorder ι] {x : α} :
    x ∈ notConvergentSeq f g n j ↔ ∃ k ≥ j, 1 / (n + 1 : ℝ) < dist (f k x) (g x) := by
  simp_rw [notConvergentSeq, Set.mem_iUnion, exists_prop]; 

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝¹ : MetricSpace β
μ : Measure α
n : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝ : Preorder ι
x : α
⊢ (∃ i, j ≤ i ∧ x ∈ {x | 1 / (↑n + 1) < dist (f i x) (g x)}) ↔ ∃ k ≥ j, 1 / (↑n + 1) < dist (f k x) (g x)

Next tactic:
rfl
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
⊢ ↑↑μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0

Next tactic:
simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
⊢ ↑↑μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0

Next tactic:
rw [← nonpos_iff_eq_zero, ← hfg]
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  rw [← nonpos_iff_eq_zero, ← hfg]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
⊢ ↑↑μ (s ∩ ⋂ j, notConvergentSeq f g n j) ≤ ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)}

Next tactic:
refine' measure_mono fun x => _
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  rw [← nonpos_iff_eq_zero, ← hfg]
  refine' measure_mono fun x => _
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
x : α
⊢ x ∈ s ∩ ⋂ j, notConvergentSeq f g n j → x ∈ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)}

Next tactic:
simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  rw [← nonpos_iff_eq_zero, ← hfg]
  refine' measure_mono fun x => _
  simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
x : α
⊢ (x ∈ s ∧ ∀ (i : ι), ∃ k, i ≤ k ∧ 1 / (↑n + 1) < dist (f k x) (g x)) →
    x ∈ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ (n : ι), N ≤ n → dist (f n a) (g a) < ε)}

Next tactic:
push_neg
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  rw [← nonpos_iff_eq_zero, ← hfg]
  refine' measure_mono fun x => _
  simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
  push_neg
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
x : α
⊢ (x ∈ s ∧ ∀ (i : ι), ∃ k, i ≤ k ∧ 1 / (↑n + 1) < dist (f k x) (g x)) →
    x ∈ {a | a ∈ s ∧ ∃ ε > 0, ∀ (N : ι), ∃ n, N ≤ n ∧ ε ≤ dist (f n a) (g a)}

Next tactic:
rintro ⟨hmem, hx⟩
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  rw [← nonpos_iff_eq_zero, ← hfg]
  refine' measure_mono fun x => _
  simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
  push_neg
  rintro ⟨hmem, hx⟩
  

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
x : α
hmem : x ∈ s
hx : ∀ (i : ι), ∃ k, i ≤ k ∧ 1 / (↑n + 1) < dist (f k x) (g x)
⊢ x ∈ {a | a ∈ s ∧ ∃ ε > 0, ∀ (N : ι), ∃ n, N ≤ n ∧ ε ≤ dist (f n a) (g a)}

Next tactic:
refine' ⟨hmem, 1 / (n + 1 : ℝ), Nat.one_div_pos_of_nat, fun N => _⟩
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  rw [← nonpos_iff_eq_zero, ← hfg]
  refine' measure_mono fun x => _
  simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
  push_neg
  rintro ⟨hmem, hx⟩
  refine' ⟨hmem, 1 / (n + 1 : ℝ), Nat.one_div_pos_of_nat, fun N => _⟩
  

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
x : α
hmem : x ∈ s
hx : ∀ (i : ι), ∃ k, i ≤ k ∧ 1 / (↑n + 1) < dist (f k x) (g x)
N : ι
⊢ ∃ n_1, N ≤ n_1 ∧ 1 / (↑n + 1) ≤ dist (f n_1 x) (g x)

Next tactic:
obtain ⟨n, hn₁, hn₂⟩ := hx N
theorem measure_inter_notConvergentSeq_eq_zero [SemilatticeSup ι] [Nonempty ι]
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    μ (s ∩ ⋂ j, notConvergentSeq f g n j) = 0 := by
  simp_rw [Metric.tendsto_atTop, ae_iff] at hfg
  rw [← nonpos_iff_eq_zero, ← hfg]
  refine' measure_mono fun x => _
  simp only [Set.mem_inter_iff, Set.mem_iInter, ge_iff_le, mem_notConvergentSeq_iff]
  push_neg
  rintro ⟨hmem, hx⟩
  refine' ⟨hmem, 1 / (n + 1 : ℝ), Nat.one_div_pos_of_nat, fun N => _⟩
  obtain ⟨n, hn₁, hn₂⟩ := hx N
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝¹ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Nonempty ι
n✝ : ℕ
hfg : ↑↑μ {a | ¬(a ∈ s → ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (f n a) (g a) < ε)} = 0
x : α
hmem : x ∈ s
hx : ∀ (i : ι), ∃ k, i ≤ k ∧ 1 / (↑n✝ + 1) < dist (f k x) (g x)
N n : ι
hn₁ : N ≤ n
hn₂ : 1 / (↑n✝ + 1) < dist (f n x) (g x)
⊢ ∃ n, N ≤ n ∧ 1 / (↑n✝ + 1) ≤ dist (f n x) (g x)

Next tactic:
exact ⟨n, hn₁, hn₂.le⟩
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
⊢ Tendsto (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0)

Next tactic:
cases' isEmpty_or_nonempty ι with h h
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0) := by
  cases' isEmpty_or_nonempty ι with h h
  · 

Proof state:
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
h : IsEmpty ι
⊢ Tendsto (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0)

Next tactic:
have : (fun j => μ (s ∩ notConvergentSeq f g n j)) = fun j => 0 := by
      simp only [eq_iff_true_of_subsingleton]
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0) := by
  cases' isEmpty_or_nonempty ι with h h
  · have : (fun j => μ (s ∩ notConvergentSeq f g n j)) = fun j => 0 := by
      

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
h : IsEmpty ι
⊢ (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) = fun j => 0

Next tactic:
simp only [eq_iff_true_of_subsingleton]
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0) := by
  cases' isEmpty_or_nonempty ι with h h
  · have : (fun j => μ (s ∩ notConvergentSeq f g n j)) = fun j => 0 := by
      simp only [eq_iff_true_of_subsingleton]
    

Proof state:
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
h : IsEmpty ι
this : (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) = fun j => 0
⊢ Tendsto (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0)

Next tactic:
rw [this]
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0) := by
  cases' isEmpty_or_nonempty ι with h h
  · have : (fun j => μ (s ∩ notConvergentSeq f g n j)) = fun j => 0 := by
      simp only [eq_iff_true_of_subsingleton]
    rw [this]
    

Proof state:
case inl
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
h : IsEmpty ι
this : (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) = fun j => 0
⊢ Tendsto (fun j => 0) atTop (𝓝 0)

Next tactic:
exact tendsto_const_nhds
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0) := by
  cases' isEmpty_or_nonempty ι with h h
  · have : (fun j => μ (s ∩ notConvergentSeq f g n j)) = fun j => 0 := by
      simp only [eq_iff_true_of_subsingleton]
    rw [this]
    exact tendsto_const_nhds
  

Proof state:
case inr
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
h : Nonempty ι
⊢ Tendsto (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0)

Next tactic:
rw [← measure_inter_notConvergentSeq_eq_zero hfg n, Set.inter_iInter]
theorem measure_notConvergentSeq_tendsto_zero [SemilatticeSup ι] [Countable ι]
    (hf : ∀ n, StronglyMeasurable (f n)) (hg : StronglyMeasurable g) (hsm : MeasurableSet s)
    (hs : μ s ≠ ∞) (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    Tendsto (fun j => μ (s ∩ notConvergentSeq f g n j)) atTop (𝓝 0) := by
  cases' isEmpty_or_nonempty ι with h h
  · have : (fun j => μ (s ∩ notConvergentSeq f g n j)) = fun j => 0 := by
      simp only [eq_iff_true_of_subsingleton]
    rw [this]
    exact tendsto_const_nhds
  rw [← measure_inter_notConvergentSeq_eq_zero hfg n, Set.inter_iInter]
  

Proof state:
case inr
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝² : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝¹ : SemilatticeSup ι
inst✝ : Countable ι
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
h : Nonempty ι
⊢ Tendsto (fun j => ↑↑μ (s ∩ notConvergentSeq f g n j)) atTop
    (𝓝 (↑↑μ (⋂ i, s ∩ notConvergentSeq (fun n x => f n x) (fun x => g x) n i)))

Next tactic:
refine' tendsto_measure_iInter (fun n => hsm.inter <| notConvergentSeq_measurableSet hf hg)
    (fun k l hkl => Set.inter_subset_inter_right _ <| notConvergentSeq_antitone hkl)
    ⟨h.some,
      (lt_of_le_of_lt (measure_mono <| Set.inter_subset_left _ _) (lt_top_iff_ne_top.2 hs)).ne⟩
theorem exists_notConvergentSeq_lt (hε : 0 < ε) (hf : ∀ n, StronglyMeasurable (f n))
    (hg : StronglyMeasurable g) (hsm : MeasurableSet s) (hs : μ s ≠ ∞)
    (hfg : ∀ᵐ x ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))) (n : ℕ) :
    ∃ j : ι, μ (s ∩ notConvergentSeq f g n j) ≤ ENNReal.ofReal (ε * 2⁻¹ ^ n) := by
  

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace α
inst✝³ : MetricSpace β
μ : Measure α
n✝ : ℕ
i j : ι
s : Set α
ε : ℝ
f : ι → α → β
g : α → β
inst✝² : SemilatticeSup ι
inst✝¹ : Nonempty ι
inst✝ : Countable ι
hε : 0 < ε
hf : ∀ (n : ι), StronglyMeasurable (f n)
hg : StronglyMeasurable g
hsm : MeasurableSet s
hs : ↑↑μ s ≠ ⊤
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → Tendsto (fun n => f n x) atTop (𝓝 (g x))
n : ℕ
⊢ ∃ j, ↑↑μ (s ∩ notConvergentSeq f g n j) ≤ ENNReal.ofReal (ε * 2⁻¹ ^ n)

Next tactic:
have ⟨N, hN⟩ := (ENNReal.tendsto_atTop ENNReal.zero_ne_top).1
    (measure_notConvergentSeq_tendsto_zero hf hg hsm hs hfg n) (ENNReal.ofReal (ε * 2⁻¹ ^ n)) (by
      rw [gt_iff_lt, ENNReal.ofReal_pos]
      exact mul_pos hε (pow_pos (by norm_num) n))