Skip to content

Commit f160a5e

Browse files
feat(NumberTheory/ModularForms/EisensteinSeries/Summable): add auxiliary E2 lemmas (leanprover-community#32955)
This contains a series of lemmas that are needed in leanprover-community#32585 to prove how E2 transforms under the slash action. Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent c05a1ae commit f160a5e

11 files changed

Lines changed: 266 additions & 150 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5356,6 +5356,7 @@ public import Mathlib.NumberTheory.Transcendental.Liouville.LiouvilleNumber
53565356
public import Mathlib.NumberTheory.Transcendental.Liouville.LiouvilleWith
53575357
public import Mathlib.NumberTheory.Transcendental.Liouville.Measure
53585358
public import Mathlib.NumberTheory.Transcendental.Liouville.Residual
5359+
public import Mathlib.NumberTheory.TsumDivisorsAntidiagonal
53595360
public import Mathlib.NumberTheory.TsumDivsorsAntidiagonal
53605361
public import Mathlib.NumberTheory.VonMangoldt
53615362
public import Mathlib.NumberTheory.WellApproximable

Mathlib/Analysis/Complex/IntegerCompl.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,10 @@ lemma upperHalfPlane_inter_integerComplement :
5858
simp only [Set.mem_inter_iff, Set.mem_setOf_eq, and_iff_left_iff_imp]
5959
exact fun hz ↦ UpperHalfPlane.coe_mem_integerComplement ⟨z, hz⟩
6060

61+
lemma UpperHalfPlane.int_div_mem_integerComplement (z : ℍ) {n : ℤ} (hn : n ≠ 0) :
62+
n / (z : ℂ) ∈ ℂ_ℤ := by
63+
rintro ⟨_, hm⟩
64+
have : (n / (z : ℂ)).im ≠ 0:= by simp [div_im, hn, z.im_pos.ne', ne_zero z]
65+
simpa [← hm]
66+
6167
end Complex

Mathlib/Analysis/Complex/UpperHalfPlane/Basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ theorem normSq_ne_zero (z : ℍ) : Complex.normSq (z : ℂ) ≠ 0 :=
157157
theorem im_inv_neg_coe_pos (z : ℍ) : 0 < (-z : ℂ)⁻¹.im := by
158158
simpa [neg_div] using div_pos z.property (normSq_pos z)
159159

160+
lemma im_pnat_div_pos (n : ℕ) [NeZero n] (z : ℍ) : 0 < (-(n : ℂ) / z).im := by
161+
suffices 0 < n * z.im / Complex.normSq z by simpa [Complex.div_im, neg_div]
162+
positivity [NeZero.ne n, z.normSq_pos]
163+
160164
lemma ne_nat (z : ℍ) : ∀ n : ℕ, z.1 ≠ n := by
161165
intro n
162166
have h1 := z.2

Mathlib/NumberTheory/LSeries/RiemannZeta.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,8 @@ lemma two_mul_riemannZeta_eq_tsum_int_inv_pow_of_even {k : ℕ} (hk : 2 ≤ k) (
209209
norm_cast
210210
simp [h0, zeta_eq_tsum_one_div_nat_add_one_cpow (s := k) (by simp [hkk]),
211211
tsum_pnat_eq_tsum_succ (f := fun n => ((n : ℂ) ^ k)⁻¹)]
212-
· simp [Even.neg_pow hk2]
212+
· intro n
213+
simp [Even.neg_pow hk2]
213214
· exact (Summable.of_nat_of_neg (by simp [hkk]) (by simp [hkk])).of_norm
214215

215216
/-- The residue of `ζ(s)` at `s = 1` is equal to 1. -/

Mathlib/NumberTheory/ModularForms/EisensteinSeries/QExpansion.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Cotangent
1010
public import Mathlib.NumberTheory.LSeries.Dirichlet
1111
public import Mathlib.NumberTheory.LSeries.HurwitzZetaValues
1212
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic
13-
public import Mathlib.NumberTheory.TsumDivsorsAntidiagonal
13+
public import Mathlib.NumberTheory.TsumDivisorsAntidiagonal
1414

1515
/-!
1616
# Eisenstein series q-expansions

Mathlib/NumberTheory/ModularForms/EisensteinSeries/Summable.lean

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,12 @@ lemma summand_bound_of_mem_verticalStrip {k : ℝ} (hk : 0 ≤ k) (x : Fin 2 →
159159
exact Real.rpow_le_rpow_of_nonpos (r_pos _) (r_lower_bound_on_verticalStrip z hB hz)
160160
(neg_nonpos.mpr hk)
161161

162-
lemma linear_isTheta_right (c : ℤ) (z : ℂ) :
163-
(fun (d : ℤ)(c * z + d)) =Θ[cofinite] fun n ↦ (n : ℝ) := by
164-
refine Asymptotics.IsLittleO.add_isTheta ?_ (Int.cast_complex_isTheta_cast_real)
165-
rw [isLittleO_const_left]
166-
exact Or.inr
167-
(tendsto_norm_comp_cofinite_atTop_of_isClosedEmbedding Int.isClosedEmbedding_coe_real)
162+
lemma linear_isTheta_right_add (c e : ℤ) (z : ℂ) :
163+
(fun d : ℤ ↦ c * z + d + e) =Θ[cofinite] fun n ↦ (n : ℝ) := by
164+
apply IsTheta.add_isLittleO <;>
165+
[refine Asymptotics.IsLittleO.add_isTheta ?_ (Int.cast_complex_isTheta_cast_real); skip] <;>
166+
simpa [-Int.cofinite_eq] using
167+
.inr <| tendsto_norm_comp_cofinite_atTop_of_isClosedEmbedding Int.isClosedEmbedding_coe_real
168168

169169
lemma linear_isTheta_left (d : ℤ) {z : ℂ} (hz : z ≠ 0) :
170170
(fun (c : ℤ) ↦ (c * z + d)) =Θ[cofinite] fun n ↦ (n : ℝ) := by
@@ -174,14 +174,28 @@ lemma linear_isTheta_left (d : ℤ) {z : ℂ} (hz : z ≠ 0) :
174174
· simp only [isLittleO_const_left, Int.cast_eq_zero,
175175
tendsto_norm_comp_cofinite_atTop_of_isClosedEmbedding Int.isClosedEmbedding_coe_real, or_true]
176176

177+
lemma linear_inv_isBigO_right_add (c e : ℤ) (z : ℂ) :
178+
(fun (d : ℤ) ↦ (c * z + d + e)⁻¹) =O[cofinite] fun n ↦ (n : ℝ)⁻¹ :=
179+
(linear_isTheta_right_add c e z).inv.isBigO
180+
177181
lemma linear_inv_isBigO_right (c : ℤ) (z : ℂ) :
178-
(fun (d : ℤ) ↦ (c * z + d)⁻¹) =O[cofinite] fun n ↦ (n : ℝ)⁻¹ :=
179-
(linear_isTheta_right c z).inv.isBigO
182+
(fun (d : ℤ) ↦ (c * z + d)⁻¹) =O[cofinite] fun n ↦ (n : ℝ)⁻¹ := by
183+
grind [add_zero, (linear_isTheta_right_add c 0 z).inv.isBigO]
180184

181185
lemma linear_inv_isBigO_left (d : ℤ) {z : ℂ} (hz : z ≠ 0) :
182186
(fun (c : ℤ) ↦ (c * z + d)⁻¹) =O[cofinite] fun n ↦ (n : ℝ)⁻¹ :=
183187
(linear_isTheta_left d hz).inv.isBigO
184188

189+
lemma tendsto_zero_inv_linear (z : ℂ) (b : ℤ) :
190+
Tendsto (fun d : ℕ ↦ 1 / ((b : ℂ) * z + d)) atTop (𝓝 0) := by
191+
apply IsBigO.trans_tendsto ?_ tendsto_inv_atTop_nhds_zero_nat (F'' := ℝ)
192+
have := (isBigO_sup.mp (Int.cofinite_eq ▸ linear_inv_isBigO_right b z)).2
193+
simpa [← Nat.map_cast_int_atTop, isBigO_map]
194+
195+
lemma tendsto_zero_inv_linear_sub (z : ℂ) (b : ℤ) :
196+
Tendsto (fun d : ℕ ↦ 1 / ((b : ℂ) * z - d)) atTop (𝓝 0) := by
197+
grind [neg_zero, (tendsto_zero_inv_linear z (-b)).neg]
198+
185199
end bounding_functions
186200

187201
/-- The function `ℤ ^ 2 → ℝ` given by `x ↦ ‖x‖ ^ (-k)` is summable if `2 < k`. We prove this by
@@ -216,9 +230,9 @@ lemma summable_inv_of_isBigO_rpow_inv {α : Type*} [NormedField α] [CompleteSpa
216230
lemma linear_right_summable (z : ℂ) (c : ℤ) {k : ℤ} (hk : 2 ≤ k) :
217231
Summable fun d : ℤ ↦ ((c * z + d) ^ k)⁻¹ := by
218232
apply summable_inv_of_isBigO_rpow_inv (a := k) (by norm_cast)
219-
lift k to ℕ using (by lia)
220-
simp only [zpow_natCast, Int.cast_natCast, Real.rpow_natCast, ← inv_pow, ← abs_inv]
221-
apply (linear_inv_isBigO_right c z).abs_right.pow
233+
lift k to ℕ using by lia
234+
grind [(linear_inv_isBigO_right c z).abs_right.pow k,
235+
zpow_natCast, Int.cast_natCast, Real.rpow_natCast, ← inv_pow, ← abs_inv]
222236

223237
/-- For `z : ℂ` the function `c : ℤ ↦ ((c z + d) ^ k)⁻¹` is Summable for `2 ≤ k`. -/
224238
lemma linear_left_summable {z : ℂ} (hz : z ≠ 0) (d : ℤ) {k : ℤ} (hk : 2 ≤ k) :
@@ -231,8 +245,54 @@ lemma linear_left_summable {z : ℂ} (hz : z ≠ 0) (d : ℤ) {k : ℤ} (hk : 2
231245
lemma summable_linear_sub_mul_linear_add (z : ℂ) (c₁ c₂ : ℤ) :
232246
Summable fun n : ℤ ↦ ((c₁ * z - n) * (c₂ * z + n))⁻¹ := by
233247
apply summable_inv_of_isBigO_rpow_inv (a := 2) (by norm_cast)
248+
simpa [pow_two] using (linear_inv_isBigO_right c₂ z).mul
249+
(linear_inv_isBigO_right c₁ z).comp_neg_int
250+
251+
lemma summable_linear_right_add_one_mul_linear_right (z : ℂ) (c₁ c₂ : ℤ) :
252+
Summable fun n : ℤ ↦ ((c₁ * z + n + 1) * (c₂ * z + n))⁻¹ := by
253+
apply summable_inv_of_isBigO_rpow_inv (a := 2) (by norm_cast)
254+
simpa [pow_two] using (linear_inv_isBigO_right c₂ z).mul
255+
(linear_inv_isBigO_right_add c₁ 1 z)
256+
257+
lemma summable_linear_left_mul_linear_left {z : ℂ} (hz : z ≠ 0) (c₁ c₂ : ℤ) :
258+
Summable fun n : ℤ ↦ ((n * z + c₁) * (n * z + c₂))⁻¹ := by
259+
apply summable_inv_of_isBigO_rpow_inv (a := 2) (by norm_cast)
234260
simp only [Real.rpow_two, abs_mul_abs_self, pow_two]
235-
simpa [sub_eq_add_neg] using (linear_inv_isBigO_right c₂ z).mul
236-
(linear_inv_isBigO_right c₁ z).comp_neg_int
261+
simpa using (linear_inv_isBigO_left c₂ hz).mul (linear_inv_isBigO_left c₁ hz)
262+
263+
private lemma aux_isBigO_linear (z : ℍ) (a b : ℤ) :
264+
(fun (m : Fin 2 → ℤ) ↦ ((m 0 + a : ℂ) * z + m 1 + b)⁻¹) =O[cofinite]
265+
fun (m : Fin 2 → ℤ) ↦ ‖![m 0 + a, m 1 + b]‖⁻¹ := by
266+
rw [Asymptotics.isBigO_iff]
267+
have h0 : z ∈ verticalStrip |z.re| (z.im) := by simp [mem_verticalStrip_iff]
268+
use ‖r ⟨⟨|z.re|, z.im⟩, z.2⟩‖⁻¹
269+
filter_upwards with m
270+
apply le_trans (by simpa [Real.rpow_neg_one, add_assoc] using
271+
summand_bound_of_mem_verticalStrip zero_le_one ![m 0 + a, m 1 + b] z.2 h0)
272+
simp [abs_of_pos (r_pos _)]
273+
aesop
274+
275+
lemma isLittleO_const_left_of_properSpace_of_discreteTopology
276+
{α : Type*} (a : α) [NormedAddCommGroup α] [DiscreteTopology α]
277+
[ProperSpace α] : (fun _ : α ↦ a) =o[cofinite] (‖·‖) := by
278+
simpa [isLittleO_const_left, Function.comp_def] using
279+
.inr <| tendsto_norm_comp_cofinite_atTop_of_isClosedEmbedding IsClosedEmbedding.id
280+
281+
lemma vec_add_const_isTheta (a b : ℤ) :
282+
(fun (m : Fin 2 → ℤ) => ‖![m 0 + a, m 1 + b]‖⁻¹) =Θ[cofinite] (fun m => ‖m‖⁻¹) := by
283+
have (x : Fin 2 → ℤ) : ![x 0 + a, x 1 + b] = x + ![a, b] := List.ofFn_inj.mp rfl
284+
simpa only [isTheta_inv, isTheta_norm_left, this] using (IsTheta.add_isLittleO
285+
(by rw [← isTheta_norm_left]) (isLittleO_const_left_of_properSpace_of_discreteTopology ![a, b]))
286+
287+
lemma isBigO_linear_add_const_vec (z : ℍ) (a b : ℤ) :
288+
(fun m : (Fin 2 → ℤ) => (((m 0 : ℂ) + a) * z + m 1 + b)⁻¹) =O[cofinite] (fun m => ‖m‖⁻¹) :=
289+
(aux_isBigO_linear z a b).trans (vec_add_const_isTheta a b).isBigO
290+
291+
/-- If a function `ℤ² → ℂ` is `O (‖n‖ ^ a)⁻¹` for `2 < a`, then the function is summable. -/
292+
lemma summable_of_isBigO_rpow_norm {E : Type*} [NormedAddCommGroup E] [CompleteSpace E]
293+
{f : (Fin 2 → ℤ) → E} {a : ℝ} (hab : 2 < a)
294+
(hf : f =O[cofinite] fun n ↦ (‖n‖ ^ a)⁻¹) : Summable f :=
295+
summable_of_isBigO
296+
((summable_one_div_norm_rpow hab).congr fun b ↦ Real.rpow_neg (norm_nonneg b) a) hf
237297

238298
end EisensteinSeries

Mathlib/NumberTheory/ModularForms/Identities.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ theorem T_zpow_width_invariant (N : ℕ) (k n : ℤ) (f : SlashInvariantForm (Ga
4444
rw [modular_T_zpow_smul z (N * n)]
4545
simpa only [Int.cast_mul, Int.cast_natCast] using vAdd_width_periodic N k n f z
4646

47+
lemma slash_S_apply (f : ℍ → ℂ) (k : ℤ) (z : ℍ) :
48+
(f ∣[k] ModularGroup.S) z = f (.mk _ z.im_inv_neg_coe_pos) * z ^ (-k) := by
49+
rw [SL_slash_apply, modular_S_smul]
50+
simp [ModularGroup.S, denom]
51+
4752
end SlashInvariantForm
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
/-
2+
Copyright (c) 2025 Chris Birkbeck. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Chris Birkbeck
5+
-/
6+
module
7+
8+
public import Mathlib.Analysis.SpecificLimits.Normed
9+
public import Mathlib.NumberTheory.ArithmeticFunction.Misc
10+
11+
12+
/-!
13+
# Lemmas on infinite sums over the antidiagonal of the divisors function
14+
15+
This file contains lemmas about the antidiagonal of the divisors function. It defines the map from
16+
`Nat.divisorsAntidiagonal n` to `ℕ+ × ℕ+` given by sending `n = a * b` to `(a, b)`.
17+
18+
We then prove some identities about the infinite sums over this antidiagonal, such as
19+
`∑' n : ℕ+, n ^ k * r ^ n / (1 - r ^ n) = ∑' n : ℕ+, σ k n * r ^ n`
20+
which are used for Eisenstein series and their q-expansions. This is also a special case of
21+
Lambert series.
22+
23+
-/
24+
25+
@[expose] public section
26+
27+
open Filter Complex ArithmeticFunction Nat Topology
28+
29+
/-- The map from `Nat.divisorsAntidiagonal n` to `ℕ+ × ℕ+` given by sending `n = a * b`
30+
to `(a, b)`. -/
31+
def divisorsAntidiagonalFactors (n : ℕ+) : Nat.divisorsAntidiagonal n → ℕ+ × ℕ+ := fun x ↦
32+
⟨⟨x.1.1, Nat.pos_of_mem_divisors (Nat.fst_mem_divisors_of_mem_antidiagonal x.2)⟩,
33+
(⟨x.1.2, Nat.pos_of_mem_divisors (Nat.snd_mem_divisors_of_mem_antidiagonal x.2)⟩ : ℕ+),
34+
Nat.pos_of_mem_divisors (Nat.snd_mem_divisors_of_mem_antidiagonal x.2)⟩
35+
36+
lemma divisorsAntidiagonalFactors_eq {n : ℕ+} (x : Nat.divisorsAntidiagonal n) :
37+
(divisorsAntidiagonalFactors n x).1.1 * (divisorsAntidiagonalFactors n x).2.1 = n := by
38+
simp [divisorsAntidiagonalFactors, (Nat.mem_divisorsAntidiagonal.mp x.2).1]
39+
40+
lemma divisorsAntidiagonalFactors_one (x : Nat.divisorsAntidiagonal 1) :
41+
(divisorsAntidiagonalFactors 1 x) = (1, 1) := by
42+
have h := Nat.mem_divisorsAntidiagonal.mp x.2
43+
simp only [mul_eq_one, ne_eq, one_ne_zero, not_false_eq_true, and_true] at h
44+
simp [divisorsAntidiagonalFactors, h.1, h.2]
45+
46+
/-- The equivalence from the union over `n` of `Nat.divisorsAntidiagonal n` to `ℕ+ × ℕ+`
47+
given by sending `n = a * b` to `(a, b)`. -/
48+
def sigmaAntidiagonalEquivProd : (Σ n : ℕ+, Nat.divisorsAntidiagonal n) ≃ ℕ+ × ℕ+ where
49+
toFun x := divisorsAntidiagonalFactors x.1 x.2
50+
invFun x :=
51+
⟨⟨x.1.val * x.2.val, mul_pos x.1.2 x.2.2⟩, ⟨x.1, x.2⟩, by simp [Nat.mem_divisorsAntidiagonal]⟩
52+
left_inv := by
53+
rintro ⟨n, ⟨k, l⟩, h⟩
54+
rw [Nat.mem_divisorsAntidiagonal] at h
55+
ext <;> simp [divisorsAntidiagonalFactors, ← PNat.coe_injective.eq_iff, h.1]
56+
right_inv _ := rfl
57+
58+
lemma sigmaAntidiagonalEquivProd_symm_apply_fst (x : ℕ+ × ℕ+) :
59+
(sigmaAntidiagonalEquivProd.symm x).1 = x.1.1 * x.2.1 := rfl
60+
61+
lemma sigmaAntidiagonalEquivProd_symm_apply_snd (x : ℕ+ × ℕ+) :
62+
(sigmaAntidiagonalEquivProd.symm x).2 = (x.1.1, x.2.1) := rfl
63+
64+
section tsum
65+
66+
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [CompleteSpace 𝕜] [NormSMulClass ℤ 𝕜]
67+
68+
omit [NormSMulClass ℤ 𝕜] in
69+
lemma summable_norm_pow_mul_geometric_div_one_sub (k : ℕ) {r : 𝕜} (hr : ‖r‖ < 1) :
70+
Summable fun n : ℕ ↦ n ^ k * r ^ n / (1 - r ^ n) := by
71+
simp only [div_eq_mul_one_div (_ * _ ^ _)]
72+
apply Summable.mul_tendsto_const (c := 1 / (1 - 0))
73+
(by simpa using summable_norm_pow_mul_geometric_of_norm_lt_one k hr)
74+
simpa only [Nat.cofinite_eq_atTop] using
75+
tendsto_const_nhds.div ((tendsto_pow_atTop_nhds_zero_of_norm_lt_one hr).const_sub 1) (by simp)
76+
77+
private lemma summable_divisorsAntidiagonal_aux (k : ℕ) {r : 𝕜} (hr : ‖r‖ < 1) :
78+
Summable fun c : (n : ℕ+) × {x // x ∈ (n : ℕ).divisorsAntidiagonal} ↦
79+
(c.2.1.2) ^ k * (r ^ (c.2.1.1 * c.2.1.2)) := by
80+
apply Summable.of_norm
81+
rw [summable_sigma_of_nonneg (fun a ↦ by positivity)]
82+
constructor
83+
· exact fun n ↦ (hasSum_fintype _).summable
84+
· simp only [norm_mul, norm_pow, tsum_fintype, Finset.univ_eq_attach]
85+
apply Summable.of_nonneg_of_le (f := fun c : ℕ+ ↦ ‖(c : 𝕜) ^ (k + 1) * r ^ (c : ℕ)‖)
86+
(fun b ↦ Finset.sum_nonneg (fun _ _ ↦ mul_nonneg (by simp) (by simp))) (fun b ↦ ?_)
87+
(by apply (summable_norm_pow_mul_geometric_of_norm_lt_one (k + 1) hr).subtype)
88+
transitivity ∑ _ ∈ (b : ℕ).divisors, ‖(b : 𝕜)‖ ^ k * ‖r ^ (b : ℕ)‖
89+
· rw [(b : ℕ).divisorsAntidiagonal.sum_attach (fun x ↦ ‖(x.2 : 𝕜)‖ ^ _ * _ ^ (x.1 * x.2)),
90+
sum_divisorsAntidiagonal ((fun x y ↦ ‖(y : 𝕜)‖ ^ k * _ ^ (x * y)))]
91+
gcongr with i hi
92+
· simpa using le_of_dvd b.2 (div_dvd_of_dvd (dvd_of_mem_divisors hi))
93+
· rw [norm_pow, mul_comm, Nat.div_mul_cancel (dvd_of_mem_divisors hi)]
94+
· simp only [norm_pow, Finset.sum_const, nsmul_eq_mul, ← mul_assoc, add_comm k 1, pow_add,
95+
pow_one, norm_mul]
96+
gcongr
97+
simpa using Nat.card_divisors_le_self b
98+
99+
theorem summable_prod_mul_pow (k : ℕ) {r : 𝕜} (hr : ‖r‖ < 1) :
100+
Summable fun c : (ℕ+ × ℕ+) ↦ c.2 ^ k * (r ^ (c.1 * c.2 : ℕ)) := by
101+
simpa [sigmaAntidiagonalEquivProd.summable_iff.symm] using summable_divisorsAntidiagonal_aux k hr
102+
103+
-- access notation `σ`
104+
open scoped sigma
105+
106+
theorem tsum_prod_pow_eq_tsum_sigma (k : ℕ) {r : 𝕜} (hr : ‖r‖ < 1) :
107+
∑' d : ℕ+, ∑' c : ℕ+, c ^ k * r ^ (d * c : ℕ) = ∑' e : ℕ+, σ k e * r ^ (e : ℕ) := by
108+
suffices ∑' c : ℕ+ × ℕ+, c.2 ^ k * r ^ (c.1 * c.2 : ℕ) =
109+
∑' e : ℕ+, σ k e * r ^ (e : ℕ) by rwa [← (summable_prod_mul_pow k hr).tsum_prod]
110+
simp only [← sigmaAntidiagonalEquivProd.tsum_eq, sigmaAntidiagonalEquivProd,
111+
divisorsAntidiagonalFactors, PNat.mk_coe, Equiv.coe_fn_mk, sigma_eq_sum_div, cast_sum,
112+
cast_pow, Summable.tsum_sigma (summable_divisorsAntidiagonal_aux k hr)]
113+
refine tsum_congr fun n ↦ ?_
114+
simpa [tsum_fintype, Finset.sum_mul,
115+
(n : ℕ).divisorsAntidiagonal.sum_attach fun x : ℕ × ℕ ↦ x.2 ^ k * r ^ (x.1 * x.2),
116+
sum_divisorsAntidiagonal fun x y ↦ y ^ k * r ^ (x * y)]
117+
using Finset.sum_congr rfl fun i hi ↦ by rw [Nat.mul_div_cancel' (dvd_of_mem_divisors hi)]
118+
119+
lemma tsum_pow_div_one_sub_eq_tsum_sigma {r : 𝕜} (hr : ‖r‖ < 1) (k : ℕ) :
120+
∑' n : ℕ+, n ^ k * r ^ (n : ℕ) / (1 - r ^ (n : ℕ)) = ∑' n : ℕ+, σ k n * r ^ (n : ℕ) := by
121+
have (m : ℕ) [NeZero m] := tsum_geometric_of_norm_lt_one (ξ := r ^ m)
122+
(by simpa using pow_lt_one₀ (by simp) hr (NeZero.ne _))
123+
simp only [div_eq_mul_inv, ← this, ← tsum_mul_left, mul_assoc, ← _root_.pow_succ',
124+
fun (n : ℕ) ↦ tsum_pnat_eq_tsum_succ (f := fun m ↦ n ^ k * (r ^ n) ^ m)]
125+
have h00 := tsum_prod_pow_eq_tsum_sigma k hr
126+
rw [Summable.tsum_comm (by apply (summable_prod_mul_pow k hr).prod_symm)] at h00
127+
rw [← h00]
128+
exact tsum_congr₂ <| fun b c ↦ by simp [mul_comm c.val b.val, pow_mul]
129+
130+
omit [CompleteSpace 𝕜] [NormSMulClass ℤ 𝕜] in
131+
lemma tendsto_zero_geometric_tsum_pnat {r : 𝕜} (hr : ‖r‖ < 1) :
132+
Tendsto (fun m : ℕ+ ↦ ∑' n : ℕ+, r ^ (n * m : ℕ)) atTop (𝓝 0) := by
133+
have h1 (m : ℕ+) : ‖r ^ (m : ℕ)‖ < 1 := by
134+
rwa [norm_pow, pow_lt_one_iff_of_nonneg (norm_nonneg _) (NeZero.ne _)]
135+
have h2 (m : ℕ+) : ∑' n : ℕ+, r ^ (n * m : ℕ) = (1 - r ^ (m : ℕ))⁻¹ - 1 := by
136+
have := tsum_geometric_of_norm_lt_one (h1 m)
137+
rw [← tsum_zero_pnat_eq_tsum_nat (summable_geometric_of_norm_lt_one (h1 m))] at this
138+
simp_rw [← this, pow_zero, add_sub_cancel_left, mul_comm, pow_mul]
139+
rw [funext h2, (by simp : 𝓝 (0 : 𝕜) = 𝓝 ((1 - 0)⁻¹ - 1)), tendsto_sub_const_iff,
140+
tendsto_inv_iff₀ (by simp), tendsto_const_sub_iff]
141+
exact (tendsto_pow_atTop_nhds_zero_of_norm_lt_one hr).comp <| tendsto_PNat_val_atTop_atTop
142+
143+
end tsum

0 commit comments

Comments
 (0)