Definition 2.5.1: For a sequence x : ℕ → α, the expression
∑_{n=1}^{∞} x n denotes the formal series. Its k-th partial sum is
s k = ∑_{n=1}^k x n. The series converges to ℓ when the partial sums
s k converge to ℓ as k → ∞; otherwise the series is divergent. When the
series converges we identify its value with this limit.
Equations
- partialSumsFromOne x k = ∑ n ∈ Finset.Icc 1 k, x n
Instances For
Convergence of the series ∑_{n=1}^{∞} x n to a limit ℓ, expressed via
the convergence of the partial sums ∑_{n=1}^k x n as k → ∞.
Equations
- SeriesConvergesTo x ℓ = HasSum (fun (n : ℕ) => x (n + 1)) ℓ
Instances For
The series ∑_{n=1}^{∞} x n is convergent if its partial sums admit some
limit.
Equations
- SeriesConvergent x = Summable fun (n : ℕ) => x (n + 1)
Instances For
A divergent series is one whose partial sums do not converge.
Equations
Instances For
Definition 2.5.7: A series ∑_{n=1}^{∞} x n is called Cauchy (a Cauchy
series) when its sequence of partial sums ∑_{n=1}^k x n forms a Cauchy
sequence.
Equations
- SeriesCauchy x = CauchySeq fun (k : ℕ) => partialSumsFromOne x k
Instances For
Bridge to mathlib's HasSum: using the shift starting at 1 our notion of
converging series agrees with HasSum.
The book's notion of a convergent series agrees with mathlib's Summable
for the shifted sequence starting at index 1.
Proposition 2.5.6: For a series ∑_{n=1}^{∞} x n and any M ∈ ℕ,
convergence is unchanged by discarding the first M - 1 terms; equivalently
∑_{n=1}^{∞} x n converges if and only if the tail ∑_{n=M}^{∞} x n
converges.
A closed form for the partial sums of the geometric series with ratio 1/2.
Example 2.5.4: The geometric series ∑_{n=1}^{∞} (1/2)^n converges to 1.
For each k ≥ 1, the partial sum satisfies
∑_{n=1}^k (1/2)^n + (1/2)^k = 1, so the sequence of partial sums tends to 1.
Example 2.5.4: Consequently, the series ∑_{n=1}^{∞} (1/2)^n converges and
its sum equals 1.
Split partial sums into an initial segment plus a tail over Icc (n+1) k.
The difference of partial sums is the tail sum over Icc (n+1) k.
Distance between partial sums equals the norm of the corresponding tail sum.
Proposition 2.5.8: The series ∑_{n=1}^{∞} x n is Cauchy if and only if
for every ε > 0 there exists M ∈ ℕ such that for all n ≥ M and k > n,
the tail sum ∑_{i=n+1}^k x i has norm less than ε.
Proposition 2.5.9: If the series ∑_{n=1}^{∞} x n converges, then the
underlying sequence converges and its limit is 0; equivalently,
lim_{n→∞} x n = 0.
Example 2.5.11: The harmonic series ∑_{n=1}^{∞} 1/n diverges even though
its terms tend to 0. Grouping the terms in blocks of length 2^{k-1} shows
that the partial sums s_{2^k} satisfy s_{2^k} ≥ 1 + k/2, which is
unbounded by the Archimedean property; hence the whole sequence of partial
sums is unbounded and the series diverges.
Proposition 2.5.12 (linearity of series). Let α : ℝ and suppose the
series ∑_{n=1}^{∞} x n and ∑_{n=1}^{∞} y n converge. Then
(i) the series ∑_{n=1}^{∞} α * x n converges and its value is
α * ∑_{n=1}^{∞} x n; and
(ii) the series ∑_{n=1}^{∞} (x n + y n) converges and its value is the sum of
the two series.
Proposition 2.5.13: For a sequence of nonnegative real numbers, the series
∑_{n=1}^{∞} x n converges if and only if the sequence of partial sums is
bounded above.
Definition 2.5.14: A series ∑_{n=1}^{∞} x n converges absolutely if the
series of norms ∑_{n=1}^{∞} ‖x n‖ converges. If the original series converges
but does not converge absolutely, it is conditionally convergent.
Equations
- SeriesAbsolutelyConvergent x = SeriesConvergent fun (n : ℕ) => ‖x n‖
Instances For
Equations
Instances For
Proposition 2.5.15: An absolutely convergent series ∑_{n=1}^{∞} x n
necessarily converges.
Proposition 2.5.16 (comparison test). Let ∑_{n=1}^{∞} x n and
∑_{n=1}^{∞} y n be series with 0 ≤ x n ≤ y n for all n ∈ ℕ.
(i) If ∑_{n=1}^{∞} y n converges, then ∑_{n=1}^{∞} x n converges.
(ii) If ∑_{n=1}^{∞} x n diverges, then ∑_{n=1}^{∞} y n diverges.
Proposition 2.5.17 ($p$-series or the $p$-test). For p ∈ ℝ, the series
∑_{n=1}^{∞} 1 / n^p converges if and only if p > 1.
Example 2.5.18: The series ∑_{n=1}^{∞} 1 / (n^2 + 1) converges, for instance
by comparison with the $p$-series ∑_{n=1}^{∞} 1 / n^2.
Proposition 2.5.19 (ratio test). Let ∑_{n=1}^{∞} x n be a real series with
x n ≠ 0 for all n, and suppose the limit
L = lim_{n→∞} |x (n+1)| / |x n| exists. (i) If L < 1, the series converges
absolutely. (ii) If L > 1, the series diverges.
Example 2.5.20: The series ∑_{n=1}^{∞} 2^n / n! converges absolutely.
The ratio of successive terms tends to 0, so the ratio test applies.