Skip to content

Commit 5b04143

Browse files
committed
feat(NumberTheory/ModularForms): cusp form submodule of modular forms (leanprover-community#37978)
Introduces the inclusion of cusp forms into modular forms and the corresponding submodule and `IsCuspForm` predicate. This is in preparation for proving the dimension formula in level one which is in leanprover-community#37979 and see also leanprover-community#37789 The work was done as part of the Sphere packing project. The original code was written by me but the PR was done with the help of Claude Code.
1 parent 7d58598 commit 5b04143

7 files changed

Lines changed: 201 additions & 37 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5614,6 +5614,7 @@ public import Mathlib.NumberTheory.ModularForms.Basic
56145614
public import Mathlib.NumberTheory.ModularForms.BoundedAtCusp
56155615
public import Mathlib.NumberTheory.ModularForms.Bounds
56165616
public import Mathlib.NumberTheory.ModularForms.CongruenceSubgroups
5617+
public import Mathlib.NumberTheory.ModularForms.CuspFormSubmodule
56175618
public import Mathlib.NumberTheory.ModularForms.Cusps
56185619
public import Mathlib.NumberTheory.ModularForms.DedekindEta
56195620
public import Mathlib.NumberTheory.ModularForms.Delta

Mathlib/NumberTheory/ModularForms/Basic.lean

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ instance (priority := 100) ModularForm.funLike :
108108
coe f := f.toFun
109109
coe_injective' f g h := by cases f; cases g; congr; exact DFunLike.ext' h
110110

111-
instance (priority := 100) ModularFormClass.modularForm :
111+
instance (priority := 100) ModularForm.instModularFormClass :
112112
ModularFormClass (ModularForm Γ k) Γ k where
113113
slash_action_eq f := f.slash_action_eq'
114114
holo := ModularForm.holo'
@@ -135,6 +135,19 @@ initialize_simps_projections CuspForm (toFun → coe, as_prefix coe)
135135

136136
variable {F Γ k}
137137

138+
/-- Build a `ModularForm Γ k` from any element of a type carrying a `ModularFormClass Γ k`
139+
instance. -/
140+
@[simps -fullyApplied]
141+
def ModularFormClass.modularForm [FunLike F ℍ ℂ] [ModularFormClass F Γ k] (f : F) :
142+
ModularForm Γ k where
143+
toFun := f
144+
slash_action_eq' := SlashInvariantFormClass.slash_action_eq f
145+
holo' := ModularFormClass.holo f
146+
bdd_at_cusps' := ModularFormClass.bdd_at_cusps f
147+
148+
instance [FunLike F ℍ ℂ] [ModularFormClass F Γ k] : CoeTC F (ModularForm Γ k) :=
149+
⟨ModularFormClass.modularForm⟩
150+
138151
theorem ModularForm.toFun_eq_coe (f : ModularForm Γ k) : f.toFun = (f : ℍ → ℂ) :=
139152
rfl
140153

@@ -156,20 +169,23 @@ theorem ModularForm.ext {f g : ModularForm Γ k} (h : ∀ x, f x = g x) : f = g
156169
theorem CuspForm.ext {f g : CuspForm Γ k} (h : ∀ x, f x = g x) : f = g :=
157170
DFunLike.ext f g h
158171

159-
/-- Copy of a `ModularForm` with a new `toFun` equal to the old one. Useful to fix
160-
definitional equalities. -/
161-
protected def ModularForm.copy (f : ModularForm Γ k) (f' : ℍ → ℂ) (h : f' = ⇑f) :
162-
ModularForm Γ k where
163-
toSlashInvariantForm := f.1.copy f' h
172+
/-- Copy of a `ModularForm` with a new `toFun` equal to the old one, optionally transporting
173+
along an equality of subgroups. Useful to fix definitional equalities. -/
174+
protected def ModularForm.copy {Γ' : Subgroup (GL (Fin 2) ℝ)} (f : ModularForm Γ k) (f' : ℍ → ℂ)
175+
(h : f' = ⇑f) (hΓ : Γ' = Γ := by rfl) : ModularForm Γ' k where
176+
toFun := f'
177+
slash_action_eq' A hA := h.symm ▸ f.slash_action_eq' A (hΓ ▸ hA)
164178
holo' := h.symm ▸ f.holo'
165-
bdd_at_cusps' A := h.symm ▸ f.bdd_at_cusps' A
166-
167-
/-- Copy of a `CuspForm` with a new `toFun` equal to the old one. Useful to fix
168-
definitional equalities. -/
169-
protected def CuspForm.copy (f : CuspForm Γ k) (f' : ℍ → ℂ) (h : f' = ⇑f) : CuspForm Γ k where
170-
toSlashInvariantForm := f.1.copy f' h
179+
bdd_at_cusps' hc := h.symm ▸ f.bdd_at_cusps' (hΓ ▸ hc)
180+
181+
/-- Copy of a `CuspForm` with a new `toFun` equal to the old one, optionally transporting
182+
along an equality of subgroups. Useful to fix definitional equalities. -/
183+
protected def CuspForm.copy {Γ' : Subgroup (GL (Fin 2) ℝ)} (f : CuspForm Γ k) (f' : ℍ → ℂ)
184+
(h : f' = ⇑f) (hΓ : Γ' = Γ := by rfl) : CuspForm Γ' k where
185+
toFun := f'
186+
slash_action_eq' A hA := h.symm ▸ f.slash_action_eq' A (hΓ ▸ hA)
171187
holo' := h.symm ▸ f.holo'
172-
zero_at_cusps' A := h.symm ▸ f.zero_at_cusps' A
188+
zero_at_cusps' hc := h.symm ▸ f.zero_at_cusps' (hΓ ▸ hc)
173189

174190
end ModularForm
175191

Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ theorem Gamma_one_top : Gamma 1 = ⊤ := by
6969
lemma mem_Gamma_one (γ : SL(2, ℤ)) : γ ∈ Γ(1) := by
7070
simp only [Gamma_one_top, Subgroup.mem_top]
7171

72+
/-- The GL-image of `Γ(1)` equals `𝒮ℒ` (the image of `SL(2, ℤ)` in `GL(2, ℝ)`). -/
73+
theorem Gamma_one_coe_eq_SL : (↑(Gamma 1) : Subgroup (GL (Fin 2) ℝ)) = 𝒮ℒ := by
74+
simp [Gamma_one_top, MonoidHom.range_eq_map]
75+
7276
theorem Gamma_zero_bot : Gamma 0 = ⊥ := rfl
7377

7478
lemma ModularGroup_T_pow_mem_Gamma (N M : ℤ) (hNM : N ∣ M) :
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
/-
2+
Copyright (c) 2026 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.NumberTheory.ModularForms.QExpansion
9+
public import Mathlib.NumberTheory.ModularForms.LevelOne
10+
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.QExpansion
11+
12+
/-!
13+
# Cusp form submodule and IsCuspForm predicate
14+
15+
This file defines the inclusion of cusp forms into modular forms as a linear map, the cusp form
16+
submodule of modular forms, and the `IsCuspForm` predicate. It also provides a direct constructor
17+
`ModularForm.toCuspForm` for building cusp forms from modular forms with vanishing constant
18+
q-expansion coefficient (for `𝒮ℒ`).
19+
20+
## Main definitions
21+
22+
* `CuspForm.toModularFormₗ`: the inclusion `CuspForm Γ k →ₗ[ℂ] ModularForm Γ k`.
23+
* `ModularForm.cuspFormSubmodule`: the submodule of `ModularForm Γ k` consisting of cusp forms.
24+
* `ModularForm.IsCuspForm`: predicate that a modular form lies in the cusp form submodule.
25+
* `ModularForm.toCuspForm`: builds a `CuspForm 𝒮ℒ k` from a `ModularForm` whose q-expansion
26+
has vanishing constant term.
27+
28+
## Main results
29+
30+
* `CuspForm.toModularFormₗ_injective`: the inclusion is injective.
31+
* `CuspForm.equivCuspFormSubmodule`: `CuspForm Γ k ≃ₗ[ℂ] cuspFormSubmodule Γ k`.
32+
* `ModularForm.isCuspForm_iff_coeffZero_eq_zero`: for `𝒮ℒ`, `IsCuspForm` is equivalent to the
33+
q-expansion having vanishing constant term.
34+
-/
35+
36+
@[expose] public noncomputable section
37+
38+
open UpperHalfPlane ModularForm Complex SlashInvariantForm SlashInvariantFormClass
39+
ModularFormClass MatrixGroups OnePoint Filter Topology
40+
41+
variable {Γ : Subgroup (GL (Fin 2) ℝ)} {k : ℤ}
42+
43+
namespace CuspForm
44+
45+
/-- The inclusion of cusp forms into modular forms, as a ℂ-linear map. -/
46+
def toModularFormₗ [Γ.HasDetOne] : CuspForm Γ k →ₗ[ℂ] ModularForm Γ k where
47+
toFun := ModularFormClass.modularForm
48+
map_add' _ _ := rfl
49+
map_smul' _ _ := rfl
50+
51+
@[simp]
52+
lemma toModularFormₗ_apply [Γ.HasDetOne] (f : CuspForm Γ k) (z : ℍ) :
53+
(toModularFormₗ f) z = f z := rfl
54+
55+
lemma toModularFormₗ_eq_coe [Γ.HasDetOne] (f : CuspForm Γ k) :
56+
toModularFormₗ f = (f : ModularForm Γ k) := rfl
57+
58+
lemma toModularFormₗ_injective [Γ.HasDetOne] :
59+
Function.Injective (toModularFormₗ : CuspForm Γ k → ModularForm Γ k) :=
60+
fun _ _ h ↦ DFunLike.ext _ _ fun z ↦ DFunLike.congr_fun h z
61+
62+
end CuspForm
63+
64+
namespace ModularForm
65+
66+
/-- The submodule of `ModularForm Γ k` consisting of cusp forms, defined as the range of
67+
the inclusion `CuspForm.toModularFormₗ`. -/
68+
def cuspFormSubmodule (Γ : Subgroup (GL (Fin 2) ℝ)) (k : ℤ) [Γ.HasDetOne] :
69+
Submodule ℂ (ModularForm Γ k) :=
70+
LinearMap.range CuspForm.toModularFormₗ
71+
72+
/-- A modular form is a cusp form if it lies in the cusp form submodule. -/
73+
def IsCuspForm [Γ.HasDetOne] (f : ModularForm Γ k) : Prop :=
74+
f ∈ cuspFormSubmodule Γ k
75+
76+
@[simp]
77+
lemma mem_cuspFormSubmodule_iff [Γ.HasDetOne] {f : ModularForm Γ k} :
78+
f ∈ cuspFormSubmodule Γ k ↔ IsCuspForm f := Iff.rfl
79+
80+
/-- The cusp form submodule is linearly equivalent to the type of cusp forms. -/
81+
def CuspForm.equivCuspFormSubmodule (Γ : Subgroup (GL (Fin 2) ℝ)) (k : ℤ) [Γ.HasDetOne] :
82+
CuspForm Γ k ≃ₗ[ℂ] cuspFormSubmodule Γ k :=
83+
LinearEquiv.ofInjective CuspForm.toModularFormₗ CuspForm.toModularFormₗ_injective
84+
85+
/-- A modular form is a cusp form if and only if it vanishes at every cusp. This is the
86+
general characterization valid for any subgroup. -/
87+
lemma isCuspForm_iff [Γ.HasDetOne] (f : ModularForm Γ k) :
88+
IsCuspForm f ↔ ∀ {c}, IsCusp c Γ → c.IsZeroAt f k :=
89+
fun ⟨g, hg⟩ _ ↦ hg ▸ g.zero_at_cusps', fun h ↦ ⟨⟨f, f.holo', h⟩, rfl⟩⟩
90+
91+
/-- A modular form with `valueAtInfty f = 0` is zero at infinity. -/
92+
lemma isZeroAtImInfty_of_valueAtInfty_eq_zero {F : Type*} [FunLike F ℍ ℂ]
93+
[DiscreteTopology Γ] [Γ.HasDetPlusMinusOne] [Fact (IsCusp ∞ Γ)] [ModularFormClass F Γ k]
94+
(f : F) (h : valueAtInfty f = 0) : IsZeroAtImInfty f := by
95+
have hh : 0 < Γ.strictWidthInfty := Γ.strictWidthInfty_pos_iff.mpr Fact.out
96+
have hΓ : Γ.strictWidthInfty ∈ Γ.strictPeriods := Γ.strictWidthInfty_mem_strictPeriods
97+
have hanal := ModularFormClass.analyticAt_cuspFunction_zero f hh hΓ
98+
have hper := periodic_comp_ofComplex f hΓ
99+
simp_rw [IsZeroAtImInfty, ZeroAtFilter, ← h, ← cuspFunction_apply_zero hh hanal hper]
100+
exact (hanal.continuousAt.tendsto.comp (qParam_tendsto_atImInfty hh)).congr
101+
(fun τ ↦ SlashInvariantFormClass.eq_cuspFunction f τ hΓ hh.ne')
102+
103+
section SL2Z
104+
105+
open EisensteinSeries
106+
107+
variable {k : ℤ}
108+
109+
/-- An `𝒮ℒ` modular form with vanishing q-expansion constant term vanishes at every cusp. -/
110+
lemma isZeroAt_of_coeffZero_eq_zero (f : ModularForm 𝒮ℒ k)
111+
(h : (qExpansion 1 f).coeff 0 = 0) {c : OnePoint ℝ} (hc : IsCusp c 𝒮ℒ) :
112+
c.IsZeroAt f k := by
113+
rw [Subgroup.IsArithmetic.isCusp_iff_isCusp_SL2Z] at hc
114+
rw [isZeroAt_iff_forall_SL2Z hc]
115+
intro γ _
116+
rw [show (⇑f ∣[k] γ) = ⇑f from f.slash_action_eq' _ ⟨γ, rfl⟩]
117+
exact isZeroAtImInfty_of_valueAtInfty_eq_zero f <| by
118+
rwa [← qExpansion_coeff_zero one_pos
119+
(ModularFormClass.analyticAt_cuspFunction_zero f one_pos one_mem_strictPeriods_SL)
120+
(periodic_comp_ofComplex f one_mem_strictPeriods_SL)]
121+
122+
/-- Build a `CuspForm 𝒮ℒ k` from a `ModularForm 𝒮ℒ k` whose q-expansion has vanishing
123+
constant term. The resulting cusp form has the same underlying function. -/
124+
def toCuspForm (f : ModularForm 𝒮ℒ k) (h : (qExpansion 1 f).coeff 0 = 0) : CuspForm 𝒮ℒ k :=
125+
{ f with zero_at_cusps' := isZeroAt_of_coeffZero_eq_zero f h }
126+
127+
@[simp]
128+
lemma toCuspForm_apply (f : ModularForm 𝒮ℒ k) (h : (qExpansion 1 f).coeff 0 = 0)
129+
(z : ℍ) : (toCuspForm f h) z = f z := rfl
130+
131+
/-- For `𝒮ℒ` modular forms, `IsCuspForm` is equivalent to the q-expansion having vanishing
132+
constant term. -/
133+
lemma isCuspForm_iff_coeffZero_eq_zero (f : ModularForm 𝒮ℒ k) :
134+
IsCuspForm f ↔ (qExpansion 1 f).coeff 0 = 0 := by
135+
refine ⟨fun ⟨g, hg⟩ ↦ ?_, fun h ↦ (isCuspForm_iff f).mpr (isZeroAt_of_coeffZero_eq_zero f h)⟩
136+
rw [← hg, qExpansion_coeff_zero one_pos
137+
(ModularFormClass.analyticAt_cuspFunction_zero _ one_pos one_mem_strictPeriods_SL)
138+
(periodic_comp_ofComplex _ one_mem_strictPeriods_SL)]
139+
exact (CuspFormClass.zero_at_infty g).valueAtInfty_eq_zero
140+
141+
end SL2Z
142+
143+
end ModularForm

Mathlib/NumberTheory/ModularForms/EisensteinSeries/QExpansion.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ lemma EisensteinSeries.E_qExpansion_coeff {k : ℕ} (hk : 3 ≤ k) (hk2 : Even k
327327
set β : ℂ := -(2 * k / bernoulli k : ℂ)
328328
set c : ℕ → ℂ := fun m ↦ if m = 0 then 1 else β * ↑(σ (k - 1) m)
329329
suffices ∀ τ : ℍ, HasSum (fun m ↦ c m • 𝕢 (1 : ℝ) τ ^ m) (E hk τ) from
330-
(ModularFormClass.qExpansion_coeff_unique one_pos one_mem_strictPeriods_SL2Z this m).symm
330+
(ModularFormClass.qExpansion_coeff_unique one_pos (by simp) this m).symm
331331
intro τ
332332
have hS : Summable fun n : ℕ ↦ (σ (k - 1) (n + 1) : ℂ) * cexp (2 * π * I * τ) ^ (n + 1) :=
333333
(summable_nat_add_iff 1).mpr (summable_sigma_mul_cexp_pow (by omega) τ)

Mathlib/NumberTheory/ModularForms/LevelOne.lean

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,22 @@ variable {F : Type*} [FunLike F ℍ ℂ] {k : ℤ}
3030

3131
namespace SlashInvariantForm
3232

33-
variable [SlashInvariantFormClass F Γ(1) k]
33+
variable [SlashInvariantFormClass F 𝒮ℒ k]
3434

3535
lemma exists_one_half_le_im_and_norm_le (hk : k ≤ 0) (f : F) (τ : ℍ) :
3636
∃ ξ : ℍ, 1 / 2 ≤ ξ.im ∧ ‖f τ‖ ≤ ‖f ξ‖ :=
3737
let ⟨γ, hγ, hdenom⟩ := exists_one_half_le_im_smul_and_norm_denom_le τ
38-
⟨γ • τ, hγ, by simpa only [slash_action_eqn_SL'' _ (mem_Gamma_one γ),
39-
norm_mul, norm_zpow] using le_mul_of_one_le_left (norm_nonneg _) <|
40-
one_le_zpow_of_nonpos₀ (norm_pos_iff.2 (denom_ne_zero _ _)) hdenom hk⟩
38+
⟨γ • τ, hγ, by
39+
have : SlashInvariantFormClass F Γ(1) k := Gamma_one_coe_eq_SL ▸ ‹_›
40+
simpa only [slash_action_eqn_SL'' _ (mem_Gamma_one γ), norm_mul, norm_zpow]
41+
using le_mul_of_one_le_left (norm_nonneg _) <|
42+
one_le_zpow_of_nonpos₀ (norm_pos_iff.2 (denom_ne_zero _ _)) hdenom hk⟩
4143

4244
variable (k) in
4345
/-- If a constant function is modular of weight `k`, then either `k = 0`, or the constant is `0`. -/
4446
lemma wt_eq_zero_of_eq_const {f : F} {c : ℂ} (hf : ⇑f = Function.const _ c) :
4547
k = 0 ∨ c = 0 := by
48+
have : SlashInvariantFormClass F Γ(1) k := Gamma_one_coe_eq_SL ▸ ‹_›
4649
have hI := slash_action_eqn_SL'' f (mem_Gamma_one S) I
4750
have h2I2 := slash_action_eqn_SL'' f (mem_Gamma_one S) ((⟨2, two_pos⟩ : {x : ℝ // 0 < x}) • .I)
4851
simp_rw [sl_moeb, hf, Function.const, denom_S] at hI h2I2
@@ -63,16 +66,16 @@ theorem slash_action_generators_SL2Z {f : ℍ → ℂ} {k : ℤ}
6366

6467
end SlashInvariantForm
6568

66-
namespace ModularFormClass
69+
lemma one_mem_strictPeriods_SL : (1 : ℝ) ∈ (𝒮ℒ).strictPeriods := by simp
6770

68-
variable [ModularFormClass F Γ(1) k]
71+
namespace ModularFormClass
6972

70-
lemma one_mem_strictPeriods_SL2Z : (1 : ℝ) ∈ Γ(1).strictPeriods := by simp
73+
variable [ModularFormClass F 𝒮ℒ k]
7174

7275
private theorem cuspFunction_eqOn_const_of_nonpos_wt (hk : k ≤ 0) (f : F) :
7376
Set.EqOn (cuspFunction 1 f) (const ℂ (cuspFunction 1 f 0)) (Metric.ball 0 1) := by
7477
refine eq_const_of_exists_le (fun q hq ↦ ?_) (exp_nonneg (-π)) ?_ (fun q hq ↦ ?_)
75-
· exact (ModularFormClass.differentiableAt_cuspFunction f one_pos one_mem_strictPeriods_SL2Z
78+
· exact (ModularFormClass.differentiableAt_cuspFunction f one_pos one_mem_strictPeriods_SL
7679
(mem_ball_zero_iff.mp hq)).differentiableWithinAt
7780
· simp [pi_pos]
7881
· simp only [Metric.mem_closedBall, dist_zero_right]
@@ -81,15 +84,15 @@ private theorem cuspFunction_eqOn_const_of_nonpos_wt (hk : k ≤ 0) (f : F) :
8184
· obtain ⟨ξ, hξ, hξ₂⟩ := exists_one_half_le_im_and_norm_le hk f
8285
⟨_, im_invQParam_pos_of_norm_lt_one Real.zero_lt_one (mem_ball_zero_iff.mp hq) hq'⟩
8386
exact ⟨_, norm_qParam_le_of_one_half_le_im hξ,
84-
by simpa [← SlashInvariantFormClass.eq_cuspFunction f _ one_mem_strictPeriods_SL2Z
87+
by simpa [← SlashInvariantFormClass.eq_cuspFunction f _ one_mem_strictPeriods_SL
8588
one_ne_zero, qParam_right_inv one_ne_zero hq'] using hξ₂⟩
8689

8790
private theorem levelOne_nonpos_wt_const (hk : k ≤ 0) (f : F) :
8891
f = Function.const ℍ (cuspFunction 1 f 0) := by
8992
ext z
9093
have hQ : 𝕢 1 z ∈ (Metric.ball 0 1) := by
9194
simpa using (norm_qParam_lt_iff zero_lt_one 0 z.1).mpr z.2
92-
simpa [← SlashInvariantFormClass.eq_cuspFunction f _ one_mem_strictPeriods_SL2Z one_ne_zero]
95+
simpa [← SlashInvariantFormClass.eq_cuspFunction f _ one_mem_strictPeriods_SL one_ne_zero]
9396
using cuspFunction_eqOn_const_of_nonpos_wt hk f hQ
9497

9598
lemma levelOne_neg_weight_eq_zero (hk : k < 0) (f : F) : ⇑f = 0 := by
@@ -98,18 +101,18 @@ lemma levelOne_neg_weight_eq_zero (hk : k < 0) (f : F) : ⇑f = 0 := by
98101
· exact (lt_irrefl _ hk).elim
99102
· rw [hf, hf₀, const_zero]
100103

101-
lemma levelOne_weight_zero_const [ModularFormClass F Γ(1) 0] (f : F) :
104+
lemma levelOne_weight_zero_const [ModularFormClass F 𝒮ℒ 0] (f : F) :
102105
∃ c, ⇑f = Function.const _ c :=
103106
⟨_, levelOne_nonpos_wt_const le_rfl f⟩
104107

105108
end ModularFormClass
106109

107-
lemma ModularForm.levelOne_weight_zero_rank_one : Module.rank ℂ (ModularForm Γ(1) 0) = 1 := by
110+
lemma ModularForm.levelOne_weight_zero_rank_one : Module.rank ℂ (ModularForm 𝒮ℒ 0) = 1 := by
108111
refine rank_eq_one (const 1) (by simp [DFunLike.ne_iff]) fun g ↦ ?_
109112
obtain ⟨c', hc'⟩ := levelOne_weight_zero_const g
110113
aesop
111114

112115
lemma ModularForm.levelOne_neg_weight_rank_zero (hk : k < 0) :
113-
Module.rank ℂ (ModularForm Γ(1) k) = 0 := by
116+
Module.rank ℂ (ModularForm 𝒮ℒ k) = 0 := by
114117
refine rank_eq_zero_iff.mpr fun f ↦ ⟨_, one_ne_zero, ?_⟩
115118
simpa [← coe_eq_zero_iff] using levelOne_neg_weight_eq_zero hk f

Mathlib/NumberTheory/ModularForms/NormTrace.lean

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,17 @@ lemma ModularForm.isZero_of_neg_weight [𝒢.IsArithmetic]
142142
{k : ℤ} (hk : k < 0) (f : ModularForm 𝒢 k) : f = 0 := by
143143
suffices ModularForm.norm 𝒮ℒ f = 0 by simpa [ModularForm.norm_eq_zero_iff]
144144
ext
145-
-- some friction here because `levelOne_neg_weight_eq_zero` uses `Γ(1)` for the level
146-
rw [@ModularFormClass.levelOne_neg_weight_eq_zero (f := ModularForm.norm 𝒮ℒ f) _ _ _,
147-
Pi.zero_apply, zero_apply]
148-
· rw [CongruenceSubgroup.Gamma_one_top, ← MonoidHom.range_eq_map]
149-
infer_instance
150-
· exact mul_neg_of_neg_of_pos hk <| mod_cast Nat.pos_of_ne_zero 𝒢.relIndex_ne_zero
145+
rw [ModularFormClass.levelOne_neg_weight_eq_zero
146+
(mul_neg_of_neg_of_pos hk <| mod_cast Nat.pos_of_ne_zero 𝒢.relIndex_ne_zero)
147+
(ModularForm.norm 𝒮ℒ f), Pi.zero_apply, zero_apply]
151148

152149
private lemma ModularForm.eq_const_of_weight_zero₀ [𝒢.IsArithmetic] [𝒢.HasDetOne]
153150
(f : ModularForm 𝒢 0) : ∃ c, (f : ℍ → ℂ) = Function.const ℍ c := by
154151
-- Consider the norm of `f - (f I)`. This must be a constant, since it's a weight 0 level 1 form.
155-
obtain ⟨c, hc⟩ : ∃ c, (ModularForm.norm 𝒮ℒ (f - .const (f I)) : ℍ → ℂ) = Function.const ℍ c := by
156-
convert @ModularFormClass.levelOne_weight_zero_const
157-
(f := ModularForm.norm 𝒮ℒ (f - .const (f I))) _ (by infer_instance)
158-
(by rw [zero_mul, CongruenceSubgroup.Gamma_one_top, MonoidHom.range_eq_map]; infer_instance)
152+
let : ModularFormClass (ModularForm 𝒮ℒ (0 * Nat.card (𝒮ℒ ⧸ 𝒢.subgroupOf 𝒮ℒ))) 𝒮ℒ 0 := by
153+
rw [zero_mul]; infer_instance
154+
obtain ⟨c, hc⟩ := ModularFormClass.levelOne_weight_zero_const
155+
(ModularForm.norm 𝒮ℒ (f - .const (f I)))
159156
-- But the constant must be 0, since `f - f I` vanishes at `I`.
160157
have : ModularForm.norm 𝒮ℒ (f - .const (f I)) I = 0 := by
161158
simpa [Finset.prod_eq_zero_iff, QuotientGroup.exists_mk] using1, by simp⟩

0 commit comments

Comments
 (0)