From a2ebabc7e445a01a4fab3241037ab3f1adb5e11d Mon Sep 17 00:00:00 2001
From: John Cremona
Date: Thu, 28 Nov 2024 12:04:18 -0500
Subject: [PATCH 1/3] Issue #6276: display of elliptic curve generators
---
lmfdb/ecnf/WebEllipticCurve.py | 10 ++
lmfdb/ecnf/templates/ecnf-curve.html | 112 +++++-------------
lmfdb/elliptic_curves/templates/ec-curve.html | 42 +++++--
lmfdb/elliptic_curves/web_ec.py | 8 +-
4 files changed, 83 insertions(+), 89 deletions(-)
diff --git a/lmfdb/ecnf/WebEllipticCurve.py b/lmfdb/ecnf/WebEllipticCurve.py
index 5992ac678c..85e3228bd6 100644
--- a/lmfdb/ecnf/WebEllipticCurve.py
+++ b/lmfdb/ecnf/WebEllipticCurve.py
@@ -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)
@@ -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
#
@@ -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:
diff --git a/lmfdb/ecnf/templates/ecnf-curve.html b/lmfdb/ecnf/templates/ecnf-curve.html
index 4d030ff796..b4a088ab33 100644
--- a/lmfdb/ecnf/templates/ecnf-curve.html
+++ b/lmfdb/ecnf/templates/ecnf-curve.html
@@ -70,6 +70,37 @@ {{ KNOWL('ec.weierstrass_coeffs', title='Weierstrass equation') }}
{{ place_code('is_min') }}
+ {{ KNOWL('ec.mordell_weil_group', title='Mordell-Weil group') }} structure
+
+ {% if ec.rk == "not available" %}
+ Not computed ($ {{ec.rk_lb}} \le r \le {{ec.rk_ub}} $)
+ {% else %}
+ {{ ec.mw_struct}}
+ {%endif%}
+
+
+{% if ec.ngens > 0 or ec.torsion_order > 1 %}
+
+ {{ KNOWL('ec.mw_generators', title="Mordell-Weil generators") }}
+
+
+ {% 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 %}
+
+ $P$ | {{ KNOWL('ec.canonical_height', title="$\hat{h}(P)$")}} | Order |
+ {% for P,h in ec.gens_and_heights %}
+ {{P}} | ${{h}}$ | $\infty$ |
+ {% endfor %}
+ {% for T,n in ec.tor_gens_and_orders %}
+ {{T}} | $0$ | ${{n}}$ |
+ {% endfor %}
+
+
+
+{%endif%}
+
{{ KNOWL('ec.invariants', title='Invariants')}}
@@ -189,85 +220,6 @@ {{ KNOWL('ec.invariants', title='Invariants')}}
- {{ KNOWL('ec.mordell_weil_group', title="Mordell-Weil group") }}
-
-
-
-
- {{ KNOWL('ec.rank', title="Rank")}}: |
-{% if ec.rk == "not available" %}
-{% if ec.rank_bounds != "not available" %}
- \({{ ec.rk_lb }} \le r \le {{ec.rk_ub}}\) |
-{% else %}
- $r$ |
- |
- not available |
-{% endif %}
-{% else %}
- $r$ |
- = |
- \({{ ec.rank }}\) |
-{% endif %}
-
-
-{% if ec.ngens %}
-
-
- {% if ec.ngens==1 %}
- {{KNOWL('ec.mw_generators','Non-torsion generator')}}:
- {% else %}
- {{KNOWL('ec.mw_generators','Non-torsion generators')}}:
- {% endif %}
- |
- {% if ec.gens == 'not available' %}
- not available |
- {% else %}
- $P$ | = |
- {% for gen in ec.gens %}
- {{ gen }} |
- {% endfor %}
-{% endif %}
-
-{% endif %}
-
-{% if ec.heights %}
-
-
- {% if ec.ngens==1 %}
- {{ KNOWL('ec.canonical_height', title="Height") }}:
- {% else %}
- {{ KNOWL('ec.canonical_height', title="Heights") }}:
- {% endif %}
- |
- $\hat{h}(P)$ | ≈ |
- {% for h in ec.heights %}
- \({{ h }}\) |
- {% endfor %}
-
-{% endif %}
-
-
-{{KNOWL('ec.torsion_subgroup','Torsion structure')}}: |
- $E(K)_{\mathrm{tor}}$ |
- $\cong$ |
-{{ ec.tor_struct_pretty }} |
-
- {{ place_code('tors') }} |
-
- {% if ec.tr %}
-
- {% if ec.tr==1 %}{{KNOWL('ec.mw_generators','Torsion generator')}}{% else %}{{KNOWL('ec.mw_generators','Torsion generators')}}{% endif %}: |
- $T$ |
- = |
-{% for gen in ec.torsion_gens %}
-{{ gen }} |
-{% endfor %}
-
- {{ place_code('torgens') }} |
- {% endif %}
-
-
-
{{ KNOWL('ec.bsdconjecture', title='BSD invariants') }}
@@ -341,7 +293,7 @@
{{ KNOWL('ec.bsdconjecture', title='BSD invariants') }}
{{ KNOWL('ec.torsion_order', title='Torsion order') }}: |
- $E(K)_{\mathrm{tors}}$ | = |
+ $\#E(K)_{\mathrm{tor}}$ | = |
\({{ ec.torsion_order }}\) |
diff --git a/lmfdb/elliptic_curves/templates/ec-curve.html b/lmfdb/elliptic_curves/templates/ec-curve.html
index fbecf34b2e..2d92e0e687 100644
--- a/lmfdb/elliptic_curves/templates/ec-curve.html
+++ b/lmfdb/elliptic_curves/templates/ec-curve.html
@@ -102,6 +102,24 @@
{{ KNOWL('ec.mordell_weil_group', title='Mordell-Weil group') }} structure<
{{ place_code('mwgroup') }}
+ {% if data.mwbsd.rank or data.mwbsd.torsion_order %}
+
{{ KNOWL('ec.mw_generators', title="Mordell-Weil generators") }}
+
+
+
+ $P$ | {{ KNOWL('ec.canonical_height', title="$\hat{h}(P)$")}} | Order |
+ {% for P,h in data.mwbsd.gens_and_heights %}
+ ${{P}}$ | ${{h}}$ | $\infty$ |
+ {% endfor %}
+ {% for T,n in data.mwbsd.tor_gens_and_orders %}
+ ${{T}}$ | $0$ | ${{n}}$ |
+ {% endfor %}
+
+
+
+ {%endif%}
+
+{#
{% if data.mwbsd.rank!=0 %}
{% if data.mwbsd.rank==1 %}
{{ KNOWL('ec.mw_generators', title='Non-torsion Mordell-Weil generator') }} and {{KNOWL('ec.canonical_height','height')}}
@@ -134,8 +152,9 @@
{{ KNOWL('ec.mw_generators', title='Torsion generators') }}
{{ data.mwbsd.tor_gens |safe }}
{{ place_code('tors') }}
{%endif %}
+#}
-
+ {% if data.mwbsd.rank > 0 or data.mwbsd.torsion_order > 1 %}
{{ KNOWL('ec.q.integral_points', title='Integral points') }}
@@ -148,6 +167,7 @@
{{ KNOWL('ec.mw_generators', title='Torsion generators') }}
N.B. Only integral points which are combinations of known generators are shown.
{%endif %}
+ {%endif %}
Invariants
@@ -237,6 +257,13 @@ {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}
{{ place_code('analytic_rank') }} |
+
+ {{ KNOWL('ec.rank', title='Rank') }}: |
+ $r$ | = | $ {{ data.rank }}$
+ |
+ {{ place_code('rank') }} |
+
+
{{ KNOWL('ec.regulator', title='Regulator') }}: |
{% if data.mwbsd.reg == '?' %}
@@ -269,10 +296,16 @@ {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}
{{ KNOWL('ec.torsion_order', title='Torsion order') }}: |
- $E(\Q)_{\mathrm{tors}}$ | = | ${{ data.mwbsd.torsion }}$ |
+ $\#E(\Q)_{\mathrm{tor}}$ | = | ${{ data.mwbsd.torsion }}$ |
{{ place_code('ntors') }} |
+
+ {{KNOWL('ec.q.special_value', title='Special value', special_value = data.special_value)}}: |
+ $ {{ data.mwbsd.lder_name }}$ | ≈ | ${{ data.mwbsd.special_value }} $ |
+ {{ place_code('L1') }} |
+
+
{{ KNOWL('ec.analytic_sha_order', title='Analytic order of Ш') }}: |
{% if data.mwbsd.sha == '?' %}Not computed{% else %} Ш${}_{\mathrm{an}}$ |
@@ -293,11 +326,6 @@ {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}
${{ data.mwbsd.regsha }}$ |
{% endif %}
-
- {{KNOWL('ec.q.special_value', title='Special value', special_value = data.special_value)}}: |
- $ {{ data.mwbsd.lder_name }}$ | ≈ | ${{ data.mwbsd.special_value }} $ |
- {{ place_code('L1') }} |
-
diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py
index 9928118a8f..28c802c175 100644
--- a/lmfdb/elliptic_curves/web_ec.py
+++ b/lmfdb/elliptic_curves/web_ec.py
@@ -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'\)'
@@ -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:
From 36d0ce363bf0411410e439ccdf332a62dd9b0c6a Mon Sep 17 00:00:00 2001
From: John Cremona
Date: Fri, 29 Nov 2024 04:27:16 -0500
Subject: [PATCH 2/3] Dealing with #6275 and #6276
---
lmfdb/ecnf/templates/ecnf-curve.html | 2 +-
lmfdb/elliptic_curves/templates/ec-curve.html | 6 +++---
lmfdb/elliptic_curves/templates/sw_ecdb.html | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lmfdb/ecnf/templates/ecnf-curve.html b/lmfdb/ecnf/templates/ecnf-curve.html
index b4a088ab33..baed8cc381 100644
--- a/lmfdb/ecnf/templates/ecnf-curve.html
+++ b/lmfdb/ecnf/templates/ecnf-curve.html
@@ -298,7 +298,7 @@ {{ KNOWL('ec.bsdconjecture', title='BSD invariants') }}
- {{ KNOWL('lfunction.leading_coeff', title='Leading coefficient') }}: |
+ {{ KNOWL('ec.special_value', title='Special value') }}: |
$L^{(r)}(E/K,1)/r!$ |
{% if ec.Lvalue=='not available' %}
| not available |
diff --git a/lmfdb/elliptic_curves/templates/ec-curve.html b/lmfdb/elliptic_curves/templates/ec-curve.html
index 2d92e0e687..22cc006216 100644
--- a/lmfdb/elliptic_curves/templates/ec-curve.html
+++ b/lmfdb/elliptic_curves/templates/ec-curve.html
@@ -258,7 +258,7 @@ {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}
- {{ KNOWL('ec.rank', title='Rank') }}: |
+ {{ KNOWL('ec.rank', title='Mordell-Weil rank') }}: |
$r$ | = | $ {{ data.rank }}$
|
{{ place_code('rank') }} |
@@ -301,7 +301,7 @@ {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}
- {{KNOWL('ec.q.special_value', title='Special value', special_value = data.special_value)}}: |
+ {{KNOWL('ec.special_value', title='Special value', special_value = data.special_value)}}: |
$ {{ data.mwbsd.lder_name }}$ | ≈ | ${{ data.mwbsd.special_value }} $ |
{{ place_code('L1') }} |
@@ -329,7 +329,7 @@ {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}
- {{ KNOWL('ec.q.bsdconjecture', title='BSD formula') }}
+ {{ KNOWL('ec.bsdconjecture', title='BSD formula') }}
$\displaystyle {{ data.mwbsd.formula|safe }}$
diff --git a/lmfdb/elliptic_curves/templates/sw_ecdb.html b/lmfdb/elliptic_curves/templates/sw_ecdb.html
index df74af9404..4f7a352356 100644
--- a/lmfdb/elliptic_curves/templates/sw_ecdb.html
+++ b/lmfdb/elliptic_curves/templates/sw_ecdb.html
@@ -39,7 +39,7 @@ File and data format
$L^{(r)}(1)/r!$ |
- The {{ KNOWL('ec.q.special_value', 'special value') }} of $E$ |
+ The {{ KNOWL('ec.special_value', 'special value') }} of $E$ |
$14.921134$ |
From be278f8602a0da2820333bff1c378a840426a66b Mon Sep 17 00:00:00 2001
From: John Cremona
Date: Fri, 29 Nov 2024 05:47:19 -0500
Subject: [PATCH 3/3] fix typos
---
lmfdb/elliptic_curves/templates/ec-curve.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lmfdb/elliptic_curves/templates/ec-curve.html b/lmfdb/elliptic_curves/templates/ec-curve.html
index 22cc006216..e49ec675c7 100644
--- a/lmfdb/elliptic_curves/templates/ec-curve.html
+++ b/lmfdb/elliptic_curves/templates/ec-curve.html
@@ -102,7 +102,7 @@ {{ KNOWL('ec.mordell_weil_group', title='Mordell-Weil group') }} structure<
{{ place_code('mwgroup') }}
- {% if data.mwbsd.rank or data.mwbsd.torsion_order %}
+ {% if data.mwbsd.rank > 0 or data.mwbsd.torsion > 1 %}
{{ KNOWL('ec.mw_generators', title="Mordell-Weil generators") }}
@@ -154,7 +154,7 @@
{{ KNOWL('ec.mw_generators', title='Torsion generators') }}
{%endif %}
#}
- {% if data.mwbsd.rank > 0 or data.mwbsd.torsion_order > 1 %}
+ {% if data.mwbsd.rank > 0 or data.mwbsd.torsion > 1 %}
{{ KNOWL('ec.q.integral_points', title='Integral points') }}