Skip to content

Select the correct newform via traces in CMF GP and Magma code snippets (LMFDB#5403, LMFDB#6060)#28

Open
roed-math wants to merge 1 commit into
mainfrom
ai/t32-cmf-snippet-select
Open

Select the correct newform via traces in CMF GP and Magma code snippets (LMFDB#5403, LMFDB#6060)#28
roed-math wants to merge 1 commit into
mainfrom
ai/t32-cmf-snippet-select

Conversation

@roed-math

Copy link
Copy Markdown
Owner

The Pari/GP snippet on newform pages took f = lf[1] ("index may be different") and Magma had no selection at all, even though the eigenbasis order of GP/Magma often differs from the LMFDB order (e.g. PARI reverses 37.2.a and 34.2.c; Magma reverses 80.5.h from LMFDB#6059). Following the Sage snippet from LMFDB#6515, the GP and Magma snippets now select the newform whose absolute Hecke eigenvalue traces up to the newspace's trace bound match the stored traces. The GP version computes traces from mfeigenbasis with a small abstrace helper (rescaling by degrees since PARI represents coefficients in subtowers); the Magma version selects from NewformDecomposition(NewSubspace(CuspidalSubspace(ModularSymbols(chi,k,-1)))) because Newforms(CuspForms(chi,k)) in current Magma (V2.29-4) silently returns wrong eigenvalues in many character spaces (e.g. 32.2.g, 110.2.f, 102.2.h; verified against LMFDB data, PARI and Magma's own modular symbols). Selection adds 0-1 ms in GP and at most ~0.2 s in Magma on all 19 tested labels, verified by running the generated snippets in both systems and comparing traces beyond the selection window; a snippet_test section now lets the snippet CI cover newform pages. For weight 1 the Magma snippet is omitted since Magma has no weight-1 newforms (its init already errors there). Addresses LMFDB#5403. Addresses LMFDB#6060.

🤖 Generated with Claude Code

LMFDB#6060)

The GP snippet took f = lf[1] and Magma had no selection, although the
GP/Magma eigenbasis order often differs from the LMFDB order (PARI
reverses 37.2.a and 34.2.c; Magma reverses 80.5.h from LMFDB#6059).
Following the Sage snippet, select the orbit whose absolute eigenvalue
traces up to the newspace trace bound match the stored traces: in GP via
mfeigenbasis with an abstrace helper (rescaling by field degrees since
PARI represents coefficients in subtowers), in Magma via the modular
symbols NewformDecomposition, because Newforms(CuspForms(chi,k)) in
Magma V2.29-4 silently returns wrong eigenvalues in many character
spaces (32.2.g, 110.2.f, 102.2.h). Weight 1 keeps no Magma snippet
(Magma has no weight 1 newforms). Adds a snippet_test section so the
snippet CI covers newform pages.

Verified by running the rendered snippets and full code downloads in gp
and Magma for 19 newforms (incl. order-mismatch, nested-coefficient-
field, trace_bound 0 and weight 1 cases), comparing traces beyond the
selection window with the database; selection costs 0-1 ms in GP and
at most ~0.2 s in Magma.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants