Skip to content

Commit

Permalink
Merge pull request #6280 from LMFDB/main
Browse files Browse the repository at this point in the history
main -> dev
  • Loading branch information
roed314 authored Dec 3, 2024
2 parents 63b8da0 + 9a24358 commit b490f87
Show file tree
Hide file tree
Showing 33 changed files with 251 additions and 294 deletions.
2 changes: 1 addition & 1 deletion lmfdb/abvar/fq/isog_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def newton_plot(self):
L += line([(i, 0), (i, ymax)], color="grey", thickness=0.5)
for j in range(ymax+1):
L += line([(0, j), (xmax, j)], color="grey", thickness=0.5)
L+=line(pts,thickness=2)
L += line(pts, thickness=2)
for v in pts:
L += circle(v, 0.06, fill=True)
L.axes(False)
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/belyi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ def primitivization_search(info, query, search_type):
re_str = PASSPORT_RE
err_name = "passport"
else:
ValueError("Invalid search type")
raise ValueError("invalid search type")
if info.get("primitivization"):
primitivization = info["primitivization"]
if re.match(re_str, primitivization):
Expand Down
10 changes: 5 additions & 5 deletions lmfdb/bianchi_modular_forms/bianchi_modular_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def download_bmf_magma(**args):
except ValueError:
return "Bianchi newform not found"

hecke_pol = f.hecke_poly_obj
hecke_pol = f.hecke_poly_obj
hecke_eigs = f.hecke_eigs

F = WebNumberField(f.field_label)
Expand Down Expand Up @@ -452,7 +452,7 @@ def download_bmf_magma(**args):
outstr += 'for i in [1..#heckeEigenvaluesList] do\n heckeEigenvalues[primes[i]] := heckeEigenvaluesList[i];\nend for;\n'

if f.have_AL:
AL_eigs = f.AL_table_data
AL_eigs = f.AL_table_data
outstr += '\nALEigenvalues := AssociativeArray();\n'
for s in AL_eigs:
outstr += 'ALEigenvalues[ideal<ZF | {}>] := {};\n'.format(set(s[0]), s[1])
Expand Down Expand Up @@ -540,7 +540,7 @@ def download_bmf_sage(**args):
except ValueError:
return "Bianchi newform not found"

hecke_pol = f.hecke_poly_obj
hecke_pol = f.hecke_poly_obj
hecke_eigs = f.hecke_eigs

F = WebNumberField(f.field_label)
Expand Down Expand Up @@ -580,10 +580,10 @@ def download_bmf_sage(**args):
outstr += 'for i in range(len(hecke_eigenvalues_array)):\n hecke_eigenvalues[primes[i]] = hecke_eigenvalues_array[i]\n\n'

if f.have_AL:
AL_eigs = f.AL_table_data
AL_eigs = f.AL_table_data
outstr += 'AL_eigenvalues = {}\n'
for s in AL_eigs:
outstr += 'AL_eigenvalues[ZF.ideal(%s)] = %s\n' % (s[0],s[1])
outstr += 'AL_eigenvalues[ZF.ideal(%s)] = %s\n' % (s[0], s[1])
else:
outstr += 'AL_eigenvalues ="not known"\n'

Expand Down
4 changes: 2 additions & 2 deletions lmfdb/characters/web_character.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def to_dict(self):
d = {}
logger.info('[DC] start collecting data for %s' % self.__class__.__name__)
for k in self._keys:
d[k] = getattr(self,k,None)
d[k] = getattr(self, k, None)
if d[k] is None:
logger.debug('[DC warning] ### key[%s] is None' % k)
logger.info('[DC] collected for %s' % self.__class__.__name__)
Expand All @@ -121,7 +121,7 @@ def texlogvalue(x, tag=False):
if not isinstance(x, Rational):
return '1'
d = int(x.denom())
n = int(x.numer()) % d
n = int(x.numer()) % d
if d == 1:
s = '1'
elif n == 1 and d == 2:
Expand Down
3 changes: 2 additions & 1 deletion lmfdb/classical_modular_forms/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,12 +798,13 @@ def newform_parse(info, query):
parse_noop(info, query, 'projective_image', func=str.upper)
parse_ints(info, query, 'artin_degree', name="Artin degree")


def newspace_parse(info, query):
for key, display in newform_only_fields.items():
if key in info:
msg = "%s not valid when searching for spaces"
flash_error(msg, display)
raise ValueError(msg % display)
raise ValueError(msg % display)
if 'dim' not in info and 'hst' not in info:
# When coming from browse page, add dim condition to only show non-empty spaces
info['dim'] = '1-'
Expand Down
17 changes: 14 additions & 3 deletions lmfdb/ecnf/WebEllipticCurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def make_E(self):
self.fact_disc = self.disc
self.fact_disc_norm = str(Dnorm)
else:
self.fact_disc = latex_factorization(badprimes, disc_ords)
self.fact_disc = latex_factorization(badprimes, disc_ords)
self.fact_disc_norm = latex_factorization(badnorms, disc_ords, sign=signDnorm)

if self.is_minimal:
Expand All @@ -411,10 +411,10 @@ def make_E(self):

self.mindisc_norm = web_latex(Dmin_norm)
if Dmin_norm in [1,-1]: # since the factorization of (1) displays as "1"
self.fact_mindisc = self.mindisc
self.fact_mindisc = self.mindisc
self.fact_mindisc_norm = self.mindisc_norm
else:
self.fact_mindisc = latex_factorization(badprimes, mindisc_ords)
self.fact_mindisc = latex_factorization(badprimes, mindisc_ords)
self.fact_mindisc_norm = latex_factorization(badnorms, mindisc_ords, sign=signDnorm)

j = self.field.parse_NFelt(self.jinv)
Expand Down 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,11 @@ 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))
self.gens_and_heights.sort(key=lambda Ph: Ph[1])
except AttributeError:
self.gens = []
self.gens_and_heights = []

# 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
6 changes: 2 additions & 4 deletions lmfdb/elliptic_curves/elliptic_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,10 +745,8 @@ def modular_form_display(label, number):
number = int(number)
except ValueError:
number = 10
if number < 10:
number = 10
if number > 1000:
number = 1000
number = max(number, 10)
number = min(number, 1000)
ainvs = db.ec_curvedata.lookup(label, 'ainvs', 'lmfdb_label')
if ainvs is None:
return elliptic_curve_jump_error(label, {})
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/elliptic_curves/isog_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def make_class(self):
# changing one line in this file (defining OPTIMALITY_BOUND)
# without changing the data.

self.cremona_bound = CREMONA_BOUND
self.cremona_bound = CREMONA_BOUND
self.optimality_bound = OPTIMALITY_BOUND
self.optimality_known = (self.conductor < OPTIMALITY_BOUND) or ((self.conductor < CREMONA_BOUND) and ((self.optimality == 1) or (self.Ciso == '990h')))
self.optimal_label = self.Clabel if self.label_type == 'Cremona' else self.lmfdb_label
Expand Down
Loading

0 comments on commit b490f87

Please sign in to comment.