Download tasks/real-analysis/real-analysis-limit_sequence-d3-e0009/solution/Solution.lean from RenaissanceLabsEU/math: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/real-analysis/real-analysis-limit_sequence-d3-e0009/solution/Solution.lean
- Command line
-
hf download hf://datasets/RenaissanceLabsEU/math/tasks/real-analysis/real-analysis-limit_sequence-d3-e0009/solution/Solution.lean
-
curl -L -o Solution.lean https://huggingface.co/datasets/RenaissanceLabsEU/math/resolve/main/tasks/real-analysis/real-analysis-limit_sequence-d3-e0009/solution/Solution.lean
1.08 kB
Lean 4 · 1
declaration statementsfull
4The sequence tends to 0 (epsilon-N definition).
theorem seq_limit :
∀ ε > 0, ∃ N : ℕ, ∀ n ≥ N, |((6 : ℝ) * (n : ℝ) + (4 : ℝ)) / ((n : ℝ) ^ 2 + (6 : ℝ)) - 0| < ε := by proof · 11 lines
intro ε hε
refine ⟨⌈(10 : ℝ) / ε⌉₊ + 1, fun n hn => ?_⟩
have h1 : (10 : ℝ) / ε ≤ ((⌈(10 : ℝ) / ε⌉₊ : ℕ) : ℝ) := Nat.le_ceil _
have h1' : (((⌈(10 : ℝ) / ε⌉₊ + 1 : ℕ)) : ℝ) ≤ (n : ℝ) := by exact_mod_cast hn
push_cast at h1'
have h2 : (10 : ℝ) ≤ ((⌈(10 : ℝ) / ε⌉₊ : ℕ) : ℝ) * ε := (div_le_iff₀ hε).mp h1
have hn1 : (1 : ℝ) ≤ (n : ℝ) := by linarith [Nat.cast_nonneg (α := ℝ) ⌈(10 : ℝ) / ε⌉₊]
have hM : (10 : ℝ) < (n : ℝ) * ε := by nlinarith
have hpos : (0 : ℝ) < (n : ℝ) ^ 2 + (6 : ℝ) := by positivity
rw [sub_zero, abs_of_pos (by positivity), div_lt_iff₀ hpos]
nlinarith [mul_pos hε (by norm_num : (0 : ℝ) < (6 : ℝ)), mul_le_mul_of_nonneg_left hn1 (by positivity : (0 : ℝ) ≤ (4 : ℝ)), mul_pos hε (by linarith : (0 : ℝ) < (n : ℝ))]Outline