isogeny_bound

290 days ago by arabindr

K.<a> = NumberField(x^2 - x - 1) 
       
R.<x> = K[] 
       
from psage.ellcurve.lseries.aplist_sqrt5 import aplist 
       
t12 = 2048*x^12 -6144*x^10 + 6912*x^8 -3584*x^6 + 840*x^4 -72*x^2 + 1 
       
t12p = 2048*x^6 -6144*x^5 + 6912*x^4 -3584*x^3 + 840*x^2 -72*x + 1 
       
t24 = 2*(t12)^2 - 1 
       
E = EllipticCurve([1,1,a+1,1,a]) 
       
E.conductor().norm().factor() 
       
2^2 * 19 * 16111
2^2 * 19 * 16111
time E.change_ring(K.prime_above(16111).residue_field()).trace_of_frobenius() 
       
92
Time: CPU 0.02 s, Wall: 0.02 s
92
Time: CPU 0.02 s, Wall: 0.02 s
def plstar1(El, q): #this is only for primes that have no ramification and have good reduction if len(K.primes_above(q)) == 1: w1 = 1 - 2*(q^12)*t12(x/(2*q)) + q^24 t1 = El.change_ring(K.ideal(q).residue_field()).trace_of_frobenius() w = w1(t1) m = [] for zee in factor(ZZ(w)): m.append(zee[0]) return m else: v = K.primes_above(q) t1 = El.change_ring(v[0].residue_field()).trace_of_frobenius() t2 = El.change_ring(v[1].residue_field()).trace_of_frobenius() w1 = t12p(x^2/(4*q)) w = 1 - 4*(q^12)*w1(t1)*w1(t2) - 2*(q^24)*(1- 2*(w1(t1)^2 + w1(t2)^2))- 4*(q^36)*w1(t1)*w1(t2) + q^48 m = [] for zee in factor(ZZ(w)): m.append(zee[0]) return m 
       
from psage.number_fields.sqrt5 import primes_of_bounded_norm 
       
def plstar12(El, q): #same caveat, only for unramified and good reduction if len(K.primes_above(q)) == 1: t1 = El.change_ring(K.prime_above(q).residue_field()).trace_of_frobenius() m = [q] try: for v in factor(t1): m.append(v[0]) for v in factor(t1^2 - q^2): m.append(v[0]) for v in factor(t1^2 - 4*q^2): m.append(v[0]) for v in factor(t1^2 - 3*q^2): m.append(v[0]) s1 = set(m) m = list(s1) return m except ArithmeticError: return 0 else: t1 = El.change_ring(K.primes_above(q)[0].residue_field()).trace_of_frobenius() t2 = El.change_ring(K.primes_above(q)[1].residue_field()).trace_of_frobenius() m = [q] try: for v in factor((t1^2 + t2^2 - q^2)^2 - 3*(t1^2)*(t2^2)): m.append(v[0]) for v in factor(t1^2 - t2^2): m.append(v[0]) for v in factor(t1^2 +t2^2 - 4*q^2): m.append(v[0]) for v in factor((t1^2 + t2^2 - 3*q^2)^2 - (t1*t2)^2): m.append(v[0]) s1 = set(m) m = list(s1) return m except ArithmeticError: return 0 
       
def isogeny_list(Ec): ans = set([]) Bad = [v[0] for v in Ec.conductor().norm().factor()] Pr = prime_range(100) num = 0 i = 0 X =[set([3])] while num < 3: if not Pr[i] in Bad and Pr[i] != 5: try: X.append(set(plstar1(Ec, Pr[i]) + plstar12(Ec, Pr[i]))) num+=1 except TypeError: pass i+=1 ans = (X[1].intersection(X[2])).intersection(X[3]) return ans.union(set(Bad)).union(set([2,3, 5])) 
       
isogeny_list(E3) 
       
set([2, 3, 5, 7])
set([2, 3, 5, 7])
E3 = EllipticCurve(K, [1,-1,0,-107,552]) 
       
A = set(plstar1(E, 11) + plstar12(E, 11)) 
       
B = set(plstar1(E, 13) + plstar12(E, 13)) 
       
C = set(plstar1(E, 23) + plstar12(E, 23)) 
       
(A.intersection(B)).intersection(C) 
       
set([2, 3, 5, 7])
set([2, 3, 5, 7])
E1 = EllipticCurve([1,0,1,-a-2,a]) 
       
E1.conductor().norm().factor() 
       
11 * 19
11 * 19
A1 = set(plstar1(E1, 7) + plstar12(E1, 7)) 
       
B1 = set(plstar1(E1, 13) + plstar12(E1, 13)) 
       
C1 = set(plstar1(E1, 17) + plstar12(E1, 17)) 
       
(A1.intersection(B1)).intersection(C1) 
       
set([2, 3, 5])
set([2, 3, 5])
E2 = EllipticCurve([0,-a-1,1,-4*a-2,10*a+6]) 
       
E2.conductor().norm().factor() 
       
7^2 * 19
7^2 * 19
A2= set(plstar1(E2, 3) + plstar12(E2, 3)) 
       
B2 = set(plstar1(E2, 11) + plstar12(E2, 11)) 
       
Traceback (click to the left of this block for traceback)
...
TypeError: unsupported operand parent(s) for '+': '<type 'list'>'
and 'Integer Ring'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_117.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("QjIgPSBzZXQocGxzdGFyMShFMiwgMTEpICsgcGxzdGFyMTIoRTIsIDExKSk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpDUrOmn/___code___.py", line 3, in <module>
    exec compile(u'B2 = set(plstar1(E2, _sage_const_11 ) + plstar12(E2, _sage_const_11 ))
  File "", line 1, in <module>
    
  File "element.pyx", line 1297, in sage.structure.element.RingElement.__add__ (sage/structure/element.c:11458)
  File "coerce.pyx", line 766, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:7337)
TypeError: unsupported operand parent(s) for '+': '<type 'list'>' and 'Integer Ring'
C2 = set(plstar1(E2, 17) + plstar12(E2, 17)) 
       
((A2.intersection(B2)).intersection(C2)).intersection(D2) 
       
set([2, 3, 5])
set([2, 3, 5])