Skip to content

Commit

Permalink
Allow p-adic field pages work when hard to compute data is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jwj61 committed Oct 10, 2024
1 parent 65ea15b commit 4db20b0
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 31 deletions.
54 changes: 36 additions & 18 deletions lmfdb/local_fields/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,16 @@ def local_field_data(label):
nicename = ' = ' + prettyname(f)
ans = '$p$-adic field %s%s<br><br>' % (label, nicename)
ans += r'Extension of $\Q_{%s}$ defined by %s<br>' % (str(f['p']),web_latex(coeff_to_poly(f['coeffs'])))
gt = int(f['galois_label'].split('T')[1])
gn = f['n']
ans += 'Degree: %s<br>' % str(gn)
ans += 'Ramification index $e$: %s<br>' % str(f['e'])
ans += 'Residue field degree $f$: %s<br>' % str(f['f'])
ans += 'Discriminant ideal: $(p^{%s})$ <br>' % str(f['c'])
ans += 'Galois group $G$: %s<br>' % group_pretty_and_nTj(gn, gt, True)
if 'galois_label' in f:
gt = int(f['galois_label'].split('T')[1])
ans += 'Galois group $G$: %s<br>' % group_pretty_and_nTj(gn, gt, True)
else:
ans += 'Galois group $G$: not computed<br>'
ans += '<div align="right">'
ans += '<a href="%s">%s home page</a>' % (str(url_for("local_fields.by_label", label=label)),label)
ans += '</div>'
Expand Down Expand Up @@ -239,6 +242,8 @@ def show_slopes2(sl):
return(sl)

def show_slope_content(sl,t,u):
if sl is None or t is None or u is None:
return ' $not computed$ ' # actually killing math mode
sc = str(sl)
if sc == '[]':
sc = r'[\ ]'
Expand Down Expand Up @@ -294,6 +299,11 @@ class LF_download(Downloader):
),
}

def galcolresponse(n,t,cache):
if t is None:
return 'not computed'
return group_pretty_and_nTj(n, t, cache=cache)

lf_columns = SearchColumns([
LinkCol("label", "lf.field.label", "Label", url_for_label),
MathCol("n", "lf.degree", "$n$", short_title="degree", default=False),
Expand All @@ -304,7 +314,7 @@ class LF_download(Downloader):
MathCol("c", "lf.discriminant_exponent", "$c$", short_title="discriminant exponent"),
MultiProcessedCol("gal", "nf.galois_group", "Galois group",
["n", "gal", "cache"],
lambda n, t, cache: group_pretty_and_nTj(n, t, cache=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),
Expand All @@ -322,7 +332,7 @@ class LF_download(Downloader):
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):
cache = knowl_cache(list({f"{rec['n']}T{rec['gal']}" for rec in res}))
cache = knowl_cache(list({f"{rec['n']}T{rec['gal']}" for rec in res if 'gal' in rec}))
for rec in res:
rec["cache"] = cache
return res
Expand Down Expand Up @@ -376,21 +386,24 @@ def render_field_webpage(args):
e = data['e']
f = data['f']
cc = data['c']
gt = int(data['galois_label'].split('T')[1])
gn = data['n']
the_gal = WebGaloisGroup.from_nt(gn,gt)
isgal = ' Galois' if the_gal.order() == gn else ' not Galois'
abelian = ' and abelian' if the_gal.is_abelian() else ''
galphrase = 'This field is'+isgal+abelian+r' over $\Q_{%d}.$' % p
autstring = r'\Gal' if the_gal.order() == gn else r'\Aut'
autstring = r'\Aut'
if 'galois_label' in data:
gt = int(data['galois_label'].split('T')[1])
the_gal = WebGaloisGroup.from_nt(gn,gt)
isgal = ' Galois' if the_gal.order() == gn else ' not Galois'
abelian = ' and abelian' if the_gal.is_abelian() else ''
galphrase = 'This field is'+isgal+abelian+r' over $\Q_{%d}.$' % p
if the_gal.order() == gn:
autstring = r'\Gal'
prop2 = [
('Label', label),
('Base', r'\(%s\)' % Qp),
('Degree', r'\(%s\)' % data['n']),
('e', r'\(%s\)' % e),
('f', r'\(%s\)' % f),
('c', r'\(%s\)' % cc),
('Galois group', group_pretty_and_nTj(gn, gt)),
('Galois group', group_pretty_and_nTj(gn, gt) if 'galois_label' in data else 'not computed'),
]
# Look up the unram poly so we can link to it
unramdata = db.lf_fields.lucky({'p': p, 'n': f, 'c': 0})
Expand Down Expand Up @@ -448,25 +461,30 @@ def render_field_webpage(args):
'base': lf_display_knowl(str(p)+'.1.0.1', name='$%s$' % Qp),
'hw': data['hw'],
'visible': show_slopes(data['visible']),
'slopes': show_slopes(data['slopes']),
'gal': group_pretty_and_nTj(gn, gt, True),
'gt': gt,
'inertia': group_display_inertia(data['inertia']),
'wild_inertia': wild_inertia,
'unram': unramp,
'ind_insep': show_slopes(str(data['ind_of_insep'])),
'eisen': eisenp,
'gms': data['gms'],
'gsm': gsm,
'galphrase': galphrase,
'autstring': autstring,
'subfields': format_subfields(data['subfield'],data['subfield_mult'],p),
'aut': data['aut'],
'ram_polygon_plot': plot_polygon(data['ram_poly_vert'], data['residual_polynomials'], data['ind_of_insep'], p),
'residual_polynomials': ",".join(f"${teXify_pol(poly)}$" for poly in data['residual_polynomials']),
'associated_inertia': ",".join(f"${ai}$" for ai in data['associated_inertia']),
})
friends = [('Galois group', "/GaloisGroup/%dT%d" % (gn, gt))]
friends=[]
if 'slopes' in data:
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']})
if 'galois_label' in data:
info.update({'gal': group_pretty_and_nTj(gn, gt, True),
'galphrase': galphrase,
'gt': gt})
friends.append(('Galois group', "/GaloisGroup/%dT%d" % (gn, gt)))
if unramfriend != '':
friends.append(('Unramified subfield', unramfriend))
if rffriend != '':
Expand Down
73 changes: 60 additions & 13 deletions lmfdb/local_fields/templates/lf-show-field.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,20 @@ <h2>{{ KNOWL('lf.unramified_totally_ramified_tower', title='Unramified/totally r

<h2>{{ KNOWL('lf.ramification_polygon_display', title='Ramification polygon') }}</h2>


{% if info.e > 1 %}

<img src="{{info.ram_polygon_plot}}" width="800" height="{{100 if (info.e % info.p) else 400}}">
{% if info.ram_poly_polt %}
<img src="{{info.ram_polygon_plot}}" width="800" height="{{100 if (info.e % info.p) else 400}}">

<table>
<tr><td>{{ KNOWL('lf.residual_polynomials', title='Residual polynomials') }}:</td><td>{{info.residual_polynomials}}</td></tr>
<tr><td>{{ KNOWL('lf.associated_inertia', title='Associated inertia') }}:</td><td>{{info.associated_inertia}}</td></tr>
<tr><td>{{ KNOWL('lf.indices_of_inseparability', 'Indices of inseparability')}}:</td><td>{{info.ind_insep|safe}}</tr>
</table>
<table>
<tr><td>{{ KNOWL('lf.residual_polynomials', title='Residual polynomials') }}:</td><td>{{info.residual_polynomials}}</td></tr>
<tr><td>{{ KNOWL('lf.associated_inertia', title='Associated inertia') }}:</td><td>{{info.associated_inertia}}</td></tr>
<tr><td>{{ KNOWL('lf.indices_of_inseparability', 'Indices of inseparability')}}:</td><td>{{info.ind_insep|safe}}</tr>
</table>
{% else %}
Data not computed
{% endif %}


{% else %}
Expand All @@ -69,13 +74,55 @@ <h2>{{ KNOWL('lf.ramification_polygon_display', title='Ramification polygon') }}

<h2>{{ KNOWL('lf.galois_invariants', title='Invariants of the Galois closure') }}</h2>
<table>
<tr><td>{{ KNOWL('nf.galois_group', title='Galois group')}}:</td><td>{{info.gal|safe}}</td></tr>
<tr><td>{{ KNOWL('lf.inertia_group', title='Inertia group')}}:</td><td>{{info.inertia|safe}}</td></tr>
<tr><td>{{ KNOWL('lf.wild_inertia_group', title='Wild inertia group')}}:</td><td>{{info.wild_inertia|safe}}</td></tr>
<tr><td>{{ KNOWL('lf.unramified_degree', title='Unramified degree')}}:</td><td>${{info.u}}$</td></tr>
<tr><td>{{ KNOWL('lf.tame_degree', title='Tame degree')}}:</td><td>${{info.t}}$</td></tr>
<tr><td>{{ KNOWL('lf.wild_slopes', title='Wild slopes')}}:</td><td>{{info.slopes}}</td></tr>
<tr><td>{{ KNOWL('lf.galois_mean_slope', title='Galois mean slope')}}:</td><td>${{info.gms}}$</td></tr>
<tr><td>{{ KNOWL('nf.galois_group', title='Galois group')}}:</td><td>
{% if info.gal %}
{{info.gal|safe}}
{% else %}
Not computed
{% endif %}
</td></tr>
<tr><td>{{ KNOWL('lf.inertia_group', title='Inertia group')}}:</td><td>
{% if info.inertia %}
{{info.inertia|safe}}
{% else %}
Not computed
{% endif %}
</td></tr>
<tr><td>{{ KNOWL('lf.wild_inertia_group', title='Wild inertia group')}}:</td><td>
{% if info.wild_inertia %}
{{info.wild_inertia|safe}}
{% else %}
Not computed
{% endif %}
</td></tr>
<tr><td>{{ KNOWL('lf.unramified_degree', title='Unramified degree')}}:</td><td>
{% if info.u %}
${{info.u}}$
{% else %}
Not computed
{% endif %}
</td></tr>
<tr><td>{{ KNOWL('lf.tame_degree', title='Tame degree')}}:</td><td>
{% if info.t %}
${{info.t}}$
{% else %}
Not computed
{% endif %}
</td></tr>
<tr><td>{{ KNOWL('lf.wild_slopes', title='Wild slopes')}}:</td><td>
{% if info.slopes %}
{{info.slopes}}
{% else %}
Not computed
{% endif %}
</td></tr>
<tr><td>{{ KNOWL('lf.galois_mean_slope', title='Galois mean slope')}}:</td><td>
{% if info.gms %}
${{info.gms}}$
{% else %}
Not computed
{% endif %}
</td></tr>
<tr><td>{{KNOWL('lf.galois_splitting_model', title='Galois splitting model')}}:</td><td>{{info.gsm|safe}}</td></tr>
</table>

Expand Down

0 comments on commit 4db20b0

Please sign in to comment.