{{{id=3| K.=NumberField(x^2-x-1) from psage.ellcurve.minmodel.sqrt5 import canonical_model /// }}} {{{id=1| def saturate_rank_01(E, sat_bound): v = E.simon_two_descent() t2 = E.two_torsion_rank() sel2 = v[1] rank_bound = sel2 - t2 if rank_bound >1: raise NotImplementedError if rank_bound == 0: return 0 Q = v[-1][0] for p in prime_range(sat_bound): if len(Q.division_points(p)) != 0: Q = Q.division_points(p)[0] return Q def conjectural_sha(E, reg, Lstar, omega): M = E.tamagawa_product_bsd() sha = RR(sqrt(5))*Lstar*(E.torsion_order())^2/((omega)*reg*M) return sha def comp(weq,lstar,omega): R=regulator_new(E,100) #this is where one would change the value for saturation bound. Currently held at 10 Sha=conjectural_sha(E,omega,R[0],lstar) return R[0],Sha /// }}} {{{id=2| #order of readline: N,weq1,weq2,L,omega /// }}} {{{id=5| %time data=[] f=open('/home/psharaba/RegList.txt') for r in f.readlines(): A=r.split() E=EllipticCurve(K,eval(A[1])).global_minimal_model() F=canonical_model(E) Re,Sh=comp(E,eval(A[3]), eval(A[4])) data.append((A[1], Re, Sh)) /// Traceback (most recent call last): F=canonical_model(E) File "", line 1, in File "/tmp/tmpd_0CWU/___code___.py", line 6, in exec compile(u'for r in f.readlines():\n A=r.split()\n E=EllipticCurve(K,eval(A[_sage_const_1 ])).global_minimal_model()\n F=canonical_model(E)\n Re,Sh=comp(E,eval(A[_sage_const_3 ]), eval(A[_sage_const_4 ]))\n data.append((A[_sage_const_1 ], Re, Sh))' + '\n', '', 'single') File "", line 5, in File "/tmp/tmpksH2Hy/___code___.py", line 28, in comp R=regulator_new(E,_sage_const_100 ) #this is where one would change the value for saturation bound. Currently held at 10 File "/tmp/tmpGVtYxa/___code___.py", line 22, in regulator_new Q = saturate_rank_01(E,sat_bound) File "/tmp/tmpksH2Hy/___code___.py", line 10, in saturate_rank_01 raise NotImplementedError NotImplementedError }}} {{{id=10| data /// [('[1,a+1,a,a,0]', 1, 7.71909557337876), ('[a,-1,a+1,-17*a-11,39*a+24]', 1, 7.71909557336377), ('[a+1,-a-1,a+1,-1788*a-1105,44001*a+27194]', 1, 7.71909557339374), ('[1,a+1,a,41*a-70,170*a-276]', 1, 7.71909557336976), ('[1,a+1,a,31*a-75,141*a-303]', 1, 7.71909557335778), ('[a,a,a+1,32197*a-52096,3319586*a-5371204]', 1, 7.71909557335778), ('[a+1,a,a,0,0]', 1, 6.36956799376007), ('[a+1,a,a,-10*a-10,10*a+10]', 1, 6.36956799376007), ('[a+1,a,a,-165*a-165,-1683*a-1221]', 1, 6.36956799374569), ('[a+1,a,a,-5*a-5,-51*a-37]', 1, 6.36956799374569), ('[0,-a,a,0,0]', 1, 5.60963253594495), ('[0,-a,a,10*a-40,31*a-113]', 1, 5.60963253593780), ('[1,1,1,-80,242]', 1, 5.19720364283536), ('[1,1,1,-5,2]', 1, 5.19720364283536), ('[1,1,1,0,0]', 1, 5.19720364283536), ('[1,1,1,-10,-10]', 1, 5.19720364283867), ('[1,1,1,-135,-660]', 1, 5.19720364284529), ('[1,1,1,35,-28]', 1, 5.19720364284529)] }}} {{{id=7| %time data2=[] f=open('/home/psharaba/RegList.txt') for r in f.readlines(): A=r.split() E=EllipticCurve(K,eval(A[2])).global_minimal_model() F=canonical_model(E) Re,Sh=sha_comp(E,eval(A[3]), eval(A[4])) data.append((A[1], Re, Sh)) /// Traceback (most recent call last): F=canonical_model(E) File "", line 1, in File "/tmp/tmpmKIkCm/___code___.py", line 6, in exec compile(u'for r in f.readlines():\n A=r.split()\n E=EllipticCurve(K,eval(A[_sage_const_2 ])).global_minimal_model()\n F=canonical_model(E)\n Re,Sh=sha_comp(E,eval(A[_sage_const_3 ]), eval(A[_sage_const_4 ]))\n data.append((A[_sage_const_1 ], Re, Sh))' + '\n', '', 'single') File "", line 5, in File "/tmp/tmpHimhzY/___code___.py", line 5, in sha_comp S=conjectural_sha(F,R,Lstar,omega) File "/tmp/tmpksH2Hy/___code___.py", line 24, in conjectural_sha sha = RR(sqrt(_sage_const_5 ))*Lstar*(E.torsion_order())**_sage_const_2 /((omega)*reg*M) TypeError: can't multiply sequence by non-int of type 'float' }}} {{{id=8| data2 /// [] }}} {{{id=11| /// }}}