From 3491fa1c07a7f06a16bba396a04581cbd1d94773 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Mon, 2 Feb 2026 06:44:35 -0500 Subject: [PATCH 1/2] ECQ: show base-changed curves in database on curve home pages --- lmfdb/elliptic_curves/web_ec.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index bf32eacfbb..2a4c4dea13 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -536,6 +536,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 +560,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('/') From d243a08555111da917316a890a6e123e37e1a560 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Mon, 2 Feb 2026 09:38:33 -0500 Subject: [PATCH 2/2] revise a comment --- lmfdb/elliptic_curves/web_ec.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index 2a4c4dea13..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'))