α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
have h_lt_ε_real : ∀ (ε : ℝ) (_ : 0 < ε), ∃ k : ℕ, 2 * (2 : ℝ)⁻¹ ^ k < ε := by
  intro ε hε
  obtain ⟨k, h_k⟩ : ∃ k : ℕ, (2 : ℝ)⁻¹ ^ k < ε := exists_pow_lt_of_lt_one hε (by norm_num)
  refine' ⟨k + 1, (le_of_eq _).trans_lt h_k⟩
  rw [pow_add]; ring
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
set ns := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
⊢ ∃ ns, StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
use ns
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
let S := fun k => { x | (2 : ℝ)⁻¹ ^ k ≤ dist (f (ns k) x) (g x) }
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
have hμS_le : ∀ k, μ (S k) ≤ (2 : ℝ≥0∞)⁻¹ ^ k := by
  intro k
  have := ExistsSeqTendstoAe.seqTendstoAeSeq_spec hfg k (ns k) le_rfl
  convert this
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
set s := Filter.atTop.limsup S with hs
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
have hμs : μ s = 0 := by
  refine' measure_limsup_eq_zero (ne_of_lt <| lt_of_le_of_lt (ENNReal.tsum_le_tsum hμS_le) _)
  simp only [ENNReal.tsum_geometric, ENNReal.one_sub_inv_two, inv_inv]
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
have h_tendsto : ∀ x ∈ sᶜ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x)) := by
  refine' fun x hx => Metric.tendsto_atTop.mpr fun ε hε => _
  rw [hs, limsup_eq_iInf_iSup_of_nat] at hx
  simp only [Set.iSup_eq_iUnion, Set.iInf_eq_iInter, Set.compl_iInter, Set.compl_iUnion,
    Set.mem_iUnion, Set.mem_iInter, Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx
  obtain ⟨N, hNx⟩ := hx
  obtain ⟨k, hk_lt_ε⟩ := h_lt_ε_real ε hε
  refine' ⟨max N (k - 1), fun n hn_ge => lt_of_le_of_lt _ hk_lt_ε⟩
  specialize hNx n ((le_max_left _ _).trans hn_ge)
  have h_inv_n_le_k : (2 : ℝ)⁻¹ ^ n ≤ 2 * (2 : ℝ)⁻¹ ^ k := by
    rw [mul_comm, ← inv_mul_le_iff' (zero_lt_two' ℝ)]
    conv_lhs =>
      congr
      rw [← pow_one (2 : ℝ)⁻¹]
    rw [← pow_add, add_comm]
    exact pow_le_pow_of_le_one (one_div (2 : ℝ) ▸ one_half_pos.le) (inv_le_one one_le_two)
      ((le_tsub_add.trans (add_le_add_right (le_max_right _ _) 1)).trans
        (add_le_add_right hn_ge 1))
  exact le_trans hNx.le h_inv_n_le_k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
⊢ StrictMono ns ∧ ↑↑μ {a | ¬Tendsto (fun i => f (ns i) a) atTop (𝓝 (g a))} = 0
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
⊢ StrictMono ns ∧ ∀ᵐ (x : α) ∂μ, Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
rw [ae_iff]
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
x : α
⊢ x ∈ {a | ¬Tendsto (fun i => f (ns i) a) atTop (𝓝 (g a))} → x ∈ s
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
⊢ StrictMono ns ∧ ↑↑μ {a | ¬Tendsto (fun i => f (ns i) a) atTop (𝓝 (g a))} = 0
refine' ⟨ExistsSeqTendstoAe.seqTendstoAeSeq_strictMono hfg, measure_mono_null (fun x => _) hμs⟩
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
x : α
⊢ ¬x ∈ s → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
x : α
⊢ x ∈ {a | ¬Tendsto (fun i => f (ns i) a) atTop (𝓝 (g a))} → x ∈ s
rw [Set.mem_setOf_eq, ← @Classical.not_not (x ∈ s), not_imp_not]
no goals
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
h_tendsto : ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
x : α
⊢ ¬x ∈ s → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
exact h_tendsto x
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
⊢ ∃ k, 2 * 2⁻¹ ^ k < ε
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
⊢ ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
intro ε hε
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
k : ℕ
h_k : 2⁻¹ ^ k < ε
⊢ ∃ k, 2 * 2⁻¹ ^ k < ε
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
⊢ ∃ k, 2 * 2⁻¹ ^ k < ε
obtain ⟨k, h_k⟩ : ∃ k : ℕ, (2 : ℝ)⁻¹ ^ k < ε := exists_pow_lt_of_lt_one hε (by norm_num)
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
k : ℕ
h_k : 2⁻¹ ^ k < ε
⊢ 2 * 2⁻¹ ^ (k + 1) = 2⁻¹ ^ k
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
k : ℕ
h_k : 2⁻¹ ^ k < ε
⊢ ∃ k, 2 * 2⁻¹ ^ k < ε
refine' ⟨k + 1, (le_of_eq _).trans_lt h_k⟩
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
k : ℕ
h_k : 2⁻¹ ^ k < ε
⊢ 2 * (2⁻¹ ^ k * 2⁻¹ ^ 1) = 2⁻¹ ^ k
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
k : ℕ
h_k : 2⁻¹ ^ k < ε
⊢ 2 * 2⁻¹ ^ (k + 1) = 2⁻¹ ^ k
rw [pow_add]
no goals
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
k : ℕ
h_k : 2⁻¹ ^ k < ε
⊢ 2 * (2⁻¹ ^ k * 2⁻¹ ^ 1) = 2⁻¹ ^ k
ring
no goals
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
ε : ℝ
hε : 0 < ε
⊢ 2⁻¹ < 1
norm_num
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
k : ℕ
⊢ ↑↑μ (S k) ≤ 2⁻¹ ^ k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
⊢ ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
intro k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
k : ℕ
this : ↑↑μ {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)} ≤ 2⁻¹ ^ k
⊢ ↑↑μ (S k) ≤ 2⁻¹ ^ k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
k : ℕ
⊢ ↑↑μ (S k) ≤ 2⁻¹ ^ k
have := ExistsSeqTendstoAe.seqTendstoAeSeq_spec hfg k (ns k) le_rfl
no goals
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
k : ℕ
this : ↑↑μ {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)} ≤ 2⁻¹ ^ k
⊢ ↑↑μ (S k) ≤ 2⁻¹ ^ k
convert this
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
⊢ (∑' (a : ℕ), 2⁻¹ ^ a) < ⊤
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
⊢ ↑↑μ s = 0
refine' measure_limsup_eq_zero (ne_of_lt <| lt_of_le_of_lt (ENNReal.tsum_le_tsum hμS_le) _)
no goals
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
⊢ (∑' (a : ℕ), 2⁻¹ ^ a) < ⊤
simp only [ENNReal.tsum_geometric, ENNReal.one_sub_inv_two, inv_inv]
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
hx : x ∈ sᶜ
ε : ℝ
hε : ε > 0
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
⊢ ∀ (x : α), x ∈ sᶜ → Tendsto (fun i => f (ns i) x) atTop (𝓝 (g x))
refine' fun x hx => Metric.tendsto_atTop.mpr fun ε hε => _
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
hx : x ∈ (⨅ (n : ℕ), ⨆ (i : ℕ) (_ : i ≥ n), S i)ᶜ
ε : ℝ
hε : ε > 0
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
hx : x ∈ sᶜ
ε : ℝ
hε : ε > 0
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
rw [hs, limsup_eq_iInf_iSup_of_nat] at hx
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
hx : ∃ i, ∀ (i_1 : ℕ), i_1 ≥ i → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i_1) x) (g x) < 2⁻¹ ^ i_1
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
hx : x ∈ (⨅ (n : ℕ), ⨆ (i : ℕ) (_ : i ≥ n), S i)ᶜ
ε : ℝ
hε : ε > 0
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
simp only [Set.iSup_eq_iUnion, Set.iInf_eq_iInter, Set.compl_iInter, Set.compl_iUnion,
  Set.mem_iUnion, Set.mem_iInter, Set.mem_compl_iff, Set.mem_setOf_eq, not_le] at hx
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N : ℕ
hNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
hx : ∃ i, ∀ (i_1 : ℕ), i_1 ≥ i → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i_1) x) (g x) < 2⁻¹ ^ i_1
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
obtain ⟨N, hNx⟩ := hx
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N : ℕ
hNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i
k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
case intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N : ℕ
hNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
obtain ⟨k, hk_lt_ε⟩ := h_lt_ε_real ε hε
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N : ℕ
hNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i
k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N : ℕ
hNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i
k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (f (ns n) x) (g x) < ε
refine' ⟨max N (k - 1), fun n hn_ge => lt_of_le_of_lt _ hk_lt_ε⟩
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N : ℕ
hNx : ∀ (i : ℕ), i ≥ N → dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg i) x) (g x) < 2⁻¹ ^ i
k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k
specialize hNx n ((le_max_left _ _).trans hn_ge)
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
h_inv_n_le_k : 2⁻¹ ^ n ≤ 2 * 2⁻¹ ^ k
⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k
have h_inv_n_le_k : (2 : ℝ)⁻¹ ^ n ≤ 2 * (2 : ℝ)⁻¹ ^ k := by
  rw [mul_comm, ← inv_mul_le_iff' (zero_lt_two' ℝ)]
  conv_lhs =>
    congr
    rw [← pow_one (2 : ℝ)⁻¹]
  rw [← pow_add, add_comm]
  exact pow_le_pow_of_le_one (one_div (2 : ℝ) ▸ one_half_pos.le) (inv_le_one one_le_two)
    ((le_tsub_add.trans (add_le_add_right (le_max_right _ _) 1)).trans
      (add_le_add_right hn_ge 1))
no goals
case intro.intro
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
h_inv_n_le_k : 2⁻¹ ^ n ≤ 2 * 2⁻¹ ^ k
⊢ dist (f (ns n) x) (g x) ≤ 2 * 2⁻¹ ^ k
exact le_trans hNx.le h_inv_n_le_k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ 2⁻¹ * 2⁻¹ ^ n ≤ 2⁻¹ ^ k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ 2⁻¹ ^ n ≤ 2 * 2⁻¹ ^ k
rw [mul_comm, ← inv_mul_le_iff' (zero_lt_two' ℝ)]
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ 2⁻¹ ^ 1 * 2⁻¹ ^ n ≤ 2⁻¹ ^ k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ 2⁻¹ * 2⁻¹ ^ n ≤ 2⁻¹ ^ k
conv_lhs =>
  congr
  rw [← pow_one (2 : ℝ)⁻¹]
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ 2⁻¹ ^ (n + 1) ≤ 2⁻¹ ^ k
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ 2⁻¹ ^ 1 * 2⁻¹ ^ n ≤ 2⁻¹ ^ k
rw [← pow_add, add_comm]
no goals
α : Type u_1
ι : Type ?u.20960
E : Type u_2
m : MeasurableSpace α
μ : Measure α
inst✝ : MetricSpace E
f : ℕ → α → E
g : α → E
hfg : TendstoInMeasure μ f atTop g
h_lt_ε_real : ∀ (ε : ℝ), 0 < ε → ∃ k, 2 * 2⁻¹ ^ k < ε
ns : ℕ → ℕ := ExistsSeqTendstoAe.seqTendstoAeSeq hfg
S : ℕ → Set α := fun k => {x | 2⁻¹ ^ k ≤ dist (f (ns k) x) (g x)}
hμS_le : ∀ (k : ℕ), ↑↑μ (S k) ≤ 2⁻¹ ^ k
s : Set α := limsup S atTop
hs : s = limsup S atTop
hμs : ↑↑μ s = 0
x : α
ε : ℝ
hε : ε > 0
N k : ℕ
hk_lt_ε : 2 * 2⁻¹ ^ k < ε
n : ℕ
hn_ge : n ≥ max N (k - 1)
hNx : dist (f (ExistsSeqTendstoAe.seqTendstoAeSeq hfg n) x) (g x) < 2⁻¹ ^ n
⊢ 2⁻¹ ^ (n + 1) ≤ 2⁻¹ ^ k
exact pow_le_pow_of_le_one (one_div (2 : ℝ) ▸ one_half_pos.le) (inv_le_one one_le_two)
  ((le_tsub_add.trans (add_le_add_right (le_max_right _ _) 1)).trans
    (add_le_add_right hn_ge 1))