Theorem: Real.le_mk_of_forall_le
File: Mathlib/Data/Real/Basic.lean

tactic: intro h
state_before: x y : ℝ
f : CauSeq ℚ abs
⊢ (∃ i, ∀ (j : ℕ), j ≥ i → x ≤ ↑(↑f j)) → x ≤ mk f

tactic: induction' x using Real.ind_mk with x
state_before: x y : ℝ
f : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → x ≤ ↑(↑f j)
⊢ x ≤ mk f

tactic: apply le_of_not_lt
state_before: case h
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
⊢ mk x ≤ mk f

tactic: rw [mk_lt]
state_before: case h.h
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
⊢ ¬mk f < mk x

tactic: rintro ⟨K, K0, hK⟩
state_before: case h.h
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
⊢ ¬f < x

tactic: obtain ⟨i, H⟩ := exists_forall_ge_and h (exists_forall_ge_and hK (f.cauchy₃ <| half_pos K0))
state_before: case h.h.intro.intro
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ ↑(x - f) j
⊢ False

tactic: apply not_lt_of_le (H _ le_rfl).1
state_before: case h.h.intro.intro.intro
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ ↑(x - f) j
i : ℕ
H : ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ (k : ℕ), k ≥ j → abs (↑f k - ↑f j) < K / 2
⊢ False

tactic: erw [mk_lt]
state_before: case h.h.intro.intro.intro
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ ↑(x - f) j
i : ℕ
H : ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ (k : ℕ), k ≥ j → abs (↑f k - ↑f j) < K / 2
⊢ ↑(↑f i) < mk x

tactic: refine' ⟨_, half_pos K0, i, fun j ij => _⟩
state_before: case h.h.intro.intro.intro
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ ↑(x - f) j
i : ℕ
H : ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ (k : ℕ), k ≥ j → abs (↑f k - ↑f j) < K / 2
⊢ const abs ↑(↑f i) < x

tactic: have := add_le_add (H _ ij).2.1 (le_of_lt (abs_lt.1 <| (H _ le_rfl).2.2 _ ij).1)
state_before: case h.h.intro.intro.intro
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ ↑(x - f) j
i : ℕ
H : ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ (k : ℕ), k ≥ j → abs (↑f k - ↑f j) < K / 2
j : ℕ
ij : j ≥ 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
state_before: case h.h.intro.intro.intro
x✝ y : ℝ
f : CauSeq ℚ abs
h✝ : ∃ i, ∀ (j : ℕ), j ≥ i → x✝ ≤ ↑(↑f j)
x : CauSeq ℚ abs
h : ∃ i, ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j)
K : ℚ
K0 : K > 0
hK : ∃ i, ∀ (j : ℕ), j ≥ i → K ≤ ↑(x - f) j
i : ℕ
H : ∀ (j : ℕ), j ≥ i → mk x ≤ ↑(↑f j) ∧ K ≤ ↑(x - f) j ∧ ∀ (k : ℕ), k ≥ j → abs (↑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