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

tactic: intro N
state_before: ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
⊢ ∀ (N : ℕ), ∃ n, n ≥ N ∧ ∀ (k : ℕ), k < n → u k < u n

tactic: obtain ⟨k : ℕ, - : k ≤ N, hku : ∀ l ≤ N, u l ≤ u k⟩ : ∃ k ≤ N, ∀ l ≤ N, u l ≤ u k
state_before: ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N : ℕ
⊢ ∃ n, n ≥ N ∧ ∀ (k : ℕ), k < n → u k < u n

tactic: exact exists_max_image _ u (finite_le_nat N) ⟨N, le_refl N⟩
state_before: ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N : ℕ
⊢ ∃ k, k ≤ N ∧ ∀ (l : ℕ), l ≤ N → u l ≤ u k

case intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
⊢ ∃ n, n ≥ N ∧ ∀ (k : ℕ), k < n → u k < u n

tactic: have ex : ∃ n ≥ N, u k < u n := exists_lt_of_tendsto_atTop hu _ _
state_before: case intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
⊢ ∃ n, n ≥ N ∧ ∀ (k : ℕ), k < n → u k < u n

tactic: obtain ⟨n : ℕ, hnN : n ≥ N, hnk : u k < u n, hn_min : ∀ m, m < n → N ≤ m → u m ≤ u k⟩ :
    ∃ n ≥ N, u k < u n ∧ ∀ m, m < n → N ≤ m → u m ≤ u k := by
  rcases Nat.findX ex with ⟨n, ⟨hnN, hnk⟩, hn_min⟩
  push_neg  at hn_min
  exact ⟨n, hnN, hnk, hn_min⟩
state_before: case intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
⊢ ∃ n, n ≥ N ∧ ∀ (k : ℕ), k < n → u k < u n

tactic: use n, hnN
state_before: case intro.intro.intro.intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hnN : n ≥ N
hnk : u k < u n
hn_min : ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k
⊢ ∃ n, n ≥ N ∧ ∀ (k : ℕ), k < n → u k < u n

tactic: rintro (l : ℕ) (hl : l < n)
state_before: case intro.intro.intro.intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hnN : n ≥ N
hnk : u k < u n
hn_min : ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k
⊢ ∀ (k : ℕ), k < n → u k < u n

tactic: calc
  u l ≤ u k := hlk
  _ < u n := hnk
state_before: case intro.intro.intro.intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hnN : n ≥ N
hnk : u k < u n
hn_min : ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k
l : ℕ
hl : l < n
hlk : u l ≤ u k
⊢ u l < u n

tactic: rcases Nat.findX ex with ⟨n, ⟨hnN, hnk⟩, hn_min⟩
state_before: ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
⊢ ∃ n, n ≥ N ∧ u k < u n ∧ ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k

tactic: push_neg  at hn_min
state_before: case mk.intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hn_min : ∀ (m : ℕ), m < n → ¬(m ≥ N ∧ u k < u m)
hnN : n ≥ N
hnk : u k < u n
⊢ ∃ n, n ≥ N ∧ u k < u n ∧ ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k

tactic: exact ⟨n, hnN, hnk, hn_min⟩
state_before: case mk.intro.intro
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hnN : n ≥ N
hnk : u k < u n
hn_min : ∀ (m : ℕ), m < n → m ≥ N → u m ≤ u k
⊢ ∃ n, n ≥ N ∧ u k < u n ∧ ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k

tactic: cases' (le_total l N : l ≤ N ∨ N ≤ l) with H H
state_before: ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hnN : n ≥ N
hnk : u k < u n
hn_min : ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k
l : ℕ
hl : l < n
⊢ u l ≤ u k

tactic: exact hku l H
state_before: case inl
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hnN : n ≥ N
hnk : u k < u n
hn_min : ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k
l : ℕ
hl : l < n
H : l ≤ N
⊢ u l ≤ u k

tactic: exact hn_min l hl H
state_before: case inr
ι : Type ?u.70456
ι' : Type ?u.70459
α : Type ?u.70462
β : Type u_1
γ : Type ?u.70468
inst✝¹ : LinearOrder β
inst✝ : NoMaxOrder β
u : ℕ → β
hu : Tendsto u atTop atTop
N k : ℕ
hku : ∀ (l : ℕ), l ≤ N → u l ≤ u k
ex : ∃ n, n ≥ N ∧ u k < u n
n : ℕ
hnN : n ≥ N
hnk : u k < u n
hn_min : ∀ (m : ℕ), m < n → N ≤ m → u m ≤ u k
l : ℕ
hl : l < n
H : N ≤ l
⊢ u l ≤ u k