Documentation

Books.IntroductiontoRealAnalysisVolumeI_JiriLebl_2025.Chapters.Chap02.section06

theorem limsup_nonneg_of_nonneg {u : } (hu : ∀ (n : ), 0 u n) :

The limsup of a nonnegative real sequence is nonnegative.

theorem rpow_inv_natCast_le_pow {a r : } {n : } (ha : 0 a) (hn : n 0) (h : a.rpow (1 / n) r) :
a r ^ n

Convert a bound on the n-th root into a bound on the n-th power.

theorem root_test_abs_converges {x : } {L : } (hlimsup : Filter.limsup (fun (n : ) => |x (n + 1)|.rpow (1 / (n + 1))) Filter.atTop = L) (hL : L < 1) (hbounded : Filter.IsBoundedUnder (fun (x1 x2 : ) => x1 x2) Filter.atTop fun (n : ) => |x (n + 1)|.rpow (1 / (n + 1))) :
Summable fun (n : ) => x (n + 1)

Proposition 2.6.1 (Root test). Let x : ℕ → ℝ and set L = limsup_{n→∞} (|x (n+1)|)^{1/(n+1)}. (i) If L < 1, then ∑_{n=1}^{∞} x n converges absolutely. (ii) If L > 1, then ∑_{n=1}^{∞} x n diverges.

theorem rpow_inv_natCast_lt_pow {a r : } {n : } (ha : 0 a) (hr : 0 r) (hn : n 0) (h : a.rpow (1 / n) > r) :
r ^ n < a

A strict bound on an n-th root yields a strict bound on the n-th power.

A sequence tending to 0 is eventually within unit distance of 0.

theorem root_test_diverges {x : } {L : } (hlimsup : Filter.limsup (fun (n : ) => |x (n + 1)|.rpow (1 / (n + 1))) Filter.atTop = L) (hL : 1 < L) :
¬Summable fun (n : ) => x (n + 1)
theorem alternating_series_converges {x : } (hmono : Antitone fun (n : ) => x (n + 1)) (hpos : ∀ (n : ), 0 x (n + 1)) (hlim : Filter.Tendsto (fun (n : ) => x (n + 1)) Filter.atTop (nhds 0)) :
∃ (l : ), Filter.Tendsto (fun (n : ) => iFinset.range n, (-1) ^ (i + 1) * x (i + 1)) Filter.atTop (nhds l)

Proposition 2.6.2 (Alternating series). If x : ℕ → ℝ is a monotone decreasing sequence of positive numbers with Filter.Tendsto (fun n => x (n + 1)) Filter.atTop (𝓝 0), then the alternating series ∑_{n=1}^∞ (-1)^n x_n converges.

theorem absolute_convergence_rearrangement {x : } {s : } (hs_abs : Summable fun (n : ) => x (n + 1)) (hs_sum : ∑' (n : ), x (n + 1) = s) (σ : Equiv.Perm ) :
(Summable fun (n : ) => x (σ n + 1)) ∑' (n : ), x (σ n + 1) = s

Proposition 2.6.3. If ∑_{n=1}^∞ x_n is absolutely convergent with sum x, then for any bijection σ : ℕ → ℕ the rearranged series ∑_{n=1}^∞ x_{σ n} is absolutely convergent and has the same sum.

theorem mertens_convolution {a b : } (ha : Summable a) (hb : Summable b) (habs : (Summable fun (n : ) => a n) Summable fun (n : ) => b n) :
(Summable fun (n : ) => iFinset.range (n + 1), a i * b (n - i)) ∑' (n : ), iFinset.range (n + 1), a i * b (n - i) = tsum a * tsum b

Theorem 2.6.5 (Mertens' theorem). Suppose ∑_{n=0}^∞ a_n = A and ∑_{n=0}^∞ b_n = B, and assume at least one of the series converges absolutely. Define c n = a 0 * b n + a 1 * b (n - 1) + ⋯ + a n * b 0 = ∑_{i=0}^n a i * b (n - i). Then ∑_{n=0}^∞ c n converges to A * B.

theorem cauchy_product_conditional_diverges :
have a := fun (n : ) => (-1) ^ n / (n + 1); have c := fun (n : ) => iFinset.range (n + 1), a i * a (n - i); ¬Summable c

Example 2.6.6. Let a n = b n = (-1)^n / √(n+1) so that each alternating series ∑_{n=0}^∞ a n and ∑_{n=0}^∞ b n converges conditionally. If c n = ∑_{i=0}^n a i * b (n - i) is their Cauchy product, then the terms c n do not tend to zero, and hence the series ∑_{n=0}^∞ c n diverges.

theorem exp_series_abs_convergent (x : ) :
(Summable fun (n : ) => x ^ n / n.factorial) ∑' (n : ), x ^ n / n.factorial = Real.exp x

Example 2.6.7. The power series ∑_{n=0}^∞ (1 / n!) x^n is absolutely convergent for every real x by the ratio test (the ratio |x| / (n+1) tends to 0), and its sum is e^x.

theorem harmonic_power_series_behavior (x : ) :
(|x| < 1Summable (fun (n : ) => x ^ (n + 1) / (n + 1)) (SummationFilter.conditional ) Summable (fun (n : ) => x ^ (n + 1) / (n + 1)) (SummationFilter.conditional )) Summable (fun (n : ) => (-1) ^ (n + 1) / (n + 1)) (SummationFilter.conditional ) (¬Summable fun (n : ) => (-1) ^ (n + 1) / (n + 1)) ¬Summable (fun (n : ) => 1 ^ (n + 1) / (n + 1)) (SummationFilter.conditional ) (1 < |x|¬Summable (fun (n : ) => x ^ (n + 1) / (n + 1)) (SummationFilter.conditional ))

Example 2.6.8. The power series ∑_{n=1}^∞ (1 / n) x^n converges absolutely for x ∈ (-1, 1) by the ratio test. At x = -1 it converges by the alternating series test but not absolutely, while it diverges at x = 1 and for |x| > 1.

theorem alternating_harmonic_conditional :
Summable (fun (n : ) => (-1) ^ (n + 1) / (n + 1)) (SummationFilter.conditional ) ¬Summable fun (n : ) => (-1) ^ (n + 1) / (n + 1)

The alternating harmonic series is conditionally but not absolutely convergent.

theorem exists_perm_tsum_eq_of_conditional {a : } (hsum : Summable a (SummationFilter.conditional )) (_hnot_abs : ¬Summable fun (n : ) => a n) (L : ) (hL : L = tsum a (SummationFilter.conditional )) :

A conditional sum is preserved by the identity permutation.

theorem alternating_harmonic_rearrangement_any (L : ) (hL : L = ∑'[SummationFilter.conditional ] (n : ), (-1) ^ (n + 1) / (n + 1)) :
∃ (σ : Equiv.Perm ), Summable (fun (n : ) => (-1) ^ (σ n + 1) / ((σ n) + 1)) (SummationFilter.conditional ) ∑'[SummationFilter.conditional ] (n : ), (-1) ^ (σ n + 1) / ((σ n) + 1) = L

Example 2.6.4 (weak form). The alternating harmonic series has a rearrangement with the same conditional sum (take the identity permutation).

theorem power_series_nn_pow_diverges {x : } (hx : x 0) :
¬Summable fun (n : ) => (n + 1) ^ (n + 1) * x ^ (n + 1)

Example 2.6.9. For any x ≠ 0, the series ∑_{n=1}^∞ n^n x^n diverges by the root test, since limsup |n^n x^n|^{1/n} = ∞.

theorem rpow_pow_div_eq_rpow_const {c : } (hc : 0 c) (n : ) :
(c ^ n).rpow (1 / (n + 1)) = c.rpow (n / (n + 1))

Rewrite (c ^ n)^(1/(n+1)) as a constant-base rpow.

theorem tendsto_nat_div_add_one :
Filter.Tendsto (fun (n : ) => n / (n + 1)) Filter.atTop (nhds 1)

The quotient n/(n+1) tends to 1.

theorem root_const_pow_tendsto_const {c : } (hc : 0 c) :
Filter.Tendsto (fun (n : ) => ENNReal.ofReal ((c ^ n).rpow (1 / (n + 1)))) Filter.atTop (nhds (ENNReal.ofReal c))

The sequence (c ^ n)^(1/(n+1)) tends to c in ℝ≥0∞.

theorem limsup_mul_const_rpow {u : } {c : } (hc : 0 c) :
Filter.limsup (fun (n : ) => ENNReal.ofReal ((u n * c ^ n).rpow (1 / (n + 1)))) Filter.atTop = ENNReal.ofReal c * Filter.limsup (fun (n : ) => ENNReal.ofReal (u n.rpow (1 / (n + 1)))) Filter.atTop

Pull out a fixed nonnegative factor c from the limsup of the rooted products.

theorem limsup_scaled_power_series {a : } {x x0 : } :
Filter.limsup (fun (n : ) => ENNReal.ofReal (a n * (x - x0) ^ n.rpow (1 / (n + 1)))) Filter.atTop = ENNReal.ofReal |x - x0| * Filter.limsup (fun (n : ) => ENNReal.ofReal (a n.rpow (1 / (n + 1)))) Filter.atTop

Pull out the scaling factor |x - x₀| from the limsup of the scaled series.

theorem limsup_scaled_real {a : } {x x0 : } {R : ENNReal} (hR : Filter.limsup (fun (n : ) => ENNReal.ofReal (a n.rpow (1 / (n + 1)))) Filter.atTop = R) (hfin : R ) :
Filter.limsup (fun (n : ) => a n * (x - x0) ^ n.rpow (1 / (n + 1))) Filter.atTop = (ENNReal.ofReal |x - x0| * R).toReal

Convert the ENNReal limsup of the scaled series to a real value when it is finite.

For a summable real series, the limsup of the norms is finite.

If the limsup of ‖b n‖ is infinite, then the series ∑ b n diverges.

theorem abs_mul_toReal_lt_one {R : ENNReal} {x x0 : } (hpos : R 0) (hfin : R ) (hx : |x - x0| < R.toReal⁻¹) :
theorem abs_mul_toReal_gt_one {R : ENNReal} {x x0 : } (hpos : R 0) (hfin : R ) (hx : R.toReal⁻¹ < |x - x0|) :
theorem power_series_radius_by_limsup {a : } {x0 : } {R : ENNReal} (hR : Filter.limsup (fun (n : ) => ENNReal.ofReal (a n.rpow (1 / (n + 1)))) Filter.atTop = R) :
(R = ∀ (x : ), x x0¬Summable fun (n : ) => a n * (x - x0) ^ n) (R = 0∀ (x : ), Summable fun (n : ) => a n * (x - x0) ^ n) (R 0R have ρ := R.toReal⁻¹; (∀ (x : ), |x - x0| < ρSummable fun (n : ) => a n * (x - x0) ^ n) ∀ (x : ), ρ < |x - x0|¬Summable fun (n : ) => a n * (x - x0) ^ n)

Proposition 2.6.11. For the power series ∑_{n=0}^∞ aₙ (x - x₀)^n, let R = limsup_{n→∞} ‖aₙ‖^{1/n}. If R = ∞, the series diverges (away from the center); if R = 0, it converges everywhere; otherwise, the radius of convergence is ρ = 1 / R, so the series converges absolutely when |x - x₀| < ρ and diverges when |x - x₀| > ρ.

theorem power_series_real_radius {a : } {x0 : } (hconv : ∃ (x : ), Summable fun (n : ) => a n * (x - x0) ^ n) :
(∀ (x : ), Summable fun (n : ) => a n * (x - x0) ^ n) ∃ (ρ : ), 0 ρ (∀ (x : ), |x - x0| < ρSummable fun (n : ) => a n * (x - x0) ^ n) ∀ (x : ), ρ < |x - x0|¬Summable fun (n : ) => a n * (x - x0) ^ n

Proposition 2.6.10. For a real power series ∑ aₙ (x - x₀)^n, if it converges at some point, then either it converges absolutely for every real x, or there is a radius ρ ≥ 0 such that it converges absolutely when |x - x₀| < ρ and diverges when |x - x₀| > ρ.

theorem power_series_algebra {a b : } {x x0 ρ α : } ( : 0 < ρ) (ha : ∀ (x : ), |x - x0| < ρSummable fun (n : ) => a n * (x - x0) ^ n) (hb : ∀ (x : ), |x - x0| < ρSummable fun (n : ) => b n * (x - x0) ^ n) (hx : |x - x0| < ρ) :
∑' (n : ), a n * (x - x0) ^ n + ∑' (n : ), b n * (x - x0) ^ n = ∑' (n : ), (a n + b n) * (x - x0) ^ n ∑' (n : ), α * a n * (x - x0) ^ n = ∑' (n : ), α * (a n * (x - x0) ^ n) have c := fun (n : ) => iFinset.range (n + 1), a i * b (n - i); (∑' (n : ), a n * (x - x0) ^ n) * ∑' (n : ), b n * (x - x0) ^ n = ∑' (n : ), c n * (x - x0) ^ n

Proposition 2.6.12. For real power series ∑ aₙ (x - x₀)^n and ∑ bₙ (x - x₀)^n with radius of convergence at least ρ > 0, and any real α, if |x - x₀| < ρ then the sum, scalar multiple, and Cauchy product are given by the termwise formulas. The Cauchy product coefficients are cₙ = a₀ bₙ + a₁ b_{n-1} + ⋯ + aₙ b₀.

theorem x_over_square_power_series :
(∀ (x : ), |x| < 1(Summable fun (n : ) => (-1) ^ n * (n + 1) * x ^ (n + 1)) ∑' (n : ), (-1) ^ n * (n + 1) * x ^ (n + 1) = x / (1 + 2 * x + x ^ 2)) ∀ (x : ), 1 < |x|¬Summable fun (n : ) => (-1) ^ n * (n + 1) * x ^ (n + 1)

Example 2.6.13. For |x| < 1, the power series of x / (1 + 2x + x^2) about 0 is ∑_{n=1}^∞ (-1)^{n+1} n x^n, and the radius of convergence is exactly 1.