Theorem: exists_seq_monotone_tendsto_atTop_atTop
File: Mathlib/MeasureTheory/Measure/Stieltjes.lean

tactic: haveI h_ne_bot : (atTop : Filter α).NeBot := atTop_neBot
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop

tactic: obtain ⟨ys, h⟩ := exists_seq_tendsto (atTop : Filter α)
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop

tactic: let xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) Finset.nonempty_range_succ ys
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop

tactic: have h_mono : Monotone xs := by
  intro i j hij
  rw [Finset.sup'_le_iff]
  intro k hk
  refine' Finset.le_sup'_of_le _ _ le_rfl
  rw [Finset.mem_range] at hk⊢
  exact hk.trans_le (add_le_add_right hij _)
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop

tactic: refine' ⟨xs, h_mono, _⟩
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop

tactic: intro i j hij
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
⊢ Monotone xs

tactic: rw [Finset.sup'_le_iff]
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
i j : ℕ
hij : i ≤ j
⊢ xs i ≤ xs j

tactic: intro k hk
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
i j : ℕ
hij : i ≤ j
⊢ ∀ (b : ℕ), b ∈ Finset.range (i + 1) → ys b ≤ xs j

tactic: refine' Finset.le_sup'_of_le _ _ le_rfl
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
i j : ℕ
hij : i ≤ j
k : ℕ
hk : k ∈ Finset.range (i + 1)
⊢ ys k ≤ xs j

tactic: rw [Finset.mem_range] at hk⊢
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
i j : ℕ
hij : i ≤ j
k : ℕ
hk : k ∈ Finset.range (i + 1)
⊢ k ∈ Finset.range (j + 1)

tactic: exact hk.trans_le (add_le_add_right hij _)
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
i j : ℕ
hij : i ≤ j
k : ℕ
hk : k < i + 1
⊢ k < j + 1

tactic: refine' tendsto_atTop_atTop_of_monotone h_mono _
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
⊢ Tendsto xs atTop atTop

tactic: have : ∀ a : α, ∃ n : ℕ, a ≤ ys n := by
  rw [tendsto_atTop_atTop] at h
  intro a
  obtain ⟨i, hi⟩ := h a
  exact ⟨i, hi i le_rfl⟩
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
⊢ ∀ (b : α), ∃ a, b ≤ xs a

tactic: intro a
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
this : ∀ (a : α), ∃ n, a ≤ ys n
⊢ ∀ (b : α), ∃ a, b ≤ xs a

tactic: obtain ⟨i, hi⟩ := this a
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
this : ∀ (a : α), ∃ n, a ≤ ys n
a : α
⊢ ∃ a_1, a ≤ xs a_1

tactic: refine' ⟨i, hi.trans _⟩
state_before: case intro.intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
this : ∀ (a : α), ∃ n, a ≤ ys n
a : α
i : ℕ
hi : a ≤ ys i
⊢ ∃ a_1, a ≤ xs a_1

tactic: refine' Finset.le_sup'_of_le _ _ le_rfl
state_before: case intro.intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
this : ∀ (a : α), ∃ n, a ≤ ys n
a : α
i : ℕ
hi : a ≤ ys i
⊢ ys i ≤ xs i

tactic: rw [Finset.mem_range_succ_iff]
state_before: case intro.intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
this : ∀ (a : α), ∃ n, a ≤ ys n
a : α
i : ℕ
hi : a ≤ ys i
⊢ i ∈ Finset.range (i + 1)

tactic: rw [tendsto_atTop_atTop] at h
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
⊢ ∀ (a : α), ∃ n, a ≤ ys n

tactic: intro a
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : ∀ (b : α), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ys a
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
⊢ ∀ (a : α), ∃ n, a ≤ ys n

tactic: obtain ⟨i, hi⟩ := h a
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : ∀ (b : α), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ys a
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
a : α
⊢ ∃ n, a ≤ ys n

tactic: exact ⟨i, hi i le_rfl⟩
state_before: case intro
α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : IsCountablyGenerated atTop
h_ne_bot : NeBot atTop
ys : ℕ → α
h : ∀ (b : α), ∃ i, ∀ (a : ℕ), i ≤ a → b ≤ ys a
xs : ℕ → α := fun n => Finset.sup' (Finset.range (n + 1)) (_ : Finset.Nonempty (Finset.range (n + 1))) ys
h_mono : Monotone xs
a : α
i : ℕ
hi : ∀ (a_1 : ℕ), i ≤ a_1 → a ≤ ys a_1
⊢ ∃ n, a ≤ ys n