Theorem: Filter.exists_seq_monotone_tendsto_atTop_atTop
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: obtain ⟨ys, h⟩ := exists_seq_tendsto (atTop : Filter α)
state_before: ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop
state_after: case intro
ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop 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
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop
state_after: case intro
ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop

tactic: have h_mono : Monotone xs := fun i j hij ↦ by
  simp only [xs] gcongr
state_before: case intro
ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop
state_after: case intro
ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
h_mono : Monotone xs
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop

tactic: refine ⟨xs, h_mono, tendsto_atTop_mono (fun n ↦ Finset.le_sup' _ ?_) h⟩
state_before: case intro
ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
h_mono : Monotone xs
⊢ ∃ xs, Monotone xs ∧ Tendsto xs atTop atTop
state_after: case intro
ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
h_mono : Monotone xs
n : ℕ
⊢ n ∈ Finset.range (n + 1)

tactic: simp
state_before: case intro
ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
h_mono : Monotone xs
n : ℕ
⊢ n ∈ Finset.range (n + 1)
state_after: no goals

tactic: simp only [xs]
state_before: ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
i j : ℕ
hij : i ≤ j
⊢ xs i ≤ xs j
state_after: ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
i j : ℕ
hij : i ≤ j
⊢ (Finset.range (i + 1)).sup' ⋯ ys ≤ (Finset.range (j + 1)).sup' ⋯ ys

tactic: gcongr
state_before: ι : Type u_1
ι' : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
α : Type u_6
inst✝² : SemilatticeSup α
inst✝¹ : Nonempty α
inst✝ : atTop.IsCountablyGenerated
ys : ℕ → α
h : Tendsto ys atTop atTop
xs : ℕ → α := fun n => (Finset.range (n + 1)).sup' ⋯ ys
i j : ℕ
hij : i ≤ j
⊢ (Finset.range (i + 1)).sup' ⋯ ys ≤ (Finset.range (j + 1)).sup' ⋯ ys
state_after: no goals