Skip to content

Commit

Permalink
Merge pull request #6196 from roed314/show_hyp
Browse files Browse the repository at this point in the history
Update abvar page
  • Loading branch information
AndrewVSutherland authored Nov 15, 2024
2 parents 672e518 + 35222a1 commit a612955
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 32 deletions.
17 changes: 14 additions & 3 deletions lmfdb/abvar/fq/isog_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from sage.rings.all import Integer, QQ, RR, ZZ
from sage.plot.all import line, points, circle, polygon, Graphics
from sage.misc import latex
from sage.misc.latex import latex
from sage.misc.cachefunc import cached_method
from sage.misc.lazy_attribute import lazy_attribute

Expand Down Expand Up @@ -114,7 +114,7 @@ def expanded_polynomial(self):
if self.is_simple and QQ['x'](self.polynomial).is_irreducible():
return ""
else:
return latex.latex(QQ[['x']](self.polynomial))
return latex(QQ[['x']](self.polynomial))

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

@property
def pretty_slopes(self):
return "[" + ",".join(latex(QQ(s)) for s in self.polygon_slopes) + "]"

@property
def polynomial(self):
return self.poly
Expand Down Expand Up @@ -281,6 +285,9 @@ def is_ordinary(self):
def is_supersingular(self):
return all(slope == "1/2" for slope in self.polygon_slopes)

def is_almost_ordinary(self):
return self.newton_elevation == 1

def display_slopes(self):
return "[" + ", ".join(self.polygon_slopes) + "]"

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

def galois_groups_pretty(self):
# Used in search result pages
return ", ".join(transitive_group_display_knowl(gal, cache=self.gal_cache) for gal in self.galois_groups)

def decomposition_display_search(self):
if self.is_simple:
return "simple"
Expand Down Expand Up @@ -503,7 +514,7 @@ def describe_end_algebra(p, extension_label):
ans[1] += '<td class="center">${0}$</td>'.format(inv)
ans[1] += "</tr></table>\n"
center_poly = db.nf_fields.lookup(center, 'coeffs')
center_poly = latex.latex(ZZ["x"](center_poly))
center_poly = latex(ZZ["x"](center_poly))
ans[1] += r"where $\pi$ is a root of ${0}$.".format(center_poly)
ans[1] += "\n"
return ans
Expand Down
96 changes: 77 additions & 19 deletions lmfdb/abvar/fq/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
from .search_parsing import parse_nf_string, parse_galgrp
from .isog_class import validate_label, AbvarFq_isoclass
from .stats import AbvarFqStats
from lmfdb.number_fields.web_number_field import nf_display_knowl, field_pretty
from lmfdb.utils import redirect_no_cache
from lmfdb.utils.search_columns import SearchColumns, SearchCol, MathCol, LinkCol
from lmfdb.utils.search_columns import SearchColumns, SearchCol, MathCol, LinkCol, ProcessedCol, CheckCol, CheckMaybeCol
from lmfdb.abvar.fq.download import AbvarFq_download

logger = make_logger("abvarfq")
Expand Down Expand Up @@ -168,9 +169,15 @@ class AbvarSearchArray(SearchArray):
("q", "field", ['q', 'g', 'poly']),
("p", "characteristic", ['p', 'q', 'g', 'poly']),
("p_rank", "p-rank", ['p_rank', 'g', 'q', 'poly']),
("p_rank_deficit", "p-rank deficit", ['p_rank_deficit', 'g', 'q', 'poly']),
("angle_rank", "angle rank", ['angle_rank', 'g', 'q', 'poly']),
("elevation", "Newton elevation", ['newton_elevation', 'g', 'q', 'poly']),
("curve_count", "curve points", ['curve_count', 'g', 'q', 'poly']),
("abvar_count", "abvar points", ['abvar_count', 'g', 'q', 'poly'])]
("abvar_count", "abvar points", ['abvar_count', 'g', 'q', 'poly']),
("jacobian_count", "Jacobian count", ['jacobian_count', 'g', 'q', 'poly']),
("hyp_count", "Hyp. Jacobian count", ['hyp_count', 'g', 'q', 'poly']),
("twist_count", "Num .twists", ['twist_count', 'g', 'q', 'poly']),
("max_twist_degree", "Max. twist degree", ['max_twist_degree', 'g', 'q', 'poly']),
("geom_deg", "End. degree", ['geometric_extension_degree', 'g', 'q', 'poly'])]
jump_example = "2.16.am_cn"
jump_egspan = "e.g. 2.16.am_cn or 1 - x + 2x^2 or x^2 - x + 2"
jump_knowl = "av.fq.search_input"
Expand Down Expand Up @@ -206,9 +213,9 @@ def __init__(self):
knowl="av.fq.p_rank",
example="2"
)
p_rank_deficit = TextBox(
"p_rank_deficit",
label="$p$-rank deficit",
p_corank = TextBox(
"p_corank",
label="$p$-corank",
knowl="av.fq.p_rank",
example="2",
advanced=True,
Expand All @@ -221,6 +228,22 @@ def __init__(self):
example_col=False,
advanced=True,
)
angle_corank = TextBox(
"angle_corank",
label="Angle corank",
knowl="av.fq.angle_rank",
example="3",
example_col=False,
advanced=True,
)
newton_elevation = TextBox(
"newton_elevation",
label="Newton elevation",
knowl="av.fq.newton_elevation",
example="1",
example_col=False,
advanced=True,
)
newton_polygon = TextBox(
"newton_polygon",
label="Slopes of Newton polygon",
Expand Down Expand Up @@ -481,8 +504,8 @@ def short_label(d):
[q, p, g, p_rank, initial_coefficients],
[simple, geom_simple, primitive, polarizable, jacobian],
[newton_polygon, abvar_point_count, curve_point_count, simple_factors],
[angle_rank, jac_cnt, hyp_cnt, twist_count, max_twist_degree],
[geom_deg, p_rank_deficit, geom_squarefree],
[newton_elevation, jac_cnt, hyp_cnt, twist_count, max_twist_degree],
[angle_rank, angle_corank, geom_deg, p_corank, geom_squarefree],
use_geom_refine,
[dim1, dim2, dim3, dim4, dim5],
[dim1d, dim2d, dim3d, number_field, galois_group],
Expand All @@ -493,10 +516,11 @@ def short_label(d):
[g, geom_simple],
[initial_coefficients, polarizable],
[p_rank, jacobian],
[p_rank_deficit, geom_squarefree],
[p_corank, geom_squarefree],
[jac_cnt, hyp_cnt],
[geom_deg, angle_rank],
[angle_rank, angle_corank],
[twist_count, max_twist_degree],
[newton_elevation, geom_deg],
[newton_polygon],
[abvar_point_count],
[curve_point_count],
Expand Down Expand Up @@ -529,8 +553,10 @@ def common_parse(info, query):
parse_bool_unknown(info, query, "jacobian", qfield="has_jacobian")
parse_bool_unknown(info, query, "polarizable", qfield="has_principal_polarization")
parse_ints(info, query, "p_rank")
parse_ints(info, query, "p_rank_deficit")
parse_ints(info, query, "p_corank", qfield="p_rank_deficit")
parse_ints(info, query, "angle_rank")
parse_ints(info, query, "angle_corank")
parse_ints(info, query, "newton_elevation")
parse_ints(info, query, "jac_cnt", qfield="jacobian_count", name="Number of Jacobians")
parse_ints(info, query, "hyp_cnt", qfield="hyp_count", name="Number of Hyperelliptic Jacobians")
parse_ints(info, query, "twist_count")
Expand Down Expand Up @@ -619,20 +645,52 @@ def extended_code(c):
jump_box = "%s.%s.%s" % (g, q, "_".join(extended_code(cdict.get(i, 0)) for i in range(1, g+1)))
return by_label(jump_box)

# simple, geom. simple, primitive, princ polarizable, Jacobian
# F_q^k points on curve/variety

abvar_columns = SearchColumns([
LinkCol("label", "ab.fq.lmfdb_label", "Label", url_for_label),
LinkCol("label", "av.fq.lmfdb_label", "Label", url_for_label),
MathCol("g", "ag.dimension", "Dimension"),
MathCol("field", "ag.base_field", "Base field", download_col="q"),
MathCol("p", "ag.base_field", "Base char.", short_title="base characteristic", default=False),
CheckCol("is_simple", "av.simple", "Simple", default=False),
CheckCol("is_geometrically_simple", "av.geometrically_simple", "Geom. simple", default=False),
CheckCol("is_primitive", "ag.primitive", "Primitive", default=False),
CheckCol("is_ordinary", "av.fq.ordinary", "Ordinary", default=False),
CheckCol("is_almost_ordinary", "av.fq.newton_elevation", "Almost ordinary", default=False),
CheckCol("is_supersingular", "av.fq.supersingular", "Supersingular", default=False),
CheckMaybeCol("has_principal_polarization", "av.princ_polarizable", "Princ. polarizable", default=False),
CheckMaybeCol("has_jacobian", "ag.jacobian", "Jacobian", default=False),
MathCol("formatted_polynomial", "av.fq.l-polynomial", "L-polynomial", short_title="L-polynomial", download_col="polynomial"),
MathCol("pretty_slopes", "lf.newton_polygon", "Newton slopes", default=False),
MathCol("newton_elevation", "av.fq.newton_elevation", "Newton elevation", default=False),
MathCol("p_rank", "av.fq.p_rank", "$p$-rank"),
MathCol("p_rank_deficit", "av.fq.p_rank", "$p$-rank deficit", default=False),
MathCol("curve_count", "av.fq.curve_point_counts", "points on curve", default=False),
MathCol("abvar_count", "ag.fq.point_counts", "points on variety", default=False),
MathCol("jacobian_count", "av.jacobian_count", "jacobians", default=False),
MathCol("hyp_count", "av.hyperelliptic_count", "hyperelliptic jacobians", default=False),
MathCol("p_rank_deficit", "av.fq.p_rank", "$p$-corank", default=False),
MathCol("angle_rank", "av.fq.angle_rank", "Angle rank", default=False),
MathCol("angle_corank", "av.fq.angle_rank", "Angle corank", default=False),
MathCol("curve_count", "av.fq.curve_point_counts", r"$\mathbb{F}_q$ points on curve", short_title="Fq points on curve", default=False),
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),
MathCol("abvar_count", "ag.fq.point_counts", "$\mathbb{F}_q$ points on variety", short_title="Fq points on variety", default=False),
MathCol("abvar_counts", "ag.fq.point_counts", "$\mathbb{F}_{q^k}$ points on variety", short_title="Fq^k points on variety", default=False),
MathCol("jacobian_count", "av.jacobian_count", "Jacobians", default=False),
MathCol("hyp_count", "av.hyperelliptic_count", "Hyperelliptic Jacobians", default=False),
MathCol("twist_count", "av.twist", "Num. twists", default=False),
MathCol("max_twist_degree", "av.twist", "Max. twist degree", default=False),
MathCol("geometric_extension_degree", "av.endomorphism_field", "End. degree", default=False),
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),
SearchCol("galois_groups_pretty", "nf.galois_group", "Galois groups", download_col="galois_groups", default=False),
SearchCol("decomposition_display_search", "av.decomposition", "Isogeny factors", download_col="decompositionraw")],
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"])
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"])

def abvar_postprocess(res, info, query):
gals = set()
for A in res:
for gal in A["galois_groups"]:
gals.add(gal)
cache = {rec["label"]: rec for rec in db.gps_transitive.search({"label": {"$in": list(gals)}}, ["label", "pretty"])}
for A in res:
A["gal_cache"] = cache
return [AbvarFq_isoclass(x) for x in res]

@search_wrap(
table=db.av_fq_isog,
Expand All @@ -643,7 +701,7 @@ def extended_code(c):
"jump": jump,
"download": AbvarFq_download(),
},
postprocess=lambda res, info, query: [AbvarFq_isoclass(x) for x in res],
postprocess=abvar_postprocess,
url_for_label=url_for_label,
learnmore=learnmore_list,
bread=lambda: get_bread(("Search results", " ")),
Expand Down
18 changes: 15 additions & 3 deletions lmfdb/abvar/fq/templates/abvarfq-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,23 @@ <h2> Browse </h2>
<td>{% for g in info.stats.gs %} <a href="?g={{g}}">{{g}}</a>&nbsp; {% endfor %}</td>
</tr><tr>
<td>By {{ KNOWL('ag.base_field', 'base field cardinality') }}:</td>
<td>{% for q in info.q_ranges %} <a href="?q={{q}}">{{q}}</a>&nbsp; {% endfor %}</td>
<td colspan="3">{% for q in info.q_ranges %} <a href="?q={{q}}">{{q}}</a>&nbsp; {% endfor %}</td>
</tr><tr>
<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>
<td>By {{ KNOWL('av.fq.p_rank', '$p$-rank') }}:</td>
<td>{% for r in [0] + info.stats.gs %} <a href="?p_rank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
<td style="padding-left:80px;">By {{ KNOWL('av.fq.p_rank', '$p$-corank') }}:</td>
<td>{% for r in [0] + info.stats.gs %} <a href="?p_corank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
</tr><tr>
<td colspan="2">A <a href="?search_type=Counts">table</a> by dimension and base field.</td>
<td>By {{ KNOWL('av.fq.angle_rank', 'angle rank') }}:</td>
<td>{% for r in [0] + info.stats.gs %} <a href="?angle_rank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
<td style="padding-left:80px;">By {{ KNOWL('av.fq.angle_rank', 'angle corank') }}:</td>
<td>{% for r in [0] + info.stats.gs %} <a href="?angle_corank={{r}}">{{r}}</a>&nbsp; {% endfor %}</td>
</tr><tr>
<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>
</tr><tr>
<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>
</tr><tr>
<td colspan="4">A <a href="?search_type=Counts">table</a> by dimension and base field.</td>
</tr>
</table>

Expand Down
21 changes: 14 additions & 7 deletions lmfdb/abvar/fq/templates/show-abvarfq.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,20 +149,27 @@ <h2>Jacobians and polarizations</h2>
<p>
{% if cl.has_principal_polarization == 1 %}
{% if cl.has_jacobian == -1 %}
This isogeny class is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
This isogeny class is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
{% elif cl.jacobian_count is not none %}
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 }}
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 }}
{% elif cl.hyp_count == 0 and cl.has_jacobian == 1 %}
{# This case currently does not happen #}
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.
{% elif cl.hyp_count == 0 and cl.has_jacobian == 0 %}
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.
{% elif cl.hyp_count is not none and cl.hyp_count >= 1 %}
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 }}
{% elif cl.has_jacobian == 1 %}
This isogeny class contains a {{KNOWL('ag.jacobian',title='Jacobian')}}, and hence is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
This isogeny class contains a {{KNOWL('ag.jacobian',title='Jacobian')}} and hence is {{ KNOWL('av.princ_polarizable', title = 'principally polarizable')}}.
{% else %}
This isogeny class is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but it is unknown whether it contains a {{KNOWL('ag.jacobian',title='Jacobian')}}.
This isogeny class is {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, but it is unknown whether it contains a {{KNOWL('ag.jacobian',title='Jacobian')}}.
{% endif %}
{% elif cl.has_principal_polarization == -1 %}
This isogeny class is not {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, and therefore does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
This isogeny class is not {{KNOWL('av.princ_polarizable', title = 'principally polarizable')}}, and therefore does not contain a {{KNOWL('ag.jacobian',title='Jacobian')}}.
{% elif cl.has_jacobian == -1 %}
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')}}.
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')}}.
{% else %}
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')}}.
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')}}.
{% endif %}
</p>

Expand Down

0 comments on commit a612955

Please sign in to comment.