Skip to content
Closed
Changes from 123 commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
d53f78e
feat(Analysis/NormedSpace/FunctionSeries): Add SummableUniformlyOn ve…
CBirkbeck May 21, 2025
9a0f6cc
update
CBirkbeck May 21, 2025
89ad73f
Merge remote-tracking branch 'origin/master' into derivwithin_tsum
CBirkbeck Jun 17, 2025
d4df7b6
Merge remote-tracking branch 'origin/master' into derivwithin_tsum
CBirkbeck Jul 7, 2025
7311794
move files
CBirkbeck Jul 7, 2025
2f47769
imports
CBirkbeck Jul 7, 2025
5a4f0f3
mk_all
CBirkbeck Jul 7, 2025
da64063
fix name
CBirkbeck Jul 7, 2025
8802150
fix name
CBirkbeck Jul 7, 2025
f78e869
name fix again
CBirkbeck Jul 7, 2025
991df02
fix
CBirkbeck Jul 7, 2025
5311723
merge
CBirkbeck Jul 16, 2025
aaf9ca4
updates
CBirkbeck Jul 16, 2025
612c83a
updates
CBirkbeck Jul 16, 2025
9a292d7
updates2
CBirkbeck Jul 16, 2025
141652a
fix build
CBirkbeck Jul 16, 2025
89406e3
fix
CBirkbeck Jul 16, 2025
8f1c4a3
Add itereatedDerivWithin version of zpow lemmas
CBirkbeck Jul 16, 2025
df2bf4a
add file!
CBirkbeck Jul 16, 2025
217237c
fix build
CBirkbeck Jul 16, 2025
db2fc70
open
CBirkbeck Jul 16, 2025
17a3282
add content
CBirkbeck Jul 16, 2025
96a4c69
space
CBirkbeck Jul 16, 2025
d385050
fix
CBirkbeck Jul 16, 2025
cd79ab4
fix name
CBirkbeck Jul 16, 2025
6d05eb4
add doc string
CBirkbeck Jul 16, 2025
4fca1af
add eventually version
CBirkbeck Jul 17, 2025
b06ce35
update
CBirkbeck Jul 17, 2025
98009c7
merge fix
CBirkbeck Jul 28, 2025
513cd68
golf
CBirkbeck Jul 28, 2025
9e6816d
small fixes
CBirkbeck Jul 28, 2025
fa5c3ad
merge fix
CBirkbeck Jul 28, 2025
b05c86d
Merge remote-tracking branch 'origin/derivwithin_tsum' into cot_serie…
CBirkbeck Jul 28, 2025
deab207
open
CBirkbeck Jul 28, 2025
738c91f
imports£
CBirkbeck Jul 28, 2025
72b220e
cleanup
CBirkbeck Jul 29, 2025
f1185b7
lint fix
CBirkbeck Jul 29, 2025
7ec21bf
add q_exp
CBirkbeck Aug 1, 2025
3e5f7fd
open pr
CBirkbeck Aug 1, 2025
626a3c6
open pr correctly
CBirkbeck Aug 1, 2025
970ef6b
docstrings
CBirkbeck Aug 1, 2025
1874f54
space
CBirkbeck Aug 1, 2025
ae866f9
doc string
CBirkbeck Aug 1, 2025
62a78b1
docstring
CBirkbeck Aug 1, 2025
f686b78
implicit
CBirkbeck Aug 1, 2025
7297e01
fix
CBirkbeck Aug 1, 2025
9a3aed3
tidy
CBirkbeck Aug 1, 2025
4845a6e
save
CBirkbeck Aug 1, 2025
ec590ca
save
CBirkbeck Aug 2, 2025
2aa9666
Merge remote-tracking branch 'origin/master' into Eisenstein_q_exp_id…
CBirkbeck Aug 2, 2025
8bdec7c
rev updates
CBirkbeck Aug 11, 2025
f85293c
test
CBirkbeck Aug 11, 2025
5e63b97
updates
CBirkbeck Aug 11, 2025
0d564a9
fix
CBirkbeck Aug 11, 2025
5be61ee
doc string
CBirkbeck Aug 11, 2025
6ef7e2b
name update
CBirkbeck Aug 12, 2025
ec398e2
update
CBirkbeck Aug 12, 2025
d4da6e8
merge
CBirkbeck Aug 12, 2025
bcf0fe5
save
CBirkbeck Aug 12, 2025
87ed893
some api
CBirkbeck Aug 18, 2025
a533427
more api
CBirkbeck Aug 18, 2025
c7bfd97
fix
CBirkbeck Aug 18, 2025
698704c
Merge remote-tracking branch 'upstream/master' into divisiorsAntidiag…
CBirkbeck Aug 18, 2025
60c9701
move to sep file
CBirkbeck Aug 20, 2025
593940f
move to sep file
CBirkbeck Aug 20, 2025
d2ae6f9
open
CBirkbeck Aug 20, 2025
071e81a
open
CBirkbeck Aug 20, 2025
99658a2
open2
CBirkbeck Aug 20, 2025
f86617f
open3
CBirkbeck Aug 20, 2025
b3dc880
open4
CBirkbeck Aug 20, 2025
8b71aa7
open
CBirkbeck Aug 20, 2025
6003544
save
CBirkbeck Aug 20, 2025
0f800da
fix name
CBirkbeck Aug 20, 2025
9ea51fb
fix imports
CBirkbeck Aug 20, 2025
bd0e958
fix
CBirkbeck Aug 20, 2025
571483d
Merge remote-tracking branch 'upstream/master' into Eisenstein_q_exp_…
CBirkbeck Aug 20, 2025
c217ebb
Merge remote-tracking branch 'origin/divisorsAntidiagonal_tsum' into …
CBirkbeck Aug 20, 2025
c7fca28
fix
CBirkbeck Aug 20, 2025
0a4731d
fix
CBirkbeck Aug 20, 2025
682cc49
merge
CBirkbeck Aug 21, 2025
48c080f
merge
CBirkbeck Aug 21, 2025
9fac702
updates
CBirkbeck Aug 21, 2025
3c7ada3
move
CBirkbeck Aug 21, 2025
874fb5e
updates
CBirkbeck Aug 21, 2025
7971d64
golfs
CBirkbeck Aug 21, 2025
69c6b77
rev fixes
CBirkbeck Aug 27, 2025
ee5e69e
Merge remote-tracking branch 'upstream/master' into divisorsAntidiago…
CBirkbeck Aug 27, 2025
004a111
fix
CBirkbeck Aug 27, 2025
954f5ba
Merge remote-tracking branch 'upstream/master' into divisorsAntidiago…
CBirkbeck Aug 27, 2025
9064c8d
updates
CBirkbeck Aug 27, 2025
d7517e3
Merge remote-tracking branch 'upstream/master' into divisorsAntidiago…
CBirkbeck Aug 27, 2025
5dcb52f
simp fix?
CBirkbeck Aug 27, 2025
b0abe26
fix?
CBirkbeck Aug 27, 2025
4284d69
merge
CBirkbeck Aug 28, 2025
45a3cd8
save
CBirkbeck Aug 28, 2025
a1d7d5d
fix
CBirkbeck Aug 28, 2025
c335131
Merge remote-tracking branch 'upstream/master' into Eisenstein_q_exp_…
CBirkbeck Aug 28, 2025
2625482
fix
CBirkbeck Aug 28, 2025
20c93e5
fix?
CBirkbeck Aug 28, 2025
9e133d7
fix
CBirkbeck Aug 28, 2025
ff643ca
Merge remote-tracking branch 'upstream/master' into Eisenstein_q_exp_…
CBirkbeck Aug 28, 2025
a50e5a8
save
CBirkbeck Oct 9, 2025
e826932
save2
CBirkbeck Oct 9, 2025
8e3b46e
merge fix
CBirkbeck Oct 9, 2025
04decc8
updates
CBirkbeck Oct 9, 2025
9e59ebc
typos
CBirkbeck Oct 9, 2025
4f7b6b3
Merge remote-tracking branch 'upstream/master' into Eisenstein_q_exp_…
CBirkbeck Oct 9, 2025
9577a54
merge
CBirkbeck Oct 9, 2025
4a535f9
save
CBirkbeck Oct 9, 2025
6313f8d
updates
CBirkbeck Oct 10, 2025
a88cf91
update doc string
CBirkbeck Oct 10, 2025
c89cd9f
remove old lemma
CBirkbeck Oct 10, 2025
1af8d13
remove old lemma
CBirkbeck Oct 10, 2025
87deac6
more cleanup
CBirkbeck Oct 10, 2025
62c41ad
run min_imports
CBirkbeck Oct 10, 2025
26d5a1f
rev updates
CBirkbeck Oct 17, 2025
ea6e2da
Apply suggestions from code review
CBirkbeck Nov 12, 2025
eb58f1b
updates in prog
CBirkbeck Nov 12, 2025
9a297cb
save
CBirkbeck Nov 12, 2025
7f1674e
rev updates
CBirkbeck Nov 12, 2025
5f853f3
Merge remote-tracking branch 'upstream/master' into Eisenstein_q_exp_…
CBirkbeck Nov 12, 2025
5e51ca5
fix
CBirkbeck Nov 12, 2025
46e3e64
fix imports
CBirkbeck Nov 12, 2025
119226a
rev updates
CBirkbeck Nov 12, 2025
5025117
typo
CBirkbeck Nov 14, 2025
c38fcdb
doc update
CBirkbeck Nov 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 118 additions & 6 deletions Mathlib/NumberTheory/ModularForms/EisensteinSeries/QExpansion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,42 @@ Copyright (c) 2025 Chris Birkbeck. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Chris Birkbeck
-/
import Mathlib.Algebra.Order.Ring.Star
Comment thread
CBirkbeck marked this conversation as resolved.
Outdated
import Mathlib.Analysis.Complex.SummableUniformlyOn
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Cotangent
import Mathlib.NumberTheory.LSeries.Dirichlet
import Mathlib.NumberTheory.LSeries.HurwitzZetaValues
import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic
import Mathlib.NumberTheory.TsumDivsorsAntidiagonal
import Mathlib.Topology.EMetricSpace.Paracompact
import Mathlib.Topology.Separation.CompletelyRegular
Comment thread
MichaelStollBayreuth marked this conversation as resolved.
Outdated

/-!
# Einstein series q-expansions
# Eisenstein series q-expansions

We give some identities for q-expansions of Eisenstein series that will be used in describing their
q-expansions.
We give the q-expansion of Eisenstein series of weight `k` and level 1. In particular we show that
for even `k` with `3 ≤ k` Eisenstein series can we written as
Comment thread
CBirkbeck marked this conversation as resolved.
Outdated
`1 - (2k / bernoulli k) ∑' n, σ_{k-1}(n) q^n` where `q = exp(2πiz)` and `σ_{k-1}(n)` is the sum of
the `(k-1)`-th powers of the divisors of `n`. We need `k` to be even so that the Eisenstein series
are non-zero and we require `k ≥ 3` so that the series converges absolutely.
Comment thread
CBirkbeck marked this conversation as resolved.
Outdated

-/
The proof relies of the identity
Comment thread
CBirkbeck marked this conversation as resolved.
Outdated
`∑' n : ℤ, 1 / (z + n) ^ (k + 1) = ((-2πi)^(k+1) / k!) ∑' n : ℕ, n^k q^n` which comes from
differentiating the expansion of `π cot(πz)` in terms of exponentials. Since our Eisenstein series
are defined as sums over coprime integer pairs, we also need to relate these to sums over all pairs
of integers, which is done in `tsum_eisSummand_eq_riemannZeta_mul_eisensteinSeries`. This then
gives the q-expansion with a Riemann zeta factor, which we simplify using the formula for
`ζ(k)` in terms of Bernoulli numbers to get the final result.

open Set Metric TopologicalSpace Function Filter Complex EisensteinSeries
-/

open _root_.UpperHalfPlane hiding I
open Set Metric TopologicalSpace Function Filter Complex ArithmeticFunction
ModularForm EisensteinSeries

open scoped Topology Real Nat Complex Pointwise

open _root_.UpperHalfPlane hiding I

local notation "ℍₒ" => upperHalfPlaneSet

private lemma iteratedDerivWithin_cexp_aux (k m : ℕ) (p : ℝ) {S : Set ℂ} (hs : IsOpen S) :
Expand Down Expand Up @@ -181,3 +200,96 @@ theorem EisensteinSeries.qExpansion_identity_pnat {k : ℕ} (hk : 1 ≤ k) (z :
· simp [show k ≠ 0 by grind]
· apply (summable_pow_mul_cexp k 1 z).congr
simp

lemma summable_eisSummand {k : ℕ} (hk : 3 ≤ k) (z : ℍ) :
Summable (eisSummand k · z) :=
summable_norm_iff.mp <| summable_norm_eisSummand (Int.toNat_le.mp hk) z

lemma summable_prod_eisSummand {k : ℕ} (hk : 3 ≤ k) (z : ℍ) :
Summable fun x : ℤ × ℤ ↦ eisSummand k ![x.1, x.2] z := by
refine (finTwoArrowEquiv ℤ).summable_iff.mp <| (summable_eisSummand hk z).congr (fun v ↦ ?_)
simp [show ![v 0, v 1] = v from List.ofFn_inj.mp rfl]

Comment thread
CBirkbeck marked this conversation as resolved.
lemma tsum_eisSummand_eq_tsum_sigma_mul_cexp_pow {k : ℕ} (hk : 3 ≤ k) (hk2 : Even k) (z : ℍ) :
∑' v, eisSummand k v z = 2 * riemannZeta k + 2 * ((-2 * π * I) ^ k / (k - 1)!) *
∑' (n : ℕ+), sigma (k - 1) n * cexp (2 * π * I * z) ^ (n : ℕ) := by
rw [← (finTwoArrowEquiv ℤ).symm.tsum_eq, finTwoArrowEquiv_symm_apply,
Summable.tsum_prod (summable_prod_eisSummand hk z),
tsum_int_eq_zero_add_two_mul_tsum_pnat (fun n ↦ ?h₁)
(by simpa using (summable_prod_eisSummand hk z).prod)]
case h₁ =>
nth_rewrite 1 [← tsum_comp_neg]
exact tsum_congr fun y ↦ by simp [eisSummand, ← neg_add _ (y : ℂ), -neg_add_rev, hk2.neg_pow]
have H (b : ℕ+) := qExpansion_identity_pnat (k := k - 1) (by grind) ⟨b * z, by simpa using z.2⟩
simp_rw [show k - 1 + 1 = k by grind, one_div] at H
simp only [coe_mk_subtype, neg_mul] at H
rw [nsmul_eq_mul, mul_assoc]
congr
· simp [eisSummand, two_mul_riemannZeta_eq_tsum_int_inv_pow_of_even (by grind) hk2]
· suffices ∑' (m : ℕ+) (n : ℕ+), (n : ℕ) ^ (k - 1) * cexp (2 * π * I * (m * z)) ^ (n : ℕ) =
∑' (m : ℕ+) (n : ℕ+), (n : ℕ) ^ (k - 1) * cexp (2 * π * I * z) ^ (m * n : ℕ) by
simp [eisSummand, H, tsum_mul_left,
← tsum_prod_pow_eq_tsum_sigma (k - 1) (norm_exp_two_pi_I_lt_one z), this]
simp_rw [← Complex.exp_nat_mul]
exact tsum_congr₂ (fun m n ↦ by push_cast; ring_nf)

lemma eisSummand_of_gammaSet_eq_divIntMap (k : ℤ) (z : ℍ) {n : ℕ} (v : gammaSet 1 n 0) :
eisSummand k v z = ((n : ℂ) ^ k)⁻¹ * eisSummand k (divIntMap n v) z := by
simp_rw [eisSummand]
nth_rw 1 2 [gammaSet_eq_gcd_mul_divIntMap v.2]
simp [← mul_inv, ← mul_zpow, mul_add, mul_assoc]

lemma tsum_eisSummand_eq_riemannZeta_mul_eisensteinSeries {k : ℕ} (hk : 3 ≤ k) (z : ℍ) :
∑' v : Fin 2 → ℤ, eisSummand k v z = riemannZeta k * eisensteinSeries (N := 1) 0 k z := by
have hk1 : 1 < k := by grind
have hk2 : 3 ≤ (k : ℤ) := mod_cast hk
simp_rw [← gammaSetDivGcdSigmaEquiv.symm.tsum_eq, gammaSetDivGcdSigmaEquiv_symm_eq]
rw [eisensteinSeries, Summable.tsum_sigma ?hsumm, zeta_nat_eq_tsum_of_gt_one hk1,
tsum_mul_tsum_of_summable_norm (by simp [hk1]) ((summable_norm_eisSummand hk2 z).subtype _)]
case hsumm =>
exact gammaSetDivGcdSigmaEquiv.symm.summable_iff.mpr (summable_norm_eisSummand hk2 z).of_norm
|>.congr <| by simp
simp_rw [one_div]
rw [Summable.tsum_prod' ?h₁ fun b ↦ ?h₂]
case h₁ =>
exact summable_mul_of_summable_norm (f := fun (n : ℕ) ↦ ((n : ℂ) ^ k)⁻¹)
(g := fun (v : gammaSet 1 1 0) ↦ eisSummand k v z) (by simp [hk1])
((summable_norm_eisSummand hk2 z).subtype _)
case h₂ =>
simpa using ((summable_norm_eisSummand hk2 z).subtype _).of_norm.mul_left (a := ((b : ℂ) ^ k)⁻¹)
refine tsum_congr fun b ↦ ?_
rcases eq_or_ne b 0 with rfl | hb
· simp [show ((0 : ℂ) ^ k)⁻¹ = 0 by aesop, eisSummand_of_gammaSet_eq_divIntMap]
· have : NeZero b := ⟨hb⟩
simpa [eisSummand_of_gammaSet_eq_divIntMap k z, tsum_mul_left, hb]
using (gammaSetDivGcdEquiv b).tsum_eq (eisSummand k · z)

/-- The q-Expansion of normalised Eisenstein series of level one with `riemannZeta` term. -/
lemma EisensteinSeries.q_expansion_riemannZeta {k : ℕ} (hk : 3 ≤ k) (hk2 : Even k) (z : ℍ) :
E hk z = 1 + (riemannZeta k)⁻¹ * (-2 * π * I) ^ k / (k - 1)! *
∑' n : ℕ+, sigma (k - 1) n * cexp (2 * π * I * z) ^ (n : ℤ) := by
have : eisensteinSeries_MF (Int.toNat_le.mp hk) 0 z = eisensteinSeries_SIF (N := 1) 0 k z := rfl
rw [E, ModularForm.IsGLPos.smul_apply, this, eisensteinSeries_SIF_apply 0 k z, eisensteinSeries]
have HE1 := tsum_eisSummand_eq_tsum_sigma_mul_cexp_pow hk hk2 z
have HE2 := tsum_eisSummand_eq_riemannZeta_mul_eisensteinSeries hk z
have z2 : riemannZeta k ≠ 0 := riemannZeta_ne_zero_of_one_lt_re <| by norm_cast; grind
simp [eisSummand, eisensteinSeries, ← inv_mul_eq_iff_eq_mul₀ z2] at HE1 HE2 ⊢
grind

private lemma eisensteinSeries_coeff_identity {k : ℕ} (hk2 : Even k) (hkn0 : k ≠ 0) :
(riemannZeta k)⁻¹ * (-2 * π * I) ^ k / (k - 1)! = -(2 * k / bernoulli k) := by
have h2 : k = 2 * (k / 2 - 1 + 1) := by grind
set m := k / 2 - 1
rw [h2, Nat.cast_mul 2 (m + 1), Nat.cast_two, riemannZeta_two_mul_nat (show m + 1 ≠ 0 by grind),
show (2 * (m + 1))! = 2 * (m + 1) * (2 * m + 1)! by grind [Nat.factorial_succ],
show 2 * (m + 1) - 1 = 2 * m + 1 by grind, mul_pow, mul_pow, pow_mul I, I_sq]
norm_cast
simp [field]
grind

/-- The q-Expansion of normalised Eisenstein series of level one with `bernoulli` term. -/
lemma EisensteinSeries.q_expansion_bernoulli {k : ℕ} (hk : 3 ≤ k) (hk2 : Even k) (z : ℍ) :
E hk z = 1 - (2 * k / bernoulli k) *
∑' n : ℕ+, sigma (k - 1) n * cexp (2 * π * I * z) ^ (n : ℤ) := by
convert q_expansion_riemannZeta hk hk2 z using 1
rw [eisensteinSeries_coeff_identity hk2 (by grind), neg_mul, ← sub_eq_add_neg]