Skip to content

Commit c5f17a2

Browse files
authored
Merge pull request #6253 from LMFDB/main
main -> dev
2 parents 3226794 + 52ace04 commit c5f17a2

17 files changed

+269
-97
lines changed

lmfdb/abvar/fq/isog_class.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from sage.rings.all import Integer, QQ, RR, ZZ
2121
from sage.plot.all import line, points, circle, polygon, Graphics
22-
from sage.misc import latex
22+
from sage.misc.latex import latex
2323
from sage.misc.cachefunc import cached_method
2424
from sage.misc.lazy_attribute import lazy_attribute
2525

@@ -114,7 +114,7 @@ def expanded_polynomial(self):
114114
if self.is_simple and QQ['x'](self.polynomial).is_irreducible():
115115
return ""
116116
else:
117-
return latex.latex(QQ[['x']](self.polynomial))
117+
return latex(QQ[['x']](self.polynomial))
118118

119119
@property
120120
def p(self):
@@ -133,6 +133,10 @@ def polygon_slopes(self):
133133
# Remove the multiset indicators
134134
return [s[:-1] for s in self.slopes]
135135

136+
@property
137+
def pretty_slopes(self):
138+
return "[" + ",".join(latex(QQ(s)) for s in self.polygon_slopes) + "]"
139+
136140
@property
137141
def polynomial(self):
138142
return self.poly
@@ -281,6 +285,9 @@ def is_ordinary(self):
281285
def is_supersingular(self):
282286
return all(slope == "1/2" for slope in self.polygon_slopes)
283287

288+
def is_almost_ordinary(self):
289+
return self.newton_elevation == 1
290+
284291
def display_slopes(self):
285292
return "[" + ", ".join(self.polygon_slopes) + "]"
286293

@@ -306,6 +313,10 @@ def display_galois_group(self):
306313
else:
307314
return transitive_group_display_knowl(self.galois_groups[0])
308315

316+
def galois_groups_pretty(self):
317+
# Used in search result pages
318+
return ", ".join(transitive_group_display_knowl(gal, cache=self.gal_cache) for gal in self.galois_groups)
319+
309320
def decomposition_display_search(self):
310321
if self.is_simple:
311322
return "simple"
@@ -503,7 +514,7 @@ def describe_end_algebra(p, extension_label):
503514
ans[1] += '<td class="center">${0}$</td>'.format(inv)
504515
ans[1] += "</tr></table>\n"
505516
center_poly = db.nf_fields.lookup(center, 'coeffs')
506-
center_poly = latex.latex(ZZ["x"](center_poly))
517+
center_poly = latex(ZZ["x"](center_poly))
507518
ans[1] += r"where $\pi$ is a root of ${0}$.".format(center_poly)
508519
ans[1] += "\n"
509520
return ans

lmfdb/abvar/fq/main.py

+77-19
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
from .search_parsing import parse_nf_string, parse_galgrp
2020
from .isog_class import validate_label, AbvarFq_isoclass
2121
from .stats import AbvarFqStats
22+
from lmfdb.number_fields.web_number_field import nf_display_knowl, field_pretty
2223
from lmfdb.utils import redirect_no_cache
23-
from lmfdb.utils.search_columns import SearchColumns, SearchCol, MathCol, LinkCol
24+
from lmfdb.utils.search_columns import SearchColumns, SearchCol, MathCol, LinkCol, ProcessedCol, CheckCol, CheckMaybeCol
2425
from lmfdb.abvar.fq.download import AbvarFq_download
2526

2627
logger = make_logger("abvarfq")
@@ -168,9 +169,15 @@ class AbvarSearchArray(SearchArray):
168169
("q", "field", ['q', 'g', 'poly']),
169170
("p", "characteristic", ['p', 'q', 'g', 'poly']),
170171
("p_rank", "p-rank", ['p_rank', 'g', 'q', 'poly']),
171-
("p_rank_deficit", "p-rank deficit", ['p_rank_deficit', 'g', 'q', 'poly']),
172+
("angle_rank", "angle rank", ['angle_rank', 'g', 'q', 'poly']),
173+
("elevation", "Newton elevation", ['newton_elevation', 'g', 'q', 'poly']),
172174
("curve_count", "curve points", ['curve_count', 'g', 'q', 'poly']),
173-
("abvar_count", "abvar points", ['abvar_count', 'g', 'q', 'poly'])]
175+
("abvar_count", "abvar points", ['abvar_count', 'g', 'q', 'poly']),
176+
("jacobian_count", "Jacobian count", ['jacobian_count', 'g', 'q', 'poly']),
177+
("hyp_count", "Hyp. Jacobian count", ['hyp_count', 'g', 'q', 'poly']),
178+
("twist_count", "Num .twists", ['twist_count', 'g', 'q', 'poly']),
179+
("max_twist_degree", "Max. twist degree", ['max_twist_degree', 'g', 'q', 'poly']),
180+
("geom_deg", "End. degree", ['geometric_extension_degree', 'g', 'q', 'poly'])]
174181
jump_example = "2.16.am_cn"
175182
jump_egspan = "e.g. 2.16.am_cn or 1 - x + 2x^2 or x^2 - x + 2"
176183
jump_knowl = "av.fq.search_input"
@@ -206,9 +213,9 @@ def __init__(self):
206213
knowl="av.fq.p_rank",
207214
example="2"
208215
)
209-
p_rank_deficit = TextBox(
210-
"p_rank_deficit",
211-
label="$p$-rank deficit",
216+
p_corank = TextBox(
217+
"p_corank",
218+
label="$p$-corank",
212219
knowl="av.fq.p_rank",
213220
example="2",
214221
advanced=True,
@@ -221,6 +228,22 @@ def __init__(self):
221228
example_col=False,
222229
advanced=True,
223230
)
231+
angle_corank = TextBox(
232+
"angle_corank",
233+
label="Angle corank",
234+
knowl="av.fq.angle_rank",
235+
example="3",
236+
example_col=False,
237+
advanced=True,
238+
)
239+
newton_elevation = TextBox(
240+
"newton_elevation",
241+
label="Newton elevation",
242+
knowl="av.fq.newton_elevation",
243+
example="1",
244+
example_col=False,
245+
advanced=True,
246+
)
224247
newton_polygon = TextBox(
225248
"newton_polygon",
226249
label="Slopes of Newton polygon",
@@ -481,8 +504,8 @@ def short_label(d):
481504
[q, p, g, p_rank, initial_coefficients],
482505
[simple, geom_simple, primitive, polarizable, jacobian],
483506
[newton_polygon, abvar_point_count, curve_point_count, simple_factors],
484-
[angle_rank, jac_cnt, hyp_cnt, twist_count, max_twist_degree],
485-
[geom_deg, p_rank_deficit, geom_squarefree],
507+
[newton_elevation, jac_cnt, hyp_cnt, twist_count, max_twist_degree],
508+
[angle_rank, angle_corank, geom_deg, p_corank, geom_squarefree],
486509
use_geom_refine,
487510
[dim1, dim2, dim3, dim4, dim5],
488511
[dim1d, dim2d, dim3d, number_field, galois_group],
@@ -493,10 +516,11 @@ def short_label(d):
493516
[g, geom_simple],
494517
[initial_coefficients, polarizable],
495518
[p_rank, jacobian],
496-
[p_rank_deficit, geom_squarefree],
519+
[p_corank, geom_squarefree],
497520
[jac_cnt, hyp_cnt],
498-
[geom_deg, angle_rank],
521+
[angle_rank, angle_corank],
499522
[twist_count, max_twist_degree],
523+
[newton_elevation, geom_deg],
500524
[newton_polygon],
501525
[abvar_point_count],
502526
[curve_point_count],
@@ -529,8 +553,10 @@ def common_parse(info, query):
529553
parse_bool_unknown(info, query, "jacobian", qfield="has_jacobian")
530554
parse_bool_unknown(info, query, "polarizable", qfield="has_principal_polarization")
531555
parse_ints(info, query, "p_rank")
532-
parse_ints(info, query, "p_rank_deficit")
556+
parse_ints(info, query, "p_corank", qfield="p_rank_deficit")
533557
parse_ints(info, query, "angle_rank")
558+
parse_ints(info, query, "angle_corank")
559+
parse_ints(info, query, "newton_elevation")
534560
parse_ints(info, query, "jac_cnt", qfield="jacobian_count", name="Number of Jacobians")
535561
parse_ints(info, query, "hyp_cnt", qfield="hyp_count", name="Number of Hyperelliptic Jacobians")
536562
parse_ints(info, query, "twist_count")
@@ -619,20 +645,52 @@ def extended_code(c):
619645
jump_box = "%s.%s.%s" % (g, q, "_".join(extended_code(cdict.get(i, 0)) for i in range(1, g+1)))
620646
return by_label(jump_box)
621647

648+
# simple, geom. simple, primitive, princ polarizable, Jacobian
649+
# F_q^k points on curve/variety
650+
622651
abvar_columns = SearchColumns([
623-
LinkCol("label", "ab.fq.lmfdb_label", "Label", url_for_label),
652+
LinkCol("label", "av.fq.lmfdb_label", "Label", url_for_label),
624653
MathCol("g", "ag.dimension", "Dimension"),
625654
MathCol("field", "ag.base_field", "Base field", download_col="q"),
626655
MathCol("p", "ag.base_field", "Base char.", short_title="base characteristic", default=False),
656+
CheckCol("is_simple", "av.simple", "Simple", default=False),
657+
CheckCol("is_geometrically_simple", "av.geometrically_simple", "Geom. simple", default=False),
658+
CheckCol("is_primitive", "ag.primitive", "Primitive", default=False),
659+
CheckCol("is_ordinary", "av.fq.ordinary", "Ordinary", default=False),
660+
CheckCol("is_almost_ordinary", "av.fq.newton_elevation", "Almost ordinary", default=False),
661+
CheckCol("is_supersingular", "av.fq.supersingular", "Supersingular", default=False),
662+
CheckMaybeCol("has_principal_polarization", "av.princ_polarizable", "Princ. polarizable", default=False),
663+
CheckMaybeCol("has_jacobian", "ag.jacobian", "Jacobian", default=False),
627664
MathCol("formatted_polynomial", "av.fq.l-polynomial", "L-polynomial", short_title="L-polynomial", download_col="polynomial"),
665+
MathCol("pretty_slopes", "lf.newton_polygon", "Newton slopes", default=False),
666+
MathCol("newton_elevation", "av.fq.newton_elevation", "Newton elevation", default=False),
628667
MathCol("p_rank", "av.fq.p_rank", "$p$-rank"),
629-
MathCol("p_rank_deficit", "av.fq.p_rank", "$p$-rank deficit", default=False),
630-
MathCol("curve_count", "av.fq.curve_point_counts", "points on curve", default=False),
631-
MathCol("abvar_count", "ag.fq.point_counts", "points on variety", default=False),
632-
MathCol("jacobian_count", "av.jacobian_count", "jacobians", default=False),
633-
MathCol("hyp_count", "av.hyperelliptic_count", "hyperelliptic jacobians", default=False),
668+
MathCol("p_rank_deficit", "av.fq.p_rank", "$p$-corank", default=False),
669+
MathCol("angle_rank", "av.fq.angle_rank", "Angle rank", default=False),
670+
MathCol("angle_corank", "av.fq.angle_rank", "Angle corank", default=False),
671+
MathCol("curve_count", "av.fq.curve_point_counts", r"$\mathbb{F}_q$ points on curve", short_title="Fq points on curve", default=False),
672+
MathCol("curve_counts", "av.fq.curve_point_counts", r"$\mathbb{F}_{q^k}$ points on curve", short_title="Fq^k points on curve", default=False),
673+
MathCol("abvar_count", "ag.fq.point_counts", r"$\mathbb{F}_q$ points on variety", short_title="Fq points on variety", default=False),
674+
MathCol("abvar_counts", "ag.fq.point_counts", r"$\mathbb{F}_{q^k}$ points on variety", short_title="Fq^k points on variety", default=False),
675+
MathCol("jacobian_count", "av.jacobian_count", "Jacobians", default=False),
676+
MathCol("hyp_count", "av.hyperelliptic_count", "Hyperelliptic Jacobians", default=False),
677+
MathCol("twist_count", "av.twist", "Num. twists", default=False),
678+
MathCol("max_twist_degree", "av.twist", "Max. twist degree", default=False),
679+
MathCol("geometric_extension_degree", "av.endomorphism_field", "End. degree", default=False),
680+
ProcessedCol("number_fields", "av.fq.number_field", "Number fields", lambda nfs: ", ".join(nf_display_knowl(nf, field_pretty(nf)) for nf in nfs), default=False),
681+
SearchCol("galois_groups_pretty", "nf.galois_group", "Galois groups", download_col="galois_groups", default=False),
634682
SearchCol("decomposition_display_search", "av.decomposition", "Isogeny factors", download_col="decompositionraw")],
635-
db_cols=["label", "g", "q", "poly", "p_rank", "p_rank_deficit", "is_simple", "simple_distinct", "simple_multiplicities", "is_primitive", "primitive_models", "curve_count", "abvar_count", "jacobian_count", "hyp_count"])
683+
db_cols=["label", "g", "q", "poly", "p_rank", "p_rank_deficit", "is_simple", "is_geometrically_simple", "simple_distinct", "simple_multiplicities", "is_primitive", "primitive_models", "curve_count", "curve_counts", "abvar_count", "abvar_counts", "jacobian_count", "hyp_count", "number_fields", "galois_groups", "slopes", "newton_elevation", "twist_count", "max_twist_degree", "geometric_extension_degree", "angle_rank", "angle_corank", "is_supersingular", "has_principal_polarization", "has_jacobian"])
684+
685+
def abvar_postprocess(res, info, query):
686+
gals = set()
687+
for A in res:
688+
for gal in A["galois_groups"]:
689+
gals.add(gal)
690+
cache = {rec["label"]: rec for rec in db.gps_transitive.search({"label": {"$in": list(gals)}}, ["label", "pretty"])}
691+
for A in res:
692+
A["gal_cache"] = cache
693+
return [AbvarFq_isoclass(x) for x in res]
636694

637695
@search_wrap(
638696
table=db.av_fq_isog,
@@ -643,7 +701,7 @@ def extended_code(c):
643701
"jump": jump,
644702
"download": AbvarFq_download(),
645703
},
646-
postprocess=lambda res, info, query: [AbvarFq_isoclass(x) for x in res],
704+
postprocess=abvar_postprocess,
647705
url_for_label=url_for_label,
648706
learnmore=learnmore_list,
649707
bread=lambda: get_bread(("Search results", " ")),

lmfdb/abvar/fq/templates/abvarfq-index.html

+15-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,23 @@ <h2> Browse </h2>
1414
<td>{% for g in info.stats.gs %} <a href="?g={{g}}">{{g}}</a>&nbsp; {% endfor %}</td>
1515
</tr><tr>
1616
<td>By {{ KNOWL('ag.base_field', 'base field cardinality') }}:</td>
17-
<td>{% for q in info.q_ranges %} <a href="?q={{q}}">{{q}}</a>&nbsp; {% endfor %}</td>
17+
<td colspan="3">{% for q in info.q_ranges %} <a href="?q={{q}}">{{q}}</a>&nbsp; {% endfor %}</td>
1818
</tr><tr>
19-
<td colspan="2">Some <a href="{{url_for('.interesting')}}">interesting isogeny classes</a> or a <a href="{{url_for('.random_class')}}">random isogeny class</a></td>
19+
<td>By {{ KNOWL('av.fq.p_rank', '$p$-rank') }}:</td>
20+
<td>{% for r in [0] + info.stats.gs %} <a href="?p_rank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
21+
<td style="padding-left:80px;">By {{ KNOWL('av.fq.p_rank', '$p$-corank') }}:</td>
22+
<td>{% for r in [0] + info.stats.gs %} <a href="?p_corank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
2023
</tr><tr>
21-
<td colspan="2">A <a href="?search_type=Counts">table</a> by dimension and base field.</td>
24+
<td>By {{ KNOWL('av.fq.angle_rank', 'angle rank') }}:</td>
25+
<td>{% for r in [0] + info.stats.gs %} <a href="?angle_rank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
26+
<td style="padding-left:80px;">By {{ KNOWL('av.fq.angle_rank', 'angle corank') }}:</td>
27+
<td>{% for r in [0] + info.stats.gs %} <a href="?angle_corank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
28+
</tr><tr>
29+
<td colspan="4">By <a href="?primitive=yes">primitive</a>&nbsp;&nbsp;&nbsp; <a href="?simple=yes">simple</a>&nbsp;&nbsp;&nbsp; <a href="?geom_simple=yes">geom. simple</a>&nbsp;&nbsp;&nbsp; <a href="?p_corank=0">ordinary</a>&nbsp;&nbsp;&nbsp; <a href="?newton_elevation=1">almost ordinary</a>&nbsp;&nbsp;&nbsp; <a href="?angle_rank=0">supersingular</a>&nbsp;&nbsp;&nbsp; <a href="?polarizable=yes">princ. polarizable</a>&nbsp;&nbsp;&nbsp; <a href="?jacobian=yes">Jacobian</a></td>
30+
</tr><tr>
31+
<td colspan="4">Some <a href="{{url_for('.interesting')}}">interesting isogeny classes</a> or a <a href="{{url_for('.random_class')}}">random isogeny class</a></td>
32+
</tr><tr>
33+
<td colspan="4">A <a href="?search_type=Counts">table</a> by dimension and base field.</td>
2234
</tr>
2335
</table>
2436

lmfdb/abvar/fq/templates/show-abvarfq.html

+14-7
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,27 @@ <h2>Jacobians and polarizations</h2>
149149
<p>
150150
{% if cl.has_principal_polarization == 1 %}
151151
{% if cl.has_jacobian == -1 %}
152-
This isogeny class is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
152+
This isogeny class is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
153153
{% elif cl.jacobian_count is not none %}
154-
This isogeny class contains the {{KNOWL('ag.jacobian',title='Jacobians' if cl.jacobian_count != 1 else 'Jacobian')}} of {{ cl.jacobian_count }} curve{% if cl.jacobian_count != 1 %}s{% endif %} ({% if cl.jacobian_count == 1 %}which is {% if cl.hyp_count == 0 %}not {% endif %}hyperelliptic{% else %}of which {% if cl.hyp_count == 1 %}1 is{% elif cl.hyp_count == cl.jacobian_count %}all are{% else %}{{ cl.hyp_count }} are{% endif %} hyperelliptic{% endif %}), and hence is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}:{{ cl.curve_display() | safe }}
154+
This isogeny class is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}} and contains the {{KNOWL('ag.jacobian',title='Jacobians' if cl.jacobian_count != 1 else 'Jacobian')}} of {{ cl.jacobian_count }} curve{% if cl.jacobian_count != 1 %}s{% endif %} ({% if cl.jacobian_count == 1 %}which is {% if cl.hyp_count == 0 %}not {% endif %}hyperelliptic{% else %}of which {% if cl.hyp_count == 1 %}1 is{% elif cl.hyp_count == cl.jacobian_count %}all are{% else %}{{ cl.hyp_count }} are{% endif %} hyperelliptic{% endif %}):{{ cl.curve_display() | safe }}
155+
{% elif cl.hyp_count == 0 and cl.has_jacobian == 1 %}
156+
{# This case currently does not happen #}
157+
This isogeny class contains a {{KNOWL('ag.jacobian',title='Jacobian')}} and hence is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but does not contain the Jacobian of a hyperelliptic curve.
158+
{% elif cl.hyp_count == 0 and cl.has_jacobian == 0 %}
159+
This isogeny class is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}} and contains no Jacobian of a hyperelliptic curve, but it is unknown whether it contains a {{KNOWL('ag.jacobian',title='Jacobian')}} of a non-hyperelliptic curve.
160+
{% elif cl.hyp_count is not none and cl.hyp_count >= 1 %}
161+
This isogeny class is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}} and contains the {{KNOWL('ag.jacobian',title='Jacobians' if cl.hyp_count != 1 else 'Jacobian')}} of {{ cl.hyp_count }} hyperelliptic curve{% if cl.hyp_count != 1 %}s{% endif %}, but it is unknown how many Jacobians of non-hyperelliptic curves it contains:{{ cl.curve_display() | safe }}
155162
{% elif cl.has_jacobian == 1 %}
156-
This isogeny class contains a {{KNOWL('ag.jacobian',title='Jacobian')}}, and hence is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
163+
This isogeny class contains a {{KNOWL('ag.jacobian',title='Jacobian')}} and hence is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
157164
{% else %}
158-
This isogeny class is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but it is unknown whether it contains a {{KNOWL('ag.jacobian',title='Jacobian')}}.
165+
This isogeny class is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but it is unknown whether it contains a {{KNOWL('ag.jacobian',title='Jacobian')}}.
159166
{% endif %}
160167
{% elif cl.has_principal_polarization == -1 %}
161-
This isogeny class is not {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, and therefore does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
168+
This isogeny class is not {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, and therefore does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
162169
{% elif cl.has_jacobian == -1 %}
163-
This isogeny class does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}, and it is unknown whether it is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
170+
This isogeny class does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}, and it is unknown whether it is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
164171
{% else %}
165-
It is unknown whether this isogeny class contains a {{KNOWL('ag.jacobian',title='Jacobian')}} or whether it is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
172+
It is unknown whether this isogeny class contains a {{KNOWL('ag.jacobian',title='Jacobian')}} or whether it is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
166173
{% endif %}
167174
</p>
168175

lmfdb/app.py

+6
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,12 @@ def index():
359359
def about():
360360
return render_template("about.html", title="About the LMFDB")
361361

362+
@app.route("/rcs")
363+
def top_rcs():
364+
t = "Source, reliability, and completeness"
365+
bread = [(t, " ")]
366+
return render_template("single.html", kid="rcs", title=t, bread=bread)
367+
362368

363369
@app.route("/health")
364370
@app.route("/alive")

0 commit comments

Comments
 (0)