mathlib documentation

analysis.​specific_limits

analysis.​specific_limits

theorem tendsto_at_top_mul_left {α : Type u_1} {β : Type u_2} [decidable_linear_ordered_semiring α] [archimedean α] {l : filter β} {r : α} (hr : 0 < r) {f : β → α} :

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the left) also tends to infinity. The archimedean assumption is convenient to get a statement that works on , and , although not necessary (a version in ordered fields is given in tendsto_at_top_mul_left').

theorem tendsto_at_top_mul_right {α : Type u_1} {β : Type u_2} [decidable_linear_ordered_semiring α] [archimedean α] {l : filter β} {r : α} (hr : 0 < r) {f : β → α} :

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the right) also tends to infinity. The archimedean assumption is convenient to get a statement that works on , and , although not necessary (a version in ordered fields is given in tendsto_at_top_mul_right').

theorem tendsto_at_top_mul_left' {α : Type u_1} {β : Type u_2} [linear_ordered_field α] {l : filter β} {r : α} (hr : 0 < r) {f : β → α} :

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the left) also tends to infinity. For a version working in or , use tendsto_at_top_mul_left instead.

theorem tendsto_at_top_mul_right' {α : Type u_1} {β : Type u_2} [linear_ordered_field α] {l : filter β} {r : α} (hr : 0 < r) {f : β → α} :

If a function tends to infinity along a filter, then this function multiplied by a positive constant (on the right) also tends to infinity. For a version working in or , use tendsto_at_top_mul_right instead.

theorem tendsto_at_top_div {α : Type u_1} {β : Type u_2} [linear_ordered_field α] {l : filter β} {r : α} (hr : 0 < r) {f : β → α} :

If a function tends to infinity along a filter, then this function divided by a positive constant also tends to infinity.

The function x ↦ x⁻¹ tends to +∞ on the right of 0.

The function r ↦ r⁻¹ tends to 0 on the right as r → +∞.

theorem summable_of_absolute_convergence_real {f : } :
(∃ (r : ), filter.tendsto (λ (n : ), (finset.range n).sum (λ (i : ), abs (f i))) filter.at_top (nhds r))summable f

Powers

theorem tendsto_add_one_pow_at_top_at_top_of_pos {α : Type u_1} [linear_ordered_semiring α] [archimedean α] {r : α} :
0 < rfilter.tendsto (λ (n : ), (r + 1) ^ n) filter.at_top filter.at_top

theorem tendsto_pow_at_top_at_top_of_one_lt {α : Type u_1} [linear_ordered_ring α] [archimedean α] {r : α} :

theorem lim_norm_zero' {𝕜 : Type u_1} [normed_group 𝕜] :

theorem tendsto_pow_at_top_nhds_0_of_lt_1 {r : } :
0 rr < 1filter.tendsto (λ (n : ), r ^ n) filter.at_top (nhds 0)

theorem geom_lt {u : } {k : } (hk : 0 < k) {n : } :
(∀ (m : ), m nk * u m < u (m + 1))k ^ (n + 1) * u 0 < u (n + 1)

theorem tendsto_at_top_of_geom_lt {v : } {k : } :
0 < v 01 < k(∀ (n : ), k * v n < v (n + 1))filter.tendsto v filter.at_top filter.at_top

If a sequence v of real numbers satisfies k*v n < v (n+1) with 1 < k, then it goes to +∞.

theorem tendsto_pow_at_top_nhds_0_of_norm_lt_1 {R : Type u_1} [normed_ring R] {x : R} :
x < 1filter.tendsto (λ (n : ), x ^ n) filter.at_top (nhds 0)

In a normed ring, the powers of an element x with ∥x∥ < 1 tend to zero.

Geometric series

theorem has_sum_geometric_of_lt_1 {r : } :
0 rr < 1has_sum (λ (n : ), r ^ n) (1 - r)⁻¹

theorem summable_geometric_of_lt_1 {r : } :
0 rr < 1summable (λ (n : ), r ^ n)

theorem tsum_geometric_of_lt_1 {r : } :
0 rr < 1(∑' (n : ), r ^ n) = (1 - r)⁻¹

theorem has_sum_geometric_two  :
has_sum (λ (n : ), (1 / 2) ^ n) 2

theorem summable_geometric_two  :
summable (λ (n : ), (1 / 2) ^ n)

theorem tsum_geometric_two  :
(∑' (n : ), (1 / 2) ^ n) = 2

theorem sum_geometric_two_le (n : ) :
(finset.range n).sum (λ (i : ), (1 / 2) ^ i) 2

theorem has_sum_geometric_two' (a : ) :
has_sum (λ (n : ), a / 2 / 2 ^ n) a

theorem summable_geometric_two' (a : ) :
summable (λ (n : ), a / 2 / 2 ^ n)

theorem tsum_geometric_two' (a : ) :
(∑' (n : ), a / 2 / 2 ^ n) = a

theorem nnreal.​has_sum_geometric {r : nnreal} :
r < 1has_sum (λ (n : ), r ^ n) (1 - r)⁻¹

theorem nnreal.​summable_geometric {r : nnreal} :
r < 1summable (λ (n : ), r ^ n)

theorem tsum_geometric_nnreal {r : nnreal} :
r < 1(∑' (n : ), r ^ n) = (1 - r)⁻¹

theorem ennreal.​tsum_geometric (r : ennreal) :
(∑' (n : ), r ^ n) = (1 - r)⁻¹

The series pow r converges to (1-r)⁻¹. For r < 1 the RHS is a finite number, and for 1 ≤ r the RHS equals .

theorem has_sum_geometric_of_norm_lt_1 {K : Type u_4} [normed_field K] {ξ : K} :
ξ < 1has_sum (λ (n : ), ξ ^ n) (1 - ξ)⁻¹

theorem summable_geometric_of_norm_lt_1 {K : Type u_4} [normed_field K] {ξ : K} :
ξ < 1summable (λ (n : ), ξ ^ n)

theorem tsum_geometric_of_norm_lt_1 {K : Type u_4} [normed_field K] {ξ : K} :
ξ < 1(∑' (n : ), ξ ^ n) = (1 - ξ)⁻¹

theorem has_sum_geometric_of_abs_lt_1 {r : } :
abs r < 1has_sum (λ (n : ), r ^ n) (1 - r)⁻¹

theorem summable_geometric_of_abs_lt_1 {r : } :
abs r < 1summable (λ (n : ), r ^ n)

theorem tsum_geometric_of_abs_lt_1 {r : } :
abs r < 1(∑' (n : ), r ^ n) = (1 - r)⁻¹

Sequences with geometrically decaying distance in metric spaces

In this paragraph, we discuss sequences in metric spaces or emetric spaces for which the distance between two consecutive terms decays geometrically. We show that such sequences are Cauchy sequences, and bound their distances to the limit. We also discuss series with geometrically decaying terms.

theorem cauchy_seq_of_edist_le_geometric {α : Type u_1} [emetric_space α] (r C : ennreal) (hr : r < 1) (hC : C ) {f : → α} :
(∀ (n : ), has_edist.edist (f n) (f (n + 1)) C * r ^ n)cauchy_seq f

If edist (f n) (f (n+1)) is bounded by C * r^n, C ≠ ∞, r < 1, then f is a Cauchy sequence.

theorem edist_le_of_edist_le_geometric_of_tendsto {α : Type u_1} [emetric_space α] (r C : ennreal) {f : → α} (hu : ∀ (n : ), has_edist.edist (f n) (f (n + 1)) C * r ^ n) {a : α} (ha : filter.tendsto f filter.at_top (nhds a)) (n : ) :
has_edist.edist (f n) a C * r ^ n / (1 - r)

If edist (f n) (f (n+1)) is bounded by C * r^n, then the distance from f n to the limit of f is bounded above by C * r^n / (1 - r).

theorem edist_le_of_edist_le_geometric_of_tendsto₀ {α : Type u_1} [emetric_space α] (r C : ennreal) {f : → α} (hu : ∀ (n : ), has_edist.edist (f n) (f (n + 1)) C * r ^ n) {a : α} :

If edist (f n) (f (n+1)) is bounded by C * r^n, then the distance from f 0 to the limit of f is bounded above by C / (1 - r).

theorem cauchy_seq_of_edist_le_geometric_two {α : Type u_1} [emetric_space α] (C : ennreal) (hC : C ) {f : → α} :
(∀ (n : ), has_edist.edist (f n) (f (n + 1)) C / 2 ^ n)cauchy_seq f

If edist (f n) (f (n+1)) is bounded by C * 2^-n, then f is a Cauchy sequence.

theorem edist_le_of_edist_le_geometric_two_of_tendsto {α : Type u_1} [emetric_space α] (C : ennreal) {f : → α} (hu : ∀ (n : ), has_edist.edist (f n) (f (n + 1)) C / 2 ^ n) {a : α} (ha : filter.tendsto f filter.at_top (nhds a)) (n : ) :
has_edist.edist (f n) a 2 * C / 2 ^ n

If edist (f n) (f (n+1)) is bounded by C * 2^-n, then the distance from f n to the limit of f is bounded above by 2 * C * 2^-n.

theorem edist_le_of_edist_le_geometric_two_of_tendsto₀ {α : Type u_1} [emetric_space α] (C : ennreal) {f : → α} (hu : ∀ (n : ), has_edist.edist (f n) (f (n + 1)) C / 2 ^ n) {a : α} :

If edist (f n) (f (n+1)) is bounded by C * 2^-n, then the distance from f 0 to the limit of f is bounded above by 2 * C.

theorem aux_has_sum_of_le_geometric {α : Type u_1} [metric_space α] {r C : } (hr : r < 1) {f : → α} :
(∀ (n : ), has_dist.dist (f n) (f (n + 1)) C * r ^ n)has_sum (λ (n : ), C * r ^ n) (C / (1 - r))

theorem cauchy_seq_of_le_geometric {α : Type u_1} [metric_space α] (r C : ) (hr : r < 1) {f : → α} :
(∀ (n : ), has_dist.dist (f n) (f (n + 1)) C * r ^ n)cauchy_seq f

If dist (f n) (f (n+1)) is bounded by C * r^n, r < 1, then f is a Cauchy sequence. Note that this lemma does not assume 0 ≤ C or 0 ≤ r.

theorem dist_le_of_le_geometric_of_tendsto₀ {α : Type u_1} [metric_space α] (r C : ) (hr : r < 1) {f : → α} (hu : ∀ (n : ), has_dist.dist (f n) (f (n + 1)) C * r ^ n) {a : α} :

If dist (f n) (f (n+1)) is bounded by C * r^n, r < 1, then the distance from f n to the limit of f is bounded above by C * r^n / (1 - r).

theorem dist_le_of_le_geometric_of_tendsto {α : Type u_1} [metric_space α] (r C : ) (hr : r < 1) {f : → α} (hu : ∀ (n : ), has_dist.dist (f n) (f (n + 1)) C * r ^ n) {a : α} (ha : filter.tendsto f filter.at_top (nhds a)) (n : ) :
has_dist.dist (f n) a C * r ^ n / (1 - r)

If dist (f n) (f (n+1)) is bounded by C * r^n, r < 1, then the distance from f 0 to the limit of f is bounded above by C / (1 - r).

theorem cauchy_seq_of_le_geometric_two {α : Type u_1} [metric_space α] (C : ) {f : → α} :
(∀ (n : ), has_dist.dist (f n) (f (n + 1)) C / 2 / 2 ^ n)cauchy_seq f

If dist (f n) (f (n+1)) is bounded by (C / 2) / 2^n, then f is a Cauchy sequence.

theorem dist_le_of_le_geometric_two_of_tendsto₀ {α : Type u_1} [metric_space α] (C : ) {f : → α} (hu₂ : ∀ (n : ), has_dist.dist (f n) (f (n + 1)) C / 2 / 2 ^ n) {a : α} :

If dist (f n) (f (n+1)) is bounded by (C / 2) / 2^n, then the distance from f 0 to the limit of f is bounded above by C.

theorem dist_le_of_le_geometric_two_of_tendsto {α : Type u_1} [metric_space α] (C : ) {f : → α} (hu₂ : ∀ (n : ), has_dist.dist (f n) (f (n + 1)) C / 2 / 2 ^ n) {a : α} (ha : filter.tendsto f filter.at_top (nhds a)) (n : ) :
has_dist.dist (f n) a C / 2 ^ n

If dist (f n) (f (n+1)) is bounded by (C / 2) / 2^n, then the distance from f n to the limit of f is bounded above by C / 2^n.

theorem dist_partial_sum_le_of_le_geometric {α : Type u_1} [normed_group α] {r C : } {f : → α} (hf : ∀ (n : ), f n C * r ^ n) (n : ) :
has_dist.dist ((finset.range n).sum (λ (i : ), f i)) ((finset.range (n + 1)).sum (λ (i : ), f i)) C * r ^ n

theorem cauchy_seq_finset_of_geometric_bound {α : Type u_1} [normed_group α] {r C : } {f : → α} :
r < 1(∀ (n : ), f n C * r ^ n)cauchy_seq (λ (s : finset ), s.sum (λ (x : ), f x))

If ∥f n∥ ≤ C * r ^ n for all n : ℕ and some r < 1, then the partial sums of f form a Cauchy sequence. This lemma does not assume 0 ≤ r or 0 ≤ C.

theorem norm_sub_le_of_geometric_bound_of_has_sum {α : Type u_1} [normed_group α] {r C : } {f : → α} (hr : r < 1) (hf : ∀ (n : ), f n C * r ^ n) {a : α} (ha : has_sum f a) (n : ) :
(finset.range n).sum (λ (x : ), f x) - a C * r ^ n / (1 - r)

If ∥f n∥ ≤ C * r ^ n for all n : ℕ and some r < 1, then the partial sums of f are within distance C * r ^ n / (1 - r) of the sum of the series. This lemma does not assume 0 ≤ r or 0 ≤ C.

theorem normed_ring.​summable_geometric_of_norm_lt_1 {R : Type u_4} [normed_ring R] [complete_space R] (x : R) :
x < 1summable (λ (n : ), x ^ n)

A geometric series in a complete normed ring is summable. Proved above (same name, different namespace) for not-necessarily-complete normed fields.

theorem normed_ring.​tsum_geometric_of_norm_lt_1 {R : Type u_4} [normed_ring R] [complete_space R] (x : R) :
x < 1(∑' (n : ), x ^ n) 1 - 1 + (1 - x)⁻¹

Bound for the sum of a geometric series in a normed ring. This formula does not assume that the normed ring satisfies the axiom ∥1∥ = 1.

theorem geom_series_mul_neg {R : Type u_4} [normed_ring R] [complete_space R] (x : R) :
x < 1(∑' (i : ), x ^ i) * (1 - x) = 1

theorem mul_neg_geom_series {R : Type u_4} [normed_ring R] [complete_space R] (x : R) :
x < 1((1 - x) * ∑' (i : ), x ^ i) = 1

Positive sequences with small sums on encodable types

def pos_sum_of_encodable {ε : } (hε : 0 < ε) (ι : Type u_1) [encodable ι] :
{ε' // (∀ (i : ι), 0 < ε' i) ∃ (c : ), has_sum ε' c c ε}

For any positive ε, define on an encodable type a positive sequence with sum less than ε

Equations
theorem nnreal.​exists_pos_sum_of_encodable {ε : nnreal} (hε : 0 < ε) (ι : Type u_1) [encodable ι] :
∃ (ε' : ι → nnreal), (∀ (i : ι), 0 < ε' i) ∃ (c : nnreal), has_sum ε' c c < ε

theorem ennreal.​exists_pos_sum_of_encodable {ε : ennreal} (hε : 0 < ε) (ι : Type u_1) [encodable ι] :
∃ (ε' : ι → nnreal), (∀ (i : ι), 0 < ε' i) (∑' (i : ι), (ε' i)) < ε

Harmonic series

Here we define the harmonic series and prove some basic lemmas about it, leading to a proof of its divergence to +∞

def harmonic_series  :

The harmonic series 1 + 1/2 + 1/3 + ... + 1/n

Equations

The harmonic series diverges to +∞