Skip to content
Closed
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
13 changes: 13 additions & 0 deletions lmfdb/elliptic_curves/web_ec.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def class_lmfdb_label(conductor, iso_class):
def class_cremona_label(conductor, iso_class):
return "%s%s" % (conductor, iso_class)

# This converts Cremona labels (Clabel in ECQ) to LMFDB labels
# (lmfdb_label), leaving alone both LMFDB labels for curves over Q and
# ECNF labels as these all contain at least one "."
def cremona_label_to_lmfdb_label(clab):
return clab if "." in clab else next(db.ec_curvedata.search({"Clabel": clab}, projection='lmfdb_label'))

Expand Down Expand Up @@ -536,6 +539,12 @@ def red(p):
self.newform_exists_in_db = db.mf_newforms.label_exists(self.newform_label)
self._code = None

# base changes in the ec_nfcurves table, allowing for these
# being with Cremona or LMFDB labels (as of Jan 2026):
bclabels = list(db.ec_nfcurves.search({'base_change': {'$contains': self.lmfdb_label}}, projection='label'))
bclabels.extend(list(db.ec_nfcurves.search({'base_change': {'$contains': self.Clabel}}, projection='label')))
bcurls = [url_for("ecnf.show_ecnf1", nf=lab) for lab in bclabels]

if self.label_type == 'Cremona':
self.class_url = url_for(".by_ec_label", label=self.Ciso)
self.class_name = self.Ciso
Expand All @@ -554,6 +563,10 @@ def red(p):
self.friends.append((f'Minimal quartic twist {data["min_quartic_twist_label"]}', data['min_quartic_twist_url']))
self.friends.append(('All twists ', url_for(".rational_elliptic_curves", jinv=data['j_invariant'])))

if bclabels:
self.friends += [('Base changes in the database:', url_for("ecnf.index", label = {'$in': bclabels}))]
self.friends += [(f'{bclab}', bcurl) for (bclab, bcurl) in zip(bclabels, bcurls)]

lfun_url = url_for("l_functions.l_function_ec_page", conductor_label=N, isogeny_class_label=iso)
origin_url = lfun_url.lstrip('/L/').rstrip('/')

Expand Down
Loading