Theorem: CauSeq.cauchySeq
File: Mathlib/Topology/MetricSpace/CauSeqFilter.lean

tactic: refine' cauchy_iff.2 ⟨by infer_instance, fun s hs => _⟩
state_before: β : Type v
inst✝ : NormedField β
f : CauSeq β norm
⊢ CauchySeq ↑f

tactic: rcases mem_uniformity_dist.1 hs with ⟨ε, ⟨hε, hεs⟩⟩
state_before: β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
⊢ ∃ t, t ∈ map (↑f) atTop ∧ t ×ˢ t ⊆ s

tactic: cases' CauSeq.cauchy₂ f hε with N hN
state_before: case intro.intro
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
⊢ ∃ t, t ∈ map (↑f) atTop ∧ t ×ˢ t ⊆ s

tactic: exists { n | n ≥ N }.image f
state_before: case intro.intro.intro
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
⊢ ∃ t, t ∈ map (↑f) atTop ∧ t ×ˢ t ⊆ s

tactic: simp only [exists_prop, mem_atTop_sets, mem_map, mem_image, ge_iff_le, mem_setOf_eq]
state_before: case intro.intro.intro
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
⊢ ↑f '' {n | n ≥ N} ∈ map (↑f) atTop ∧ (↑f '' {n | n ≥ N}) ×ˢ (↑f '' {n | n ≥ N}) ⊆ s

tactic: constructor
state_before: case intro.intro.intro
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
⊢ (∃ a, ∀ (b : ℕ), a ≤ b → b ∈ ↑f ⁻¹' (↑f '' {n | N ≤ n})) ∧ (↑f '' {n | N ≤ n}) ×ˢ (↑f '' {n | N ≤ n}) ⊆ s

tactic: infer_instance
state_before: β : Type v
inst✝ : NormedField β
f : CauSeq β norm
⊢ NeBot (map (↑f) atTop)

tactic: exists N
state_before: case intro.intro.intro.left
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
⊢ ∃ a, ∀ (b : ℕ), a ≤ b → b ∈ ↑f ⁻¹' (↑f '' {n | N ≤ n})

tactic: intro b hb
state_before: case intro.intro.intro.left
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
⊢ ∀ (b : ℕ), N ≤ b → b ∈ ↑f ⁻¹' (↑f '' {n | N ≤ n})

tactic: exists b
state_before: case intro.intro.intro.left
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
b : ℕ
hb : N ≤ b
⊢ b ∈ ↑f ⁻¹' (↑f '' {n | N ≤ n})

tactic: rintro ⟨a, b⟩ ⟨⟨a', ⟨ha'1, ha'2⟩⟩, ⟨b', ⟨hb'1, hb'2⟩⟩⟩
state_before: case intro.intro.intro.right
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
⊢ (↑f '' {n | N ≤ n}) ×ˢ (↑f '' {n | N ≤ n}) ⊆ s

tactic: dsimp at ha'1 ha'2 hb'1 hb'2
state_before: case intro.intro.intro.right.mk.intro.intro.intro.intro.intro
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
a b : β
a' : ℕ
ha'1 : a' ∈ {n | N ≤ n}
ha'2 : ↑f a' = (a, b).fst
b' : ℕ
hb'1 : b' ∈ {n | N ≤ n}
hb'2 : ↑f b' = (a, b).snd
⊢ (a, b) ∈ s

tactic: rw [← ha'2, ← hb'2]
state_before: case intro.intro.intro.right.mk.intro.intro.intro.intro.intro
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
a b : β
a' : ℕ
ha'1 : N ≤ a'
ha'2 : ↑f a' = a
b' : ℕ
hb'1 : N ≤ b'
hb'2 : ↑f b' = b
⊢ (a, b) ∈ s

tactic: apply hεs
state_before: case intro.intro.intro.right.mk.intro.intro.intro.intro.intro
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
a b : β
a' : ℕ
ha'1 : N ≤ a'
ha'2 : ↑f a' = a
b' : ℕ
hb'1 : N ≤ b'
hb'2 : ↑f b' = b
⊢ (↑f a', ↑f b') ∈ s

tactic: rw [dist_eq_norm]
state_before: case intro.intro.intro.right.mk.intro.intro.intro.intro.intro.a
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
a b : β
a' : ℕ
ha'1 : N ≤ a'
ha'2 : ↑f a' = a
b' : ℕ
hb'1 : N ≤ b'
hb'2 : ↑f b' = b
⊢ dist (↑f a') (↑f b') < ε

tactic: apply hN <;> assumption
state_before: case intro.intro.intro.right.mk.intro.intro.intro.intro.intro.a
β : Type v
inst✝ : NormedField β
f : CauSeq β norm
s : Set (β × β)
hs : s ∈ uniformity β
ε : ℝ
hε : ε > 0
hεs : ∀ {a b : β}, dist a b < ε → (a, b) ∈ s
N : ℕ
hN : ∀ (j : ℕ), j ≥ N → ∀ (k : ℕ), k ≥ N → ‖↑f j - ↑f k‖ < ε
a b : β
a' : ℕ
ha'1 : N ≤ a'
ha'2 : ↑f a' = a
b' : ℕ
hb'1 : N ≤ b'
hb'2 : ↑f b' = b
⊢ ‖↑f a' - ↑f b'‖ < ε