This worksheet will do al computations pertaining to table 1(isogenous curves, rank, labels, etc.), table 3( ap list to a bound of choice), and table 4( values pertaining to the Birch Swinnerton-Dyer Conjecture).

In the next table, it will set the Number field to that of what is wanted, and creates local database, simply for storage. 

Lastly, there is a label , where one should input his/her method of finding the curves before continuing, as this is beefical to know how the curve was initially discovered.

One only has to evaluate all after setting what text file to open. The  file must have is the Norm of the conductor, the conductor, and the weierstrass equation, in that order.

{{{id=1| x = var('x') K.=NumberField(x^2-x-1) import psage.modform.hilbert.sqrt5.tables as sqrt5 import nosqlite db=nosqlite.Client(DATA+'localdb').db db2=nosqlite.Client('/home/psharaba/EC2kdb').db from psage.ellcurve.minmodel.sqrt5 import canonical_model label='NA' g=open('/home/psharaba/EC2k/matched.txt') /// }}} {{{id=129| db.N2k.count() /// (1292,) }}} {{{id=120| def galois_conjugate(alpha): if isinstance(alpha, Integer): return alpha return alpha[0]+alpha[1]*(1-a) /// }}} {{{id=122| db.curves.delete() /// }}} {{{id=125| K.ideal(5*a-2).gens_reduced()[0] /// 5*a - 2 }}} {{{id=123| db.curves.insert({'N':31, 'cond': '5*a-2', 'weq': '[1,a+1,a,a,0]'}) /// }}} {{{id=121| k=0 for t in g.readlines(): c=t.split() E = EllipticCurve(K,eval(c[27])) J1 = K.ideal(K(eval(c[1]))) J2 = K.ideal(galois_conjugate(K(eval(c[1])))) F = E.global_minimal_model() F1 = canonical_model(F) F = F1.a_invariants() E2 = EllipticCurve(K, [galois_conjugate(K(alpha)) for alpha in F]) F2 = E2.global_minimal_model() F3 = canonical_model(F2) F2 = F3.a_invariants() G1 = str([F[0],F[1],F[2],F[3],F[4]]).replace(' ','') G2 = str([F2[0],F2[1],F2[2],F2[3],F2[4]]).replace(' ','') print F1, F3 H = list(db.curves.find(weq=G1))+list(db.curves.find(weq=G2)) L = len(H) if L==0: db.curves.insert({'N': int(c[0]), 'cond': c[1], 'weq': G1,'found': label }) if J1==J2: try: if F1.is_isogenous(F3): continue except NotImplementedError: continue db.curves.insert({'N': int(c[0]), 'cond': str(J2.gens_reduced()[0]).replace(' ','') , 'weq': G2,'found': label }) k+=1 print k print ' ' print db.curves.count() /// WARNING: Output truncated! full_output.txt Elliptic Curve defined by y^2 + a*x*y = x^3 + x^2 + (-6*a-2)*x + (4*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-a+1)*x^2 + (6*a-8)*x + (-4*a+8) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (-1)*x^2 + (-4)*x + (-3*a+3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-a)*x^2 + (-2*a-2)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a-1)*x^2 + (-6*a+1)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + (-a)*x^2 + (5*a-4)*x + (-3*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + (-a)*x^2 + (5*a-4)*x + (-3*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a-1)*x^2 + (-6*a+1)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (a+1)*x^2 + (-24*a-15)*x + (41*a+25) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + a*x^2 + (27*a-42)*x + (-82*a+133) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-a)*x^2 + (-2*a-2)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (-1)*x^2 + (-4)*x + (-3*a+3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (-2*a-2)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-1)*x^2 + (-2)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-1)*x^2 + (-2)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (-2*a-2)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (3*a-7)*x + (-6*a+9) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (-3*a-4)*x + (6*a+3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (-3*a-4)*x + (6*a+3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (3*a-7)*x + (-6*a+9) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (-a-1)*x + (a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (a-2)*x + (-a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + a*x^2 + (-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a+1)*x^2 + (-1)*x + (a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a+1)*x^2 + (-1)*x + (a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + a*x^2 + (-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + x^2 + (a-2)*x + (a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + x^2 + (-a-1)*x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + x^2 + (-a-1)*x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + x^2 + (a-2)*x + (a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (a-1)*x^2 + (-1)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a)*x^2 + (-1)*x + a over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a)*x^2 + (-1)*x + a over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (a-1)*x^2 + (-1)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a+1)*x^2 + (-a-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (2*a-3)*x + (-2*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-1)*x^2 + (-3*a-3)*x + (3*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (-a)*x^2 + (3*a-6)*x + (-3*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (-a)*x^2 + (3*a-6)*x + (-3*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-1)*x^2 + (-3*a-3)*x + (3*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (2*a-3)*x + (-2*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a+1)*x^2 + (-a-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-a-1)*x^2 + (a-1)*x + (2*a-4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + (a+1)*x^2 + (a-1)*x + (-3*a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-a+1)*x^2 + (2*a-3)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + a*x^2 + (-2*a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + a*x^2 + (-2*a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-a+1)*x^2 + (2*a-3)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a-1)*x^2 + (-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-1)*x^2 + (-a)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-1)*x^2 + (-a)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a-1)*x^2 + (-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + (-1)*x^2 + (-a-1)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-a)*x^2 + (-a-1)*x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-a)*x^2 + (-a-1)*x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + (-1)*x^2 + (-a-1)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (a-1)*x^2 + (-8*a-7)*x + (11*a+10) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + a*x^2 + (9*a-15)*x + (-18*a+29) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a-1)*x^2 + (-3*a-1)*x + (5*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-1)*x^2 + (2*a-3)*x + (-5*a+7) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + a*x^2 + (9*a-15)*x + (-18*a+29) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (a-1)*x^2 + (-8*a-7)*x + (11*a+10) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + x^2 + (-a-2)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + x^2 + (-2)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (-4*a-2)*x + (7*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a+1)*x^2 + (5*a-6)*x + (-4*a+6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-a+1)*x^2 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + a*x^2 + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + x^2 + (-2)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + x^2 + (-a-2)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + x^2 + (-a-2)*x + (-3*a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (a-4)*x + (a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (a-4)*x + (a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + x^2 + (-a-2)*x + (-3*a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a+1)*x^2 + (5*a-6)*x + (-4*a+6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a-1)*x^2 + (-4*a-2)*x + (7*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + a*x^2 + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-a+1)*x^2 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (a-1)*x^2 + (-a-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + a*x^2 + (a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a-1)*x^2 + x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a+1)*x^2 + (a+1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a+1)*x^2 + (a+1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a-1)*x^2 + x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + a*x^2 + (a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (a-1)*x^2 + (-a-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (-a+1)*x^2 + (11*a-18)*x + (29*a-47) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-11*a-7)*x + (-29*a-18) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-11*a-7)*x + (-29*a-18) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (-a+1)*x^2 + (11*a-18)*x + (29*a-47) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (a-1)*x^2 + (-4*a-1)*x + (-4*a-4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-a)*x^2 + (4*a-5)*x + (4*a-8) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + y = x^3 + (-1)*x^2 + (a-7)*x + (-2*a+8) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + y = x^3 + (-1)*x^2 + (-a-6)*x + (2*a+6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + y = x^3 + (-1)*x^2 + (-a-6)*x + (2*a+6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + y = x^3 + (-1)*x^2 + (a-7)*x + (-2*a+8) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (-1)*x^2 + (-a)*x + 1 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-a-1)*x^2 + (a-1)*x + 1 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-a-1)*x^2 + (a-1)*x + 1 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (-1)*x^2 + (-a)*x + 1 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (a+1)*x^2 + 2*a*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + a*x^2 + (-a)*x + (-2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-a+1)*x^2 + (3*a-5)*x + (-2*a+3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + x^2 + (-3*a-2)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + x^2 + (-3*a-2)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-a+1)*x^2 + (3*a-5)*x + (-2*a+3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + a*x^2 + (-a)*x + (-2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (a+1)*x^2 + 2*a*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-a+1)*x^2 + (a-5)*x + (-2*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-2*a-4)*x + 2*a over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + a*x^2 + a*x + (a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a+1)*x^2 + (-2*a+1)*x + (-2*a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a+1)*x^2 + (-2*a+1)*x + (-2*a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + a*x^2 + a*x + (a-2) over Number Field in a with defining polynomi ... Elliptic Curve defined by y^2 + a*y = x^3 + x^2 + (4*a-5)*x + (-3*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + x^2 + (-4*a-1)*x + (2*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (2*a-5)*x + (2*a-5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + (-3*a-2)*x + (-3*a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + (-3*a-2)*x + (-3*a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (2*a-5)*x + (2*a-5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + y = x^3 + (-a-2)*x + (a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + y = x^3 + (a-3)*x + (-a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + y = x^3 + (a-3)*x + (-a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + y = x^3 + (-a-2)*x + (a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-1)*x^2 + (-6)*x + (-5*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + (-a-1)*x^2 + (-2*a-5)*x + (4*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + (-a-1)*x^2 + (-2*a-5)*x + (4*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-1)*x^2 + (-6)*x + (-5*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (a+1)*x^2 + x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (a-1)*x^2 + a*x + 1 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (a-1)*x^2 + a*x + 1 over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (a+1)*x^2 + x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + x^2 + (2*a-3)*x + (-a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-a+1)*x^2 + (-2*a-1)*x + (a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (-a+1)*x^2 + (-2*a-1)*x + (a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + x^2 + (2*a-3)*x + (-a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + a*x^2 + x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (a+1)*x^2 + (3*a+2)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + (a+1)*x^2 + (3*a+2)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + a*x^2 + x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (-3*a-4)*x + (5*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (3*a-7)*x + (-5*a+10) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + (-a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-a+1)*x^2 + (-a-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (3*a-7)*x + (-5*a+10) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-1)*x^2 + (-3*a-4)*x + (5*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + (a+1)*y = x^3 + (-a+1)*x^2 + (-a-1)*x + (-a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + (-a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + a*x^2 + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (a-1)*x^2 + (a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y = x^3 + (a-1)*x^2 + (a-1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + a*x^2 + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-4*a-4)*x + (-4*a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-4*a-4)*x + (-4*a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + x^2 + 3*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + x^2 + 3*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-a-1)*x^2 + (-3*a-3)*x + (-2*a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + x^2 + (4*a-5)*x + (5*a-8) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y = x^3 + x^2 + (4*a-5)*x + (5*a-8) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-a-1)*x^2 + (-3*a-3)*x + (-2*a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-a)*x^2 + (-2)*x + (a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (-1)*x^2 + (-2*a-2)*x + (-2*a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + (a+1)*y = x^3 + (-1)*x^2 + (-2*a-2)*x + (-2*a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (-a)*x^2 + (-2)*x + (a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + x^2 + (-a+2)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a+1)*x^2 + x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (a-1)*x^2 + 2*a*x + (a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + a*x^2 + (-2*a+3)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a+1)*x^2 + x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + x^2 + (-a+2)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + a*x^2 + 4*x + (2*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (-a+1)*x^2 + (-a+4)*x + (-3*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + a*y = x^3 + a*x^2 + (-2*a+3)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + a*y = x^3 + (a-1)*x^2 + 2*a*x + (a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + x^2 + (-2*a+3)*x + (-3*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a+1)*x^2 + (a+1)*x + (3*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + x^2 + (a-4)*x + (2*a-6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + x^2 + (-2*a-3)*x + (-3*a-4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + x^2 + (-2*a-3)*x + (-3*a-4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + x^2 + (a-4)*x + (2*a-6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a+1)*x^2 + (a+1)*x + (3*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + x^2 + (-2*a+3)*x + (-3*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-1)*x^2 + (-3*a+2)*x + (a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-a)*x^2 + 2*a*x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-a)*x^2 + 2*a*x + (-a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-1)*x^2 + (-3*a+2)*x + (a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + y = x^3 + (-a-1)*x^2 + (2*a-1)*x + (3*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (a+1)*x^2 + x + (-4*a+5) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a)*x^2 + (2*a-3)*x + (-a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (a-1)*x^2 + (-2*a-1)*x + (a-3) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (-2*a-1)*x + (2*a+2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (2*a-3)*x + (-2*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (-3*a)*x + a over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (3*a-3)*x + (-a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + a*x^2 + (-a+1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a+1)*x^2 + a*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (-4*a-4)*x + (8*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-1)*x^2 + (4*a-8)*x + (-8*a+12) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (4*a-7)*x + (4*a-6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-4*a-3)*x + (-4*a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-a+1)*x^2 + a*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + a*x^2 + (-a+1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (-4*a-3)*x + (-4*a-2) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 = x^3 + (4*a-7)*x + (4*a-6) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + a*x^2 + a*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-a+1)*x^2 + (-a+1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-a+1)*x^2 + (-a+1)*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + a*x^2 + a*x over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a-1)*x^2 + (-2)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-1)*x^2 + (-a-1)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*x*y + y = x^3 + (-1)*x^2 + (-a-1)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*x*y + y = x^3 + (-a-1)*x^2 + (-2)*x + (-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + (-1)*x^2 + (a-1)*x + (-2*a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-1)*x^2 + (-a)*x + (a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-a-1)*x^2 + (6*a-8)*x + (-8*a+12) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + (a+1)*x^2 + (-4*a-3)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + (a+1)*x^2 + (-4*a-3)*x + (2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-a-1)*x^2 + (6*a-8)*x + (-8*a+12) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + a*y = x^3 + (-1)*x^2 + (-a)*x + (a-1) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + (a+1)*y = x^3 + (-1)*x^2 + (a-1)*x + (-2*a) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-a+1)*x^2 + (-5*a-2)*x + (6*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + a*x^2 + (5*a-7)*x + (-6*a+10) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + a*x^2 + (5*a-7)*x + (-6*a+10) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y = x^3 + (-a+1)*x^2 + (-5*a-2)*x + (6*a+4) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a-1)*x^2 + (-8*a-5)*x + (-15*a-9) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + (-a)*x^2 + (7*a-12)*x + (14*a-23) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + a*y = x^3 + (-a)*x^2 + (7*a-12)*x + (14*a-23) over Number Field in a with defining polynomial x^2 - x - 1 Elliptic Curve defined by y^2 + x*y + (a+1)*y = x^3 + (a-1)*x^2 + (-8*a-5)*x + (-15*a-9) over Number Field in a with defining polynomial x^2 - x - 1 531 (602,) }}} {{{id=124| db.curves.delete('N=31') /// }}}

This is simply the list of all commands needed to compute the various isogenous curves. 

{{{id=2| def ap(E,p): return E.change_ring(p.residue_field()).trace_of_frobenius() R. = 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 closed_under_multiplication_by_m(E, f, m): """ INPUT: - E -- elliptic curve in *short* Weierstrass form - f -- a polynomial that defines a finite subset S of E[p] that is closed under [-1] - m -- integer m >= 2 coprime to p. We assume that p is odd. OUTPUT: - True if [m]*S = S, and False otherwise. """ K = E.base_field() h = E.multiplication_by_m(m, x_only=True) n = h.numerator(); d = h.denominator() S. = K[] psi = n.parent().hom([x,0]) tau = f.parent().hom([x]) r = tau(f).resultant(psi(n)-Z*psi(d), x) r0 = S.hom([0,f.parent().gen()])(r) return r0.monic() == f.monic() def is_subgroup(E, f, p): """ INPUT: - E -- elliptic curve in *short* Weierstrass form - f -- a polynomial that defines a finite subset S of E[p] that is closed under [-1] - p -- an odd prime OUTPUT: - True exactly if S union {0} is a group. """ m = primitive_root(p) return closed_under_multiplication_by_m(E, f, m) def isogeny_class_computation(E, p): if p != 2: E = E.short_weierstrass_model() F = E.division_polynomial(p).change_ring(K) candidates = [f for f in divisors(F) if f.degree() == (p-1)/2 and is_subgroup(E,f,p)] v = [] w = [] for f in candidates: try: v.append(E.change_ring(K).isogeny(f).codomain()) w.append(f) 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_vector(E): #Returns isogeny class and adjacency matrix curve_list = [E] i = 0 Adj = matrix(50) ins = 1 norm_bound, isog_degree_bound = 500,500 while i < len(curve_list): isolist = isogeny_primes(curve_list[i],norm_bound, isog_degree_bound) 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.global_minimal_model()) 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':curve_list, 'adjacency_matrix':Adj, 'norm_bound':norm_bound, 'isog_degree_bound':isog_degree_bound, 'subgroup_checked':True} /// }}}

This function simply reads in the text file(opened from the beginning, please make sure you specify the file to be opened above). This function will insert the Norm(N), conductor(cond), the weierstrass equation(weq), and the way the curve was discovered(found).

{{{id=5| for s in g.readlines(): A=s.split() db.curves.insert({'N':int(A[0]), 'cond': A[1], 'weq': A[2], 'found': label}) /// }}} {{{id=119| /// }}}

This function computes the isogenous curves to the curves read in from the file. It will then update the temporary database with a list of isogenous curves, and the corresponding adjancy matrix(that will be used to construct the graph of the isogeny class). 

{{{id=3| %time X = db('select weq,N from curves order by N') for r1 in range(len(X)): weq1=X[r1][0] weq2=eval(X[r1][0]) E = EllipticCurve(K, weq2) iso = curve_isogeny_vector(E) Tot=iso['curve_list'] India=iso['adjacency_matrix'] hotel=[] for g1 in range(len(Tot)): A=list(Tot[g1].a_invariants()) hotel.append(str(A).replace(' ','')) db.curves.update({'isoclass':str(hotel), 'mtrx': str(India)}, weq=str(weq1)) print r1 /// WARNING: Output truncated! full_output.txt 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 ... 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 CPU time: 7280.73 s, Wall time: 8248.53 s }}}

This is simply defining the function to compute the L* value that is found in the Birch Swinnerton-Dyer (BSD) Conjecture. Since the L* value will be the same for curves in the same isogeny, it will be computed now to save time.

{{{id=94| from psage.ellcurve.lseries.lseries_nf import lseries_dokchitser def l_function(ainv): E=EllipticCurve(K,eval(ainv)) F=EllipticCurve(K,list(E.short_weierstrass_model().a_invariants())) v=lseries_dokchitser(F) f=v.taylor_series(1,6) r_an=0 while abs(f[r_an])<1e-10: r_an += 1 if r_an == 6: raise RuntimeError l=float(f[r_an]) return l /// }}}

This function will fix the adjancy matrix so that it will be compatible with the database, and easier to read. This function will also do the computation of the L* value and update the database with both the L* and the revised adjancy matrix.

{{{id=31| %time test=db('select weq,mtrx,isoclass from curves order by N') for s in range(len(test)): A=str(test[s][1]).replace('\n','') A=A.replace('][',',') A='('+A.replace(' ',',')+')' B=len(eval(test[s][2])) M=matrix(B,eval(A)) mat = "matrix(%s,%s)"%(M.nrows(),str(M.list()).replace(' ','')) Lstar=l_function(test[s][0]) db.curves.update({'mtrx':mat, 'L':Lstar},weq=test[s][0]) /// CPU time: 1022.86 s, Wall time: 2274.61 s }}}

This function now splits up each curve(i.e. the curves within the same isogeny class) and inserts them into another temporary database so that the computation below can calculate all information about each curve. This also adds on the I to the label to indicate that the curves found through isogeny are properly labeled.

{{{id=7| %time test=db('select N,cond,weq,isoclass,mtrx,found, L from curves order by N') for s in range(len(test)): A=test[s] db.curvesU.insert({'N':A[0], 'cond': A[1], 'weq': A[2], 'mtrx': A[4],'mtrx_order': 0, 'found': A[5], 'L': A[6]}) B=eval(A[3]) for t in range(1,len(B)): E=EllipticCurve(K,eval(B[t])) F=canonical_model(E.global_minimal_model()).a_invariants() G=str([F[0],F[1],F[2],F[3],F[4]]).replace(' ','') db.curvesU.insert({'N':A[0], 'cond': A[1], 'weq': G, 'mtrx':A[4],'mtrx_order': int(t), 'found':A[5]+'I', 'L': A[6]}) /// CPU time: 193.85 s, Wall time: 398.10 s }}}

This function below will compute all necesary things for each curve. This includes the rank bounds, order of the torsion subgroup, the signs of the curve, the order of the discriminant, the order of the j-invaraint, the tamagawa numbers, and the kodiara symbols, while inserting the label, adjancy matrix, and the L* in the process.

{{{id=127| db.curvesU.delete() /// }}} {{{id=42| K.=NumberField(x^2-x-1) embs=K.embeddings(RR) #def grabber(s): # return eval('['+s.split('[')[1].split(']')[0]+']') #returns a-invariants def list_maker(N,cond,eqn): ret = [N,cond,eqn] # #we want to add new text to each line, so we take off # ret = [s] #\n first and define our list to eventually be returned #now we create the elliptic curve over K defined by the a-invariants E = EllipticCurve(K,eval(eqn)) T = E.torsion_subgroup() # calculations for rank bounds TI = T.invariants() # t2 = len([a for a in TI if a%2 == 0]) # simon = E.simon_two_descent() # ret.append(str(simon[0])) #append upper rank bound ret.append(str(simon[1] - t2)) #append lower rank bound D=K(E.discriminant()) #calculate discriminant t='' #create string to add + or - for m in embs: e=m(D) if sgn(e)<0: t+='-' else: t+='+' t+=',' ret.append(t[:-1]) #append disc signs tor=E.torsion_order() ret.append(tor) fac=D.factor() k=[str(e) for p,e in fac] #calculate disc ord ret.append(','.join(k)) #append disc ord #the next section adds ord_(j). There are certain curves (eg N=729 #2) which have #j-invariant 0. The denominator_ideal function is not defined for j=0, so we set #the value to be 1 if this is the case. # try: # denfac = K(E.j_invariant()).denominator_ideal().factor() # except ValueError: # denfac = [(1,1)] z=K(E.j_invariant()) if z: denfac=z.denominator_ideal().factor() if denfac: ret.append(','.join([str(e) for p,e in denfac])) else: ret.append('0') else: ret.append('0') #we still want a value for the table if denfac == [] # l=[str(e) for p,e in denfac] # ret.append(','.join(l)) #append j-ord ret.append(','.join([str(e) for e in E.tamagawa_numbers()])) #append tamagawa z = E.conductor().factor() ret.append(','.join([str(E.kodaira_symbol(p)) for p,e in z])) #append kodaira ret.append(B[3]) ret.append(B[4]) ret.append(B[5]) ret.append(B[6]) return ret /// }}}

This function will do the computations listed above, and insert them into a local text file for safekeeping. If there is an issue with a particular curve, it will simply insert it into the "broken" list. Please check to make sure this list is an empty list before continuing, as one might miss computing the rest of the worksheet to this curve.

{{{id=38| %time november=db('select N,cond,weq,mtrx,mtrx_order,found, L from curvesU ORDER BY N') data=[] broken=[] for s in range(len(november)): B=november[s] try: data.append(list_maker(B[0],B[1],B[2])) except TypeError: broken.append(B) g = open(DATA+'1.txt','w') for curr_data in data: for i,thing in enumerate(curr_data): curr_data[i] = str(thing) g.write(' '.join(curr_data)+'\n') #writes data to new file g ^^ g.close() /// CPU time: 922.65 s, Wall time: 3761.08 s }}} {{{id=45| broken /// [] }}}

This is the function of one of many values needed to order the curves and provide proper labeling for. This is the eta function defined below, which will be implemented below.

{{{id=47| def eta(alpha): return (alpha*alpha).trace() def find_small(alpha): while True: plus=a*alpha minus=alpha/a if eta(plus)This function simply inserts all the information computed above, but with some additions and some ordering. This function will take a curve with the data given from the local textfile, and take the curve and preform both the global minimal model, and the canonical model of the curve, and checks the database to see if the curve exist. If it does exist already, then the curve won't be inserted (this ensures no doubles). If it is unique, then it will compute the curve that is the galois of the initial curve. Then it computes the second conductor for this galois curve. using the two conductors, we take the ideal of the conductors in our field, and check the integral basis of both. If the galois conductor has a smaller integral basis than the other, we reverse the order in which the conductors and weierstrass equations are displayed in the table/database. If we have to switch the order, than the signs will also switch as the periods switch. After determining this, all the information will be inputed into the database which will be used for the remainder of the worksheet.

{{{id=126| db.N1k.delete() /// Traceback (most recent call last): File "", line 1, in File "_sage_input_68.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZGIuTjFrLmRlbGV0ZSgp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in File "/tmp/tmpJCWS3B/___code___.py", line 2, in exec compile(u'db.N1k.delete()' + '\n', '', 'single') File "", line 1, in File "/home/wstein/nosqlite/nosqlite.py", line 1025, in delete self.database(cmd) File "/home/wstein/nosqlite/nosqlite.py", line 592, in __call__ return self.client(cmds, t, file=self.name, many=many, coerce=coerce) File "/home/wstein/nosqlite/nosqlite.py", line 467, in __call__ return self.server.execute(cmd, t, file, many) File "/home/wstein/nosqlite/nosqlite.py", line 350, in execute o = cursor.execute(c) sqlite3.OperationalError: no such table: N1k }}} {{{id=46| %time f=open(DATA+'1.txt') for t in f.readlines(): c=t.split() E = EllipticCurve(K,eval(c[2])) #s=c[5] F = E.global_minimal_model() F = canonical_model(F).a_invariants() G1 = str([F[0],F[1],F[2],F[3],F[4]]).replace(' ','') #J1 = K.ideal(eval(c[1])) #db.N2k.insert({'N': int(J1.norm()), 'cond': str(J1.gen(0)).replace(' ',''), 'weq': G1,'rlow': int(c[3]), 'rhi': int(c[4]), 'T': int(c[6]), 's': s, 'ordD': c[7], 'ordj': c[8], 'c_p': c[9], 'K': c[10],'adj': c[11],'adj_order': c[12], 'found': c[13], 'L': float(c[14])}) db.N2k.update({'rlow': int(c[3]), 'rhi': int(c[4])}, weq= G1) /// CPU time: 280.55 s, Wall time: 299.09 s }}}

This is simply the function to compute the periods of the curves using the weierstrass equation that appears first in each row. See above for explaination on how this is determined.

{{{id=83| def period_stuff(E): w = [] v = [] for phi in K.embeddings(RR): B = E.period_lattice(phi).basis() a = B[0].real() if abs(B[1].real()) <1e-20: a *= 2 v.append(float(a)) w.append(B) return v[0], v[1] /// }}}

This computes the periods and the omega value while inserting them into the database.

{{{id=128| db.N2k.count() /// (1292,) }}} {{{id=130| db.N2k.columns() /// [u'rhi', u'ordj', u's', u'K', u'ordD', u'L', u'N', u'rlow', u'c_p', u'weq', u'adj_order', u'cond', u'T', u'found', u'adj', u'real1', u'real2', u'omega'] }}} {{{id=80| %time temp=db('select N,cond,weq from N2k ORDER BY N') for r in range(len(temp)): A=temp[r][2] p0,p1=period_stuff(EllipticCurve(K,eval(A))) db.N2k.update({'real1': float(p0), 'real2': float(p1),'omega':float(p0*p1)},weq=A) print r /// WARNING: Output truncated!
full_output.txt 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 ... 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 CPU time: 1902.07 s, Wall time: 5848.10 s }}} {{{id=133| E=EllipticCurve(K,[0,-2+a,0,1-a, 0]) /// }}} {{{id=140| E.change_weierstrass_model([1,1,0,0]).ainvs() /// (0, a + 1, 0, a, 0) }}} {{{id=139| canonical_model(E).ainvs() /// (0, a + 1, 0, a, 0) }}} {{{id=138| E.conductor() /// Fractional ideal (16) }}} {{{id=134| r1-k /// 19 }}} {{{id=143| db.N2k.columns() /// [u'rhi', u'ordj', u's', u'K', u'ordD', u'L', u'N', u'rlow', u'c_p', u'weq', u'adj_order', u'cond', u'T', u'found', u'adj', u'real1', u'real2', u'omega', u'rank'] }}} {{{id=132| data=[] temp=db('select N,cond,weq,rlow,rhi, rank,adj from N2k ORDER BY N') for r in temp: if r[5] is None: data.append((r)) /// }}} {{{id=145| temp=db('select N,cond,weq,rank, rlow,rhi from N2k ORDER by N') /// }}} {{{id=157| for r in temp: if r[3] is None: print r[4], r[5] /// }}} {{{id=158| db.N2k.count() /// (1292,) }}} {{{id=163| db.N2k.columns() /// Traceback (most recent call last): File "", line 1, in File "_sage_input_3.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("ZGIuTjJrLmNvbHVtbnMoKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in File "/tmp/tmpUy2aQd/___code___.py", line 2, in exec compile(u'db.N2k.columns()' + '\n', '', 'single') File "", line 1, in AttributeError: 'function' object has no attribute 'N2k' }}} {{{id=164| temp=db('SELECT N,cond,weq,rank,T,s,ordD,ordj,c_p,K,L,real1,real2,omega,adj,adj_order,found from N2k ORDER BY N') for r in temp: db2.N2k.insert({'N':r[0], 'cond': r[1], 'weq': r[2], 'rank': r[3], 'T': r[4], 's': r[5], 'ordD': r[6], 'ordj': r[7], 'c_p': r[8], 'K': r[9], 'L': r[10], 'real1': r[11], 'real2': r[12], 'omega': r[13], 'adj': r[14], 'adj_order': r[15], 'found': r[16]}) /// }}} {{{id=166| temp=db('SELECT N,cond,weq,rank,T,s,ordD,ordj,c_p,K,L,real1,real2,omega,adj,adj_order,found from N2k ORDER BY N') db.N2k.delete() for r in temp: db.N2k.insert({'N':r[0], 'cond': r[1], 'weq': r[2], 'T': r[4], 's': r[5], 'ordD': r[6], 'ordj': r[7], 'c_p': r[8], 'K': r[9], 'L': r[10], 'real1': r[11], 'real2': r[12], 'omega': r[13], 'adj': r[14], 'adj_order': r[15], 'found': r[16]}) /// }}} {{{id=165| test=db('SELECT N,cond,weq,rank,T,s,ordD,ordj,c_p,K,L,real1,real2,omega,adj,adj_order,found from N2kU ORDER BY N') temp[0]==test[0] /// True }}} {{{id=170| for r in data: if r[0]==1364: db.N2k.update({'rank':0},weq=r[2]) /// }}} {{{id=172| for r in temp: if r[5] is None: print r /// }}} {{{id=146| for r in temp: if r[5] is None: if r[0]==1045: #db.N2k.update({'rank': 0}, weq=r[2]) print r /// (1045, u'3*a-34', u'[a,1,a,-8023*a-4967,-418315*a-258549]', 0, 2, None, u'matrix(6,[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])') (1045, u'-3*a-31', u'[a+1,-a+1,a+1,8021*a-12990,418314*a-676864]', 0, 2, None, u'matrix(6,[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])') (1305, u'33*a-9', u'[a,a-1,a,-2222*a-1381,-61359*a-37914]', 0, 2, None, u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1305, u'-33*a+24', u'[a+1,a,a,2222*a-3602,59978*a-97051]', 0, 2, None, u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1395, u'3*a-39', u'[a+1,-a,1,-330*a-217,-3487*a-2273]', 0, 2, None, u'matrix(6,[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])') (1395, u'-3*a-36', u'[a,0,1,329*a-546,3487*a-5760]', 0, 2, None, u'matrix(6,[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])') (1856, u'-8*a+48', u'[0,1,0,703*a-1131,10901*a-17633]', 0, 2, None, u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1856, u'8*a+40', u'[0,1,0,-703*a-428,-10901*a-6732]', 0, 2, None, u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1881, u'-3*a-42', u'[a,0,a+1,-272*a-162,-2591*a-1599]', 0, 2, None, u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1881, u'3*a-45', u'[a+1,-a,a,270*a-433,2590*a-4189]', 0, 2, None, u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1936, u'44', u'[0,0,0,-59*a-59,-312*a-234]', 0, 2, None, u'matrix(4,[0,2,2,2,2,0,0,0,2,0,0,0,2,0,0,0])') }}} {{{id=171| E=EllipticCurve(K,[a,1,a,-8023*a-4967,-418315*a-258549]) F=EllipticCurve(K,[1,1,a,-2,-a]) G=EllipticCurve(K,[1,-a-1,a+1,-4*a-2,7*a+4]) E.is_isogenous(F) #E.is_isogenous(G) /// }}} {{{id=162| for r in list(db.N2k.find('N=1045')): try: r['rank'],r['cond'], r['weq'], r['adj'] except: r['cond'], r['weq'], r['adj'] /// (1, u'-3*a-31', u'[1,1,a+1,-a-2,-1]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1, u'-3*a-31', u'[1,1,a+1,4*a-12,-9*a+10]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1, u'-3*a-31', u'[1,1,a+1,79*a-187,-669*a+885]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1, u'-3*a-31', u'[1,1,a+1,9*a+3,-25*a+39]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1, u'3*a-34', u'[1,1,a,-2,-a]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1, u'3*a-34', u'[1,1,a,-5*a-7,8*a+2]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1, u'3*a-34', u'[1,1,a,-10*a+13,24*a+15]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (1, u'3*a-34', u'[1,1,a,-80*a-107,668*a+217]', u'matrix(4,[0,2,0,0,2,0,2,2,0,2,0,0,0,2,0,0])') (0, u'3*a-34', u'[1,-a-1,a+1,-4*a-2,7*a+4]', u'matrix(6,[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])') (0, u'3*a-34', u'[1,-a-1,a+1,-4*a-7,4*a]', u'matrix(6,[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])') (0, u'3*a-34', u'[a+1,-a-1,a+1,186*a-328,1564*a-2570]', u'matrix(6,[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])') (0, u'3*a-34', u'[1,-a-1,a+1,36*a-2,-49*a+14]', u'matrix(6,[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])') (u'3*a-34', u'[a,1,a,-8023*a-4967,-418315*a-258549]', u'matrix(6,[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])') (0, u'3*a-34', u'[a,-1,a+1,21720*a-35148,1836100*a-2970878]', u'matrix(6,[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])') (0, u'-3*a-31', u'[1,a+1,a+1,5*a-6,-4*a+6]', u'matrix(6,[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])') (0, u'-3*a-31', u'[1,a+1,a+1,5*a-11,-a-6]', u'matrix(6,[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])') (0, u'-3*a-31', u'[a,-1,a,-188*a-140,-1565*a-1005]', u'matrix(6,[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])') (0, u'-3*a-31', u'[1,a+1,a+1,-35*a+34,12*a]', u'matrix(6,[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])') (0, u'-3*a-31', u'[a+1,-a-1,a,-21722*a-13427,-1836101*a-1134777]', u'matrix(6,[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])') (u'-3*a-31', u'[a+1,-a+1,a+1,8021*a-12990,418314*a-676864]', u'matrix(6,[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])') (1, u'-29*a+17', u'[0,-a+1,a,0,0]', u'matrix(1,[0])') (1, u'29*a-12', u'[0,a,a+1,0,-a]', u'matrix(1,[0])') (0, u'-29*a+12', u'[a+1,1,1,-a-2,-3*a-3]', u'matrix(2,[0,2,2,0])') (0, u'-29*a+12', u'[1,-1,a,-235*a-144,-2004*a-1239]', u'matrix(2,[0,2,2,0])') (0, u'29*a-17', u'[a,-a-1,a+1,a-4,a-3]', u'matrix(2,[0,2,2,0])') (0, u'29*a-17', u'[1,-1,a+1,234*a-379,2003*a-3243]', u'matrix(2,[0,2,2,0])') }}} {{{id=149| E=EllipticCurve(K,[1,a,a,-4*a+1,-2*a+1]) /// }}} {{{id=159| E.conductor().factor() /// (Fractional ideal (3*a - 2)) * (Fractional ideal (2)) * (Fractional ideal (5*a - 3)) }}} {{{id=152| import psage.lseries.eulerprod /// }}} {{{id=153| L = psage.lseries.eulerprod.LSeries(E); L /// L-series of Elliptic Curve defined by y^2 + x*y + a*y = x^3 + a*x^2 + (-4*a+1)*x + (-2*a+1) over Number Field in a with defining polynomial x^2 - x - 1 }}} {{{id=154| L.analytic_rank() /// 0 }}} {{{id=155| L.taylor_series() /// 1.55423189358004 - 0.603571764202221*z - 0.362374571120873*z^2 + 1.41658291744878*z^3 - 1.54470612568763*z^4 + 0.757387279303821*z^5 + O(z^6) }}} {{{id=156| /// }}} {{{id=150| v=E.simon_two_descent();v /// (0, 3, [(a : -a : 1), (a : -a : 1)]) }}} {{{id=148| for r in temp: if r[0]>1200 and r[0]<1400: print r /// WARNING: Output truncated! full_output.txt (1201, u'31*a-15', u'[0,-a,1,2*a-2,-a+1]', 1) (1201, u'-31*a+16', u'[0,a-1,1,-2*a,a]', 1) (1205, u'4*a+33', u'[a+1,-1,a+1,-2*a-1,-a-1]', 0) (1205, u'4*a+33', u'[a+1,-1,a+1,-7*a-11,-15*a-14]', 0) (1205, u'-4*a+37', u'[a,-a,a,-1,-1]', 0) (1205, u'-4*a+37', u'[a,-a,a,5*a-16,14*a-28]', 0) (1205, u'4*a+33', u'[1,a+1,a,3*a-2,-a+2]', 0) (1205, u'4*a+33', u'[1,a+1,a,28*a-52,-101*a+147]', 0) (1205, u'4*a+33', u'[a,a,a+1,23445*a-37936,-2070337*a+3349874]', 0) (1205, u'4*a+33', u'[1,a+1,a,-27*a-87,-410*a-51]', 0) (1205, u'-4*a+37', u'[1,-a-1,a,-2*a,3*a+1]', 0) (1205, u'-4*a+37', u'[1,-a-1,a,-27*a-25,128*a+71]', 0) (1205, u'-4*a+37', u'[1,-a-1,a,28*a-115,382*a-346]', 0) (1205, u'-4*a+37', u'[a+1,a+1,a+1,-23444*a-14490,2032401*a+1256093]', 0) (1216, u'-32*a+24', u'[0,-a,0,-a,0]', 1) (1216, u'-32*a+24', u'[0,-a,0,4*a,-4*a-4]', 1) (1216, u'32*a-8', u'[0,a-1,0,a-1,0]', 1) (1216, u'32*a-8', u'[0,a-1,0,-4*a+4,4*a-8]', 1) (1216, u'-32*a+8', u'[0,a+1,0,2*a,a+1]', 1) (1216, u'-32*a+8', u'[0,a+1,0,-3*a-5,3*a]', 1) (1216, u'-32*a+8', u'[0,a+1,0,-23*a-5,-57*a-44]', 1) (1216, u'-32*a+8', u'[0,a+1,0,-63*a-85,431*a+140]', 1) (1216, u'32*a-24', u'[0,-a-1,0,1,1]', 1) (1216, u'32*a-24', u'[0,-a-1,0,5*a-9,-7*a+12]', 1) (1216, u'32*a-24', u'[0,-a-1,0,65*a-149,-495*a+720]', 1) (1216, u'32*a-24', u'[0,-a-1,0,25*a-29,33*a-72]', 1) (1220, u'2*a-36', u'[a,a,1,a-2,-a+1]', 1) (1220, u'2*a-36', u'[a,a,1,11*a-12,15*a-19]', 1) (1220, u'-2*a-34', u'[a+1,a+1,0,2*a,0]', 1) (1220, u'-2*a-34', u'[a+1,a+1,0,-8*a,-26*a-14]', 1) (1220, u'2*a+34', u'[a+1,-1,a+1,-a,-a-1]', 0) (1220, u'2*a+34', u'[a+1,-1,a+1,-21*a-30,-79*a-71]', 0) (1220, u'-2*a+36', u'[a,-a,a,-a+1,-1]', 0) (1220, u'-2*a+36', u'[a,-a,a,19*a-49,78*a-149]', 0) (1220, u'2*a+34', u'[a+1,-a,1,-a-5,-2*a+1]', 0) (1220, u'2*a+34', u'[a,-a+1,1,212*a-341,-1652*a+2672]', 0) (1220, u'2*a+34', u'[a+1,-a,1,-141*a-125,-1098*a-775]', 0) (1220, u'2*a+34', u'[a+1,-a,1,-121*a-155,-1214*a-623]', 0) (1220, u'-2*a+36', u'[a,0,1,-5,2*a-1]', 0) (1220, u'-2*a+36', u'[a+1,0,1,-213*a-129,1652*a+1020]', 0) (1220, u'-2*a+36', u'[a,0,1,140*a-265,1098*a-1873]', 0) (1220, u'-2*a+36', u'[a,0,1,120*a-275,1214*a-1837]', 0) (1220, u'2*a+34', u'[a+1,1,a,-2*a-3,1]', 1) (1220, u'-2*a+36', u'[a,-a-1,1,2*a-5,-2*a+6]', 1) (1225, u'35', u'[0,-1,1,2,-2]', 1) (1225, u'35', u'[0,-1,1,-148,748]', 1) (1231, u'32*a-9', u'[a,-a+1,1,11*a-20,33*a-53]', 0) (1231, u'32*a-9', u'[a+1,-a,1,-68*a-46,331*a+200]', 0) (1231, u'-32*a+23', u'[a+1,0,1,-12*a-9,-33*a-20]', 0) (1231, u'-32*a+23', u'[a,0,1,67*a-113,-331*a+531]', 0) (1244, u'32*a-10', u'[a+1,1,1,a,a]', 1) (1244, u'32*a-10', u'[a+1,1,1,a-10,9*a-12]', 1) (1244, u'-32*a+22', u'[a,-a-1,a+1,-a,-a]', 1) (1244, u'-32*a+22', u'[a,-a-1,a+1,-a-10,-9*a+6]', 1) (1255, u'-32*a+11', u'[a,a+1,a+1,1,-1]', 0) (1255, u'-32*a+11', u'[a,a+1,a+1,5*a-9,7*a-13]', 0) (1255, u'-32*a+11', u'[a,a+1,a+1,20*a-29,-32*a+59]', 0) (1255, u'-32*a+11', u'[a,a+1,a+1,70*a-149,494*a-753]', 0) (1255, u'32*a-21', u'[a+1,a-1,0,a+1,0]', 0) ... (1364, u'-2*a-36', u'[a,-a,a+1,109*a-180,696*a-1129]', 0) (1364, u'2*a+36', u'[1,a-1,a,-5*a-6,6*a+5]', 1) (1364, u'-2*a+38', u'[1,-a,a+1,4*a-11,-7*a+11]', 1) (1364, u'2*a-38', u'[a+1,-a,a,-2*a-1,0]', 1) (1364, u'-2*a-36', u'[a,0,a+1,-2,-a]', 1) (1364, u'8*a+34', u'[1,a-1,a,-3*a-4,2*a+3]', 1) (1364, u'8*a+34', u'[a,a,a,-405*a-256,4427*a+2742]', 1) (1364, u'-8*a+42', u'[1,-a,a+1,2*a-7,-3*a+5]', 1) (1364, u'-8*a+42', u'[a+1,a+1,a,407*a-660,-4682*a+7575]', 1) (1364, u'2*a+36', u'[a+1,a+1,0,5*a-4,-a+4]', 0) (1364, u'2*a+36', u'[a,1,0,4597*a-7445,181253*a-293295]', 0) (1364, u'-2*a+38', u'[a,a,1,-2*a-3,-a+2]', 0) (1364, u'-2*a+38', u'[a+1,-a+1,0,-4597*a-2848,-181253*a-112042]', 0) (1364, u'8*a+34', u'[1,-a,0,17*a-29,-37*a+62]', 1) (1364, u'8*a+34', u'[a,a-1,a+1,-105*a-68,575*a+366]', 1) (1364, u'-8*a+42', u'[1,a-1,0,-17*a-12,37*a+25]', 1) (1364, u'-8*a+42', u'[a+1,a,a+1,104*a-172,-644*a+1046]', 1) (1364, u'2*a+36', u'[a,-a-1,a,2*a-2,-4*a+2]', 0) (1364, u'2*a+36', u'[a+1,1,0,-2720*a-1692,-84368*a-52176]', 0) (1364, u'-2*a+38', u'[a+1,1,0,-a+1,2*a-1]', 0) (1364, u'-2*a+38', u'[a,-a-1,a,2721*a-4414,81647*a-132131]', 0) (1369, u'37', u'[0,0,1,-1,0]', 1) (1369, u'37', u'[1,a,0,6*a-10,8*a-13]', 0) (1369, u'37', u'[a,-a+1,a+1,-70*a-44,332*a+203]', 0) (1369, u'37', u'[1,-a+1,0,-6*a-4,-8*a-5]', 0) (1369, u'37', u'[a+1,0,a,68*a-113,-333*a+536]', 0) (1395, u'3*a+36', u'[a+1,a+1,0,5*a+1,3*a+4]', 1) (1395, u'3*a+36', u'[a+1,a+1,0,15*a-34,-48*a+74]', 1) (1395, u'-3*a+39', u'[a,a,1,-2*a+2,1]', 1) (1395, u'-3*a+39', u'[a,a,1,-12*a-23,26*a+35]', 1) (1395, u'3*a-39', u'[a,-a,0,3*a+1,0]', 0) (1395, u'3*a-39', u'[a,-a,0,-12*a-4,9*a+8]', 0) (1395, u'3*a-39', u'[1,-a+1,0,108*a-184,753*a-1230]', 0) (1395, u'3*a-39', u'[a,-a,0,-462*a-319,-5796*a-3691]', 0) (1395, u'-3*a-36', u'[a+1,-1,0,-3*a+4,0]', 0) (1395, u'-3*a-36', u'[a+1,-1,0,12*a-16,-9*a+17]', 0) (1395, u'-3*a-36', u'[1,a,0,-108*a-76,-753*a-477]', 0) (1395, u'-3*a-36', u'[a+1,-1,0,462*a-781,5796*a-9487]', 0) (1395, u'3*a-39', u'[a,-a+1,1,5*a-9,-5*a+8]', 0) (1395, u'3*a-39', u'[a+1,-a,1,-15*a-12,35*a+21]', 0) (1395, u'3*a-39', u'[a,-a+1,1,80*a-139,495*a-804]', 0) (1395, u'3*a-39', u'[a+1,-a,1,-255*a-147,2261*a+1401]', 0) (1395, u'3*a-39', u'[a+1,-a,1,-330*a-217,-3487*a-2273]', 0) (1395, u'3*a-39', u'[a,-a+1,1,1370*a-2184,29503*a-47758]', 0) (1395, u'-3*a-36', u'[a+1,0,1,-6*a-4,5*a+3]', 0) (1395, u'-3*a-36', u'[a,0,1,14*a-26,-35*a+56]', 0) (1395, u'-3*a-36', u'[a+1,0,1,-81*a-59,-495*a-309]', 0) (1395, u'-3*a-36', u'[a,0,1,254*a-401,-2261*a+3662]', 0) (1395, u'-3*a-36', u'[a+1,0,1,-1371*a-814,-29503*a-18255]', 0) (1395, u'-3*a-36', u'[a,0,1,329*a-546,3487*a-5760]', 0) (1396, u'34*a-24', u'[a,0,1,-42*a-26,146*a+90]', 0) (1396, u'34*a-24', u'[1,0,1,45*a-81,214*a-311]', 0) (1396, u'34*a-24', u'[1,a,a,1263590*a-2044531,817367714*a-1322528743]', 0) (1396, u'-34*a+10', u'[a+1,-a,1,41*a-68,-146*a+236]', 0) (1396, u'-34*a+10', u'[1,0,1,-45*a-36,-214*a-97]', 0) (1396, u'-34*a+10', u'[1,-a+1,a+1,-1263591*a-780941,-817367715*a-505161029]', 0) (1396, u'-34*a+10', u'[1,0,a+1,a-4,-2*a+2]', 1) (1396, u'34*a-24', u'[1,0,a,-2*a-2,a+1]', 1) (1396, u'-34*a+10', u'[1,1,1,-a-1,0]', 1) (1396, u'34*a-24', u'[1,1,1,a-2,0]', 1) }}} {{{id=160| /// }}} {{{id=144| data /// [u'[a,1,a,-8023*a-4967,-418315*a-258549]', u'[a+1,-a+1,a+1,8021*a-12990,418314*a-676864]', u'[a,a-1,a,-2222*a-1381,-61359*a-37914]', u'[a+1,a,a,2222*a-3602,59978*a-97051]', u'[1,a,a,-4*a+1,-2*a+1]', u'[1,a,a,-14*a-29,-92*a-27]', u'[1,a,a,-104*a-94,-759*a-574]', u'[a,-a+1,1,-12844*a-8020,-841360*a-520329]', u'[1,-a+1,a+1,3*a-3,a-1]', u'[1,-a+1,a+1,13*a-43,91*a-119]', u'[1,-a+1,a+1,103*a-198,758*a-1333]', u'[a+1,0,1,12843*a-20864,841360*a-1361689]', u'[a+1,-a,1,-330*a-217,-3487*a-2273]', u'[a,0,1,329*a-546,3487*a-5760]', u'[0,1,0,703*a-1131,10901*a-17633]', u'[0,1,0,-703*a-428,-10901*a-6732]', u'[a,0,a+1,-272*a-162,-2591*a-1599]', u'[a+1,-a,a,270*a-433,2590*a-4189]', u'[0,0,0,-59*a-59,-312*a-234]'] }}} {{{id=169| db.N2k.columns() /// [u'K', u'ordD', u'L', u'N', u'c_p', u'adj_order', u'cond', u'T', u'omega', u'ordj', u's', u'weq', u'real1', u'found', u'real2', u'adj'] }}} {{{id=168| temp=db('select N,cond,weq,rlow,rhi FROM N2k ORDER BY N') for r in temp: if r[3]==r[4]: db.N2k.update({'rank': r[3]}, weq=r[2]) /// }}} {{{id=136| temp=db('select N,cond,weq,rank, rlow,rhi FROM N2k ORDER BY N') /// }}} {{{id=137| k=0 for r in range(len(temp)): if temp[r][3] is None: for s in range(10): if temp[r-s][0]==temp[r][0] and temp[r-s][1]==temp[r][1] and type(temp[r-s][3])==type(int(1)): E=EllipticCurve(K,eval(temp[r-s][2])) F=EllipticCurve(K,eval(temp[r][2])) try: A= E.is_isogenous(F) if A==True: print temp[r][2], temp[r][3] print temp[r-s][2], temp[r-s][3] db.N2k.update({'rank':temp[r-s][3]}, weq=temp[r][2]) print ' ' break except: pass /// [a,1,a,-8023*a-4967,-418315*a-258549] None [a+1,-a-1,a+1,186*a-328,1564*a-2570] 0 [a+1,-a+1,a+1,8021*a-12990,418314*a-676864] None [a,-1,a,-188*a-140,-1565*a-1005] 0 [a,a-1,a,-2222*a-1381,-61359*a-37914] None [1,-a,1,a-47,-93*a+54] 0 [a+1,a,a,2222*a-3602,59978*a-97051] None [1,a-1,1,-a-46,93*a-39] 0 [a+1,-a,1,-330*a-217,-3487*a-2273] None [a,-a+1,1,80*a-139,495*a-804] 0 [a,0,1,329*a-546,3487*a-5760] None [a+1,0,1,-81*a-59,-495*a-309] 0 [0,1,0,703*a-1131,10901*a-17633] None [0,a+1,0,2*a-13,9*a-17] 0 [0,1,0,-703*a-428,-10901*a-6732] None [0,-a-1,0,-12,-8*a+4] 0 [a,0,a+1,-272*a-162,-2591*a-1599] None [a,0,a+1,-17*a-12,-44*a-27] 0 [a+1,-a,a,270*a-433,2590*a-4189] None [a+1,-a,a,15*a-28,43*a-70] 0 [0,0,0,-59*a-59,-312*a-234] None [0,0,0,-4*a-4,-4*a-3] 0 }}} {{{id=161| data /// [u'[a,1,a,-8023*a-4967,-418315*a-258549]', u'[a+1,-a+1,a+1,8021*a-12990,418314*a-676864]', u'[a,a-1,a,-2222*a-1381,-61359*a-37914]', u'[a+1,a,a,2222*a-3602,59978*a-97051]', u'[1,a,a,-4*a+1,-2*a+1]', u'[1,a,a,-14*a-29,-92*a-27]', u'[1,a,a,-104*a-94,-759*a-574]', u'[a,-a+1,1,-12844*a-8020,-841360*a-520329]', u'[1,-a+1,a+1,3*a-3,a-1]', u'[1,-a+1,a+1,13*a-43,91*a-119]', u'[1,-a+1,a+1,103*a-198,758*a-1333]', u'[a+1,0,1,12843*a-20864,841360*a-1361689]', u'[a+1,-a,1,-330*a-217,-3487*a-2273]', u'[a,0,1,329*a-546,3487*a-5760]', u'[0,1,0,703*a-1131,10901*a-17633]', u'[0,1,0,-703*a-428,-10901*a-6732]', u'[a,0,a+1,-272*a-162,-2591*a-1599]', u'[a+1,-a,a,270*a-433,2590*a-4189]', u'[0,0,0,-59*a-59,-312*a-234]'] }}} {{{id=135| len(data) /// 19 }}}

This function will compute ap values for the elliptic curve using the first weierstrass equation given a range. All one needs to do is to change the number that is called in the function primes_of_bounded_norm.

{{{id=103| import psage.modform.hilbert.sqrt5.sqrt5 as sq w = sq.primes_of_bounded_norm(100) from psage.ellcurve.minmodel.sqrt5 import canonical_model def ap(E,p): return E.change_ring(p.residue_field()).trace_of_frobenius() def ap_comp(E): q=[] for i in range(len(w)): u=w[i] if E.has_good_reduction(w[i])==True: if not E.conductor().norm()%norm(w[i])==0: try: q.append(ap(E,w[i])) except: q.append('?') else: q.append('?') else: q.append('?') return q /// }}}

This computes the ap values and makes a list and inserts them into the database. This will also take the weierstrass equation and embed it into the $\mathbb R^5$. This will be used for sorting purposes only. This will be explained below. Lastly, this function will take the computed ap lists and insert them into the list 'IO', while the other list thats the embedded weierstrass equations is called "NH'. These lists will be used below.

{{{id=102| %time IO=[] NH=[] embs=K.embeddings(RR)[1] temp=db('select weq1 from N1k ORDER BY N,eta') for r in range(len(temp)): A=temp[r][0] A1=eval(A) B=ap_comp(EllipticCurve(K,eval(A))) C=[embs(f) for f in A1] IO.append(B) NH.append(C) db.N1k.update({'a_p':str(B).replace(' ',''), 'remove': str(C).replace(' ','')},weq1=A) /// WARNING: Output truncated! full_output.txt 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 ... 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 CPU time: 531.93 s, Wall time: 566.39 s }}}

This function takes the IO and NH and uses them and sorts them in lexigraphical order. This then assigns each ap list and embedded weierstrass an integer value which will serve for ordering isogeny classes via ap lists, and ordering within an isogeny class, i.e embedded weierstrass equations.

{{{id=106| %time IO=sorted(IO) NH=sorted(NH) for r in range(len(IO)): db.N1k.update({'R': int(r)}, a_p=str(IO[r]).replace(' ','')) for s in range(len(NH)): db.N1k.update({'U': int(s)}, remove=str(NH[s]).replace(' ','')) test=db('select weq1,omega from N1k order by N') for r in range(len(test)): O=1/float(test[r][1]) db.N1k.update({'V': float(O)},weq1=test[r][0]) /// CPU time: 3.54 s, Wall time: 80.17 s }}}

After determing the values from above, we compute the 2 sets of labels, a_lbl which is used to sort by norm of the conductor and the conductor(via the eta function). The second label, b_lbl, will be used to order isogeny classes and order within the same isogeny class. a_lbl uses the value from the norm of the conductor and the eta value to sort between those, in that order, while b_lbl uses the lexigraphical order of the ap values, the value of 1/omega, and the lexigraphical order of the embedded weierstrass equation(to break ties if 1/omega value is the same). This then inserts them into the database.

{{{id=107| temp=db('select N,eta,R,V,U, weq1 from N1k ORDER BY N,eta,R,V,U') N=0 lastchar1=ord('a') L=1 lastchar2=ord('a') test=[] for s in range(len(temp)): A=temp[s] if temp[s][0] != temp[s-1][0]: #this instance is a curve with a new norm than the previous entry N=int(temp[s][0]) lastchar1=ord('a') L=ord('a') lastchar2=1 else: if temp[s][1]==temp[s-1][1]: if temp[s][2]==temp[s-1][2]: lastchar2+=1 else: L+=1 lastchar2=1 else: lastchar1+=1 L=ord('a') lastchar2=1 i_lbl=str(N)+chr(lastchar1) l_lbl=chr(L)+str(lastchar2) db.N1k.update({'i_lbl': i_lbl, 'l_lbl': l_lbl}, weq1=temp[s][5]) /// }}}

These next two function serve as a way to ensure the ranks are correct. If a weierstrass equation has large integer coefficents, the simon_two_descent function sometimes cannot figure out the correct rank, usually within the same isogeny. To correct this, we know that the rank of the isogeny class is the same, so this function will pull the optimal curves from the database and check to see if the rank bound matches, and if it does, it inserts them into the database as "rank", not as the bounds which are already inserted.

{{{id=131| /// Traceback (most recent call last): File "", line 1, in File "_sage_input_18.py", line 10, in exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("dGVtcD1kYignc2VsZWN0IHdlcSxybG93LHJoaSBmcm9tIE4yayBXSEVSRSBiX2xibCBMSUtFICJfMSIgT1JERVIgQlkgTicpCmZvciByIGluIHRlbXA6CiAgICBwcmludCBy"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))' + '\n', '', 'single') File "", line 1, in File "/tmp/tmp7MRaaW/___code___.py", line 2, in temp=db('select weq,rlow,rhi from N2k WHERE b_lbl LIKE "_1" ORDER BY N') File "/home/wstein/nosqlite/nosqlite.py", line 592, in __call__ return self.client(cmds, t, file=self.name, many=many, coerce=coerce) File "/home/wstein/nosqlite/nosqlite.py", line 467, in __call__ return self.server.execute(cmd, t, file, many) File "/home/wstein/nosqlite/nosqlite.py", line 350, in execute o = cursor.execute(c) sqlite3.OperationalError: no such column: b_lbl }}} {{{id=108| temp=db('select R,weq1,rlow,rhi from N1k WHERE l_lbl LIKE "_1" ORDER BY N') for r in range(len(temp)): if temp[r][2] == temp[r][3]: db.temp.insert({'rank':int(temp[r][2]), 'weq1':temp[r][1], 'value': int(temp[r][0])}) else: print temp[r] /// }}}

This function will make the rank of the curves within the same isogeny the same by using the ap list to match against. If there isn't an integer value for the rank(computed above), it will not insert a rank into the database, but simply leave the bounds for now.

{{{id=109| temp=db('select R,weq1 from N1k ORDER BY N') for r in range(len(temp)): A=temp[r][0] B=db.temp.find_one(value=A)['rank'] if type(B)==int(!): db.N1k.update({'rank': int(B)}, weq1=temp[r][1]) /// }}}

This function will define both the regulator and sha function, and a third function which will compute both at the same time. Disclaimer: the saturation bound is low purposely to speed up the calculatio of sha. If one wants, one can raise the saturation bound by changing the number in the function comp( see comment within the function to find where to change).

{{{id=53| def regulator_new(E,rank,sat_bound): if rank == 0: Q= 0 else: v = E.simon_two_descent() Q = v[-1][0] for p in prime_range(sat_bound): if len(Q.division_points(p)) != 0: Q = Q.division_points(p)[0] print Q if Q== 0: return int(1), [] else: return Q.height()/2, [Q] def conjectural_sha(E, omega, reg=1, Lstar=1): M = E.tamagawa_product_bsd() sha = RR(sqrt(5))*Lstar*(E.torsion_order())^2/((omega)*reg*M) return sha def comp(weq,lstar,rank,omega): E=EllipticCurve(K,eval(weq)) R=regulator_new(E,rank,10) #this is where one would change the value for saturation bound. Currently held at 10 if R[0] <= 0: return R[0], 'error with regulator' else: Sha=conjectural_sha(E,omega,R[0],lstar) return R[0],Sha /// }}}

This function actually tries to compute the value of sha and regulator. As seen above, the saturation bound is low for speed, so there might be errors when trying to compute. If the value of the regulator is negative or zero, it will append the curve to the broken2 list automatically. If the value of sha is below .5, it will also give an error and append to broken 2. Lastly, if a ValueError or IndexError, it will also append to broken2. One will look at these curves after the computation is done, which is evaluated immediately after this computation.

{{{id=92| %time broken2=[] temp=db('select weq1,L,rank,omega from N1k') for r in range(len(temp)): try: reg,S=comp(temp[r][0], temp[r][1], temp[r][2], temp[r][3]) if S>=.5: db.N1k.update({'Sha': float(S), 'Reg': float(reg)}, weq1=temp[r][0]) else: broken2.append((temp[r][0], reg, S)) except IndexError: broken2.append(temp[r][0]) except ValueError: broken2.append(temp[r][0]) /// 0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 CPU time: 4.09 s, Wall time: 4.41 s }}} {{{id=96| broken2 /// [] }}}

This function will now create a permanant database that will be stored to a folder/file of your choice.  It will include all the data computed from this worksheet and insert it in. This will also include the values for the sorting: eta,R(lexigraphical order for ap list),V(value computed by 1/omega) ,U(lexigraphical order of the embedded weierstrass equation).

 

###NOTE: PLEASE CHANGE LOCATION OF DATABASE TO BE SAVED. CHANGE DATABASE NAME IF NEEDED ###

{{{id=110| db2=nosqlite.Client('/Users/sharaba/Desktop/ECdb').db temp=db('select N,cond1,cond2,weq1, weq2, rank,T,s,ordD,ordj,c_p, K, real1,real2,omega,L,Reg,Sha,adj,found,i_lbl,l_lbl, eta,R,V,U from N1k ORDER BY N,eta,R,V,U') for r in range(len(temp)): A=temp[r] db2.N1k.insert({'N':int(A[0]), 'cond1': A[1], 'cond2': A[2], 'weq1': A[3], 'weq2': A[4], 'rank': int(A[5]), 'T': int(A[6]), 's': A[7], 'ordD': A[8], 'ordj': A[9], 'c_p': A[10], 'K': A[11], 'real1': float(A[12]), 'real2': float(A[13]), 'omega': float(A[14]), 'L': float(A[15]), 'Reg': A[16], 'Sha': A[17], 'adj': A[18], 'found': A[19], 'a_lbl': A[20], 'b_lbl': A[21], 'eta': int(A[22]), 'R': int(A[23]), 'V': int(A[24]), 'U': int(A[25])}) /// }}}

These last two functions may look familiar, but these only need to be run if one is inserting new curves into already database.

###NOTE: YOUR DATABASE NAME MAYBE DIFFERENT. CHANGE ACCORDINGLY. ###

These functions will redo the sorting for the lexigraphical ordering for the ap lists and embedded weierstrass equations

{{{id=111| %time IO=[] NH=[] embs=K.embeddings(RR)[1] temp=db2('select weq1 from N1k ORDER BY N,eta') for r in range(len(temp)): A=temp[r][0] A1=eval(A) B=ap_comp(EllipticCurve(K,eval(A))) C=[embs(f) for f in A1] IO.append(B) NH.append(C) db2.N1k.update({'a_p':str(B).replace(' ',''), 'remove': str(C).replace(' ','')},weq1=A) /// Traceback (most recent call last): A1=eval(A) File "", line 1, in File "/private/var/folders/SW/SW-cfJI7GnuIEvIMHm0wsk+++Ts/-Tmp-/tmpqXsUSP/___code___.py", line 7, in exec compile(u"for r in range(len(temp)):\n A=temp[r][_sage_const_0 ]\n A1=eval(A)\n B=ap_comp(EllipticCurve(K,eval(A)))\n C=[embs(f) for f in A1]\n IO.append(B)\n NH.append(C)\n db2.N1k.update({'a_p':str(B).replace(' ',''), 'remove': str(C).replace(' ','')},weq1=A)" + '\n', '', 'single') File "", line 4, in NameError: name 'ap_comp' is not defined }}} {{{id=118| %time IO=sorted(IO) NH=sorted(NH) for r in range(len(IO)): db2.N1k.update({'R': int(r)}, a_p=str(IO[r]).replace(' ','')) for s in range(len(NH)): db2.N1k.update({'U': int(s)}, remove=str(NH[s]).replace(' ','')) test=db2('select weq1,omega from N1k order by N') for r in range(len(test)): O=1/float(test[r][1]) db2.N1k.update({'V': float(O)},weq1=test[r][0]) /// }}}