Copy of Isogeny_Classes_Graphs_Table_1

324 days ago by Ben.LeVeque

This code is still pretty slow, but it seems to work! Test against Cremona's tables to get a sense if it's working.

 
       
s = server(directory='/tmp/a') db.nosqlite.Client('/ c = client(s.port) database = c.db collection = database.foo; collection 
       
Traceback (click to the left of this block for traceback)
...
SyntaxError: EOL while scanning string literal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_3.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("cyA9IHNlcnZlcihkaXJlY3Rvcnk9Jy90bXAvYScpCmRiLm5vc3FsaXRlLkNsaWVudCgnLwpjID0gY2xpZW50KHMucG9ydCkKZGF0YWJhc2UgPSBjLmRiCmNvbGxlY3Rpb24gPSBkYXRhYmFzZS5mb287IGNvbGxlY3Rpb24="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpCiYad7/___code___.py", line 3
    db.nosqlite.Client('/
                        ^
SyntaxError: EOL while scanning string literal
collection.insert({'a':123, 'b':'hello', 'Matrix':Matrix(3)}) list(collection.find('a<3')) 
       
Traceback (click to the left of this block for traceback)
...
NameError: name 'collection' is not defined
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_4.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Y29sbGVjdGlvbi5pbnNlcnQoeydhJzoxMjMsICdiJzonaGVsbG8nLCAnTWF0cml4JzpNYXRyaXgoMyl9KQpsaXN0KGNvbGxlY3Rpb24uZmluZCgnYTwzJykp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpETBmF_/___code___.py", line 3, in <module>
    collection.insert({'a':_sage_const_123 , 'b':'hello', 'Matrix':Matrix(_sage_const_3 )})
NameError: name 'collection' is not defined
dictiona = {};dictiona['1']=3;dictiona 
       
{'1': 3}
{'1': 3}
 
       
x = var('x') K.<a> = NumberField(x^2-x-1) import psage.modform.hilbert.sqrt5.tables as sqrt5 
       
K(0).denominator_ideal() 
       
Traceback (click to the left of this block for traceback)
...
ValueError: denominator ideal of 0 is not defined.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_8.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("SygwKS5kZW5vbWluYXRvcl9pZGVhbCgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpq6CnTm/___code___.py", line 3, in <module>
    exec compile(u'K(_sage_const_0 ).denominator_ideal()
  File "", line 1, in <module>
    
  File "number_field_element.pyx", line 3005, in sage.rings.number_field.number_field_element.NumberFieldElement.denominator_ideal (sage/rings/number_field/number_field_element.cpp:19281)
ValueError: denominator ideal of 0 is not defined.
@cached_function def ap(E,p): return E.change_ring(p.residue_field()).trace_of_frobenius() R.<ch> = GF(2)[] def frob(E,p): t = ap(E,p) return ch^2 - ap(E, p)*ch + int(p.norm()) def disc(E, p): t = ap(E, p) return t^2 - 4*p.norm() def isogeny_primes(E, norm_bound, isog_degree_bound): #Returns prime for which E has an isogeny P = [p for p in sqrt5.ideals_of_bounded_norm(norm_bound) if p.is_prime() and E.has_good_reduction(p)] w = set(primes(isog_degree_bound+1)) i = 0 w.remove(2) while len(w) > 0 and i < len(P): d = disc(E, P[i]) w = [ell for ell in w if not (legendre_symbol(d,ell) == -1)] i = i +1 i = 0 while i < len(P): if frob(E,P[i]).is_irreducible(): break i = i+1 if i == len(P): w.insert(0,2) return w 
       
#def isogeny_class_computation(E,p): #Returns the equations for curves in p-iso class of E # if p != 2: # E = E.short_weierstrass_model() # F = E.division_polynomial(p).change_ring(K) # f = F.factor() # i=0 # S.<x> = K[] # t=f[0][0].degree() # w=[S(1)] # while t < (p+1)/2: # for j in w: # if (j*f[i][0]).degree() < (p + 1)/2 and (j*f[i][0]).divides(F): # w.append(j*f[i][0]) # t = f[i+1][0].degree() # i+=1 # v=[] # o = 1 # while o < len(w): # try: # v.append(E.isogeny(w[o]).codomain()) # except ValueError: # pass # o+=1 # v = [F.change_ring(K).global_minimal_model() for F in v] # return v # else: # w = [Q for Q in E.torsion_subgroup() if order(Q)==2] # v = [E.isogeny(E(Q)).codomain() for Q in w] # return v 
       
def isogeny_class_computation(E,p): if p != 2: E = E.short_weierstrass_model() F = E.division_polynomial(p).change_ring(K) v = [] for f in [f for f in divisors(F) if f.degree() == (p-1)/2]: try: v.append(E.change_ring(K).isogeny(f).codomain()) except ValueError: pass v = [F.change_ring(K).global_minimal_model() for F in v] return v else: w = [Q for Q in E.torsion_subgroup() if order(Q)==2] v = [E.isogeny(E(Q)).codomain() for Q in w] return v 
       
#def isogeny_class_computation2(E,p): #William's # if p != 2: # E = E.short_weierstrass_model() # F = E.division_polynomial(p) # print F.parent(), type(F), F # F = F.change_ring(K) # try: # w = (f for f in F.divisors() if f.degree() == (p-1)/2) # except AttributeError: # print F.parent(), type(F) # raise AttributeError # for f in w: # try: # v.append(E.change_ring(K).isogeny(f).codomain()) # except ValueError: # pass # v = [F.change_ring(K).global_minimal_model() for F in v] # return v # else: # w = [Q for Q in E.torsion_subgroup() if order(Q)==2] # v = [E.isogeny(E(Q)).codomain() for Q in w] # return v 
       
#def curve_isogeny_classes(E): # isolist = isogeny_primes(E,1000,1000) # for i in isolist: # print i,'- isogeny class: ' # for j in isogeny_class_computation(E,i): # print ' ',j.a_invariants() 
       
def curve_isogeny_vector(E): #Returns isogeny class and adjacency matrix curve_list = [E] i = 0 Adj = matrix(50) ins = 1 while i < len(curve_list): isolist = isogeny_primes(curve_list[i],500,500) for p in isolist: for F in isogeny_class_computation(curve_list[i],p): bool = True for G in curve_list: if F.is_isomorphic(G): bool = False Adj[i,curve_list.index(G)]=p #if a curve in the isogeny class computation is isom Adj[curve_list.index(G),i]=p #to a curve already in the list, we want a line if bool: curve_list.append(F) Adj[i,ins]=p Adj[ins,i]=p ins += 1 i+=1 Adj = Adj.submatrix(nrows=len(curve_list),ncols=len(curve_list)) return curve_list, Adj 
       
walltime( 
       
Traceback (click to the left of this block for traceback)
...
SyntaxError: invalid syntax
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_10.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("d2FsbHRpbWUo"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpjsw9ix/___code___.py", line 3
    
             ^
SyntaxError: invalid syntax
############## 
       
 
       
 
       
def isogeny_printer(E,fsize=(5,4)): X,Y=curve_isogeny_vector(E) counter = 0 for i in X: print 'curve',counter,': ',i.a_invariants(), i.conductor().norm() counter +=1 show(Y) show(Graph(Y),figsize=fsize) 
       
E=EllipticCurve(K,[1,a+1,a,a,0]) isogeny_printer(E) 
       
curve 0 :  (1, a + 1, a, a, 0) 31
curve 1 :  (1, a + 1, a, a - 5, 3*a - 5) 31
curve 2 :  (1, a + 1, a, 41*a - 70, 170*a - 276) 31
curve 3 :  (1, a + 1, a, -39*a - 20, 108*a + 46) 31
curve 4 :  (1, a + 1, a, 31*a - 75, 141*a - 303) 31
curve 5 :  (1, a + 1, a, 691*a - 1105, 10487*a - 16933) 31
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
curve 0 :  (1, a + 1, a, a, 0) 31
curve 1 :  (1, a + 1, a, a - 5, 3*a - 5) 31
curve 2 :  (1, a + 1, a, 41*a - 70, 170*a - 276) 31
curve 3 :  (1, a + 1, a, -39*a - 20, 108*a + 46) 31
curve 4 :  (1, a + 1, a, 31*a - 75, 141*a - 303) 31
curve 5 :  (1, a + 1, a, 691*a - 1105, 10487*a - 16933) 31
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
EL = EllipticCurve(K,[0,-1,1,0,0]) isogeny_printer(EL) 
       
curve 0 :  (0, -1, 1, 0, 0) 121
curve 1 :  (0, -1, 1, -10, -20) 121
curve 2 :  (0, -1, 1, -7820, -263580) 121
curve 3 :  (0, a + 1, 1, -543074*a - 362966, -261178146*a - 163231804)
652098911521882337515422475
curve 4 :  (0, a + 1, 1, -39824*a - 27466, -3448146*a - 2150554)
83026402989233316959225
curve 5 :  (0, a + 1, 1, -562324*a - 373966, -260524746*a - 162832504)
652098911521882337515422475
curve 6 :  (0, a + 1, 1, -59074*a - 38466, -2794746*a - 1751254)
83026402989233316959225
curve 7 :  (0, -1, 1, -110*a + 320, 47030*a - 76094)
174643179603485750245
curve 8 :  (0, -1, 1, 390*a + 300, 4322*a + 908) 107026473484575847961
curve 9 :  (0, -1, 1, -390*a + 690, -4322*a + 5230)
107026473484575847961
curve 10 :  (0, -1, 1, 110*a + 210, -47030*a - 29064)
174643179603485750245
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrrrrrrr} 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 5 & 0 & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{array}\right)
curve 0 :  (0, -1, 1, 0, 0) 121
curve 1 :  (0, -1, 1, -10, -20) 121
curve 2 :  (0, -1, 1, -7820, -263580) 121
curve 3 :  (0, a + 1, 1, -543074*a - 362966, -261178146*a - 163231804) 652098911521882337515422475
curve 4 :  (0, a + 1, 1, -39824*a - 27466, -3448146*a - 2150554) 83026402989233316959225
curve 5 :  (0, a + 1, 1, -562324*a - 373966, -260524746*a - 162832504) 652098911521882337515422475
curve 6 :  (0, a + 1, 1, -59074*a - 38466, -2794746*a - 1751254) 83026402989233316959225
curve 7 :  (0, -1, 1, -110*a + 320, 47030*a - 76094) 174643179603485750245
curve 8 :  (0, -1, 1, 390*a + 300, 4322*a + 908) 107026473484575847961
curve 9 :  (0, -1, 1, -390*a + 690, -4322*a + 5230) 107026473484575847961
curve 10 :  (0, -1, 1, 110*a + 210, -47030*a - 29064) 174643179603485750245
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrrrrrrr} 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 5 & 0 & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 5 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{array}\right)
############## 
       
w=walltime() CA31 = EllipticCurve(K,[1,-a-1,a,0,0]) time isogeny_printer(CA31) walltime(w) 
       
curve 0 :  (1, -a - 1, a, 0, 0) 31
curve 1 :  (1, -a - 1, a, -5, -3*a + 3) 31
curve 2 :  (1, -a - 1, a, -40*a - 30, -130*a - 76) 31
curve 3 :  (1, -a - 1, a, 40*a - 60, -148*a + 214) 31
curve 4 :  (1, -a - 1, a, -690*a - 415, -9797*a - 6031) 31
curve 5 :  (1, -a - 1, a, -30*a - 45, -111*a - 117) 31
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
Time: CPU 41.73 s, Wall: 41.85 s 41.875041007995605
curve 0 :  (1, -a - 1, a, 0, 0) 31
curve 1 :  (1, -a - 1, a, -5, -3*a + 3) 31
curve 2 :  (1, -a - 1, a, -40*a - 30, -130*a - 76) 31
curve 3 :  (1, -a - 1, a, 40*a - 60, -148*a + 214) 31
curve 4 :  (1, -a - 1, a, -690*a - 415, -9797*a - 6031) 31
curve 5 :  (1, -a - 1, a, -30*a - 45, -111*a - 117) 31
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
Time: CPU 41.73 s, Wall: 41.85 s 41.875041007995605
CA = EllipticCurve(K,[1,a+1,a,a,0]) time isogeny_printer(CA) 
       
curve 0 :  (1, a + 1, a, a, 0) 31
curve 1 :  (1, a + 1, a, a - 5, 3*a - 5) 31
curve 2 :  (1, a + 1, a, 41*a - 70, 170*a - 276) 31
curve 3 :  (1, a + 1, a, -39*a - 20, 108*a + 46) 31
curve 4 :  (1, a + 1, a, 31*a - 75, 141*a - 303) 31
curve 5 :  (1, a + 1, a, 691*a - 1105, 10487*a - 16933) 31
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
Time: CPU 43.53 s, Wall: 43.76 s
curve 0 :  (1, a + 1, a, a, 0) 31
curve 1 :  (1, a + 1, a, a - 5, 3*a - 5) 31
curve 2 :  (1, a + 1, a, 41*a - 70, 170*a - 276) 31
curve 3 :  (1, a + 1, a, -39*a - 20, 108*a + 46) 31
curve 4 :  (1, a + 1, a, 31*a - 75, 141*a - 303) 31
curve 5 :  (1, a + 1, a, 691*a - 1105, 10487*a - 16933) 31
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
Time: CPU 43.53 s, Wall: 43.76 s
CE = EllipticCurve(K,[a,-a+1,1,-1,0]) time isogeny_printer(CE) 
       
curve 0 :  (a, -a + 1, 1, -1, 0)
curve 1 :  (a, -a + 1, 1, -5*a + 9, -8*a + 6)
curve 2 :  (a, -a + 1, 1, -45*a - 151, -264*a - 858)
curve 3 :  (a, -a + 1, 1, -3365*a - 12621, -229016*a - 564210)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr} 0 & 3 & 0 & 0 \\ 3 & 0 & 3 & 0 \\ 0 & 3 & 0 & 3 \\ 0 & 0 & 3 & 0 \end{array}\right)
Time: CPU 22.44 s, Wall: 22.60 s
curve 0 :  (a, -a + 1, 1, -1, 0)
curve 1 :  (a, -a + 1, 1, -5*a + 9, -8*a + 6)
curve 2 :  (a, -a + 1, 1, -45*a - 151, -264*a - 858)
curve 3 :  (a, -a + 1, 1, -3365*a - 12621, -229016*a - 564210)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr} 0 & 3 & 0 & 0 \\ 3 & 0 & 3 & 0 \\ 0 & 3 & 0 & 3 \\ 0 & 0 & 3 & 0 \end{array}\right)
Time: CPU 22.44 s, Wall: 22.60 s
time isogeny_printer(CE) 
       
curve 0 :  (a, -a + 1, 1, -1, 0)
curve 1 :  (a, -a + 1, 1, -5*a + 9, -8*a + 6)
curve 2 :  (a, -a + 1, 1, -45*a - 151, -264*a - 858)
curve 3 :  (a, -a + 1, 1, -3365*a - 12621, -229016*a - 564210)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr} 0 & 3 & 0 & 0 \\ 3 & 0 & 3 & 0 \\ 0 & 3 & 0 & 3 \\ 0 & 0 & 3 & 0 \end{array}\right)
Time: CPU 7.63 s, Wall: 7.63 s
curve 0 :  (a, -a + 1, 1, -1, 0)
curve 1 :  (a, -a + 1, 1, -5*a + 9, -8*a + 6)
curve 2 :  (a, -a + 1, 1, -45*a - 151, -264*a - 858)
curve 3 :  (a, -a + 1, 1, -3365*a - 12621, -229016*a - 564210)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr} 0 & 3 & 0 & 0 \\ 3 & 0 & 3 & 0 \\ 0 & 3 & 0 & 3 \\ 0 & 0 & 3 & 0 \end{array}\right)
Time: CPU 7.63 s, Wall: 7.63 s
CF = EllipticCurve(K,[0,a,1,1,0]) isogeny_printer(CF,fsize=(7,5)) 
       
curve 0 :  (0, a, 1, 1, 0)
curve 1 :  (0, a, 1, 30*a - 59, 102*a - 186)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 0 & 5 \\ 5 & 0 \end{array}\right)
curve 0 :  (0, a, 1, 1, 0)
curve 1 :  (0, a, 1, 30*a - 59, 102*a - 186)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 0 & 5 \\ 5 & 0 \end{array}\right)
print ap(CF,3) 
       
CG = EllipticCurve(K,[1,-1,a,-2*a,a]) time isogeny_printer(CG) 
       
CH = EllipticCurve(K,[1,-1,1,-5,-7]) #126 A in Cremona's tables isogeny_printer(CH) 
       
curve 0 :  (1, -1, 1, -5, -7)
curve 1 :  (1, -1, 1, -95, -331)
curve 2 :  (1, -1, 1, 40, 155)
curve 3 :  (1, -1, 1, -320, 1883)
curve 4 :  (1, -1, 1, -1535, 23591)
curve 5 :  (1, -1, 1, -24575, 1488935)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 3 & 0 & 0 & 0 \\ 2 & 0 & 0 & 3 & 0 & 0 \\ 3 & 0 & 0 & 2 & 3 & 0 \\ 0 & 3 & 2 & 0 & 0 & 3 \\ 0 & 0 & 3 & 0 & 0 & 2 \\ 0 & 0 & 0 & 3 & 2 & 0 \end{array}\right)
curve 0 :  (1, -1, 1, -5, -7)
curve 1 :  (1, -1, 1, -95, -331)
curve 2 :  (1, -1, 1, 40, 155)
curve 3 :  (1, -1, 1, -320, 1883)
curve 4 :  (1, -1, 1, -1535, 23591)
curve 5 :  (1, -1, 1, -24575, 1488935)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 3 & 0 & 0 & 0 \\ 2 & 0 & 0 & 3 & 0 & 0 \\ 3 & 0 & 0 & 2 & 3 & 0 \\ 0 & 3 & 2 & 0 & 0 & 3 \\ 0 & 0 & 3 & 0 & 0 & 2 \\ 0 & 0 & 0 & 3 & 2 & 0 \end{array}\right)
J = EllipticCurve(K,[a+1,-a-1,1,-2*a-2,-a-1]) time isogeny_printer(J,fsize=(20,20)) 
       
curve 0 :  (a + 1, -a - 1, 1, -2*a - 2, -a - 1)
curve 1 :  (a + 1, -a - 1, 1, -41617*a - 41617, 5859391*a + 4394543)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 0 & 37 \\ 37 & 0 \end{array}\right)
Time: CPU 189.24 s, Wall: 189.25 s
curve 0 :  (a + 1, -a - 1, 1, -2*a - 2, -a - 1)
curve 1 :  (a + 1, -a - 1, 1, -41617*a - 41617, 5859391*a + 4394543)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rr} 0 & 37 \\ 37 & 0 \end{array}\right)
Time: CPU 189.24 s, Wall: 189.25 s
CT = EllipticCurve(K,[0,0,0,6,7]) #144 B in Cremona's tables time isogeny_printer(CT) 
       
curve 0 :  (0, 0, 0, 6, 7)
curve 1 :  (0, 0, 0, -39, 70)
curve 2 :  (0, 0, 0, -219, -1190)
curve 3 :  (0, 0, 0, -579, 5362)
curve 4 :  (0, 0, 0, -3459, -78302)
curve 5 :  (0, 0, 0, 141, -4718)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
Time: CPU 23.56 s, Wall: 23.56 s
curve 0 :  (0, 0, 0, 6, 7)
curve 1 :  (0, 0, 0, -39, 70)
curve 2 :  (0, 0, 0, -219, -1190)
curve 3 :  (0, 0, 0, -579, 5362)
curve 4 :  (0, 0, 0, -3459, -78302)
curve 5 :  (0, 0, 0, 141, -4718)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrr} 0 & 2 & 0 & 0 & 0 & 0 \\ 2 & 0 & 2 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 2 & 2 \\ 0 & 2 & 0 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 & 0 \end{array}\right)
Time: CPU 23.56 s, Wall: 23.56 s
CW = EllipticCurve(K,[1,1,1,37,281]) #150 C in Cremona's Tables time isogeny_printer(CW) 
       
curve 0 :  (1, 1, 1, 37, 281)
curve 1 :  (1, 1, 1, -463, 3281)
curve 2 :  (1, 0, 1, -14, -64)
curve 3 :  (1, 1, 1, -1713, -24219)
curve 4 :  (1, 1, 1, -7213, 232781)
curve 5 :  (1, 0, 1, -334, -2368)
curve 6 :  (1, 0, 1, -5334, -150368)
curve 7 :  (1, 0, 1, -454, -544)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrrrr} 0 & 2 & 3 & 0 & 0 & 0 & 0 & 0 \\ 2 & 0 & 0 & 2 & 2 & 3 & 0 & 0 \\ 3 & 0 & 0 & 0 & 0 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 & 0 & 3 & 0 \\ 0 & 2 & 0 & 0 & 0 & 0 & 0 & 3 \\ 0 & 3 & 2 & 0 & 0 & 0 & 2 & 2 \\ 0 & 0 & 0 & 3 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 3 & 2 & 0 & 0 \end{array}\right)
Time: CPU 37.67 s, Wall: 37.67 s
curve 0 :  (1, 1, 1, 37, 281)
curve 1 :  (1, 1, 1, -463, 3281)
curve 2 :  (1, 0, 1, -14, -64)
curve 3 :  (1, 1, 1, -1713, -24219)
curve 4 :  (1, 1, 1, -7213, 232781)
curve 5 :  (1, 0, 1, -334, -2368)
curve 6 :  (1, 0, 1, -5334, -150368)
curve 7 :  (1, 0, 1, -454, -544)
\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrrrrrr} 0 & 2 & 3 & 0 & 0 & 0 & 0 & 0 \\ 2 & 0 & 0 & 2 & 2 & 3 & 0 & 0 \\ 3 & 0 & 0 & 0 & 0 & 2 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 & 0 & 3 & 0 \\ 0 & 2 & 0 & 0 & 0 & 0 & 0 & 3 \\ 0 & 3 & 2 & 0 & 0 & 0 & 2 & 2 \\ 0 & 0 & 0 & 3 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 0 & 3 & 2 & 0 & 0 \end{array}\right)
Time: CPU 37.67 s, Wall: 37.67 s
 
       
################################################################################ 
       
import nosqlite db = nosqlite 
       
'[a,2,1,43,3]' == '[a,2,1,43,3]' 
       
True
True
f = open( 
       
def grabber(s): return '['+s.split('[')[1].split(']')[0]+']' #returns a-invariants def dictionary_entry_maker(s): 
       
def grabber(s): return '['+s.split('[')[1].split(']')[0]+']' #returns a-invariants data=[] isowidth = 0 ainvwidth = 0 #primes_in_table = set([]) for line in f.readlines(): isooutput = isogeny_primes_readin(200,1000,line) isostring = '[' astring = grabber(line) for i in isooutput: #primes_in_table.add(i) isostring += str(i) isostring += ',' if len(isooutput)>=1: isostring = isostring[:-1] isostring += ']' if len(isostring)>isowidth: isowidth = len(isostring) if len(astring)>ainvwidth: ainvwidth = len(astring) data.append(line[0:20]+isostring+(12-len(isostring))*' '+astring) lnwidth = 32 + ainvwidth + 3 #print primes_in_table #awidth = lnwidth+ainvwidth+2 g = open('/Users/bleveque/Sage/IsogenyTable7.txt','w') for current_data in data: returnstr = current_data returnstr += (lnwidth - len(current_data))*' ' returnstr += '\n' g.write(returnstr) 
       
co = 4 dictiona['%s'%co]=3 dictiona 
       
{'1': 3, '4': 3}
{'1': 3, '4': 3}
f = 'adsfsda adfasdfaewf adfawefawef efwfaefef rfwearewfwef rfewfaergaer' f.split() 
       
['adsfsda', 'adfasdfaewf', 'adfawefawef', 'efwfaefef', 'rfwearewfwef',
'rfewfaergaer']
['adsfsda', 'adfasdfaewf', 'adfawefawef', 'efwfaefef', 'rfwearewfwef', 'rfewfaergaer']
f.split()[0] 
       
'adsfsda'
'adsfsda'
K.ideal(5).denominator_ideal() 
       
Traceback (click to the left of this block for traceback)
...
AttributeError: 'NumberFieldFractionalIdeal' object has no attribute
'denominator_ideal'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_5.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Sy5pZGVhbCg1KS5kZW5vbWluYXRvcl9pZGVhbCgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmp79vjQP/___code___.py", line 3, in <module>
    exec compile(u'K.ideal(_sage_const_5 ).denominator_ideal()
  File "", line 1, in <module>
    
  File "element.pyx", line 328, in sage.structure.element.Element.__getattr__ (sage/structure/element.c:2790)
  File "parent.pyx", line 277, in sage.structure.parent.getattr_from_other_class (sage/structure/parent.c:2930)
  File "parent.pyx", line 177, in sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2726)
AttributeError: 'NumberFieldFractionalIdeal' object has no attribute 'denominator_ideal'
 
       
def isogeny_primes(E, norm_bound, isog_degree_bound): #Returns prime for which E has an isogeny P = [p for p in sqrt5.ideals_of_bounded_norm(norm_bound) if p.is_prime() and E.has_good_reduction(p)] w = set(primes(isog_degree_bound+1)) i = 0 w.remove(2) while len(w) > 0 and i < len(P): d = disc(E, P[i]) w = [ell for ell in w if not (legendre_symbol(d,ell) == -1)] i = i +1 i = 0 while i < len(P): if frob(E,P[i]).is_irreducible(): break i = i+1 if i == len(P): w.insert(0,2) return w 
       
E = EllipticCurve(K,[0,a+1,1,-562324*a-373966,-260524746*a-162832504]) isogeny_primes(E,1000,1000) 
       
[]
[]
F = EllipticCurve(K,[0,-1,1,0,0]) isogeny_primes(F,1000,1000) 
       
[5]
[5]
F.is_isogenous(E) 
       
False
False