diff --git a/lmfdb/ecnf/main.py b/lmfdb/ecnf/main.py index 90604a35f7..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, @@ -521,7 +522,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 +534,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': cremona_label_to_lmfdb_label(info['base_change_label']) } parse_cm_list(info,query,field='cm_disc',qfield='cm',name="CM discriminant") @@ -907,6 +914,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 +931,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], ] diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index 576c7152c0..3e50b4f882 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -628,6 +628,9 @@ 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 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('/')