Skip to content

Commit 2619335

Browse files
committed
feat(RingTheory): geometric series of (Mv)PowerSeries (#30599)
Also abstracted the common part for both PowerSeries and normed rings into `Summable.tsum_pow_mul_one_sub` / `Summable.one_sub_mul_tsum_pow`.
1 parent 7a63e87 commit 2619335

File tree

6 files changed

+111
-15
lines changed

6 files changed

+111
-15
lines changed

Mathlib/Analysis/SpecificLimits/Normed.lean

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -304,21 +304,11 @@ theorem tsum_geometric_le_of_norm_lt_one (x : R) (h : ‖x‖ < 1) :
304304

305305
variable [HasSummableGeomSeries R]
306306

307-
theorem geom_series_mul_neg (x : R) (h : ‖x‖ < 1) : (∑' i : ℕ, x ^ i) * (1 - x) = 1 := by
308-
have := (summable_geometric_of_norm_lt_one h).hasSum.mul_right (1 - x)
309-
refine tendsto_nhds_unique this.tendsto_sum_nat ?_
310-
have : Tendsto (fun n : ℕ ↦ 1 - x ^ n) atTop (𝓝 1) := by
311-
simpa using tendsto_const_nhds.sub (tendsto_pow_atTop_nhds_zero_of_norm_lt_one h)
312-
convert← this
313-
rw [← geom_sum_mul_neg, Finset.sum_mul]
314-
315-
theorem mul_neg_geom_series (x : R) (h : ‖x‖ < 1) : (1 - x) * ∑' i : ℕ, x ^ i = 1 := by
316-
have := (summable_geometric_of_norm_lt_one h).hasSum.mul_left (1 - x)
317-
refine tendsto_nhds_unique this.tendsto_sum_nat ?_
318-
have : Tendsto (fun n : ℕ ↦ 1 - x ^ n) atTop (𝓝 1) := by
319-
simpa using tendsto_const_nhds.sub (tendsto_pow_atTop_nhds_zero_of_norm_lt_one h)
320-
convert← this
321-
rw [← mul_neg_geom_sum, Finset.mul_sum]
307+
theorem geom_series_mul_neg (x : R) (h : ‖x‖ < 1) : (∑' i : ℕ, x ^ i) * (1 - x) = 1 :=
308+
(summable_geometric_of_norm_lt_one h).tsum_pow_mul_one_sub
309+
310+
theorem mul_neg_geom_series (x : R) (h : ‖x‖ < 1) : (1 - x) * ∑' i : ℕ, x ^ i = 1 :=
311+
(summable_geometric_of_norm_lt_one h).one_sub_mul_tsum_pow
322312

323313
theorem geom_series_succ (x : R) (h : ‖x‖ < 1) : ∑' i : ℕ, x ^ (i + 1) = ∑' i : ℕ, x ^ i - 1 := by
324314
rw [eq_sub_iff_add_eq, (summable_geometric_of_norm_lt_one h).tsum_eq_zero_add,

Mathlib/RingTheory/MvPowerSeries/Order.lean

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,13 @@ theorem le_weightedOrder_mul :
291291
apply ne_of_lt (lt_of_lt_of_le hd <| add_le_add hi hj)
292292
rw [← hij, map_add, Nat.cast_add]
293293

294+
theorem le_weightedOrder_pow (n : ℕ) : n • f.weightedOrder w ≤ (f ^ n).weightedOrder w := by
295+
induction n with
296+
| zero => simp
297+
| succ n hn =>
298+
simpa [add_smul] using
299+
le_trans (add_le_add_right hn (f.weightedOrder w)) (le_weightedOrder_mul w)
300+
294301
theorem le_weightedOrder_prod {R : Type*} [CommSemiring R] {ι : Type*} (w : σ → ℕ)
295302
(f : ι → MvPowerSeries σ R) (s : Finset ι) :
296303
∑ i ∈ s, (f i).weightedOrder w ≤ (∏ i ∈ s, f i).weightedOrder w := by
@@ -440,10 +447,24 @@ theorem le_order_mul : f.order + g.order ≤ order (f * g) :=
440447

441448
alias order_mul_ge := le_order_mul
442449

450+
theorem le_order_pow (n : ℕ) : n • f.order ≤ (f ^ n).order :=
451+
le_weightedOrder_pow _ n
452+
443453
theorem le_order_prod {R : Type*} [CommSemiring R] {ι : Type*}
444454
(f : ι → MvPowerSeries σ R) (s : Finset ι) : ∑ i ∈ s, (f i).order ≤ (∏ i ∈ s, f i).order :=
445455
le_weightedOrder_prod _ _ _
446456

457+
theorem order_ne_zero_iff_constCoeff_eq_zero :
458+
f.order ≠ 0 ↔ f.constantCoeff = 0 := by
459+
constructor
460+
· intro h
461+
apply coeff_of_lt_order
462+
simpa using pos_of_ne_zero h
463+
· intro h
464+
refine ENat.one_le_iff_ne_zero.mp <| MvPowerSeries.le_order fun d hd ↦ ?_
465+
rw [Nat.cast_lt_one] at hd
466+
simp [(degree_eq_zero_iff d).mp hd, h]
467+
447468
section Ring
448469

449470
variable {R : Type*} [Ring R] {f g : MvPowerSeries σ R}

Mathlib/RingTheory/MvPowerSeries/PiTopology.lean

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,31 @@ theorem summable_of_tendsto_order_atTop_nhds_top
290290
(h : Tendsto (fun i ↦ (f i).order) atTop (𝓝 ⊤)) : Summable f :=
291291
summable_of_tendsto_weightedOrder_atTop_nhds_top h
292292

293+
/-- The geometric series converges if the constant term is zero. -/
294+
theorem summable_pow_of_constantCoeff_eq_zero {f : MvPowerSeries σ R}
295+
(h : f.constantCoeff = 0) : Summable (f ^ ·) := by
296+
apply summable_of_tendsto_order_atTop_nhds_top
297+
simp_rw [ENat.tendsto_nhds_top_iff_natCast_lt, Filter.eventually_atTop]
298+
refine fun n ↦ ⟨n + 1, fun m hm ↦ lt_of_lt_of_le ?_ (le_order_pow _)⟩
299+
refine (ENat.coe_lt_coe.mpr (Nat.add_one_le_iff.mp hm.le)).trans_le ?_
300+
simpa [nsmul_eq_mul] using ENat.self_le_mul_right m (order_ne_zero_iff_constCoeff_eq_zero.mpr h)
301+
302+
section GeomSeries
303+
variable {R : Type*} [TopologicalSpace R] [Ring R] [IsTopologicalRing R] [T2Space R]
304+
variable {f : MvPowerSeries σ R}
305+
306+
/-- Formula for geometric series. -/
307+
theorem tsum_pow_mul_one_sub_of_constantCoeff_eq_zero (h : f.constantCoeff = 0) :
308+
(∑' (i : ℕ), f ^ i) * (1 - f) = 1 :=
309+
(summable_pow_of_constantCoeff_eq_zero h).tsum_pow_mul_one_sub
310+
311+
/-- Formula for geometric series. -/
312+
theorem one_sub_mul_tsum_pow_of_constantCoeff_eq_zero (h : f.constantCoeff = 0) :
313+
(1 - f) * ∑' (i : ℕ), f ^ i = 1 :=
314+
(summable_pow_of_constantCoeff_eq_zero h).one_sub_mul_tsum_pow
315+
316+
end GeomSeries
317+
293318
end Sum
294319

295320
section Prod

Mathlib/RingTheory/PowerSeries/Order.lean

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,18 @@ theorem le_order_prod {R : Type*} [CommSemiring R] {ι : Type*} (φ : ι → R
194194

195195
alias order_mul_ge := le_order_mul
196196

197+
theorem order_ne_zero_iff_constCoeff_eq_zero {φ : R⟦X⟧} :
198+
φ.order ≠ 0 ↔ φ.constantCoeff = 0 := by
199+
constructor
200+
· intro h
201+
rw [← PowerSeries.coeff_zero_eq_constantCoeff]
202+
apply coeff_of_lt_order
203+
simpa using pos_of_ne_zero h
204+
· intro h
205+
refine ENat.one_le_iff_ne_zero.mp <| PowerSeries.le_order _ _ fun d hd ↦ ?_
206+
rw [Nat.cast_lt_one] at hd
207+
simp [hd, h]
208+
197209
/-- The order of the monomial `a*X^n` is infinite if `a = 0` and `n` otherwise. -/
198210
theorem order_monomial (n : ℕ) (a : R) [Decidable (a = 0)] :
199211
order (monomial n a) = if a = 0 then (⊤ : ℕ∞) else n := by

Mathlib/RingTheory/PowerSeries/PiTopology.lean

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,28 @@ theorem summable_of_tendsto_order_atTop_nhds_top [LinearOrder ι] [LocallyFinite
156156
contrapose! hk
157157
exact coeff_of_lt_order _ <| by simpa using (hi k hk.le)
158158

159+
variable {R} in
160+
/-- The geometric series converges if the constant term is zero. -/
161+
theorem summable_pow_of_constantCoeff_eq_zero {f : PowerSeries R} (h : f.constantCoeff = 0) :
162+
Summable (f ^ ·) :=
163+
MvPowerSeries.WithPiTopology.summable_pow_of_constantCoeff_eq_zero h
164+
165+
section GeomSeries
166+
variable {R : Type*} [TopologicalSpace R] [Ring R] [IsTopologicalRing R] [T2Space R]
167+
variable {f : PowerSeries R}
168+
169+
/-- Formula for geometric series. -/
170+
theorem tsum_pow_mul_one_sub_of_constantCoeff_eq_zero (h : f.constantCoeff = 0) :
171+
(∑' (i : ℕ), f ^ i) * (1 - f) = 1 :=
172+
(summable_pow_of_constantCoeff_eq_zero h).tsum_pow_mul_one_sub
173+
174+
/-- Formula for geometric series. -/
175+
theorem one_sub_mul_tsum_pow_of_constantCoeff_eq_zero (h : f.constantCoeff = 0) :
176+
(1 - f) * ∑' (i : ℕ), f ^ i = 1 :=
177+
(summable_pow_of_constantCoeff_eq_zero h).one_sub_mul_tsum_pow
178+
179+
end GeomSeries
180+
159181
end Sum
160182

161183
section Prod

Mathlib/Topology/Algebra/InfiniteSum/Ring.lean

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Authors: Johannes Hölzl
55
-/
66
import Mathlib.Algebra.BigOperators.NatAntidiagonal
77
import Mathlib.Algebra.BigOperators.Ring.Finset
8+
import Mathlib.Algebra.Ring.GeomSum
89
import Mathlib.Topology.Algebra.InfiniteSum.Constructions
10+
import Mathlib.Topology.Algebra.InfiniteSum.NatInt
911
import Mathlib.Topology.Algebra.GroupWithZero
1012
import Mathlib.Topology.Algebra.Ring.Basic
1113

@@ -17,6 +19,7 @@ This file provides lemmas about the interaction between infinite sums and multip
1719
## Main results
1820
1921
* `tsum_mul_tsum_eq_tsum_sum_antidiagonal`: Cauchy product formula
22+
* `Summable.tsum_pow_mul_one_sub`, `Summable.one_sub_mul_tsum_pow`: geometric series formula.
2023
* `tprod_one_add`: expanding `∏' i : ι, (1 + f i)` as infinite sum.
2124
-/
2225

@@ -249,6 +252,29 @@ end Nat
249252

250253
end CauchyProduct
251254

255+
section GeomSeries
256+
257+
/-!
258+
### Geometric series `∑' n : ℕ, x ^ n`
259+
260+
This section gives a general result about geometric series without assuming additional structure on
261+
the topological ring. For normed ring, see also `geom_series_mul_neg` and friends.
262+
-/
263+
264+
variable [Ring α] [TopologicalSpace α] [IsTopologicalRing α] [T2Space α]
265+
266+
theorem Summable.tsum_pow_mul_one_sub {x : α} (h : Summable (x ^ ·)) :
267+
(∑' (i : ℕ), x ^ i) * (1 - x) = 1 := by
268+
refine tendsto_nhds_unique (h.hasSum.mul_right (1 - x)).tendsto_sum_nat ?_
269+
simpa [← Finset.sum_mul, geom_sum_mul_neg] using tendsto_const_nhds.sub h.tendsto_atTop_zero
270+
271+
theorem Summable.one_sub_mul_tsum_pow {x : α} (h : Summable (x ^ ·)) :
272+
(1 - x) * ∑' (i : ℕ), x ^ i = 1 := by
273+
refine tendsto_nhds_unique (h.hasSum.mul_left (1 - x)).tendsto_sum_nat ?_
274+
simpa [← Finset.mul_sum, mul_neg_geom_sum] using tendsto_const_nhds.sub h.tendsto_atTop_zero
275+
276+
end GeomSeries
277+
252278
section ProdOneSum
253279

254280
/-!

0 commit comments

Comments
 (0)