leanprover-community/mathlib

feat(data/real/cau_seq): relate cauchy sequence completeness and filt…

`…er completeness`
robertylewis committed Sep 28, 2018
1 parent c199015 commit b72cc01d5c1ea56ee42753595262bf6657b90bb3
 @@ -235,6 +235,18 @@ begin ← div_lt_iff' (sub_pos.2 h), one_div_eq_inv] end theorem exists_nat_one_div_lt {ε : α} (hε : ε > 0) : ∃ n : ℕ, 1 / (n + 1: α) < ε := begin cases archimedean_iff_nat_lt.1 (by apply_instance) (1/ε) with n hn, existsi n, apply div_lt_of_mul_lt_of_pos, { simp, apply add_pos_of_pos_of_nonneg zero_lt_one, apply nat.cast_nonneg }, { apply (div_lt_iff' hε).1, transitivity, { exact hn }, { simp [zero_lt_one] }} end include α @[simp] theorem rat.cast_floor (x : ℚ) : by haveI := archimedean.floor_ring α; exact ⌊(x:α)⌋ = ⌊x⌋ :=
@@ -144,6 +144,11 @@ tendsto_coe_iff.1 \$
have hr : (k : ℝ) > 1, from show (k : ℝ) > (1 : ℕ), from nat.cast_lt.2 h,
by simpa using tendsto_pow_at_top_at_top_of_gt_1 hr

lemma tendsto_inverse_at_top_nhds_0_nat : tendsto (λ n : ℕ, (↑n : ℝ)⁻¹) at_top (nhds 0) :=

PatrickMassot Sep 28, 2018

Collaborator

This up-arrow is useless

tendsto.comp (tendsto_coe_iff.2 tendsto_id) tendsto_inverse_at_top_nhds_0

lemma tendsto_one_div_at_top_nhds_0_nat : tendsto (λ n : ℕ, 1/(↑n : ℝ)) at_top (nhds 0) :=

PatrickMassot Sep 28, 2018

Collaborator

This up-arrow is also useless

by simpa only [inv_eq_one_div] using tendsto_inverse_at_top_nhds_0_nat

lemma sum_geometric' {r : ℝ} (h : r 0) :
{n}, (finset.range n).sum (λi, (r + 1) ^ i) = ((r + 1) ^ n - 1) / r