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

Search for level/conductor that is a multiple of a given value #6231

Merged
merged 1 commit into from
Nov 9, 2024
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
7 changes: 5 additions & 2 deletions lmfdb/classical_modular_forms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,11 +740,13 @@ def common_parse(info, query, na_check=False):
elif parity == 'odd':
query['char_parity'] = -1
if info.get('level_type'):
if info['level_type'] == 'divides':
if info['level_type'] in ['divides', 'multiple']:
if not isinstance(query.get('level'), int):
raise ValueError("You must specify a single level")
else:
elif info['level_type'] == 'divides':
query['level'] = {'$in': integer_divisors(ZZ(query['level']))}
else:
query['level'] = {'$mod': [0, ZZ(query['level'])]}
else:
query['level_is_' + info['level_type']] = True
parse_floats(info, query, 'analytic_conductor', name="Analytic conductor")
Expand Down Expand Up @@ -1476,6 +1478,7 @@ def __init__(self):
('squarefree', 'squarefree'),
('powerful', 'powerful'),
('divides','divides'),
('multiple','multiple of'),
],
min_width=110)
level = TextBoxWithSelect(
Expand Down
7 changes: 5 additions & 2 deletions lmfdb/elliptic_curves/elliptic_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,13 +515,15 @@ def elliptic_curve_search(info, query):
query['num_bad_primes'] = 1
elif info['conductor_type'] == 'squarefree':
query['semistable'] = True
elif info['conductor_type'] == 'divides':
elif info['conductor_type'] in ['divides', 'multiple']:
if not isinstance(query.get('conductor'), int):
err = "You must specify a single conductor"
flash_error(err)
raise ValueError(err)
else:
elif info['conductor_type'] == 'divides':
query['conductor'] = {'$in': integer_divisors(ZZ(query['conductor']))}
else:
query['conductor'] = {'$mod': [0, ZZ(query['conductor'])]}
parse_signed_ints(info, query, 'discriminant', qfield=('signD', 'absD'))
parse_ints(info,query,'rank')
parse_ints(info,query,'adelic_level')
Expand Down Expand Up @@ -1170,6 +1172,7 @@ def __init__(self):
('prime_power', 'p-power'),
('squarefree', 'sq-free'),
('divides','divides'),
('multiple','multiple of'),
],
min_width=85)
cond = TextBoxWithSelect(
Expand Down
7 changes: 5 additions & 2 deletions lmfdb/modl_galois_representations/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,15 @@ def modlgal_search(info, query):
query['conductor_num_primes'] = 1
elif info['conductor_type'] == 'squarefree':
query['conductor_is_squarefree'] = True
elif info['conductor_type'] == 'divides':
elif info['conductor_type'] in ['divides', 'multiple']:
if not isinstance(query.get('conductor'), int):
err = "You must specify a single level"
flash_error(err)
raise ValueError(err)
else:
elif info['conductor_type'] == 'divides':
query['conductor'] = {'$in': integer_divisors(ZZ(query['conductor']))}
else:
query['conductor'] = {'$mod': [0, ZZ(query['conductor'])]}
parse_primes(info, query, 'conductor_primes', name='ramified primes', mode=info.get('conductor_primes_quantifier'))
parse_rats(info, query,'top_slope', qfield='top_slope_real',name='Top slope')
if 'top_slope_real' in query and '/' in info['top_slope']:
Expand Down Expand Up @@ -228,6 +230,7 @@ def __init__(self):
('prime_power', 'p-power'),
('squarefree', 'sq-free'),
('divides','divides'),
('multiple','multiple of'),
],
)
conductor = TextBoxWithSelect(
Expand Down
7 changes: 5 additions & 2 deletions lmfdb/modular_curves/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,13 +679,15 @@ def modcurve_search(info, query):
query['num_bad_primes'] = 1
elif info['level_type'] == 'squarefree':
query['level_is_squarefree'] = True
elif info['level_type'] == 'divides':
elif info['level_type'] in ['divides', 'multiple']:
if not isinstance(query.get('level'), int):
err = "You must specify a single level"
flash_error(err)
raise ValueError(err)
else:
elif info['level_type'] == 'divides':
query['level'] = {'$in': integer_divisors(ZZ(query['level']))}
else:
query['level'] = {'$mod': [0, ZZ(query['level'])]}
parse_family(info, query, "family", qfield="name")
parse_ints(info, query, "index")
parse_ints(info, query, "genus")
Expand Down Expand Up @@ -757,6 +759,7 @@ def __init__(self):
('prime_power', 'p-power'),
('squarefree', 'sq-free'),
('divides', 'divides'),
('multiple', 'multiple of'),
],
min_width=85)
level = TextBoxWithSelect(
Expand Down
Loading