Skip to content

Commit

Permalink
Fix Dirichlet character for newform orbit whose dimension is 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wwylele committed Jan 9, 2025
1 parent 65713a6 commit 308cc47
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
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)
1 change: 1 addition & 0 deletions lmfdb/classical_modular_forms/web_newform.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ 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
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

0 comments on commit 308cc47

Please sign in to comment.