Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dirichlet character for newform orbit whose dimension is 1 #6318

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
55 changes: 55 additions & 0 deletions lmfdb/classical_modular_forms/test_cmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,3 +594,58 @@ def test_underlying_data(self):
and 'mf_hecke_charpolys' in data and 'charpoly_factorization' in data
and 'mf_newform_portraits' in data and "data:image/png;base64" in data
and 'mf_hecke_traces' in data and 'trace_an' in data)

def test_character_values(self):
# A newform orbit of dimension 1
data = self.tc.get('/ModularForm/GL2/Q/holomorphic/12/3/c/a/').get_data(as_text=True)
character_values_table = r"""
<table class="ntdata">
<tbody>
<tr>
<td class="dark border-right border-bottom">\(n\)</td>
<td class="light border-bottom">\(5\)</td>
<td class="dark border-bottom">\(7\)</td> </tr>
<tr>
<td class="dark border-right">\(\chi(n)\)</td>
<td class="light">\(-1\)</td>
<td class="dark">\(1\)</td> </tr>
</tbody>
</table>
"""
assert (character_values_table in data)

# A newform orbit of dimension 2
data = self.tc.get('/ModularForm/GL2/Q/holomorphic/119/1/d/a/').get_data(as_text=True)
character_values_table = r"""
<table class="ntdata">
<tbody>
<tr>
<td class="dark border-right border-bottom">\(n\)</td>
<td class="light border-bottom">\(52\)</td>
<td class="dark border-bottom">\(71\)</td> </tr>
<tr>
<td class="dark border-right">\(\chi(n)\)</td>
<td class="light">\(-1\)</td>
<td class="dark">\(-1\)</td> </tr>
</tbody>
</table>
"""
assert (character_values_table in data)

# An embedded newform
data = self.tc.get('/ModularForm/GL2/Q/holomorphic/119/1/d/a/118/1/').get_data(as_text=True)
character_values_table = r"""
<table class="ntdata">
<tbody>
<tr>
<td class="dark border-right border-bottom">\(n\)</td>
<td class="light border-bottom">\(52\)</td>
<td class="dark border-bottom">\(71\)</td> </tr>
<tr>
<td class="dark border-right">\(\chi(n)\)</td>
<td class="light">\(-1\)</td>
<td class="dark">\(-1\)</td> </tr>
</tbody>
</table>
"""
assert (character_values_table in data)
3 changes: 3 additions & 0 deletions lmfdb/classical_modular_forms/web_newform.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ def __init__(self, data, space=None, all_m=False, all_n=False, embedding_label=N
if self.dim == 1:
# avoid using mf_hecke_nf when the dimension is 1
vals = ConreyCharacter(self.level, db.char_dirichlet.lookup("%s.%s" % (self.level,self.char_orbit_label),projection="first")).values_gens
# ConreyCharacter.values_gens returns the exponent of character values,
# But we need the character values themselves here when hecke_ring_cyclotomic_generator is unspecified.
vals = [[v[0],[1] if v[1] == 0 else [-1]] for v in vals]
eigenvals = { 'hecke_ring_cyclotomic_generator': 0, 'hecke_ring_character_values': vals, 'hecke_ring_power_basis': True, 'maxp': previous_prime(len(self.traces)+1), 'an': self.traces }
else:
eigenvals = db.mf_hecke_nf.lucky({'hecke_orbit_code': self.hecke_orbit_code}, ['an'] + hecke_cols)
Expand Down
Loading