Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
23cbc1d
save
CBirkbeck Apr 3, 2026
1548cac
feat(NumberTheory/ModularForms): add cusp form submodule and level on…
CBirkbeck Apr 8, 2026
40cd50a
chore(NumberTheory/ModularForms): address PR review comments
CBirkbeck Apr 8, 2026
fda7c11
chore(NumberTheory/ModularForms): inline more haves in dimension form…
CBirkbeck Apr 8, 2026
563616a
feat(NumberTheory/ModularForms): add E₄ and E₆ abbreviations
CBirkbeck Apr 8, 2026
ba21536
golf
CBirkbeck Apr 8, 2026
58ce4e1
feat(Algebra/Order/Floor/Semifield): add `Nat.floor_div_eq_one_add_fl…
CBirkbeck Apr 8, 2026
c906431
refactor(NumberTheory/ModularForms): pull q-coordinate eta-product he…
CBirkbeck Apr 8, 2026
4870bfc
refactor(NumberTheory/ModularForms): derive z-coord eta lemmas from q…
CBirkbeck Apr 8, 2026
53ec440
chore(NumberTheory/ModularForms): shorten `multipliableLocallyUniform…
CBirkbeck Apr 8, 2026
1f1ec2d
refactor(NumberTheory/ModularForms): decompose dimension-formula proofs
CBirkbeck Apr 8, 2026
9aee737
chore(NumberTheory/ModularForms): tighten dimension-formula proofs af…
CBirkbeck Apr 8, 2026
b8144c9
chore(NumberTheory/ModularForms): wrap long lines to ≤ 100 chars
CBirkbeck Apr 8, 2026
3ab18d1
chore(NumberTheory/ModularForms): drop redundant show in E₄/E₆ qExpan…
CBirkbeck Apr 8, 2026
1722006
some golfs
CBirkbeck Apr 8, 2026
8d4689c
more golfs
CBirkbeck Apr 8, 2026
8e597e1
Merge remote-tracking branch 'upstream/master' into Modular_form_dim_…
CBirkbeck Apr 8, 2026
97c057c
cleanup
CBirkbeck Apr 10, 2026
8d90310
feat(NumberTheory/ModularForms): Coe from CuspForm to ModularForm
CBirkbeck Apr 13, 2026
43c4fae
chore: run mk_all to fix Mathlib.lean import order
CBirkbeck Apr 13, 2026
f91e8da
feat(NumberTheory/ModularForms): CuspFormClass instance for cuspFormS…
CBirkbeck Apr 13, 2026
6367ba5
Merge remote-tracking branch 'upstream/master' into Modular_form_dim_…
CBirkbeck Apr 13, 2026
a7c729d
Merge remote-tracking branch 'upstream/master' into Modular_form_dim_…
CBirkbeck May 1, 2026
b5f280e
feat(NumberTheory/ModularForms): restore Δ = (E₄³ - E₆²) / 1728
CBirkbeck May 1, 2026
5ebde02
chore(NumberTheory/ModularForms): clean up Δ = (E₄³ - E₆²) / 1728 proof
CBirkbeck May 1, 2026
82028aa
chore(NumberTheory/ModularForms): drop redundant ℍ → ℂ ascriptions
CBirkbeck May 1, 2026
d2b5d0e
feat(NumberTheory/ModularForms): graded-ring version of Δ = (E₄³ - E₆…
CBirkbeck May 1, 2026
4b367ba
chore(NumberTheory/ModularForms): use decide for nat equalities in mcast
CBirkbeck May 1, 2026
8de2aff
feat(NumberTheory/ModularForms): mcast_apply simp lemmas
CBirkbeck May 1, 2026
0ce59fd
Revert "feat(NumberTheory/ModularForms): mcast_apply simp lemmas"
CBirkbeck May 1, 2026
9f3dadc
refactor(NumberTheory/ModularForms): move discriminant identity to Gr…
CBirkbeck May 1, 2026
a4125e6
chore(NumberTheory/ModularForms): move GradedRing.lean to ModularForm…
CBirkbeck May 1, 2026
3f560be
feat(NumberTheory/ModularForms): scaffolding for E₄, E₆ generate grad…
CBirkbeck May 1, 2026
4c7b24e
feat(NumberTheory/ModularForms): partial port of E₄, E₆ generators (s…
CBirkbeck May 1, 2026
3708588
feat(NumberTheory/ModularForms): complete cusp-form decomposition for…
CBirkbeck May 1, 2026
e34abee
feat(NumberTheory/ModularForms): close `monomial_qExpansion_coeff_zer…
CBirkbeck May 1, 2026
73d4cef
feat(NumberTheory/ModularForms): scaffold injectivity proof
CBirkbeck May 1, 2026
cf68a22
feat(NumberTheory/ModularForms): close component_eq and weight-0 base…
CBirkbeck May 1, 2026
2af2747
feat(NumberTheory/ModularForms): close eval_discriminantPoly_mul_zero…
CBirkbeck May 1, 2026
b7a9ca6
feat(NumberTheory/ModularForms): close `reduced_part_eq_zero`
CBirkbeck May 1, 2026
3232212
feat(NumberTheory/ModularForms): close `whomog_poly_Delta_decomp`
CBirkbeck May 1, 2026
4a313bd
chore(NumberTheory/ModularForms): cleanup pass on E₄/E₆ generators
CBirkbeck May 1, 2026
917e66d
chore(NumberTheory/ModularForms): one-tactic-per-line + simplify pass
CBirkbeck May 1, 2026
34d7479
chore(NumberTheory/ModularForms): golf E₄/E₆ generators (1047 → 941 l…
CBirkbeck May 1, 2026
6b20817
chore(NumberTheory/ModularForms): strip docstrings from private helpers
CBirkbeck May 3, 2026
d1f58fc
chore(NumberTheory/ModularForms): address PR review comments (round 1)
CBirkbeck May 3, 2026
7781063
chore(NumberTheory/ModularForms): break down `reduced_part_eq_zero`
CBirkbeck May 3, 2026
d825b52
chore(NumberTheory/ModularForms): break down `whomog_poly_Delta_decom…
CBirkbeck May 3, 2026
0fae977
chore(NumberTheory/ModularForms): naming abbreviations + initial line…
CBirkbeck May 3, 2026
0ed59e6
chore(NumberTheory/ModularForms): more line-length and signature fixes
CBirkbeck May 3, 2026
82eedef
chore(NumberTheory/ModularForms): collapse odd-weight dismissals in `…
CBirkbeck May 3, 2026
c3629b1
chore(NumberTheory/ModularForms): more line-length fixes + tighten `c…
CBirkbeck May 3, 2026
49f2fd2
chore(NumberTheory/ModularForms): inline `E₄E₆Weight` as `(![4, 6] : …
CBirkbeck May 3, 2026
41e6040
chore(NumberTheory/ModularForms): mathlib-style pass — line lengths a…
CBirkbeck May 3, 2026
ce9cbd5
chore(NumberTheory/ModularForms): generalize movable helpers
CBirkbeck May 3, 2026
eb7308c
chore(NumberTheory/ModularForms): more generalizations of helpers
CBirkbeck May 3, 2026
2a59e89
chore(NumberTheory/ModularForms): mathlib-style pass — naming, helper…
CBirkbeck May 3, 2026
9414256
review: address loefflerd's review comments on PR #38806
CBirkbeck May 3, 2026
036c15b
review: also rename remaining ModularFormClass.qExpansion_smul in Gra…
CBirkbeck May 3, 2026
993f681
feat(NumberTheory/ModularForms): add API lemmas needed for level-1 gr…
CBirkbeck May 4, 2026
c56a0bc
feat(RingTheory/MvPolynomial/WeightedHomogeneous): add sub, eq_zero_o…
CBirkbeck May 4, 2026
3d56238
refactor: use mathlib API from prereq PRs, drop local helpers
CBirkbeck May 4, 2026
6865576
Merge remote-tracking branch 'upstream/master' into e4-e6-generate-gr…
CBirkbeck May 11, 2026
c01ffe4
Merge remote-tracking branch 'upstream/master' into e4-e6-generate-gr…
CBirkbeck May 12, 2026
786fd49
fix: drop duplicate discriminant identity (now in LevelOne/GradedRing)
May 12, 2026
bf64222
cleanup: omega → lia, => → ↦
May 12, 2026
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
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5702,6 +5702,7 @@ public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.MDifferentiable
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.QExpansion
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.Summable
public import Mathlib.NumberTheory.ModularForms.EisensteinSeries.UniformConvergence
public import Mathlib.NumberTheory.ModularForms.GradedRing
public import Mathlib.NumberTheory.ModularForms.Identities
public import Mathlib.NumberTheory.ModularForms.JacobiTheta.Bounds
public import Mathlib.NumberTheory.ModularForms.JacobiTheta.Manifold
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/Algebra/DirectSum/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ theorem of_eq_of_ne (i j : ι) (x : β i) (h : j ≠ i) : (of _ i x) j = 0 :=
lemma of_apply {i : ι} (j : ι) (x : β i) : of β i x j = if h : i = j then Eq.recOn h x else 0 :=
DFinsupp.single_apply

theorem of_eq_of_eq {i j : ι} (h : i = j) (x : β i) : of β i x = of β j (h ▸ x) := by
subst h; rfl

theorem mk_apply_of_mem {s : Finset ι} {f : ∀ i : (↑s : Set ι), β i.val} {n : ι} (hn : n ∈ s) :
mk β s f n = f ⟨n, hn⟩ :=
DFinsupp.mk_of_mem hn
Expand Down
7 changes: 7 additions & 0 deletions Mathlib/Algebra/DirectSum/Module.lean
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ theorem mk_smul (s : Finset ι) (c : R) (x) : mk M s (c • x) = c • mk M s x
theorem of_smul (i : ι) (c : R) (x) : of M i (c • x) = c • of M i x :=
(lof R ι M i).map_smul c x

theorem of_eq_sub_add_smul {ι : Type*} [DecidableEq ι] {M : ι → Type*}
[∀ i, AddCommGroup (M i)] {R : Type*} [Semiring R] [∀ i, Module R (M i)]
{i : ι} (f g : M i) (c : R) :
of M i f = of M i (f - c • g) + c • of M i g := by
rw [← of_smul, ← map_add]
exact (congr_arg (of M i) (sub_add_cancel f (c • g))).symm

variable {R}

theorem support_smul [∀ (i : ι) (x : M i), Decidable (x ≠ 0)] (c : R) (v : ⨁ i, M i) :
Expand Down
6 changes: 6 additions & 0 deletions Mathlib/NumberTheory/ModularForms/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,12 @@ def mcast {a b : ℤ} {Γ Γ' : Subgroup (GL (Fin 2) ℝ)} (h : a = b) (f : Modu
holo' := f.holo'
bdd_at_cusps' hc := h ▸ f.bdd_at_cusps' (hΓ ▸ hc)

theorem cast_apply {Γ : Subgroup (GL (Fin 2) ℝ)} {k₁ k₂ : ℤ}
(heq : k₁ = k₂) (f : ModularForm Γ k₁) (z : ℍ) :
(heq ▸ f : ModularForm Γ k₂) z = f z := by
subst heq
rfl

@[ext (iff := false)]
theorem gradedMonoid_eq_of_cast {Γ : Subgroup (GL (Fin 2) ℝ)} {a b : GradedMonoid (ModularForm Γ)}
(h : a.fst = b.fst) (h2 : mcast h a.snd = b.snd) : a = b := by
Expand Down
16 changes: 16 additions & 0 deletions Mathlib/NumberTheory/ModularForms/CuspFormSubmodule.lean
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,22 @@ lemma isCuspForm_iff_coeffZero_eq_zero (f : ModularForm 𝒮ℒ k) :
(periodic_comp_ofComplex _ one_mem_strictPeriods_SL)]
exact (CuspFormClass.zero_at_infty g).valueAtInfty_eq_zero

/-- Subtracting `(qExpansion 1 f).coeff 0 • g` from `f` (where `g` has constant qExpansion 1)
gives a cusp form. -/
lemma sub_smul_isCuspForm (f g : ModularForm 𝒮ℒ k)
(hg : (qExpansion 1 g).coeff 0 = 1) :
ModularForm.IsCuspForm (f - (qExpansion 1 f).coeff 0 • g) := by
set c := (qExpansion 1 f).coeff 0
rw [ModularForm.isCuspForm_iff_coeffZero_eq_zero,
show qExpansion 1 ⇑(f - c • g : ModularForm 𝒮ℒ k) =
qExpansion 1 ⇑f - qExpansion 1 ⇑(c • g : ModularForm 𝒮ℒ k) from
(ModularForm.qExpansionAddHom one_pos one_mem_strictPeriods_SL k).map_sub f (c • g),
show qExpansion 1 ⇑(c • g : ModularForm 𝒮ℒ k) = c • qExpansion 1 ⇑g from
ModularForm.qExpansion_smul (h := 1) (Γ := 𝒮ℒ) (k := k)
one_pos one_mem_strictPeriods_SL c g,
map_sub, PowerSeries.coeff_smul]
simp [hg, c]

end SL2Z

end ModularForm
746 changes: 746 additions & 0 deletions Mathlib/NumberTheory/ModularForms/GradedRing.lean

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions Mathlib/NumberTheory/ModularForms/QExpansion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public import Mathlib.Analysis.Complex.TaylorSeries
public import Mathlib.Analysis.Complex.UpperHalfPlane.Exp
public import Mathlib.NumberTheory.ModularForms.Basic
public import Mathlib.NumberTheory.ModularForms.Identities
public import Mathlib.RingTheory.MvPowerSeries.NoZeroDivisors
public import Mathlib.RingTheory.PowerSeries.Basic

/-!
Expand Down Expand Up @@ -592,6 +593,14 @@ protected lemma qExpansion_pow [Γ.HasDetPlusMinusOne] (hh : 0 < h)
rw [coe_pow, pow_succ, ← coe_pow, ← coe_mul, ModularForm.qExpansion_mul hh hΓ, ih,
pow_succ]

protected lemma mul_ne_zero [Γ.HasDetPlusMinusOne] (hh : 0 < h) (hΓ : h ∈ Γ.strictPeriods)
{a b : ℤ} {f : ModularForm Γ a} {g : ModularForm Γ b} (hf : f ≠ 0) (hg : g ≠ 0) :
f.mul g ≠ 0 := by
rw [Ne, ← ModularForm.qExpansion_eq_zero_iff hh hΓ,
ModularForm.qExpansion_mul hh hΓ, mul_eq_zero, not_or]
exact ⟨(ModularForm.qExpansion_eq_zero_iff hh hΓ _).not.mpr hf,
(ModularForm.qExpansion_eq_zero_iff hh hΓ _).not.mpr hg⟩

/-- The qExpansion map as an additive group hom. to power series over `ℂ`. -/
def qExpansionAddHom (hh : 0 < h) (hΓ : h ∈ Γ.strictPeriods) (k : ℤ) :
ModularForm Γ k →+ PowerSeries ℂ where
Expand Down
26 changes: 26 additions & 0 deletions Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,32 @@ theorem add {w : σ → M} (hφ : IsWeightedHomogeneous w φ n) (hψ : IsWeighte
IsWeightedHomogeneous w (φ + ψ) n :=
(weightedHomogeneousSubmodule R w n).add_mem hφ hψ

/-- The difference of two weighted homogeneous polynomials of degree `n` is weighted homogeneous
of weighted degree `n`. -/
theorem sub {R : Type*} [CommRing R] {w : σ → M} {φ ψ : MvPolynomial σ R}
(hφ : IsWeightedHomogeneous w φ n) (hψ : IsWeightedHomogeneous w ψ n) :
IsWeightedHomogeneous w (φ - ψ) n :=
(weightedHomogeneousSubmodule R w n).sub_mem hφ hψ

/-- A weighted homogeneous polynomial of degree `n` is zero if no monomial has weight `n`. -/
theorem eq_zero_of_no_monomials {w : σ → M} (hφ : IsWeightedHomogeneous w φ n)
(hno : ∀ d : σ →₀ ℕ, weight w d ≠ n) : φ = 0 := by
rw [← support_eq_empty, ← Finset.not_nonempty_iff_eq_empty]
rintro ⟨d, hd⟩
exact hno _ (hφ (mem_support_iff.mp hd))

/-- A weighted homogeneous polynomial of degree `n` whose support degrees are all equal to a
fixed `d₀` is a single monomial. -/
theorem eq_monomial_of_unique_weight {w : σ → M} (hφ : IsWeightedHomogeneous w φ n) (d₀ : σ →₀ ℕ)
(huniq : ∀ d, weight w d = n → d = d₀) : φ = monomial d₀ (coeff d₀ φ) := by
classical
ext d
rw [coeff_monomial]
by_cases hd : d = d₀
· simp [hd]
rw [if_neg (Ne.symm hd)]
exact hφ.coeff_eq_zero d (fun h => hd (huniq d h))

/-- The sum of weighted homogeneous polynomials of degree `n` is weighted homogeneous of
weighted degree `n`. -/
theorem sum {ι : Type*} (s : Finset ι) (φ : ι → MvPolynomial σ R) (n : M) {w : σ → M}
Expand Down
Loading