Skip to content

Commit

Permalink
Merge pull request #6303 from jwj61/more-padic-optional
Browse files Browse the repository at this point in the history
Catch more bits of data which may be missing
  • Loading branch information
jwj61 authored Dec 17, 2024
2 parents c0a39e0 + 54cf9e6 commit 3f4298f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
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

0 comments on commit 3f4298f

Please sign in to comment.