Skip to content

Commit 35e5db3

Browse files
Merge pull request #6279 from JohnCremona/ECgens
Better and more consistent display of invariants and generators for ECQ and ECNF
2 parents 49cc378 + be278f8 commit 35e5db3

File tree

5 files changed

+86
-92
lines changed

5 files changed

+86
-92
lines changed

lmfdb/ecnf/WebEllipticCurve.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,13 @@ def make_E(self):
483483
except AttributeError:
484484
self.qc = "not determined"
485485

486+
# Mordell-Weil group
487+
try:
488+
invs = [0 for a in range(self.rank)] + list(self.torsion_structure)
489+
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'\)'
490+
except AttributeError: # if self.rank not set
491+
self.mw_struct = "unknown"
492+
486493
# Torsion
487494
self.ntors = web_latex(self.torsion_order)
488495
self.tr = len(self.torsion_structure)
@@ -494,6 +501,7 @@ def make_E(self):
494501
self.tor_struct_pretty = r"\(\Z/%s\Z\oplus\Z/%s\Z\)" % tuple(self.torsion_structure)
495502

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

498506
# BSD data
499507
#
@@ -568,8 +576,10 @@ def make_E(self):
568576
# Generators
569577
try:
570578
self.gens = [web_point(parse_point(K, P)) for P in self.gens]
579+
self.gens_and_heights = list(zip(self.gens,self.heights))
571580
except AttributeError:
572581
self.gens = []
582+
self.gens_and_orders = []
573583

574584
# Global period
575585
try:

lmfdb/ecnf/templates/ecnf-curve.html

Lines changed: 33 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,37 @@ <h2>{{ KNOWL('ec.weierstrass_coeffs', title='Weierstrass equation') }}</h2>
7070
{{ place_code('is_min') }}
7171
</p>
7272

73+
<h2> {{ KNOWL('ec.mordell_weil_group', title='Mordell-Weil group') }} structure</h2>
74+
<p>
75+
{% if ec.rk == "not available" %}
76+
Not computed ($ {{ec.rk_lb}} \le r \le {{ec.rk_ub}} $)
77+
{% else %}
78+
{{ ec.mw_struct}}
79+
{%endif%}
80+
</p>
81+
82+
{% if ec.ngens > 0 or ec.torsion_order > 1 %}
83+
84+
<h2> {{ KNOWL('ec.mw_generators', title="Mordell-Weil generators") }} </h2>
85+
<div>
86+
<p>
87+
{% if ec.ngens < ec.rk_ub %}
88+
{% if ec.ngens > 0 %} Only {{ec.ngens}} {% else %} No {% endif %} non-torsion
89+
{% if ec.ngens == 1 %} generator is {% else %} generators are {% endif %} known.
90+
{% endif %}
91+
<table>
92+
<tr><th>$P$</th><th>{{ KNOWL('ec.canonical_height', title="$\hat{h}(P)$")}}</th><th>Order</th></tr>
93+
{% for P,h in ec.gens_and_heights %}
94+
<tr><td>{{P}}</td><td>${{h}}$</td><td>$\infty$</td></tr>
95+
{% endfor %}
96+
{% for T,n in ec.tor_gens_and_orders %}
97+
<tr><td>{{T}}</td><td>$0$</td><td>${{n}}$</td></tr>
98+
{% endfor %}
99+
</table>
100+
</p>
101+
</div>
102+
{%endif%}
103+
73104

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

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

190221
</table>
191222

192-
<h2> {{ KNOWL('ec.mordell_weil_group', title="Mordell-Weil group") }} </h2>
193-
<div>
194-
<p>
195-
<table>
196-
<tr>
197-
<td align = 'left'>{{ KNOWL('ec.rank', title="Rank")}}:</td>
198-
{% if ec.rk == "not available" %}
199-
{% if ec.rank_bounds != "not available" %}
200-
<td>\({{ ec.rk_lb }} \le r \le {{ec.rk_ub}}\)</td>
201-
{% else %}
202-
<td>$r$</td>
203-
<td>&nbsp;</td>
204-
<td>not available</td>
205-
{% endif %}
206-
{% else %}
207-
<td>$r$</td>
208-
<td>=</td>
209-
<td>\({{ ec.rank }}\)</td>
210-
{% endif %}
211-
</tr>
212-
213-
{% if ec.ngens %}
214-
<tr>
215-
<td align = 'left'>
216-
{% if ec.ngens==1 %}
217-
{{KNOWL('ec.mw_generators','Non-torsion generator')}}:
218-
{% else %}
219-
{{KNOWL('ec.mw_generators','Non-torsion generators')}}:
220-
{% endif %}
221-
</td>
222-
{% if ec.gens == 'not available' %}
223-
<td>not available</td>
224-
{% else %}
225-
<td>$P$</td><td>=</td>
226-
{% for gen in ec.gens %}
227-
<td>{{ gen }}</td>
228-
{% endfor %}
229-
{% endif %}
230-
</tr>
231-
{% endif %}
232-
233-
{% if ec.heights %}
234-
<tr>
235-
<td align = 'left'>
236-
{% if ec.ngens==1 %}
237-
{{ KNOWL('ec.canonical_height', title="Height") }}:
238-
{% else %}
239-
{{ KNOWL('ec.canonical_height', title="Heights") }}:
240-
{% endif %}
241-
</td>
242-
<td>$\hat{h}(P)$</td><td>&approx;</td>
243-
{% for h in ec.heights %}
244-
<td>\({{ h }}\)</td>
245-
{% endfor %}
246-
</tr>
247-
{% endif %}
248-
249-
<tr>
250-
<td align='left'>{{KNOWL('ec.torsion_subgroup','Torsion structure')}}:</td>
251-
<td>$E(K)_{\mathrm{tor}}$</td>
252-
<td>$\cong$</td>
253-
<td>{{ ec.tor_struct_pretty }}</td>
254-
</tr>
255-
<tr><td colspan=2> {{ place_code('tors') }}</td></tr>
256-
<!-- <tr><td colspan=2> {{ place_code('ntors') }}</td></tr> -->
257-
{% if ec.tr %}
258-
<tr>
259-
<td align='left'>{% if ec.tr==1 %}{{KNOWL('ec.mw_generators','Torsion generator')}}{% else %}{{KNOWL('ec.mw_generators','Torsion generators')}}{% endif %}:</td>
260-
<td>$T$</td>
261-
<td>=</td>
262-
{% for gen in ec.torsion_gens %}
263-
<td>{{ gen }}</td>
264-
{% endfor %}
265-
</tr>
266-
<tr><td colspan=2> {{ place_code('torgens') }}</td></tr>
267-
{% endif %}
268-
</table>
269-
</p>
270-
</div>
271223

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

342294
<tr>
343295
<td align='left'>{{ KNOWL('ec.torsion_order', title='Torsion order') }}:</td>
344-
<td>$E(K)_{\mathrm{tors}}$</td><td>=</td>
296+
<td>$\#E(K)_{\mathrm{tor}}$</td><td>=</td>
345297
<td>\({{ ec.torsion_order }}\)</td>
346298
</tr>
347299

348300
<tr>
349-
<td align='left'>{{ KNOWL('lfunction.leading_coeff', title='Leading coefficient') }}:</td>
301+
<td align='left'>{{ KNOWL('ec.special_value', title='Special value') }}:</td>
350302
<td>$L^{(r)}(E/K,1)/r!$</td>
351303
{% if ec.Lvalue=='not available' %}
352304
<td></td><td>not available</td>

lmfdb/elliptic_curves/templates/ec-curve.html

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,24 @@ <h2> {{ KNOWL('ec.mordell_weil_group', title='Mordell-Weil group') }} structure<
102102

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

105+
{% if data.mwbsd.rank > 0 or data.mwbsd.torsion > 1 %}
106+
<h2> {{ KNOWL('ec.mw_generators', title="Mordell-Weil generators") }} </h2>
107+
<div>
108+
<p>
109+
<table>
110+
<tr><th>$P$</th><th>{{ KNOWL('ec.canonical_height', title="$\hat{h}(P)$")}}</th><th>Order</th></tr>
111+
{% for P,h in data.mwbsd.gens_and_heights %}
112+
<tr><td>${{P}}$</td><td>${{h}}$</td><td>$\infty$</td></tr>
113+
{% endfor %}
114+
{% for T,n in data.mwbsd.tor_gens_and_orders %}
115+
<tr><td>${{T}}$</td><td>$0$</td><td>${{n}}$</td></tr>
116+
{% endfor %}
117+
</table>
118+
</p>
119+
</div>
120+
{%endif%}
121+
122+
{#
105123
{% if data.mwbsd.rank!=0 %}
106124
{% if data.mwbsd.rank==1 %}
107125
<h3> {{ KNOWL('ec.mw_generators', title='Non-torsion Mordell-Weil generator') }} and {{KNOWL('ec.canonical_height','height')}}</h3>
@@ -134,8 +152,9 @@ <h2> {{ KNOWL('ec.mw_generators', title='Torsion generators') }}</h2>
134152
<p> {{ data.mwbsd.tor_gens |safe }} </p>
135153
{{ place_code('tors') }}
136154
{%endif %}
155+
#}
137156

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

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

260+
<tr>
261+
<td>{{ KNOWL('ec.rank', title='Mordell-Weil rank') }}:</td>
262+
<td>$r$</td><td>&nbsp;=&nbsp;</td><td>$ {{ data.rank }}$
263+
</td>
264+
<td>{{ place_code('rank') }}</td>
265+
</tr>
266+
240267
<tr>
241268
<td>{{ KNOWL('ec.regulator', title='Regulator') }}:</td>
242269
{% if data.mwbsd.reg == '?' %}
@@ -269,10 +296,16 @@ <h2> {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}</h2>
269296

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

303+
<tr>
304+
<td>{{KNOWL('ec.special_value', title='Special value', special_value = data.special_value)}}:</td>
305+
<td>$ {{ data.mwbsd.lder_name }}$</td><td>&nbsp;&approx;&nbsp;</td><td>${{ data.mwbsd.special_value }} $</td>
306+
<td>{{ place_code('L1') }}</td>
307+
</tr>
308+
276309
<tr>
277310
<td>{{ KNOWL('ec.analytic_sha_order', title='Analytic order of &#1064;') }}:</td>
278311
<td>{% if data.mwbsd.sha == '?' %}Not computed{% else %} &#1064;${}_{\mathrm{an}}$</td>
@@ -293,15 +326,10 @@ <h2> {{ KNOWL('ec.q.bsdconjecture', title='BSD invariants') }}</h2>
293326
<td> ${{ data.mwbsd.regsha }}$</td>
294327
</tr>
295328
{% endif %}
296-
<tr>
297-
<td>{{KNOWL('ec.q.special_value', title='Special value', special_value = data.special_value)}}:</td>
298-
<td>$ {{ data.mwbsd.lder_name }}$</td><td>&nbsp;&approx;&nbsp;</td><td>${{ data.mwbsd.special_value }} $</td>
299-
<td>{{ place_code('L1') }}</td>
300-
</tr>
301329
</tbody>
302330
</table>
303331

304-
<h2> {{ KNOWL('ec.q.bsdconjecture', title='BSD formula') }}</h2>
332+
<h2> {{ KNOWL('ec.bsdconjecture', title='BSD formula') }}</h2>
305333
<p style="margin:10px 280px;">
306334
$\displaystyle {{ data.mwbsd.formula|safe }}$
307335
</p>

lmfdb/elliptic_curves/templates/sw_ecdb.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h3>File and data format</h3>
3939
</tr>
4040
<tr>
4141
<td>$L^{(r)}(1)/r!$</td>
42-
<td>The {{ KNOWL('ec.q.special_value', 'special value') }} of $E$</td>
42+
<td>The {{ KNOWL('ec.special_value', 'special value') }} of $E$</td>
4343
<td>$14.921134$</td>
4444
</tr>
4545
<tr>

lmfdb/elliptic_curves/web_ec.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,11 @@ def make_mwbsd(self):
657657
mwbsd['int_points'] = "None"
658658

659659
# Generators (mod torsion) and heights:
660-
mwbsd['generators'] = [raw_typeset(weighted_proj_to_affine_point(P)) for P in mwbsd['gens']] if mwbsd['ngens'] else ''
660+
#mwbsd['generators'] = [raw_typeset(weighted_proj_to_affine_point(P)) for P in mwbsd['gens']] if mwbsd['ngens'] else []
661+
mwbsd['generators'] = [weighted_proj_to_affine_point(P) for P in mwbsd['gens']] if mwbsd['ngens'] else []
661662
mwbsd['heights'] = [RR(h) for h in mwbsd['heights']]
662-
663+
mwbsd['gens_and_heights'] = list(zip(mwbsd['generators'], mwbsd['heights']))
664+
663665
# Mordell-Weil group
664666
invs = [0 for a in range(self.rank)] + list(self.torsion_structure)
665667
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):
668670
if mwbsd['torsion'] == 1:
669671
mwbsd['tor_struct'] = ''
670672
mwbsd['tor_gens'] = ''
673+
mwbsd['tor_gens_and_orders'] = []
671674
else:
672675
mwbsd['tor_struct'] = r' \oplus '.join(r'\Z/{%s}\Z' % n for n in self.torsion_structure)
673676
tor_gens_tmp = [weighted_proj_to_affine_point(P) for P in mwbsd['torsion_generators']]
674677
mwbsd['tor_gens'] = raw_typeset(', '.join(str(P) for P in tor_gens_tmp),
675678
', '.join(web_latex(P) for P in tor_gens_tmp))
679+
mwbsd['tor_gens_and_orders'] = list(zip(tor_gens_tmp, self.torsion_structure))
676680

677681
# BSD invariants
678682
if r >= 2:

0 commit comments

Comments
 (0)