Skip to content
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
6 changes: 3 additions & 3 deletions lmfdb/abvar/fq/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,15 +616,15 @@ def jump(info):
if deg % 2 == 1:
raise ValueError
except Exception:
flash_error ("%s is not valid input. Expected a label or Weil polynomial.", jump_box)
flash_error("%s is not valid input. Expected a label or Weil polynomial.", jump_box)
return redirect(url_for(".abelian_varieties"))
g = deg//2
lead = cdict[deg]
if lead == 1: # accept monic normalization
lead = cdict[0]
cdict = {deg-exp: coeff for (exp, coeff) in cdict.items()}
if cdict.get(0) != 1:
flash_error ("%s is not valid input. Polynomial must have constant or leading coefficient 1", jump_box)
flash_error("%s is not valid input. Polynomial must have constant or leading coefficient 1", jump_box)
return redirect(url_for(".abelian_varieties"))
try:
q = lead.nth_root(g)
Expand All @@ -634,7 +634,7 @@ def jump(info):
if cdict.get(2*g-i, 0) != q**(g-i) * cdict.get(i, 0):
raise ValueError
except ValueError:
flash_error ("%s is not valid input. Expected a label or Weil polynomial.", jump_box)
flash_error("%s is not valid input. Expected a label or Weil polynomial.", jump_box)
return redirect(url_for(".abelian_varieties"))

def extended_code(c):
Expand Down
8 changes: 4 additions & 4 deletions lmfdb/characters/web_character.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,13 @@ def jacobi_sum(self, val):
try:
val = int(val)
except ValueError:
raise Warning ("n must be a positive integer coprime to the modulus {} and no greater than it".format(mod))
raise Warning("n must be a positive integer coprime to the modulus {} and no greater than it".format(mod))
if gcd(mod, val) > 1:
raise Warning ("n must be coprime to the modulus : %s" % mod)
raise Warning("n must be coprime to the modulus : %s" % mod)
if val > mod:
raise Warning ("n must be less than the modulus : %s" % mod)
raise Warning("n must be less than the modulus : %s" % mod)
if val < 0:
raise Warning ("n must be positive")
raise Warning("n must be positive")

chi_valuepairs = [[k, chi.conreyangle(k) * chi.order] for k in self.gens]
chi_genvalues = [int(v) for g, v in chi_valuepairs]
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/classical_modular_forms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def url_for_label(label):
return abort(404, "Invalid label")
keys = ['level', 'weight', 'char_orbit_label', 'hecke_orbit', 'conrey_index', 'embedding']
keytypes = [POSINT_RE, POSINT_RE, ALPHA_RE, ALPHA_RE, POSINT_RE, POSINT_RE]
for i in range (len(slabel)):
for i in range(len(slabel)):
if not keytypes[i].match(slabel[i]):
raise ValueError("Invalid label")
kwds = {keys[i]: val for i, val in enumerate(slabel)}
Expand Down
10 changes: 5 additions & 5 deletions lmfdb/ecnf/WebEllipticCurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def get_nf_info(lab):
r""" extract number field label from string and pretty"""
try:
label = nf_string_to_label(lab)
pretty = field_pretty (label)
pretty = field_pretty(label)
except ValueError as err:
raise ValueError(Markup("<span style='color:black'>%s</span> is not a valid number field label. %s" % (escape(lab),err)))
return label, pretty
Expand Down Expand Up @@ -566,7 +566,7 @@ def make_E(self):
# Regulator only in conditional/unconditional cases, or when we know the rank:
BSDReg = None
if self.bsd_status in ["conditional", "unconditional"]:
if self.ar == 0:
if self.analytic_rank == 0:
BSDReg = 1
self.reg = self.NTreg = web_latex(BSDReg) # otherwise we only get 1.00000...
else:
Expand All @@ -575,7 +575,7 @@ def make_E(self):
BSDReg = R * K.degree()**self.rank
self.reg = web_latex(R)
self.NTreg = web_latex(BSDReg)
except AttributeError:
except Exception:
self.reg = "not available"
self.NTreg = "not available"
elif self.rk != "not available":
Expand Down Expand Up @@ -652,7 +652,7 @@ def make_E(self):
BSDsha_denominator = BSDReg * BSDomega * BSDprodcp
BSDsha_from_formula = BSDLvalue * BSDsha_numerator / BSDsha_denominator
BSDsha_from_formula_rounded = BSDsha_from_formula.round()
BSDok = (BSDsha_from_formula_rounded == BSDsha) and ((BSDsha_from_formula_rounded -BSDsha_from_formula).abs() < 0.001)
BSDok = (BSDsha_from_formula_rounded == BSDsha) and ((BSDsha_from_formula_rounded - BSDsha_from_formula).abs() < 0.001)
#print(f"{BSDsha_from_formula=}")
#print(f"{BSDsha_from_formula_rounded=}")
#print(f"{BSDsha=}")
Expand Down Expand Up @@ -686,7 +686,7 @@ def make_E(self):
tors2 = '\\#E(K)_{\\mathrm{tor}}^2'
rootD = '\\left|d_K\\right|^{1/2}'

lder_name = rf"L^{{({r})}}(E/K,1)/{r}!" if r>=2 else "L'(E/K,1)" if r else "L(E/K,1)"
lder_name = rf"L^{{({r})}}(E/K,1)/{r}!" if r >= 2 else "L'(E/K,1)" if r else "L(E/K,1)"
lhs_num = rf'{Sha} {dot} {Om} {dot} {Reg} {dot} {prodcp}'
lhs_den = rf'{tors2} {dot} {rootD}'
lhs = rf'{frac}{{ {lhs_num} }} {{ {lhs_den} }}'
Expand Down
6 changes: 3 additions & 3 deletions lmfdb/ecnf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def show_ecnf1(nf):
if len(request.args) > 0:
# if requested field differs from nf, redirect to general search
if 'field' in request.args and request.args['field'] != nf_label:
return redirect (url_for(".index", **request.args), 307)
return redirect(url_for(".index", **request.args), 307)
info['title'] += ' Search results'
info['bread'].append(('Search results',''))
info['field'] = nf_label
Expand All @@ -223,7 +223,7 @@ def show_ecnf_conductor(nf, conductor_label):
# if requested field or conductor norm differs from nf or conductor_lable, redirect to general search
if ('field' in request.args and request.args['field'] != nf_label) or \
('conductor_norm' in request.args and request.args['conductor_norm'] != conductor_norm):
return redirect (url_for(".index", **request.args), 307)
return redirect(url_for(".index", **request.args), 307)
info['title'] += ' Search results'
info['bread'].append(('Search results',''))
info['field'] = nf_label
Expand Down Expand Up @@ -386,7 +386,7 @@ def parse_cm_list(inp, query, qfield):
short_title="nonmaximal primes", default=lambda info: info.get("nonmax_primes"), mathmode=True, align="center"),
ProcessedCol("galois_images", "ec.galois_rep_modell_image", r"mod-$\ell$ images",
lambda v: ", ".join(display_knowl('gl2.subgroup_data', title=s, kwargs={'label':s}) for s in v),
short_title="mod-ℓ images", default=lambda info: info.get ("nonmax_primes") or info.get("galois_image"), align="center"),
short_title="mod-ℓ images", default=lambda info: info.get("nonmax_primes") or info.get("galois_image"), align="center"),
MathCol("sha", "ec.analytic_sha_order", r"$Ш_{\textrm{an}}$", short_title="analytic Ш", default=False),
ProcessedCol("tamagawa_product", "ec.tamagawa_number", "Tamagawa", lambda v: web_latex(factor(v)), short_title="Tamagawa product", align="center", default=False),
ProcessedCol("reg", "ec.regulator", "Regulator", lambda v: str(v)[:11], mathmode=True, align="left", default=False),
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/elliptic_curves/elliptic_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def by_conductor(conductor):
if request.args:
# if conductor changed, fall back to a general search
if 'conductor' in request.args and request.args['conductor'] != str(conductor):
return redirect (url_for(".rational_elliptic_curves", **request.args), 307)
return redirect(url_for(".rational_elliptic_curves", **request.args), 307)
info['title'] += ' Search results'
info['bread'].append(('Search results',''))
info['conductor'] = conductor
Expand Down
6 changes: 3 additions & 3 deletions lmfdb/genus2_curves/web_g2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,11 +898,11 @@ def make_object(self, curve, endo, tama, ratpts, clus, galrep, nonsurj, is_curve
else:
data['mw_group'] = r'\(' + r' \oplus '.join((r'\Z' if n == 0 else r'\Z/{%s}\Z' % n) for n in invs) + r'\)'
if lower >= upper:
data['mw_gens_table'] = mw_gens_table (ratpts['mw_invs'], ratpts['mw_gens'], ratpts['mw_heights'], ratpts['rat_pts'])
data['mw_gens_simple_table'] = mw_gens_simple_table (ratpts['mw_invs'], ratpts['mw_gens'], ratpts['mw_heights'], ratpts['rat_pts'], data['min_eqn'])
data['mw_gens_table'] = mw_gens_table(ratpts['mw_invs'], ratpts['mw_gens'], ratpts['mw_heights'], ratpts['rat_pts'])
data['mw_gens_simple_table'] = mw_gens_simple_table(ratpts['mw_invs'], ratpts['mw_gens'], ratpts['mw_heights'], ratpts['rat_pts'], data['min_eqn'])

if curve['two_torsion_field'][0]:
data['two_torsion_field_knowl'] = nf_display_knowl (curve['two_torsion_field'][0], field_pretty(curve['two_torsion_field'][0]))
data['two_torsion_field_knowl'] = nf_display_knowl(curve['two_torsion_field'][0], field_pretty(curve['two_torsion_field'][0]))
else:
t = curve['two_torsion_field']
data['two_torsion_field_knowl'] = r"splitting field of \(%s\) with Galois group %s" % (intlist_to_poly(t[1]),transitive_group_display_knowl(f"{t[2][0]}T{t[2][1]}"))
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/higher_genus_w_automorphisms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def decjac_format(decjac_list):
entry = entry + "^{" + str(ints[1]) + "}"
entries.append(entry)
latex = "\\times ".join(entries)
ccClasses = cc_display ([ints[2] for ints in decjac_list])
ccClasses = cc_display([ints[2] for ints in decjac_list])
return latex, ccClasses

# Turn 'i.j' in the total label in to cc displayed in mongo
Expand Down
12 changes: 6 additions & 6 deletions lmfdb/lfunctions/Lfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,10 @@ def __init__(self, **args):

# Check for compulsory arguments
if self.fromDB:
validate_required_args ('Unable to construct L-function of Maass form.',
validate_required_args('Unable to construct L-function of Maass form.',
args, 'group', 'level', 'char', 'R', 'ap_id')
else:
validate_required_args ('Unable to construct L-function of Maass form.',
validate_required_args('Unable to construct L-function of Maass form.',
args, 'maass_id')

self._Ltype = "maass"
Expand Down Expand Up @@ -848,9 +848,9 @@ def __init__(self, **args):
constructor_logger(self, args)

# Check for compulsory arguments
validate_required_args ('Unable to construct Hilbert modular form '
validate_required_args('Unable to construct Hilbert modular form '
+ 'L-function.', args, 'label', 'number', 'character')
validate_integer_args ('Unable to construct Hilbert modular form L-function.',
validate_integer_args('Unable to construct Hilbert modular form L-function.',
args, 'character','number')

self._Ltype = "hilbertmodularform"
Expand Down Expand Up @@ -1125,7 +1125,7 @@ def __init__(self, **args):
constructor_logger(self, args)

# Check for compulsory arguments
validate_required_args ('Unable to construct Dedekind zeta function.', args, 'label')
validate_required_args('Unable to construct Dedekind zeta function.', args, 'label')
self._Ltype = "dedekindzeta"

# Put the arguments into the object dictionary
Expand Down Expand Up @@ -1434,7 +1434,7 @@ def __init__(self, **args):
validate_required_args('Unable to construct symmetric power L-function.',
args, 'power', 'underlying_type', 'field',
'conductor', 'isogeny')
validate_integer_args ('The power has to be an integer.',
validate_integer_args('The power has to be an integer.',
args, 'power', 'conductor')
self._Ltype = "SymmetricPower"

Expand Down
29 changes: 20 additions & 9 deletions lmfdb/local_fields/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,18 @@ def galcolresponse(n,t,cache):
return 'not computed'
return group_pretty_and_nTj(n, t, cache=cache)

def formatbracketcol(blist):
if blist == []:
return r'$[\ ]$'
if blist == '':
return 'not computed'
return f'${blist}$'

def intcol(j):
if j == '':
return 'not computed'
return f'${j}$'

lf_columns = SearchColumns([
LinkCol("label", "lf.field.label", "Label", url_for_label),
MathCol("n", "lf.degree", "$n$", short_title="degree", default=False),
Expand All @@ -316,8 +328,8 @@ def galcolresponse(n,t,cache):
["n", "gal", "cache"],
galcolresponse,
apply_download=lambda n, t, cache: [n, t]),
MathCol("u", "lf.unramified_degree", "$u$", short_title="unramified degree", default=False),
MathCol("t", "lf.tame_degree", "$t$", short_title="tame degree", default=False),
ProcessedCol("u", "lf.unramified_degree", "$u$", intcol, short_title="unramified degree", default=False),
ProcessedCol("t", "lf.tame_degree", "$t$", intcol, short_title="tame degree", default=False),
ListCol("visible", "lf.visible_slopes", "Visible slopes",
show_slopes2, default=lambda info: info.get("visible"), mathmode=True),
MultiProcessedCol("slopes", "lf.slope_content", "Slope content",
Expand All @@ -327,8 +339,8 @@ def galcolresponse(n,t,cache):
# want apply_download for download conversion
PolynomialCol("unram", "lf.unramified_subfield", "Unram. Ext.", default=lambda info:info.get("visible")),
ProcessedCol("eisen", "lf.eisenstein_polynomial", "Eisen. Poly.", default=lambda info:info.get("visible"), mathmode=True, func=format_eisen),
MathCol("ind_of_insep", "lf.indices_of_inseparability", "Ind. of Insep.", default=lambda info: info.get("ind_of_insep")),
MathCol("associated_inertia", "lf.associated_inertia", "Assoc. Inertia", default=lambda info: info.get("associated_inertia"))],
ProcessedCol("ind_of_insep", "lf.indices_of_inseparability", "Ind. of Insep.", formatbracketcol, default=lambda info: info.get("ind_of_insep")),
ProcessedCol("associated_inertia", "lf.associated_inertia", "Assoc. Inertia", formatbracketcol, default=lambda info: info.get("associated_inertia"))],
db_cols=["c", "coeffs", "e", "f", "gal", "label", "n", "p", "slopes", "t", "u", "visible", "ind_of_insep", "associated_inertia","unram","eisen"])

def lf_postprocess(res, info, query):
Expand Down Expand Up @@ -446,7 +458,7 @@ def render_field_webpage(args):
if 'wild_gap' in data and data['wild_gap'] != [0,0]:
wild_inertia = abstract_group_display_knowl(f"{data['wild_gap'][0]}.{data['wild_gap'][1]}")
else:
wild_inertia = 'data not computed'
wild_inertia = 'Not computed'

info.update({
'polynomial': raw_typeset(polynomial),
Expand All @@ -455,8 +467,6 @@ def render_field_webpage(args):
'c': data['c'],
'e': data['e'],
'f': data['f'],
't': data['t'],
'u': data['u'],
'rf': lf_display_knowl( rflabel, name=printquad(data['rf'], p)),
'base': lf_display_knowl(str(p)+'.1.0.1', name='$%s$' % Qp),
'hw': data['hw'],
Expand All @@ -475,8 +485,9 @@ def render_field_webpage(args):
info.update({'slopes': show_slopes(data['slopes'])})
if 'inertia' in data:
info.update({'inertia': group_display_inertia(data['inertia'])})
if 'gms' in data:
info.update({'gms': data['gms']})
for k in ['gms', 't', 'u']:
if k in data:
info.update({k: data[k]})
if 'ram_poly_vert' in data:
info.update({'ram_polygon_plot': plot_polygon(data['ram_poly_vert'], data['residual_polynomials'], data['ind_of_insep'], p)})
if 'residual_polynomials' in data:
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/local_fields/templates/lf-show-field.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h2>{{ KNOWL('lf.ramification_polygon_display', title='Ramification polygon') }}
<tr><td>{{ KNOWL('lf.indices_of_inseparability', 'Indices of inseparability')}}:</td><td>{{info.ind_insep|safe}}</tr>
</table>
{% else %}
Data not computed
Not computed
{% endif %}


Expand Down
6 changes: 3 additions & 3 deletions lmfdb/sato_tate_groups/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ def render_by_label(label):
data, in_database = st_lookup(label)
info = {}
if data is None:
flash_error ("%s is not the label of a Sato-Tate group currently in the database.", label)
flash_error("%s is not the label of a Sato-Tate group currently in the database.", label)
return redirect(url_for(".index"))
for attr in ['label','weight','degree','name','pretty','real_dimension','components']:
info[attr] = data[attr]
Expand All @@ -868,7 +868,7 @@ def render_by_label(label):
info['rational'] = boolean_name(info.get('rational',True))
st0 = db.gps_st0.lucky({'name':data['identity_component']})
if not st0:
flash_error ("%s is not the label of a Sato-Tate identity component currently in the database.", data['identity_component'])
flash_error("%s is not the label of a Sato-Tate identity component currently in the database.", data['identity_component'])
return redirect(url_for(".index"))
info['symplectic_form'] = st0.get('symplectic_form')
info['hodge_circle'] = st0.get('hodge_circle')
Expand All @@ -883,7 +883,7 @@ def render_by_label(label):
else:
G = db.gps_groups.lookup(data['component_group'])
if not G:
flash_error ("%s is not the label of a Sato-Tate component group currently in the database.", data['component_group'])
flash_error("%s is not the label of a Sato-Tate component group currently in the database.", data['component_group'])
return redirect(url_for(".index"))
info['component_group'] = G['tex_name']
info['cyclic'] = boolean_name(G['cyclic'])
Expand Down
12 changes: 6 additions & 6 deletions lmfdb/siegel_modular_forms/siegel_modular_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def by_label(label):
bread = [("Modular forms", url_for('modular_forms')),
('Siegel', url_for('.index'))]
slabel = label.split('.')
family = get_smf_family (slabel[0])
family = get_smf_family(slabel[0])
if family:
if len(slabel) == 1:
return render_family_page(family, request.args, bread)
Expand Down Expand Up @@ -197,7 +197,7 @@ def render_family_page(family, args, bread):
forms = [ (k, [(f.name(), f.degree_of_field()) for f in sams if k == f.weight()]) for k in Set(f.weight() for f in sams)]
info = { 'family': family, 'forms': forms, 'args': to_dict(args) }
if family.computes_dimensions():
build_dimension_table (info, family, args)
build_dimension_table(info, family, args)
bread.append(('$'+family.latex_name+'$', ''))
return render_template("ModularForm_GSp4_Q_family.html", title='Siegel modular forms for $'+family.latex_name+'$', bread=bread, info=info)

Expand All @@ -209,9 +209,9 @@ def render_search_results_page(args, bread):
info = { 'args': to_dict(args) }
query = {}
try:
parse_ints (info['args'], query, 'deg', 'degree', qfield="degree")
parse_ints (info['args'], query, 'wt', '$k$', qfield="weight")
parse_ints (info['args'], query, 'fdeg', 'field degree')
parse_ints(info['args'], query, 'deg', 'degree', qfield="degree")
parse_ints(info['args'], query, 'wt', '$k$', qfield="weight")
parse_ints(info['args'], query, 'fdeg', 'field degree')
except ValueError:
info['error'] = True
if not info.get('error'):
Expand All @@ -237,7 +237,7 @@ def render_dimension_table_page(args, bread):
if 'j' not in family.latex_name and 'j' in info['args'] and info['args']['j'] != '0':
flash_error("$j$ = %s should not be specified for the selected space %s", info['args']['j'], '$'+family.latex_name+'$')
else:
build_dimension_table (info, family, info['args'])
build_dimension_table(info, family, info['args'])
bread.append(('Dimensions', 'dimensions'))
return render_template("ModularForm_GSp4_Q_dimensions.html", title='Siegel modular forms dimension tables', bread=bread, info=info)

Expand Down
Loading
Loading