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

Better and more consistent display of invariants and generators for ECQ and ECNF #6279

Merged
merged 3 commits into from
Dec 2, 2024
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
10 changes: 10 additions & 0 deletions lmfdb/ecnf/WebEllipticCurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,13 @@ def make_E(self):
except AttributeError:
self.qc = "not determined"

# Mordell-Weil group
try:
invs = [0 for a in range(self.rank)] + list(self.torsion_structure)
self.mw_struct = "trivial" if len(invs) == 0 else r'\(' + r' \oplus '.join((r'\Z' if n == 0 else r'\Z/{%s}\Z' % n) for n in invs) + r'\)'
except AttributeError: # if self.rank not set
self.mw_struct = "unknown"

# Torsion
self.ntors = web_latex(self.torsion_order)
self.tr = len(self.torsion_structure)
Expand All @@ -494,6 +501,7 @@ def make_E(self):
self.tor_struct_pretty = r"\(\Z/%s\Z\oplus\Z/%s\Z\)" % tuple(self.torsion_structure)

self.torsion_gens = [web_point(parse_point(K,P)) for P in self.torsion_gens]
self.tor_gens_and_orders = list(zip(self.torsion_gens, self.torsion_structure))

# BSD data
#
Expand Down Expand Up @@ -568,8 +576,10 @@ def make_E(self):
# Generators
try:
self.gens = [web_point(parse_point(K, P)) for P in self.gens]
self.gens_and_heights = list(zip(self.gens,self.heights))
except AttributeError:
self.gens = []
self.gens_and_orders = []

# Global period
try:
Expand Down
114 changes: 33 additions & 81 deletions lmfdb/ecnf/templates/ecnf-curve.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,37 @@ <h2>{{ KNOWL('ec.weierstrass_coeffs', title='Weierstrass equation') }}</h2>
{{ place_code('is_min') }}
</p>

<h2> {{ KNOWL('ec.mordell_weil_group', title='Mordell-Weil group') }} structure</h2>
<p>
{% if ec.rk == "not available" %}
Not computed ($ {{ec.rk_lb}} \le r \le {{ec.rk_ub}} $)
{% else %}
{{ ec.mw_struct}}
{%endif%}
</p>

{% if ec.ngens > 0 or ec.torsion_order > 1 %}

<h2> {{ KNOWL('ec.mw_generators', title="Mordell-Weil generators") }} </h2>
<div>
<p>
{% if ec.ngens < ec.rk_ub %}
{% if ec.ngens > 0 %} Only {{ec.ngens}} {% else %} No {% endif %} non-torsion
{% if ec.ngens == 1 %} generator is {% else %} generators are {% endif %} known.
{% endif %}
<table>
<tr><th>$P$</th><th>{{ KNOWL('ec.canonical_height', title="$\hat{h}(P)$")}}</th><th>Order</th></tr>
{% for P,h in ec.gens_and_heights %}
<tr><td>{{P}}</td><td>${{h}}$</td><td>$\infty$</td></tr>
{% endfor %}
{% for T,n in ec.tor_gens_and_orders %}
<tr><td>{{T}}</td><td>$0$</td><td>${{n}}$</td></tr>
{% endfor %}
</table>
</p>
</div>
{%endif%}


<h2>{{ KNOWL('ec.invariants', title='Invariants')}}</h2>

Expand Down Expand Up @@ -189,85 +220,6 @@ <h2>{{ KNOWL('ec.invariants', title='Invariants')}}</h2>

</table>

<h2> {{ KNOWL('ec.mordell_weil_group', title="Mordell-Weil group") }} </h2>
<div>
<p>
<table>
<tr>
<td align = 'left'>{{ KNOWL('ec.rank', title="Rank")}}:</td>
{% if ec.rk == "not available" %}
{% if ec.rank_bounds != "not available" %}
<td>\({{ ec.rk_lb }} \le r \le {{ec.rk_ub}}\)</td>
{% else %}
<td>$r$</td>
<td>&nbsp;</td>
<td>not available</td>
{% endif %}
{% else %}
<td>$r$</td>
<td>=</td>
<td>\({{ ec.rank }}\)</td>
{% endif %}
</tr>

{% if ec.ngens %}
<tr>
<td align = 'left'>
{% if ec.ngens==1 %}
{{KNOWL('ec.mw_generators','Non-torsion generator')}}:
{% else %}
{{KNOWL('ec.mw_generators','Non-torsion generators')}}:
{% endif %}
</td>
{% if ec.gens == 'not available' %}
<td>not available</td>
{% else %}
<td>$P$</td><td>=</td>
{% for gen in ec.gens %}
<td>{{ gen }}</td>
{% endfor %}
{% endif %}
</tr>
{% endif %}

{% if ec.heights %}
<tr>
<td align = 'left'>
{% if ec.ngens==1 %}
{{ KNOWL('ec.canonical_height', title="Height") }}:
{% else %}
{{ KNOWL('ec.canonical_height', title="Heights") }}:
{% endif %}
</td>
<td>$\hat{h}(P)$</td><td>&approx;</td>
{% for h in ec.heights %}
<td>\({{ h }}\)</td>
{% endfor %}
</tr>
{% endif %}

<tr>
<td align='left'>{{KNOWL('ec.torsion_subgroup','Torsion structure')}}:</td>
<td>$E(K)_{\mathrm{tor}}$</td>
<td>$\cong$</td>
<td>{{ ec.tor_struct_pretty }}</td>
</tr>
<tr><td colspan=2> {{ place_code('tors') }}</td></tr>
<!-- <tr><td colspan=2> {{ place_code('ntors') }}</td></tr> -->
{% if ec.tr %}
<tr>
<td align='left'>{% if ec.tr==1 %}{{KNOWL('ec.mw_generators','Torsion generator')}}{% else %}{{KNOWL('ec.mw_generators','Torsion generators')}}{% endif %}:</td>
<td>$T$</td>
<td>=</td>
{% for gen in ec.torsion_gens %}
<td>{{ gen }}</td>
{% endfor %}
</tr>
<tr><td colspan=2> {{ place_code('torgens') }}</td></tr>
{% endif %}
</table>
</p>
</div>

<h2> {{ KNOWL('ec.bsdconjecture', title='BSD invariants') }}</h2>
<div>
Expand Down Expand Up @@ -341,12 +293,12 @@ <h2> {{ KNOWL('ec.bsdconjecture', title='BSD invariants') }}</h2>

<tr>
<td align='left'>{{ KNOWL('ec.torsion_order', title='Torsion order') }}:</td>
<td>$E(K)_{\mathrm{tors}}$</td><td>=</td>
<td>$\#E(K)_{\mathrm{tor}}$</td><td>=</td>
<td>\({{ ec.torsion_order }}\)</td>
</tr>

<tr>
<td align='left'>{{ KNOWL('lfunction.leading_coeff', title='Leading coefficient') }}:</td>
<td align='left'>{{ KNOWL('ec.special_value', title='Special value') }}:</td>
<td>$L^{(r)}(E/K,1)/r!$</td>
{% if ec.Lvalue=='not available' %}
<td></td><td>not available</td>
Expand Down
44 changes: 36 additions & 8 deletions lmfdb/elliptic_curves/templates/ec-curve.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,24 @@ <h2> {{ KNOWL('ec.mordell_weil_group', title='Mordell-Weil group') }} structure<

<p>{{ place_code('mwgroup') }}</p>

{% if data.mwbsd.rank > 0 or data.mwbsd.torsion > 1 %}
<h2> {{ KNOWL('ec.mw_generators', title="Mordell-Weil generators") }} </h2>
<div>
<p>
<table>
<tr><th>$P$</th><th>{{ KNOWL('ec.canonical_height', title="$\hat{h}(P)$")}}</th><th>Order</th></tr>
{% for P,h in data.mwbsd.gens_and_heights %}
<tr><td>${{P}}$</td><td>${{h}}$</td><td>$\infty$</td></tr>
{% endfor %}
{% for T,n in data.mwbsd.tor_gens_and_orders %}
<tr><td>${{T}}$</td><td>$0$</td><td>${{n}}$</td></tr>
{% endfor %}
</table>
</p>
</div>
{%endif%}

{#
{% if data.mwbsd.rank!=0 %}
{% if data.mwbsd.rank==1 %}
<h3> {{ KNOWL('ec.mw_generators', title='Non-torsion Mordell-Weil generator') }} and {{KNOWL('ec.canonical_height','height')}}</h3>
Expand Down Expand Up @@ -134,8 +152,9 @@ <h2> {{ KNOWL('ec.mw_generators', title='Torsion generators') }}</h2>
<p> {{ data.mwbsd.tor_gens |safe }} </p>
{{ place_code('tors') }}
{%endif %}
#}


{% if data.mwbsd.rank > 0 or data.mwbsd.torsion > 1 %}
<p><h2> {{ KNOWL('ec.q.integral_points', title='Integral points') }}</h2>
<div class="ip">
<p>
Expand All @@ -148,6 +167,7 @@ <h2> {{ KNOWL('ec.mw_generators', title='Torsion generators') }}</h2>
N.B. Only integral points which are combinations of known generators are shown.
</p>
{%endif %}
{%endif %}

<h2> Invariants </h2>
<table>
Expand Down Expand Up @@ -237,6 +257,13 @@ <h2> {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}</h2>
<td>{{ place_code('analytic_rank') }}</td>
</tr>

<tr>
<td>{{ KNOWL('ec.rank', title='Mordell-Weil rank') }}:</td>
<td>$r$</td><td>&nbsp;=&nbsp;</td><td>$ {{ data.rank }}$
</td>
<td>{{ place_code('rank') }}</td>
</tr>

<tr>
<td>{{ KNOWL('ec.regulator', title='Regulator') }}:</td>
{% if data.mwbsd.reg == '?' %}
Expand Down Expand Up @@ -269,10 +296,16 @@ <h2> {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}</h2>

<tr>
<td>{{ KNOWL('ec.torsion_order', title='Torsion order') }}:</td>
<td>$E(\Q)_{\mathrm{tors}}$</td><td>&nbsp;=&nbsp;</td><td>${{ data.mwbsd.torsion }}$</td>
<td>$\#E(\Q)_{\mathrm{tor}}$</td><td>&nbsp;=&nbsp;</td><td>${{ data.mwbsd.torsion }}$</td>
<td>{{ place_code('ntors') }}</td>
</tr>

<tr>
<td>{{KNOWL('ec.special_value', title='Special value', special_value = data.special_value)}}:</td>
<td>$ {{ data.mwbsd.lder_name }}$</td><td>&nbsp;&approx;&nbsp;</td><td>${{ data.mwbsd.special_value }} $</td>
<td>{{ place_code('L1') }}</td>
</tr>

<tr>
<td>{{ KNOWL('ec.analytic_sha_order', title='Analytic order of &#1064;') }}:</td>
<td>{% if data.mwbsd.sha == '?' %}Not computed{% else %} &#1064;${}_{\mathrm{an}}$</td>
Expand All @@ -293,15 +326,10 @@ <h2> {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}</h2>
<td> ${{ data.mwbsd.regsha }}$</td>
</tr>
{% endif %}
<tr>
<td>{{KNOWL('ec.q.special_value', title='Special value', special_value = data.special_value)}}:</td>
<td>$ {{ data.mwbsd.lder_name }}$</td><td>&nbsp;&approx;&nbsp;</td><td>${{ data.mwbsd.special_value }} $</td>
<td>{{ place_code('L1') }}</td>
</tr>
</tbody>
</table>

<h2> {{ KNOWL('ec.q.bsdconjecture', title='BSD formula') }}</h2>
<h2> {{ KNOWL('ec.bsdconjecture', title='BSD formula') }}</h2>
<p style="margin:10px 280px;">
$\displaystyle {{ data.mwbsd.formula|safe }}$
</p>
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/elliptic_curves/templates/sw_ecdb.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h3>File and data format</h3>
</tr>
<tr>
<td>$L^{(r)}(1)/r!$</td>
<td>The {{ KNOWL('ec.q.special_value', 'special value') }} of $E$</td>
<td>The {{ KNOWL('ec.special_value', 'special value') }} of $E$</td>
<td>$14.921134$</td>
</tr>
<tr>
Expand Down
8 changes: 6 additions & 2 deletions lmfdb/elliptic_curves/web_ec.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,11 @@ def make_mwbsd(self):
mwbsd['int_points'] = "None"

# Generators (mod torsion) and heights:
mwbsd['generators'] = [raw_typeset(weighted_proj_to_affine_point(P)) for P in mwbsd['gens']] if mwbsd['ngens'] else ''
#mwbsd['generators'] = [raw_typeset(weighted_proj_to_affine_point(P)) for P in mwbsd['gens']] if mwbsd['ngens'] else []
mwbsd['generators'] = [weighted_proj_to_affine_point(P) for P in mwbsd['gens']] if mwbsd['ngens'] else []
mwbsd['heights'] = [RR(h) for h in mwbsd['heights']]

mwbsd['gens_and_heights'] = list(zip(mwbsd['generators'], mwbsd['heights']))

# Mordell-Weil group
invs = [0 for a in range(self.rank)] + list(self.torsion_structure)
mwbsd['mw_struct'] = "trivial" if len(invs) == 0 else r'\(' + r' \oplus '.join((r'\Z' if n == 0 else r'\Z/{%s}\Z' % n) for n in invs) + r'\)'
Expand All @@ -668,11 +670,13 @@ def make_mwbsd(self):
if mwbsd['torsion'] == 1:
mwbsd['tor_struct'] = ''
mwbsd['tor_gens'] = ''
mwbsd['tor_gens_and_orders'] = []
else:
mwbsd['tor_struct'] = r' \oplus '.join(r'\Z/{%s}\Z' % n for n in self.torsion_structure)
tor_gens_tmp = [weighted_proj_to_affine_point(P) for P in mwbsd['torsion_generators']]
mwbsd['tor_gens'] = raw_typeset(', '.join(str(P) for P in tor_gens_tmp),
', '.join(web_latex(P) for P in tor_gens_tmp))
mwbsd['tor_gens_and_orders'] = list(zip(tor_gens_tmp, self.torsion_structure))

# BSD invariants
if r >= 2:
Expand Down