-- Mathlib/Data/Real/Basic.lean
theorem le_mk_of_forall_le {f : CauSeq ℚ abs} : (∃ i, ∀ j ≥ i, x ≤ f j) → x ≤ mk f

Proof state:
case h.h
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
⊢ ¬mk f < mk x

Tactic:
rw [mk_lt]

Result:
case h.h
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
⊢ ¬f < x

Proof state:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
j : ℕ
ij : j ≥ i
⊢ K / 2 ≤ ↑(x - const abs ↑(↑f i)) j

Tactic:
have := add_le_add (H _ ij).2.1 (le_of_lt (abs_lt.1 <| (H _ le_rfl).2.2 _ ij).1)

Result:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
j : ℕ
ij : j ≥ i
this : K + -(K / 2) ≤ ↑(x - f) j + (↑f j - ↑f i)
⊢ K / 2 ≤ ↑(x - const abs ↑(↑f i)) j

Proof state:
case h
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
⊢ mk x ≤ mk f

Tactic:
apply le_of_not_lt

Result:
case h.h
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
⊢ ¬mk f < mk x

Proof state:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
j : ℕ
ij : j ≥ i
this : K + -(K / 2) ≤ ↑(x - f) j + (↑f j - ↑f i)
⊢ K / 2 ≤ ↑(x - const abs ↑(↑f i)) j

Tactic:
rwa [← sub_eq_add_neg, sub_self_div_two, sub_apply, sub_add_sub_cancel] at this

Result:
no goals

Proof state:
x : ℝ
f : CauSeq ℚ abs
⊢ (∃ i, ∀ j ≥ i, x ≤ ↑(↑f j)) → x ≤ mk f

Tactic:
intro h

Result:
x : ℝ
f : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, x ≤ ↑(↑f j)
⊢ x ≤ mk f

Proof state:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
⊢ ↑(↑f i) < mk x

Tactic:
erw [mk_lt]

Result:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
⊢ const abs ↑(↑f i) < x

Proof state:
case h.h
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
⊢ ¬f < x

Tactic:
rintro ⟨K, K0, hK⟩

Result:
case h.h.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
⊢ False

Proof state:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
⊢ False

Tactic:
apply not_lt_of_le (H _ le_rfl).1

Result:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
⊢ ↑(↑f i) < mk x

Proof state:
x : ℝ
f : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, x ≤ ↑(↑f j)
⊢ x ≤ mk f

Tactic:
induction' x using Real.ind_mk with x

Result:
case h
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
⊢ mk x ≤ mk f

Proof state:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
⊢ const abs ↑(↑f i) < x

Tactic:
refine ⟨_, half_pos K0, i, fun j ij => ?_⟩

Result:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
j : ℕ
ij : j ≥ i
⊢ K / 2 ≤ ↑(x - const abs ↑(↑f i)) j

Proof state:
case h.h.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
⊢ False

Tactic:
obtain ⟨i, H⟩ := exists_forall_ge_and h (exists_forall_ge_and hK (f.cauchy₃ <| half_pos K0))

Result:
case h.h.intro.intro.intro
x✝ : ℝ
f x : CauSeq ℚ abs
h : ∃ i, ∀ j ≥ i, mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ j ≥ i, K ≤ ↑(x - f) j
i : ℕ
H : ∀ j ≥ i, mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ k ≥ j, |↑f k - ↑f j| < K / 2
⊢ False