feat: the Fourier-coefficient recurrence for T_p at every prime - #4288
feat: the Fourier-coefficient recurrence for T_p at every prime#4288sqrt-of-2 wants to merge 7 commits into
Conversation
Turn the slash-level identity for the double coset Γ₁(N)·diag(1, p)·Γ₁(N)
into Diamond–Shurman's recurrence on Fourier coefficients,
aₘ(Tₚ f) = a_{p m}(f) + p^{k−1} a_{m/p}(⟨p⟩ f),
uniformly at every prime, with the nebentypus form aₘ(Tₚ f) = a_{p m}(f) +
χ(p) p^{k−1} a_{m/p}(f) at p ∤ N and the degenerate Uₚ form at p ∣ N.
Co-Authored-By: Claude Code <noreply@github.com>
There was a problem hiding this comment.
🟡 attribution — request_changes claude/claude-opus-5
Diamond–Shurman, Shimura, Miyake and the in-repo antecedents are properly credited, and the AINTLIB predecessor file is named; but the AINTLIB credit line drops the author/copyright holder (and the pinned commit) that every sibling module in this directory carries.
TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:59— The Provenance credit for AINTLIB'sHeckeRIngs/GL2/FourierHecke.leangives only the repo URL and license, omitting the copyright holder (Chris Birkbeck) and a pinned commit, so the Apache-2.0 attribution is incomplete and the cited file is not verifiable at a revision. Fix: Extend the line to the neighbourhood's form, e.g. "(LeanModularForms/HeckeRIngs/GL2/FourierHecke.lean, https://github.com/CBirkbeck/AINTLIB, commit2baa76f742bdb4fb8ee323fabba41203bd390e08, Apache-2.0, Chris Birkbeck)".
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 108s · 16 in / 7.1k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 api-design — request_changes claude/claude-opus-5
The recurrence surface is complete and symmetric, with no compatibility artifacts, but the advertised bad-prime (Uₚ) lemmas carry a needless p.Prime hypothesis that makes them weaker than what the existing library already yields, and the newly de-privatised width lemma is exposed under a Hecke namespace it has nothing to do with.
TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:212—qExpansion_coeff_heckeSlashGamma1ModularFormEnd_diagCosetGamma1_of_dvd(and its cusp counterpart, line 221) requireshp : p.Prime, but the identical statement holds for everyp ∣ N; the primality hypothesis narrows the canonicalUₚAPI for no reason. Fix: Drophpand prove from the existing lemmas:rw [heckeSlashGamma1ModularFormEnd_diagCosetGamma1 k hpN, qExpansion_coeff_heckeSlashUpperTriModularFormEnd](resp. the cusp-form versions).TauCeti/NumberTheory/ModularForms/HeckeSlash/UpperTri/ModularForm.lean:92—one_mem_strictPeriods_Gamma1becomes public in namespaceHeckeRing.GL2, but it is a general statement aboutGamma1with no Hecke content, and the repo already spells the same fact inline elsewhere, leaving two spellings. Fix: Place the public lemma in theCongruenceSubgroupnamespace beside the other Γ₁ cusp-width material and use it at the existing sites, or keep itprivateand discharge the new file's uses withby simp.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 211s · 22 in / 15.2k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 generality — request_changes claude/claude-opus-5
The two bad-prime statements assume p.Prime although the result holds for every divisor p ∣ N and already follows from two existing primality-free lemmas; everything else sits at the natural level.
TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:212—qExpansion_coeff_heckeSlashGamma1ModularFormEnd_diagCosetGamma1_of_dvdassumeshp : p.Prime, but the statement holds for everyp ∣ N(with[NeZero N]); primality is used only to route the proof through the prime recurrence. Fix: Drophpand prove directly:rw [heckeSlashGamma1ModularFormEnd_diagCosetGamma1 k hpN]; exact qExpansion_coeff_heckeSlashUpperTriModularFormEnd k hpN f m, and adjust the docstring ("at a bad prime" → any divisor of the level).TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:221— Same over-strong hypothesis in the cusp-form counterpartqExpansion_coeff_heckeSlashGamma1CuspFormEnd_diagCosetGamma1_of_dvd. Fix: Drophpand derive fromheckeSlashGamma1CuspFormEnd_diagCosetGamma1 k hpNplusqExpansion_coeff_heckeSlashUpperTriCuspFormEnd k hpN f m.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 172s · 19 in / 12.3k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 placement — request_changes claude/claude-opus-5
The new file's location and imports are correct. But the lemma this PR promotes to public API, one_mem_strictPeriods_Gamma1, has no Hecke content and belongs in an earlier general file rather than in HeckeSlash/UpperTri/ModularForm.lean under HeckeRing.GL2.
TauCeti/NumberTheory/ModularForms/HeckeSlash/UpperTri/ModularForm.lean:92—one_mem_strictPeriods_Gamma1becomes public API but is a generic statement aboutΓ₁(N)widths ((1:ℝ) ∈ ((Gamma1 N).map (mapGL ℝ)).strictPeriods) with no upper-triangular or Hecke content; it depends only on Mathlib'sCongruenceSubgroup.strictPeriods_Gamma1(mathlib/Mathlib/NumberTheory/ModularForms/Cusps.lean:442), yet lives in a Hecke file under namespaceHeckeRing.GL2, where callers outside the Hecke tree will not find it. Fix: Move it to an earlier general file —TauCeti/NumberTheory/ModularForms/Cusps/Basic.leanis the repo's home forstrictPeriods/cusp-width facts and is already upstream of the HeckeSlash tree — under a non-Hecke namespace, and use it at the sites that currently reprove it inline.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 166s · 33 in / 12.6k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 naming — request_changes claude/claude-opus-5
Names track the adjacent Prime.lean/UpperTri precedent and no notation is introduced, but the newly public one_mem_strictPeriods_Gamma1 sits in the wrong namespace and the _of_dvd suffix is ambiguous between p ∣ N and the p ∣ m guard that every other lemma in the file carries.
TauCeti/NumberTheory/ModularForms/HeckeSlash/UpperTri/ModularForm.lean:92—one_mem_strictPeriods_Gamma1becomes public insidenamespace HeckeRing.GL2(line 78), but it states(1 : ℝ) ∈ ((Gamma1 N).map (mapGL ℝ)).strictPeriods— a fact aboutΓ₁(N)and cusp widths, unrelated to Hecke rings. As public API the name is misplaced in that namespace and undiscoverable next to its siblings. Fix: Put it in the root namespace (matching Mathlib'sone_mem_strictPeriods_SL) or inCongruenceSubgroup(matchingstrictPeriods_Gamma1), and adjust the three call sites inUpperTri/ModularForm.leanandRecurrence.lean.TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:212—qExpansion_coeff_heckeSlashGamma1ModularFormEnd_diagCosetGamma1_of_dvdnames the hypothesisp ∣ Nas bare_of_dvd, but in this file the salient divisibility isp ∣ m(theif p ∣ mguard in every recurrence statement). The name reads as thep ∣ mcase of the recurrence rather than the bad-prime case. Fix: Rename to…_of_dvd_level(repo precedent:twistedDivisorSum_apply_prime_pow_of_dvd_left_level,TauCeti/NumberTheory/ArithmeticFunction/TwistedDivisorSum.lean:115), and update theMain resultsbullet at line 49 and the module-doc mention at line 35.TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:221— Same ambiguous_of_dvdsuffix on the cusp-form counterpartqExpansion_coeff_heckeSlashGamma1CuspFormEnd_diagCosetGamma1_of_dvd(hypothesisp ∣ N). Fix: Rename in step with the modular-form version, e.g.…_of_dvd_level.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 183s · 27 in / 14.2k out tokens · reviewing this diff · rubric
There was a problem hiding this comment.
🟡 proof-quality — request_changes claude/claude-opus-5
Proofs are short and mostly explicit, but the file re-derives two analyticity facts that already exist (one private) in the files it imports, and the cusp-form recurrence closes by unfolding the ModularFormClass.modularForm wrapper rather than by an explicit coercion step.
TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:106— ThehUblock re-derives, from the form class, the exact statement ofanalyticAt_cuspFunction_heckeSlashUpperTri(private, UpperTri/QExpansion.lean:190) — same four arguments, plus a re-instantiation of theFact (IsCusp .infty Γ)instance thatqExpansion_coeff_heckeSlashUpperTri'also builds. Fix: DropprivatefromanalyticAt_cuspFunction_heckeSlashUpperTri, or add a class-levelanalyticAt_cuspFunction_heckeSlashUpperTri'besideqExpansion_coeff_heckeSlashUpperTri'(which already deriveshfperand theFactinstance fromhΓ), and call it here — the same de-privatization this PR already performs forone_mem_strictPeriods_Gamma1.TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:86—analyticAt_cuspFunction_slash_scaleRepis a private,Γ₁(N)-specific repeat of the reasoning in Diagonal/QExpansion.lean (rewrite the diagonal slash asd^(k-1) • levelRaise, then use analyticity of the level raise). Analyticity of the cusp function off ∣[k] diag(d,1)is the reusable fact needed whenever the two halves are added — it will be needed again for the compositeTₙthe PR description defers. Fix: State it inDiagonal/QExpansion.leannext toModularForm.qExpansion_slash_natDiagGL_d_one, in the general{𝒢 𝒢'} (h𝒢') (hle) (f)form, and use it both there (its proof currently inlines the sameModularFormClass.analyticAt_cuspFunction_zero (levelRaise …)step) and here.TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:148— Theexacttypechecks only because⇑(ModularFormClass.modularForm (diamondOpCuspNat k p f))unfolds to⇑(diamondOpCuspNat k p f): the private lemma's conclusion mentions the wrapper, the goal does not. Undocumented defeq across a coercion wrapper, and nothing in the proof shows the reader where the two spellings meet. Fix: Make the identification explicit — e.g.simpa only [<the@[simps]-generated coercion lemma forModularFormClass.modularForm>] using …— or restateqExpansion_coeff_add_slash_scaleRepso the second argument is passed as aModularFormClasstype and the wrapping happens inside the lemma.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
claude/claude-opus-5 · 276s · 31 in / 22.4k out tokens · reviewing this diff · rubric
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
Generalize and rename the level-divisor formulas, reuse the shared analyticity results, restore the cusp-width helper to private scope, and complete the AINTLIB attribution. Co-Authored-By: Codex <noreply@github.com>
Delete the private level-raise wrapper and call the existing ModularFormClass theorem directly at both sites.\n\nCo-Authored-By: Codex <noreply@github.com>
There was a problem hiding this comment.
✅ reuse — now passing on 471c5a7.
There was a problem hiding this comment.
✅ generality — now passing on 471c5a7.
There was a problem hiding this comment.
🟡 proof-quality — request_changes codex/gpt-5.6-sol
The shared recurrence helper still closes the diagonal branch through undocumented definitional equality across the generic ModularFormClass wrapper.
TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean:118— Theexactapplies a theorem aboutModularFormClass.modularForm gto a goal stated using genericg; both modular- and cusp-form callers therefore rely on wrapper/coercion definitional equality. Fix: State the helper’s diagonal input as aModularForm, or add and use an explicit lemma relating aModularFormClassvalue’s q-expansion and slash to its bundled modular form.
Reply in this thread to contest a finding; that re-runs only this rubric and posts an answer here. (To fix it, just push a commit — that re-reviews on its own. To contest again after an answer, post a NEW reply rather than editing an old one.)
codex/gpt-5.6-sol · 30s · 108.3k in / 1.2k out tokens · reviewing this diff · rubric
Derive analyticity of the diagonal summand from the bundled full Hecke operator and the upper-triangular summand, and remove the now-unused private diagonal helper. Co-Authored-By: Codex <noreply@github.com>
Use a concrete ModularForm for the private helper's diagonal input so the coefficient theorem applies without crossing the generic ModularFormClass wrapper by definitional equality. Co-Authored-By: Codex <noreply@github.com>
This PR proves Diamond–Shurman's Fourier-coefficient recurrence for the Hecke operator
Tₚ, uniformly at every prime and at every levelΓ₁(N):aₘ(Tₚ f) = a_{p m}(f) + p^{k−1} a_{m/p}(⟨p⟩ f), with the second term present exactly whenp ∣ m. On a nebentypus spaceM_k(N, χ)withp ∤ Nthe diamond acts by the scalarχ(p), giving the classicalaₘ(Tₚ f) = a_{p m}(f) + χ(p) p^{k−1} a_{m/p}(f); atp ∣ Nthe zero-extended⟨p⟩vanishes and the same statement degenerates toaₘ(Tₚ f) = a_{p m}(f), the operator modern papers writeUₚ. Following Miyake, Diamond–Shurman and Shimura no separateUₚis introduced — it is only this case ofTₚ. TheNatdivisionm / pis guarded by an explicitif p ∣ m, so no index silently rounds down. Alongside the coefficient statements the same identity is recorded between power series, with the diamond term appearing as aPowerSeries.expand; and two immediate consequences are drawn:a₁(Tₚ f) = a_p(f), and the fact that the Hecke eigenvalue of a normalized eigenvector (a₁(f) = 1) isa_p(f)— the identity that turns an eigenvalue system into a system of Fourier coefficients.The milestone served is Layer 2(b) of the ModularForms roadmap, "The action on forms":
Tₙ,Tₚasℂ-linear endomorphisms ofM_k(Γ₁(N))together with "the explicitq-expansion recurrences", listed there asaₘ(Tₚ f) = a_{mp}(f) + χ(p) p^{k−1} a_{m/p}(f)(Diamond–Shurman §5.2–5.3), and the roadmap's own frontier item "Uniform Hecke operators … the full good- and bad-prime coefficient recurrences". #4042 supplied the slash-level identityTₚ f = ∑_{b < p} f ∣[k] !![1, b; 0, p] + (⟨p⟩ f) ∣[k] !![p, 0; 0, 1];UpperTri/QExpansion.leanandDiagonal/QExpansion.leansupplied theq-expansion of each of the two halves separately. This PR is the step that adds them, which is what makes the recurrence a statement about coefficients rather than about slashes. What remains on that milestone after this PR: the compositeTₙfor generalnwithTₘ Tₙ = Tₘₙfor(m, n) = 1and the prime-power recurrence, the Hecke-ring homomorphism onto each character space, and the theorem thatTₚpreserves the nebentypus at a good prime.Files:
TauCeti/NumberTheory/ModularForms/HeckeSlash/Recurrence.lean(new, 271 lines). One further change:one_mem_strictPeriods_Gamma1inTauCeti/NumberTheory/ModularForms/HeckeSlash/UpperTri/ModularForm.leanstops beingprivate, so the new file reuses it instead of restating it; it is now listed in that file's main results.No Mathlib infrastructure is vendored, and no code is transcribed from AINTLIB. The hypotheses of the nebentypus statements — membership in
modFormCharSpace k χandNat.Coprime p N— are the ones the roadmap asks to be kept verbatim from AINTLIB'sHeckeRIngs/GL2/FourierHecke.lean(Apache-2.0), and the module docstring records that.Roadmap: ModularForms
🤖 Prepared with Claude Code