From 69ab05d9fde395af1437ec6f14cf9d5f6d5db1a4 Mon Sep 17 00:00:00 2001 From: AndrewVSutherland Date: Sat, 14 Feb 2026 07:41:00 -0500 Subject: [PATCH 1/4] add base_change_label search option to ecnf --- lmfdb/ecnf/main.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lmfdb/ecnf/main.py b/lmfdb/ecnf/main.py index 90604a35f7..0bb11944c9 100644 --- a/lmfdb/ecnf/main.py +++ b/lmfdb/ecnf/main.py @@ -521,7 +521,6 @@ def elliptic_curve_search(info, query): elif info['include_Q_curves'] == 'only': query['q_curve'] = True if 'Qcurves' in info: - print("Qcurves") if info['Qcurves'] == 'Q-curve': query['q_curve'] = True elif info['Qcurves'] == 'base-change': @@ -534,6 +533,13 @@ def elliptic_curve_search(info, query): elif info['Qcurves'] == 'non-base-change-Q-curve': query['q_curve'] = True query['base_change'] = [] + if 'base_change_label' in info: + if "Qcurves" in info and info['Qcurves'][:3] == 'non': + err = "Incompatible base change query options, you cannot simultaneous exclude base changes and specify a base change label." + flash_error(err) + raise ValueError(err) + query['q_curve'] = True + query['base_change'] = { '$contains': info['base_change_label'] } parse_cm_list(info,query,field='cm_disc',qfield='cm',name="CM discriminant") @@ -907,6 +913,11 @@ def __init__(self): label="Isogeny class degree", knowl="ec.isogeny", example="16") + base_change_label = TextBox( + name="base_change_label", + label="Base change of", + knowl="ec.base_change", + example="11a.1") count = CountBox() self.browse_array = [ @@ -919,13 +930,15 @@ def __init__(self): [isodeg, one], [class_size, class_deg], [galois_image, nonmax_primes], + [base_change_label, reduction], [jinv], - [count, reduction], + [count] ] self.refine_array = [ [field, conductor_norm, rank, torsion, cm_disc], [deg_sig, bad_primes, Qcurves, torsion_structure, include_cm], [sha, isodeg, class_size, reduction, galois_image], - [jinv, regulator, one, class_deg, nonmax_primes], + [base_change_label, regulator, one, class_deg, nonmax_primes], + [jinv], ] From bb035d36ae1c3a2cdd1c6cda2b737074f5b3621f Mon Sep 17 00:00:00 2001 From: AndrewVSutherland Date: Sat, 14 Feb 2026 14:01:55 -0500 Subject: [PATCH 2/4] add base-change link to EQC related object --- lmfdb/elliptic_curves/web_ec.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index 576c7152c0..7910460a86 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -628,6 +628,8 @@ 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']))) + self.friends.append(('Base changes ', url_for('ecnf.index', base_change_label=self.lmfdb_label))) + 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 69ed20f83556d868fef65fe9656dd2f758c5d442 Mon Sep 17 00:00:00 2001 From: AndrewVSutherland Date: Sat, 14 Feb 2026 14:09:45 -0500 Subject: [PATCH 3/4] add base-change link to EQC related object --- lmfdb/elliptic_curves/web_ec.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index 7910460a86..3e50b4f882 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -628,7 +628,8 @@ 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']))) - self.friends.append(('Base changes ', url_for('ecnf.index', base_change_label=self.lmfdb_label))) + if db.ec_nfcurves.count({'q_curve':True,'base_change':{'$contains':self.lmfdb_label}}) > 0: + self.friends.append(('Base changes ', url_for('ecnf.index', base_change_label=self.lmfdb_label))) 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 421503a80d5d881d386ac0b962f2f8c69b4119ec Mon Sep 17 00:00:00 2001 From: AndrewVSutherland Date: Mon, 16 Feb 2026 10:58:50 -0500 Subject: [PATCH 4/4] use cremona_to_lmfdb_label --- lmfdb/ecnf/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lmfdb/ecnf/main.py b/lmfdb/ecnf/main.py index 0bb11944c9..f578ddd69c 100644 --- a/lmfdb/ecnf/main.py +++ b/lmfdb/ecnf/main.py @@ -27,6 +27,7 @@ from lmfdb.sato_tate_groups.main import st_display_knowl from lmfdb.ecnf import ecnf_page from lmfdb.ecnf.ecnf_stats import ECNF_stats +from lmfdb.elliptic_curves.web_ec import cremona_label_to_lmfdb_label from lmfdb.ecnf.WebEllipticCurve import (ECNF, web_ainvs, LABEL_RE, CLASS_LABEL_RE, @@ -539,7 +540,7 @@ def elliptic_curve_search(info, query): flash_error(err) raise ValueError(err) query['q_curve'] = True - query['base_change'] = { '$contains': info['base_change_label'] } + query['base_change'] = { '$contains': cremona_label_to_lmfdb_label(info['base_change_label']) } parse_cm_list(info,query,field='cm_disc',qfield='cm',name="CM discriminant")