diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index bf32eacfbb..47bc141a77 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -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')) @@ -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 @@ -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('/')