Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master -> dev #5746

Merged
merged 3 commits into from
Nov 26, 2023
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
34 changes: 27 additions & 7 deletions lmfdb/modular_curves/templates/modcurve.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h2> {{ KNOWL('modcurve.invariants', 'Invariants') }} </h2>
<tr><td>{{ KNOWL("modcurve.cusps", "Cusps") }}:</td><td> {{ curve.cusps_display }}</td><td style="width:20px;"></td><td>{{ KNOWL("modcurve.cusp_widths", "Cusp widths") }}</td><td>{{ curve.cusp_widths_display }}</td><td style="width:60px;"></td><td>{{ KNOWL("modcurve.cusp_orbits", "Cusp orbits") }}</td><td>{{ curve.cusp_orbits_display }}</td></tr>
<tr><td>{{ KNOWL("modcurve.elliptic_points", "Elliptic points") }}:</td> <td> ${{curve.nu2}}$ of order $2$ and ${{curve.nu3}}$ of order $3$ </td></tr>
{% if curve.genus > 0 %}
<tr><td>{{ KNOWL('modcurve.rank', 'Analytic rank') }}:</td><td> ${{ curve.rank }}$ </td></tr>
<tr><td>{{ KNOWL('modcurve.rank', 'Analytic rank') }}:</td><td> {% if curve.rank is not none %} ${{ curve.rank }}$ {% else %} not computed {% endif %} </td></tr>
{% endif %}
<tr><td>{{ KNOWL("modcurve.gonality", "$\Q$-gonality")}}:</td><td> ${{ curve.q_gonality if curve.q_gonality else "%s \\le \\gamma \\le %s"%(curve.q_gonality_bounds[0],curve.q_gonality_bounds[1]) }}$ </td></tr>
<tr><td>{{ KNOWL("modcurve.gonality", "$\overline{\Q}$-gonality")}}:</td><td> ${{ curve.qbar_gonality if curve.qbar_gonality else "%s \\le \\gamma \\le %s"%(curve.qbar_gonality_bounds[0],curve.qbar_gonality_bounds[1]) }}$ </td></tr>
Expand Down Expand Up @@ -62,20 +62,36 @@ <h2> {{ KNOWL('modcurve.level_structure', 'Level structure') }} </h2>
</table>
{% endif %}

{% if curve.genus > 0 %}
{% if curve.genus > 0 and curve.dims is not none %}
<h2> {{ KNOWL('ag.jacobian', 'Jacobian') }} </h2>

<table>
<tr><td>{{ KNOWL('ag.conductor', 'Conductor') }}:</td><td> ${{ curve.factored_conductor }}$ </td></tr>
<tr>
<td>
{{ KNOWL('av.simple', 'Simple') }}:
</td>
<td>
{% if curve.simple %}
yes
{% elif curve.simple is not none %}
no
{% else %}
not computed
{% endif %}
</td>
</tr>
<tr>
<td>
{{ KNOWL('av.squarefree', 'Squarefree') }}:
</td>
<td>
{% if curve.squarefree %}
yes
{% else %}
{% elif curve.squarefree is not none %}
no
{% else %}
not computed
{% endif %}
</td>
</tr>
Expand Down Expand Up @@ -365,7 +381,7 @@ <h4>Cover information</h4>
<th>{{ KNOWL('modcurve.modular_cover','Degree') }}</th>
<th>{{ KNOWL('modcurve.genus','Genus') }}</th>
<th>{{ KNOWL('modcurve.rank','Rank') }}</th>
{% if curve.genus > 0 %}
{% if curve.dims %}
<th>{{ KNOWL('modcurve.modular_cover','Kernel decomposition') }}</th>
{% endif %}
</tr>
Expand All @@ -379,11 +395,13 @@ <h4>Cover information</h4>
<td align="center">${{ degree }}$</td>
<td align="center">${{ genus }}$</td>
<td align="center">${{ rank }}$</td>
{% if curve.dims %}
{% if genus > 0 %}
<td><span>{{ kernel if kernel else "dimension zero" | safe }}</span></td>
{% elif curve.genus > 0 %}
<td>full Jacobian</td>
{% endif %}
{% endif %}
</tr>
{% endfor %}
</tbody>
Expand All @@ -401,7 +419,7 @@ <h4>Cover information</h4>
<th>{{ KNOWL('modcurve.modular_cover','Degree') }}</th>
<th>{{ KNOWL('modcurve.genus','Genus') }}</th>
<th>{{ KNOWL('modcurve.rank','Rank') }}</th>
{% if curve.genus > 0 %}
{% if curve.dims %}
<th>{{ KNOWL('modcurve.modular_cover','Kernel decomposition') }}</th>
{% endif %}
</tr>
Expand All @@ -415,11 +433,13 @@ <h4>Cover information</h4>
<td align="center">${{ degree }}$</td>
<td align="center">${{ genus }}$</td>
<td align="center">${{ rank }}$</td>
{% if curve.dims %}
{% if genus > 0 %}
<td><span>{{ kernel if kernel else "dimension zero" | safe }}</span></td>
{% elif curve.genus > 0 %}
<td>full Jacobian</td>
{% endif %}
{% endif %}
</tr>
{% endfor %}
</tbody>
Expand All @@ -436,8 +456,8 @@ <h4>Cover information</h4>
<th>{{ KNOWL('modcurve.relative_index', 'Index') }}</th>
<th>{{ KNOWL('modcurve.modular_cover','Degree') }}</th>
<th>{{ KNOWL('modcurve.genus','Genus') }}</th>
{% if curve.dims %}
<th>{{ KNOWL('modcurve.rank','Rank') }}</th>
{% if curve.genus > 0 %}
<th>{{ KNOWL('modcurve.modular_cover','Kernel decomposition') }}</th>
{% endif %}
</tr>
Expand All @@ -450,8 +470,8 @@ <h4>Cover information</h4>
<td align="center">${{ index }}$</td>
<td align="center">${{ degree }}$</td>
<td align="center">${{ genus }}$</td>
{% if curve.dims %}
<td align="center">${{ rank }}$</td>
{% if curve.genus > 0 %}
<td><span>{{ kernel if kernel else "dimension zero" | safe }}</span></td>
{% endif %}
</tr>
Expand Down
13 changes: 9 additions & 4 deletions lmfdb/modular_curves/web_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def name_to_latex(name):
return f"${name}$"

def factored_conductor(conductor):
return "\\cdot".join(f"{p}{showexp(e, wrap=False)}" for (p, e) in conductor) if conductor else "1"
return "\\cdot".join(f"{p}{showexp(e, wrap=False)}" for (p, e) in conductor) if conductor else ("1" if conductor == [] else r"?")

def remove_leading_coeff(jfac):
if "(%s)" % jfac.unit() == (str(jfac).split("*")[0]).replace(' ',''):
Expand All @@ -142,6 +142,8 @@ def remove_leading_coeff(jfac):
return str(jfac)

def formatted_dims(dims, mults):
if dims is None:
return "not computed"
if not dims:
return ""
# Collapse newforms with the same dimension
Expand All @@ -152,6 +154,8 @@ def formatted_dims(dims, mults):
return "$" + r"\cdot".join(f"{d}{showexp(c, wrap=False)}" for (d, c) in zip(dims, mults)) + "$"

def formatted_newforms(newforms, mults):
if newforms is None:
return "not computed"
if not newforms:
return ""
return ", ".join(f'<a href="{url_for_mf_label(label)}">{label}</a>{showexp(c)}' for (label, c) in zip(newforms, mults))
Expand Down Expand Up @@ -316,7 +320,7 @@ def properties(self):
]
if self.image is not None:
props.append((None, self.image))
if hasattr(self,"rank"):
if hasattr(self,"rank") and self.rank is not None:
props.append(("Analytic rank", str(self.rank)))
props.extend([("Cusps", str(self.cusps)),
(r"$\Q$-cusps", str(self.rational_cusps))])
Expand Down Expand Up @@ -346,7 +350,7 @@ def friends(self):
friends.append(("L-function", "/L" + url_for_mf_label(self.newforms[0])))
else:
friends.append(("L-function not available",""))
if self.genus > 0:
if self.genus > 0 and self.trace_hash is not None:
for r in self.table.search({'trace_hash':self.trace_hash},['label','name','newforms']):
if r['newforms'] == self.newforms and r['label'] != self.label:
friends.append(("Modular curve " + (r['name'] if r['name'] else r['label']),url_for("modcurve.by_label", label=r['label'])))
Expand Down Expand Up @@ -637,7 +641,8 @@ def _curvedata(self, query, flip=False):
C["index"] // self.index if flip else self.index // C["index"], # relative index
C["psl2index"] // self.psl2index if flip else self.psl2index // C["psl2index"], # relative degree
C["genus"],
"" if C["rank"] is None else C["rank"],
"?" if C["rank"] is None else C["rank"],
"not computed" if C["dims"] is None or self.dims is None else
(formatted_dims(*difference(C["dims"], self.dims,
C["mults"], self.mults)) if flip else
formatted_dims(*difference(self.dims, C["dims"],
Expand Down
Loading