Theorem: CauSeq.abv_pos_of_not_limZero
File: Mathlib/Data/Real/CauSeq.lean

tactic: haveI := Classical.propDecidable
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
⊢ ∃ K, K > 0 ∧ ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ abv (↑f j)

tactic: by_contra nk
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this : (a : Prop) → Decidable a
⊢ ∃ K, K > 0 ∧ ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ abv (↑f j)

tactic: refine' hf fun ε ε0 => _
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this : (a : Prop) → Decidable a
nk : ¬∃ K, K > 0 ∧ ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ abv (↑f j)
⊢ False

tactic: simp [not_forall] at nk
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this : (a : Prop) → Decidable a
nk : ¬∃ K, K > 0 ∧ ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ abv (↑f j)
ε : α
ε0 : ε > 0
⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abv (↑f j) < ε

tactic: cases' f.cauchy₃ (half_pos ε0) with i hi
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this : (a : Prop) → Decidable a
ε : α
ε0 : ε > 0
nk : ∀ (x : α), 0 < x → ∀ (x_1 : ℕ), ∃ x_2, x_1 ≤ x_2 ∧ abv (↑f x_2) < x
⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abv (↑f j) < ε

tactic: rcases nk _ (half_pos ε0) i with ⟨j, ij, hj⟩
state_before: case intro
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this : (a : Prop) → Decidable a
ε : α
ε0 : ε > 0
nk : ∀ (x : α), 0 < x → ∀ (x_1 : ℕ), ∃ x_2, x_1 ≤ x_2 ∧ abv (↑f x_2) < x
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → abv (↑f k - ↑f j) < ε / 2
⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abv (↑f j) < ε

tactic: refine' ⟨j, fun k jk => _⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this : (a : Prop) → Decidable a
ε : α
ε0 : ε > 0
nk : ∀ (x : α), 0 < x → ∀ (x_1 : ℕ), ∃ x_2, x_1 ≤ x_2 ∧ abv (↑f x_2) < x
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → abv (↑f k - ↑f j) < ε / 2
j : ℕ
ij : i ≤ j
hj : abv (↑f j) < ε / 2
⊢ ∃ i, ∀ (j : ℕ), j ≥ i → abv (↑f j) < ε

tactic: have := lt_of_le_of_lt (abv_add abv _ _) (add_lt_add (hi j ij k jk) hj)
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this : (a : Prop) → Decidable a
ε : α
ε0 : ε > 0
nk : ∀ (x : α), 0 < x → ∀ (x_1 : ℕ), ∃ x_2, x_1 ≤ x_2 ∧ abv (↑f x_2) < x
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → abv (↑f k - ↑f j) < ε / 2
j : ℕ
ij : i ≤ j
hj : abv (↑f j) < ε / 2
k : ℕ
jk : k ≥ j
⊢ abv (↑f k) < ε

tactic: rwa [sub_add_cancel, add_halves] at this
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f : CauSeq β abv
hf : ¬LimZero f
this✝ : (a : Prop) → Decidable a
ε : α
ε0 : ε > 0
nk : ∀ (x : α), 0 < x → ∀ (x_1 : ℕ), ∃ x_2, x_1 ≤ x_2 ∧ abv (↑f x_2) < x
i : ℕ
hi : ∀ (j : ℕ), j ≥ i → ∀ (k : ℕ), k ≥ j → abv (↑f k - ↑f j) < ε / 2
j : ℕ
ij : i ≤ j
hj : abv (↑f j) < ε / 2
k : ℕ
jk : k ≥ j
this : abv (↑f k - ↑f j + ↑f j) < ε / 2 + ε / 2
⊢ abv (↑f k) < ε