From 50b97e11dfe6e5759ef0aaebc41e4f120987239e Mon Sep 17 00:00:00 2001 From: John Cremona Date: Fri, 13 Feb 2015 15:21:29 +0000 Subject: [PATCH 01/12] added parsing for 2adic data files in ec import --- lmfdb/elliptic_curves/import_ec_data.py | 79 ++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/lmfdb/elliptic_curves/import_ec_data.py b/lmfdb/elliptic_curves/import_ec_data.py index 668d2121a8..83f38145c4 100644 --- a/lmfdb/elliptic_curves/import_ec_data.py +++ b/lmfdb/elliptic_curves/import_ec_data.py @@ -40,7 +40,17 @@ - 'galois_images': (list of strings) Sutherland codes for the images of the mod p Galois representations for the primes in 'non-surjective_primes' e.g. ['5B'] - - 'isogeny_matrix': (list of lists of ints) isogeny matrix for curves in the class + - '2adic_index': (int) the index of the 2-adic representation in + GL(2,Z2) (or 0 for CM curves, which have infinite index) + - '2adic_log_level': (int) the smallest n such that the image + contains the kernel of reduction modulo 2^n (or None for CM curves) + - '2adic_gens': (list of lists of 4 ints) list of entries [a,b,c,d] + of matrices in GL(2,Z/2^nZ) generating the image where n is the + log_level (None for CM curves) + - '2adic_label': (string) Rouse label of the associated modular + curve (None for CM curves) + - 'isogeny_matrix': (list of lists of ints) isogeny matrix for + curves in the class - 'sha_an': (float) analytic order of sha (approximate unless r=0) - 'sha': (int) analytic order of sha (rounded value of sha_an) - 'sha_primes': (list of ints) primes dividing sha @@ -239,6 +249,49 @@ def allgens(line): 'torsion_generators': ["%s" % parse_tgens(tgens[1:-1]) for tgens in data[6 + rank:]], } +def twoadic(line): + r""" Parses one line from a 2adic file. Returns the label and a dict + containing fields with keys '2adic_index', '2adic_log_level', + '2adic_gens' and '2adic_label'. + + Input line fields: + + conductor iso number ainvs index level gens label + + Sample input lines: + + 110005 a 2 [1,-1,1,-185793,29503856] 12 4 [[3,0,0,1],[3,2,2,3],[3,0,0,3]] X24 + 27 a 1 [0,0,1,0,-7] inf inf [] CM + """ + data = split(line) + assert len(data)==8 + label = data[0] + data[1] + data[2] + model = data[7] + if model == 'CM': + return label, { + '2adic_index': int(0), + '2adic_log_level': None, + '2adic_gens': None, + '2adic_label': None, + } + + index = int(data[4]) + level = ZZ(data[5]) + log_level = int(level.valuation(2)) + assert 2**log_level==level + if data[6]=='[]': + gens=[] + else: + gens = data[6][1:-1].replace('],[','];[').split(';') + gens = [[int(c) for c in g[1:-1].split(',')] for g in gens] + + return label, { + '2adic_index': index, + '2adic_log_level': log_level, + '2adic_gens': gens, + '2adic_label': model, + } + def intpts(line): r""" Parses one line from an intpts file. Returns the label and a @@ -356,19 +409,30 @@ def cmp_label(lab1, lab2): def comp_dict_by_label(d1, d2): return cmp_label(d1['label'], d2['label']) +# To run this go into the top-level lmfdb directory, run sage and give +# the command +# %runfile lmfdb/elliptic_curves/import_ec_data.py +# def upload_to_db(base_path, min_N, max_N): -# allcurves data all exists also in allgens -# allcurves_filename = 'allcurves/allcurves.%s-%s'%(min_N,max_N) allbsd_filename = 'allbsd/allbsd.%s-%s' % (min_N, max_N) allgens_filename = 'allgens/allgens.%s-%s' % (min_N, max_N) intpts_filename = 'intpts/intpts.%s-%s' % (min_N, max_N) alldegphi_filename = 'alldegphi/alldegphi.%s-%s' % (min_N, max_N) alllabels_filename = 'alllabels/alllabels.%s-%s' % (min_N, max_N) galreps_filename = 'galrep/galrep.%s-%s' % (min_N, max_N) - file_list = [allbsd_filename, allgens_filename, intpts_filename, alldegphi_filename, alllabels_filename, galreps_filename] -# file_list = [galreps_filename] -# file_list = [allgens_filename] + twoadic_filename = '2adic/2adic.%s-%s' % (min_N, max_N) + file_list = [allbsd_filename, allgens_filename, intpts_filename, alldegphi_filename, alllabels_filename, galreps_filename,twoadic_filename] +# file_list = [twoadic_filename] + + parsing_dict = {} + for f in file_list: + prefix = f[f.find('/')+1:f.find('.')] + if prefix == '2adic': + parsing_dict[f] = twoadic + else: + parsing_dict[f] = globals()[prefix] + data_to_insert = {} # will hold all the data to be inserted @@ -376,8 +440,7 @@ def upload_to_db(base_path, min_N, max_N): h = open(os.path.join(base_path, f)) print "opened %s" % os.path.join(base_path, f) - parse = globals()[f[f.find('/')+1:f.find('.')]] - + parse=parsing_dict[f] t = time.time() count = 0 for line in h.readlines(): From 6e6a46b1571f7bf5da259c6cfce24c0cf69c2925 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Fri, 13 Feb 2015 17:13:43 +0000 Subject: [PATCH 02/12] added 2-adic image data to ec/Q web pages --- lmfdb/elliptic_curves/templates/curve.html | 21 +++++++++++++++++++++ lmfdb/elliptic_curves/web_ec.py | 9 +++++++++ 2 files changed, 30 insertions(+) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index d2083f57ef..22d5918ac3 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -339,6 +339,27 @@

Local data

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

+{% if data.data.CMD %} {% else %} +{% if data.twoadic_index == 1 %} +The 2-adic representation attached to this elliptic curve is + surjective. +{% else %} + +

+The image of the 2-adic representation attached to this elliptic curve +is the subgroup of $\GL(2,\Z_2)$ with Rouse label +{{data.twoadic_label}}. +

+

+This subgroup is the pull-back of the subgroup of +$\GL(2,\Z/2^{{data.twoadic_log_level}}\Z)$ generated by +${{data.data.twoadic_gen_matrices}}$ and has index {{ +data.twoadic_index }}. +

+{% endif %} +{% endif %} + + {% if data.data.galois_data %}

{% if data.data.CMD %} diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index b3a51aff29..ddc914e6a1 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -105,6 +105,12 @@ def __init__(self, dbdata): # Next lines because the hyphens make trouble self.xintcoords = parse_list(dbdata['x-coordinates_of_integral_points']) self.non_surjective_primes = dbdata['non-surjective_primes'] + # Next lines because the python identifiers cannot start with 2 + self.twoadic_index = dbdata['2adic_index'] + self.twoadic_log_level = dbdata['2adic_log_level'] + self.twoadic_gens = dbdata['2adic_gens'] + self.twoadic_label = dbdata['2adic_label'] + # All other fields are handled here self.make_curve() @staticmethod @@ -242,6 +248,9 @@ def make_curve(self): for p,im in zip(data['non_surjective_primes'], data['galois_images'])] + from sage.matrix.all import Matrix + data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) + # Leading term of L-function & BSD data bsd = self.bsd = {} From 3aaf28c16e2a5f3d8d86549ad7049add875d6335 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Fri, 20 Feb 2015 11:26:25 +0000 Subject: [PATCH 03/12] added 2-adic image info to ec/Q web pages --- lmfdb/elliptic_curves/elliptic_curve.py | 2 ++ lmfdb/elliptic_curves/templates/curve.html | 4 ++-- lmfdb/elliptic_curves/web_ec.py | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lmfdb/elliptic_curves/elliptic_curve.py b/lmfdb/elliptic_curves/elliptic_curve.py index 5cc678923c..97a4945f6c 100644 --- a/lmfdb/elliptic_curves/elliptic_curve.py +++ b/lmfdb/elliptic_curves/elliptic_curve.py @@ -466,6 +466,8 @@ def render_curve_webpage_by_label(label): except AttributeError: return elliptic_curve_jump_error(label, {}, wellformed_label=False) + if data.twoadic_label: + credit = credit.replace(' and',',') + ' and Jeremy Rouse' data.modform_display = url_for(".modular_form_display", label=lmfdb_label, number="") return render_template("curve.html", diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index 22d5918ac3..7111b30fda 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -347,12 +347,12 @@

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

The image of the 2-adic representation attached to this elliptic curve -is the subgroup of $\GL(2,\Z_2)$ with Rouse label +is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} {{data.twoadic_label}}.

This subgroup is the pull-back of the subgroup of -$\GL(2,\Z/2^{{data.twoadic_log_level}}\Z)$ generated by +$\GL(2,\Z_2/2^{{data.twoadic_log_level}}\Z_2)$ generated by ${{data.data.twoadic_gen_matrices}}$ and has index {{ data.twoadic_index }}.

diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index ddc914e6a1..200181ee0f 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -248,8 +248,9 @@ def make_curve(self): for p,im in zip(data['non_surjective_primes'], data['galois_images'])] - from sage.matrix.all import Matrix - data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) + if self.twoadic_gens: + from sage.matrix.all import Matrix + data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) # Leading term of L-function & BSD data From 1689525ef648ab653cb7acca629d185e43c21003 Mon Sep 17 00:00:00 2001 From: Nicolas Mascot Date: Fri, 27 Feb 2015 12:01:14 +0000 Subject: [PATCH 04/12] Added a few knowls for elliptic curves / Q --- lmfdb/elliptic_curves/templates/curve.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index 7111b30fda..7dd2728626 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -337,16 +337,16 @@

Local data

-

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

+

{{KNOWL('ec.galois_rep', title='Galois Representations')}}

{% if data.data.CMD %} {% else %} {% if data.twoadic_index == 1 %} -The 2-adic representation attached to this elliptic curve is +The {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is surjective. {% else %}

-The image of the 2-adic representation attached to this elliptic curve +The image of the {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} {{data.twoadic_label}}.

@@ -363,13 +363,13 @@

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

{% if data.data.galois_data %}

{% if data.data.CMD %} -The mod \( p \) {{KNOWL('ec.q.galois_rep', title='Galois +The mod \( p \) {{KNOWL('ec.galois_rep', title='Galois Representations')}} of an elliptic curve with {{ KNOWL('ec.complex_multiplication', title='Complex Multiplication') }} are non-surjective for all primes \( p \). We only show the image for primes \( p\le 37 \). {% else %} -The mod \( p \) {{KNOWL('ec.q.galois_rep', title='Galois +The mod \( p \) {{KNOWL('ec.galois_rep', title='Galois Representation')}} is surjective for all primes \( p \) except those listed. {% endif %} @@ -388,7 +388,7 @@

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

{% else %}

-The mod \( p \) {{KNOWL('ec.q.galois_rep', title='Galois +The mod \( p \) {{KNOWL('ec.galois_rep', title='Galois Representation')}} is surjective for all primes \( p \).

{% endif %} From 33d605d63f70e68dd33c47be4da4112ba1317d0c Mon Sep 17 00:00:00 2001 From: Nicolas Mascot Date: Fri, 27 Feb 2015 14:12:43 +0000 Subject: [PATCH 05/12] Made the Rouse label of 2-adic image of ell curve into a link to corresponding Rouse's webpage --- lmfdb/elliptic_curves/templates/curve.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index 7dd2728626..b1a757d474 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -348,7 +348,7 @@

{{KNOWL('ec.galois_rep', title='Galois Representations')}}

The image of the {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} -{{data.twoadic_label}}. + {{data.twoadic_label}}.

This subgroup is the pull-back of the subgroup of From a6017a535ef74b05b85174631d6327bbd1fd494c Mon Sep 17 00:00:00 2001 From: Nicolas Mascot Date: Fri, 27 Feb 2015 15:33:58 +0000 Subject: [PATCH 06/12] Made the Rouse label of 2-adic image of ell curve into a link --- lmfdb/elliptic_curves/templates/curve.html | 2 +- lmfdb/elliptic_curves/web_ec.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index b1a757d474..e8f4fe909f 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -348,7 +348,7 @@

{{KNOWL('ec.galois_rep', title='Galois Representations')}}

The image of the {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} - {{data.twoadic_label}}. + {{data.twoadic_label}}.

This subgroup is the pull-back of the subgroup of diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index 200181ee0f..31028044d1 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -11,6 +11,8 @@ import sage.all from sage.all import EllipticCurve, latex, matrix, ZZ, QQ +ROUSE_URL_PREFIX = "http://users.wfu.edu/rouseja/2adic/" # Needs to be changed whenever J. Rouse and D. Zureick-Brown move their data + cremona_label_regex = re.compile(r'(\d+)([a-z]+)(\d*)') lmfdb_label_regex = re.compile(r'(\d+)\.([a-z]+)(\d*)') lmfdb_iso_label_regex = re.compile(r'([a-z]+)(\d*)') @@ -251,7 +253,7 @@ def make_curve(self): if self.twoadic_gens: from sage.matrix.all import Matrix data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) - + data['twoadic_rouse_url'] = ROUSE_URL_PREFIX + self.twoadic_label + ".html" # Leading term of L-function & BSD data bsd = self.bsd = {} From d30d5815366a7b1593ec0ee0ef5bac34a6464fa0 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Fri, 13 Feb 2015 15:21:29 +0000 Subject: [PATCH 07/12] added parsing for 2adic data files in ec import --- lmfdb/elliptic_curves/import_ec_data.py | 79 ++++++++++++++++++++++--- 1 file changed, 71 insertions(+), 8 deletions(-) diff --git a/lmfdb/elliptic_curves/import_ec_data.py b/lmfdb/elliptic_curves/import_ec_data.py index 668d2121a8..83f38145c4 100644 --- a/lmfdb/elliptic_curves/import_ec_data.py +++ b/lmfdb/elliptic_curves/import_ec_data.py @@ -40,7 +40,17 @@ - 'galois_images': (list of strings) Sutherland codes for the images of the mod p Galois representations for the primes in 'non-surjective_primes' e.g. ['5B'] - - 'isogeny_matrix': (list of lists of ints) isogeny matrix for curves in the class + - '2adic_index': (int) the index of the 2-adic representation in + GL(2,Z2) (or 0 for CM curves, which have infinite index) + - '2adic_log_level': (int) the smallest n such that the image + contains the kernel of reduction modulo 2^n (or None for CM curves) + - '2adic_gens': (list of lists of 4 ints) list of entries [a,b,c,d] + of matrices in GL(2,Z/2^nZ) generating the image where n is the + log_level (None for CM curves) + - '2adic_label': (string) Rouse label of the associated modular + curve (None for CM curves) + - 'isogeny_matrix': (list of lists of ints) isogeny matrix for + curves in the class - 'sha_an': (float) analytic order of sha (approximate unless r=0) - 'sha': (int) analytic order of sha (rounded value of sha_an) - 'sha_primes': (list of ints) primes dividing sha @@ -239,6 +249,49 @@ def allgens(line): 'torsion_generators': ["%s" % parse_tgens(tgens[1:-1]) for tgens in data[6 + rank:]], } +def twoadic(line): + r""" Parses one line from a 2adic file. Returns the label and a dict + containing fields with keys '2adic_index', '2adic_log_level', + '2adic_gens' and '2adic_label'. + + Input line fields: + + conductor iso number ainvs index level gens label + + Sample input lines: + + 110005 a 2 [1,-1,1,-185793,29503856] 12 4 [[3,0,0,1],[3,2,2,3],[3,0,0,3]] X24 + 27 a 1 [0,0,1,0,-7] inf inf [] CM + """ + data = split(line) + assert len(data)==8 + label = data[0] + data[1] + data[2] + model = data[7] + if model == 'CM': + return label, { + '2adic_index': int(0), + '2adic_log_level': None, + '2adic_gens': None, + '2adic_label': None, + } + + index = int(data[4]) + level = ZZ(data[5]) + log_level = int(level.valuation(2)) + assert 2**log_level==level + if data[6]=='[]': + gens=[] + else: + gens = data[6][1:-1].replace('],[','];[').split(';') + gens = [[int(c) for c in g[1:-1].split(',')] for g in gens] + + return label, { + '2adic_index': index, + '2adic_log_level': log_level, + '2adic_gens': gens, + '2adic_label': model, + } + def intpts(line): r""" Parses one line from an intpts file. Returns the label and a @@ -356,19 +409,30 @@ def cmp_label(lab1, lab2): def comp_dict_by_label(d1, d2): return cmp_label(d1['label'], d2['label']) +# To run this go into the top-level lmfdb directory, run sage and give +# the command +# %runfile lmfdb/elliptic_curves/import_ec_data.py +# def upload_to_db(base_path, min_N, max_N): -# allcurves data all exists also in allgens -# allcurves_filename = 'allcurves/allcurves.%s-%s'%(min_N,max_N) allbsd_filename = 'allbsd/allbsd.%s-%s' % (min_N, max_N) allgens_filename = 'allgens/allgens.%s-%s' % (min_N, max_N) intpts_filename = 'intpts/intpts.%s-%s' % (min_N, max_N) alldegphi_filename = 'alldegphi/alldegphi.%s-%s' % (min_N, max_N) alllabels_filename = 'alllabels/alllabels.%s-%s' % (min_N, max_N) galreps_filename = 'galrep/galrep.%s-%s' % (min_N, max_N) - file_list = [allbsd_filename, allgens_filename, intpts_filename, alldegphi_filename, alllabels_filename, galreps_filename] -# file_list = [galreps_filename] -# file_list = [allgens_filename] + twoadic_filename = '2adic/2adic.%s-%s' % (min_N, max_N) + file_list = [allbsd_filename, allgens_filename, intpts_filename, alldegphi_filename, alllabels_filename, galreps_filename,twoadic_filename] +# file_list = [twoadic_filename] + + parsing_dict = {} + for f in file_list: + prefix = f[f.find('/')+1:f.find('.')] + if prefix == '2adic': + parsing_dict[f] = twoadic + else: + parsing_dict[f] = globals()[prefix] + data_to_insert = {} # will hold all the data to be inserted @@ -376,8 +440,7 @@ def upload_to_db(base_path, min_N, max_N): h = open(os.path.join(base_path, f)) print "opened %s" % os.path.join(base_path, f) - parse = globals()[f[f.find('/')+1:f.find('.')]] - + parse=parsing_dict[f] t = time.time() count = 0 for line in h.readlines(): From cc010a98a9943ccdbf3e6e97ea88c406328d84e3 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Fri, 13 Feb 2015 17:13:43 +0000 Subject: [PATCH 08/12] added 2-adic image data to ec/Q web pages --- lmfdb/elliptic_curves/templates/curve.html | 21 +++++++++++++++++++++ lmfdb/elliptic_curves/web_ec.py | 9 +++++++++ 2 files changed, 30 insertions(+) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index d2083f57ef..22d5918ac3 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -339,6 +339,27 @@

Local data

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

+{% if data.data.CMD %} {% else %} +{% if data.twoadic_index == 1 %} +The 2-adic representation attached to this elliptic curve is + surjective. +{% else %} + +

+The image of the 2-adic representation attached to this elliptic curve +is the subgroup of $\GL(2,\Z_2)$ with Rouse label +{{data.twoadic_label}}. +

+

+This subgroup is the pull-back of the subgroup of +$\GL(2,\Z/2^{{data.twoadic_log_level}}\Z)$ generated by +${{data.data.twoadic_gen_matrices}}$ and has index {{ +data.twoadic_index }}. +

+{% endif %} +{% endif %} + + {% if data.data.galois_data %}

{% if data.data.CMD %} diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index b3a51aff29..ddc914e6a1 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -105,6 +105,12 @@ def __init__(self, dbdata): # Next lines because the hyphens make trouble self.xintcoords = parse_list(dbdata['x-coordinates_of_integral_points']) self.non_surjective_primes = dbdata['non-surjective_primes'] + # Next lines because the python identifiers cannot start with 2 + self.twoadic_index = dbdata['2adic_index'] + self.twoadic_log_level = dbdata['2adic_log_level'] + self.twoadic_gens = dbdata['2adic_gens'] + self.twoadic_label = dbdata['2adic_label'] + # All other fields are handled here self.make_curve() @staticmethod @@ -242,6 +248,9 @@ def make_curve(self): for p,im in zip(data['non_surjective_primes'], data['galois_images'])] + from sage.matrix.all import Matrix + data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) + # Leading term of L-function & BSD data bsd = self.bsd = {} From 271a88562d9a0dc6a8c6a57a6b1c83ba16e33442 Mon Sep 17 00:00:00 2001 From: John Cremona Date: Fri, 20 Feb 2015 11:26:25 +0000 Subject: [PATCH 09/12] added 2-adic image info to ec/Q web pages --- lmfdb/elliptic_curves/elliptic_curve.py | 2 ++ lmfdb/elliptic_curves/templates/curve.html | 4 ++-- lmfdb/elliptic_curves/web_ec.py | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lmfdb/elliptic_curves/elliptic_curve.py b/lmfdb/elliptic_curves/elliptic_curve.py index 5cc678923c..97a4945f6c 100644 --- a/lmfdb/elliptic_curves/elliptic_curve.py +++ b/lmfdb/elliptic_curves/elliptic_curve.py @@ -466,6 +466,8 @@ def render_curve_webpage_by_label(label): except AttributeError: return elliptic_curve_jump_error(label, {}, wellformed_label=False) + if data.twoadic_label: + credit = credit.replace(' and',',') + ' and Jeremy Rouse' data.modform_display = url_for(".modular_form_display", label=lmfdb_label, number="") return render_template("curve.html", diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index 22d5918ac3..7111b30fda 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -347,12 +347,12 @@

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

The image of the 2-adic representation attached to this elliptic curve -is the subgroup of $\GL(2,\Z_2)$ with Rouse label +is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} {{data.twoadic_label}}.

This subgroup is the pull-back of the subgroup of -$\GL(2,\Z/2^{{data.twoadic_log_level}}\Z)$ generated by +$\GL(2,\Z_2/2^{{data.twoadic_log_level}}\Z_2)$ generated by ${{data.data.twoadic_gen_matrices}}$ and has index {{ data.twoadic_index }}.

diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index ddc914e6a1..200181ee0f 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -248,8 +248,9 @@ def make_curve(self): for p,im in zip(data['non_surjective_primes'], data['galois_images'])] - from sage.matrix.all import Matrix - data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) + if self.twoadic_gens: + from sage.matrix.all import Matrix + data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) # Leading term of L-function & BSD data From 44ee565b8ea8692cd8c406df13e952539952de34 Mon Sep 17 00:00:00 2001 From: Nicolas Mascot Date: Fri, 27 Feb 2015 12:01:14 +0000 Subject: [PATCH 10/12] Added a few knowls for elliptic curves / Q --- lmfdb/elliptic_curves/templates/curve.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index 7111b30fda..7dd2728626 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -337,16 +337,16 @@

Local data

-

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

+

{{KNOWL('ec.galois_rep', title='Galois Representations')}}

{% if data.data.CMD %} {% else %} {% if data.twoadic_index == 1 %} -The 2-adic representation attached to this elliptic curve is +The {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is surjective. {% else %}

-The image of the 2-adic representation attached to this elliptic curve +The image of the {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} {{data.twoadic_label}}.

@@ -363,13 +363,13 @@

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

{% if data.data.galois_data %}

{% if data.data.CMD %} -The mod \( p \) {{KNOWL('ec.q.galois_rep', title='Galois +The mod \( p \) {{KNOWL('ec.galois_rep', title='Galois Representations')}} of an elliptic curve with {{ KNOWL('ec.complex_multiplication', title='Complex Multiplication') }} are non-surjective for all primes \( p \). We only show the image for primes \( p\le 37 \). {% else %} -The mod \( p \) {{KNOWL('ec.q.galois_rep', title='Galois +The mod \( p \) {{KNOWL('ec.galois_rep', title='Galois Representation')}} is surjective for all primes \( p \) except those listed. {% endif %} @@ -388,7 +388,7 @@

{{KNOWL('ec.q.galois_rep', title='Galois Representations')}}

{% else %}

-The mod \( p \) {{KNOWL('ec.q.galois_rep', title='Galois +The mod \( p \) {{KNOWL('ec.galois_rep', title='Galois Representation')}} is surjective for all primes \( p \).

{% endif %} From b50bb228cb6152cc659b1daf952c949714782933 Mon Sep 17 00:00:00 2001 From: Nicolas Mascot Date: Fri, 27 Feb 2015 14:12:43 +0000 Subject: [PATCH 11/12] Made the Rouse label of 2-adic image of ell curve into a link to corresponding Rouse's webpage --- lmfdb/elliptic_curves/templates/curve.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index 7dd2728626..b1a757d474 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -348,7 +348,7 @@

{{KNOWL('ec.galois_rep', title='Galois Representations')}}

The image of the {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} -{{data.twoadic_label}}. + {{data.twoadic_label}}.

This subgroup is the pull-back of the subgroup of From 5e6fcd00b963f626083d15526685e19ae7f0842e Mon Sep 17 00:00:00 2001 From: Nicolas Mascot Date: Fri, 27 Feb 2015 15:33:58 +0000 Subject: [PATCH 12/12] Made the Rouse label of 2-adic image of ell curve into a link --- lmfdb/elliptic_curves/templates/curve.html | 2 +- lmfdb/elliptic_curves/web_ec.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lmfdb/elliptic_curves/templates/curve.html b/lmfdb/elliptic_curves/templates/curve.html index b1a757d474..e8f4fe909f 100644 --- a/lmfdb/elliptic_curves/templates/curve.html +++ b/lmfdb/elliptic_curves/templates/curve.html @@ -348,7 +348,7 @@

{{KNOWL('ec.galois_rep', title='Galois Representations')}}

The image of the {{KNOWL('ec.galois_rep',title='2-adic representation')}} attached to this elliptic curve is the subgroup of $\GL(2,\Z_2)$ with {{KNOWL('ec.rouse_label', title='Rouse label')}} - {{data.twoadic_label}}. + {{data.twoadic_label}}.

This subgroup is the pull-back of the subgroup of diff --git a/lmfdb/elliptic_curves/web_ec.py b/lmfdb/elliptic_curves/web_ec.py index 200181ee0f..31028044d1 100644 --- a/lmfdb/elliptic_curves/web_ec.py +++ b/lmfdb/elliptic_curves/web_ec.py @@ -11,6 +11,8 @@ import sage.all from sage.all import EllipticCurve, latex, matrix, ZZ, QQ +ROUSE_URL_PREFIX = "http://users.wfu.edu/rouseja/2adic/" # Needs to be changed whenever J. Rouse and D. Zureick-Brown move their data + cremona_label_regex = re.compile(r'(\d+)([a-z]+)(\d*)') lmfdb_label_regex = re.compile(r'(\d+)\.([a-z]+)(\d*)') lmfdb_iso_label_regex = re.compile(r'([a-z]+)(\d*)') @@ -251,7 +253,7 @@ def make_curve(self): if self.twoadic_gens: from sage.matrix.all import Matrix data['twoadic_gen_matrices'] = ','.join([latex(Matrix(2,2,M)) for M in self.twoadic_gens]) - + data['twoadic_rouse_url'] = ROUSE_URL_PREFIX + self.twoadic_label + ".html" # Leading term of L-function & BSD data bsd = self.bsd = {}