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

tactic: refine' ⟨fun h x hx => h.comp hx, fun H s hs => _⟩
state_before: ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
⊢ Tendsto f k l ↔ ∀ (x : ℕ → α), Tendsto x atTop k → Tendsto (f ∘ x) atTop l

tactic: contrapose! H
state_before: ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
H : ∀ (x : ℕ → α), Tendsto x atTop k → Tendsto (f ∘ x) atTop l
s : Set β
hs : s ∈ l
⊢ s ∈ map f k

tactic: have : NeBot (k ⊓ 𝓟 (f ⁻¹' sᶜ)) := by simpa [neBot_iff, inf_principal_eq_bot]
state_before: ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
s : Set β
hs : s ∈ l
H : ¬s ∈ map f k
⊢ ∃ x, Tendsto x atTop k ∧ ¬Tendsto (f ∘ x) atTop l

tactic: rcases (k ⊓ 𝓟 (f ⁻¹' sᶜ)).exists_seq_tendsto with ⟨x, hx⟩
state_before: ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
s : Set β
hs : s ∈ l
H : ¬s ∈ map f k
this : NeBot (k ⊓ 𝓟 (f ⁻¹' sᶜ))
⊢ ∃ x, Tendsto x atTop k ∧ ¬Tendsto (f ∘ x) atTop l

tactic: rw [tendsto_inf, tendsto_principal] at hx
state_before: case intro
ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
s : Set β
hs : s ∈ l
H : ¬s ∈ map f k
this : NeBot (k ⊓ 𝓟 (f ⁻¹' sᶜ))
x : ℕ → α
hx : Tendsto x atTop (k ⊓ 𝓟 (f ⁻¹' sᶜ))
⊢ ∃ x, Tendsto x atTop k ∧ ¬Tendsto (f ∘ x) atTop l

tactic: refine' ⟨x, hx.1, fun h => _⟩
state_before: case intro
ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
s : Set β
hs : s ∈ l
H : ¬s ∈ map f k
this : NeBot (k ⊓ 𝓟 (f ⁻¹' sᶜ))
x : ℕ → α
hx : Tendsto x atTop k ∧ ∀ᶠ (a : ℕ) in atTop, x a ∈ f ⁻¹' sᶜ
⊢ ∃ x, Tendsto x atTop k ∧ ¬Tendsto (f ∘ x) atTop l

tactic: rcases (hx.2.and (h hs)).exists with ⟨N, hnmem, hmem⟩
state_before: case intro
ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
s : Set β
hs : s ∈ l
H : ¬s ∈ map f k
this : NeBot (k ⊓ 𝓟 (f ⁻¹' sᶜ))
x : ℕ → α
hx : Tendsto x atTop k ∧ ∀ᶠ (a : ℕ) in atTop, x a ∈ f ⁻¹' sᶜ
h : Tendsto (f ∘ x) atTop l
⊢ False

tactic: exact hnmem hmem
state_before: case intro.intro.intro
ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
s : Set β
hs : s ∈ l
H : ¬s ∈ map f k
this : NeBot (k ⊓ 𝓟 (f ⁻¹' sᶜ))
x : ℕ → α
hx : Tendsto x atTop k ∧ ∀ᶠ (a : ℕ) in atTop, x a ∈ f ⁻¹' sᶜ
h : Tendsto (f ∘ x) atTop l
N : ℕ
hnmem : x N ∈ f ⁻¹' sᶜ
hmem : (f ∘ x) N ∈ s
⊢ False

tactic: simpa [neBot_iff, inf_principal_eq_bot]
state_before: ι : Type ?u.364855
ι' : Type ?u.364858
α : Type u_1
β : Type u_2
γ : Type ?u.364867
f : α → β
k : Filter α
l : Filter β
inst✝ : IsCountablyGenerated k
s : Set β
hs : s ∈ l
H : ¬s ∈ map f k
⊢ NeBot (k ⊓ 𝓟 (f ⁻¹' sᶜ))