Copy-of-even-bigger-list_ver2_179

308 days ago by Ben.LeVeque

x=var('x') K.<a>=NumberField(x^2-x-1) 
       
%cython include 'sage/libs/pari/decl.pxi' from sage.libs.pari.gen import pari from libc.stdint cimport uint8_t, uint_fast8_t, uint32_t, uint_fast32_t, uint_fast64_t cdef extern from "pari/pari.h": cdef void NEXT_PRIME_VIADIFF(uint32_t, uint_fast8_t *) cdef uint_fast32_t[32] shiftTab shiftTab[ 0] = 0x00000001u shiftTab[ 1] = 0x00000002u shiftTab[ 2] = 0x00000004u shiftTab[ 3] = 0x00000008u shiftTab[ 4] = 0x00000010u shiftTab[ 5] = 0x00000020u shiftTab[ 6] = 0x00000040u shiftTab[ 7] = 0x00000080u shiftTab[ 8] = 0x00000100u shiftTab[ 9] = 0x00000200u shiftTab[10] = 0x00000400u shiftTab[11] = 0x00000800u shiftTab[12] = 0x00001000u shiftTab[13] = 0x00002000u shiftTab[14] = 0x00004000u shiftTab[15] = 0x00008000u shiftTab[16] = 0x00010000u shiftTab[17] = 0x00020000u shiftTab[18] = 0x00040000u shiftTab[19] = 0x00080000u shiftTab[20] = 0x00100000u shiftTab[21] = 0x00200000u shiftTab[22] = 0x00400000u shiftTab[23] = 0x00800000u shiftTab[24] = 0x01000000u shiftTab[25] = 0x02000000u shiftTab[26] = 0x04000000u shiftTab[27] = 0x08000000u shiftTab[28] = 0x10000000u shiftTab[29] = 0x20000000u shiftTab[30] = 0x40000000u shiftTab[31] = 0x80000000u cdef uint_fast8_t[256] twoDiv cdef uint_fast32_t tempItr, tempVar twoDiv[0] = 8u for tempItr in range(1,255u): tempVar = tempItr while not tempVar&1u: twoDiv[tempItr] += 1u tempVar >>= 1u cdef uint_fast32_t exp_mod(uint_fast64_t b, uint_fast32_t e, uint_fast32_t p): cdef uint_fast64_t q if e&1u: q = b else: q = 1ull e >>= 1u while e: b *= b if b > 4294967295ull: b %= p if e&1u: q *= b if q > 4294967295ull: q %= p e >>= 1u if q > 4294967295ull: q %= p return q cdef uint_fast32_t non_residue(uint_fast32_t p): cdef uint8_t *pariPrimePtr = <uint8_t *>diffptr cdef uint32_t pariP = 0u NEXT_PRIME_VIADIFF(pariP, pariPrimePtr) while True: NEXT_PRIME_VIADIFF(pariP, pariPrimePtr) if exp_mod(p,(pariP-1u)>>1u,pariP)%pariP > 1u: return pariP cdef uint_fast32_t sqrt5_mod(uint_fast32_t p): if p&3u == 3u: return exp_mod(5ull, (p+1u)>>2u, p)%p cdef uint_fast64_t q, z if p&7u == 5u: q = exp_mod(10ull, (p-5u)>>3u, p) z = q*q if z > 1844674407370955161ull: z %= p z *= 10ull z -= 1ull if z > 4294967295ull: z %= p q *= 5ull if q > 4294967295ull: q %= p return q*z%p cdef uint_fast32_t d, dp if p&15u == 9u: q = exp_mod(10ull, (p-9u)>>4u, p) if q > 4294967295ull: q %= p z = q*q if z > 1844674407370955161ull: z %= p z *= 10ull if z > 4294967295ull: z %= p q *= 5ull if q > 4294967295ull: q %= p if z*z%p == 1ull: d = non_residue(p) dp = exp_mod(d, (p-1u)>>3u, p) q *= dp if q > 4294967295ull: q %= p dp *= dp if dp > 4294967295ull: dp %= p z *= dp if z > 4294967295ull: z %= p z -= 1ull return q*z%p p -= 1u cdef uint_fast8_t r = 0u q = 8ull while q == 8ull: q = twoDiv[(p>>r)&0xFFu] r += q q = p>>r p += 1u r -= 2u cdef uint_fast64_t v = exp_mod(non_residue(p), q, p) d = exp_mod(5ull, (q-1u)>>1u, p) cdef uint_fast64_t res = 5ull*d if res > 4294967295ull: res %= p d *= d if d > 3689348814741910323ull: d %= p d *= 5ull d %= p cdef uint_fast8_t m while not d == 1u: m = r dp = d*d%p while not dp == 1u: dp *= dp dp %= p m -= 1u z = exp_mod(v, shiftTab[m], p) res *= z if res > 4294967295ull: res %= p z *= z if z > 4294967295ull: z %= p d *= z d %= p return res%p def get_primes(p): q = sqrt5_mod(p)-1u w = ((p+1u)>>1u)*q%p q = p-1u-w if w < q: return (w,q) return (q,w) 
def split_prime_combine(p, firstCurves, secondCurves): ret = [] r1,r2 = get_primes(p) if len(firstCurves) < len(secondCurves): firstCurves, secondCurves = secondCurves, firstCurves r1,r2 = r2,r1 for E in firstCurves: liftE = [E[0],0,E[1],0] for i in range(p): for j in range(p): if ((liftE[0]-r2*liftE[1])%p,(liftE[2]-r2*liftE[3])%p) in secondCurves: ret.append(list(liftE)) liftE[2] = (liftE[2]+r1)%p liftE[3] += 1 liftE[3] = 0 liftE[0] = (liftE[0]+r1)%p liftE[1] += 1 return ret def integral_combine(n, first, second, firstCurves, secondCurves): ret = [] for E in firstCurves: for i in range(second): for j in range(second): for k in range(second): for l in range(second): if [A%second for A in E] in secondCurves: ret.append(list(E)) E[3] = (E[3]+first)%n E[2] = (E[2]+first)%n E[1] = (E[1]+first)%n E[0] = (E[0]+first)%n return ret def curves_in_GF(p): ret = {} K = GF(p) for i in range(p): for j in range(p): try: E = EllipticCurve(K,[i,j]) ap = p-len(E.points())+1 if ret.has_key(ap): ret[ap].append(E) else: ret[ap] = [E] except ArithmeticError: pass return ret 
       
mod29 = curves_in_GF(29) 
       
mod11 = curves_in_GF(11) 
       
mod19 = curves_in_GF(19) 
       
def quick_disc(ainv): a1 = ainv[0] a2 = ainv[1] a3 = ainv[2] a4 = ainv[3] a6 = ainv[4] return -(a1^2+4*a2)^2*((a1^2+4*a2)*a6-a1*a3*a4+a2*a3^2-a4^2)-8*(a1*a3+2*a4)^3-27*(a3^2+4*a6)^2+9*(a1^2+4*a2)*(a1*a3+2*a4)*(a3^2+4*a6) 
       
big_list_new11 = split_prime_combine(11,firstCurves,secondCurves) 
       
Traceback (click to the left of this block for traceback)
...
NameError: name 'firstCurves' is not defined
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_9.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("YmlnX2xpc3RfbmV3MTEgPSBzcGxpdF9wcmltZV9jb21iaW5lKDExLGZpcnN0Q3VydmVzLHNlY29uZEN1cnZlcyk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpm4hxNE/___code___.py", line 3, in <module>
    exec compile(u'big_list_new11 = split_prime_combine(_sage_const_11 ,firstCurves,secondCurves)
  File "", line 1, in <module>
    
NameError: name 'firstCurves' is not defined
len(big_list_new11) 
       
50
50
first29 = [] for E in mod29[5]: first29.append((int(E.a4()),int(E.a6()))) second29 = [] for E in mod29[7]: second29.append((int(E.a4()),int(E.a6()))) big_list_new29 = split_prime_combine(29,first29,second29) print len(big_list_new29) 
       
392
392
N = 179 counter=1 for e in big_list_new29: print counter counter+=1 A = e[0]+e[1]*a B = e[2]+e[3]*a for ainv in various_lifts(A,B,29): D = quick_disc(ainv).norm() if D%N==0: #print ainv E = EllipticCurve(K,list(ainv)) if E.conductor().norm() == 179: print E 
       
WARNING: Output truncated!  


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
59

...

227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
Elliptic Curve defined by y^2 + a*x*y = x^3 + (-a-1)*x^2 + (5*a-12)*x +
(9*a-16) over Number Field in a with defining polynomial x^2 - x - 1
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
WARNING: Output truncated!  


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
59

...

227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
Elliptic Curve defined by y^2 + a*x*y = x^3 + (-a-1)*x^2 + (5*a-12)*x + (9*a-16) over Number Field in a with defining polynomial x^2 - x - 1
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
E = EllipticCurve(K,[a,-a-1,0,5*a-12,9*a-16]) 
       
N = 179 counter=1 for e in big_list_new11: print counter counter+=1 A = e[0]+e[1]*a B = e[2]+e[3]*a for ainv in various_lifts(A,B,11): D = quick_disc(ainv).norm() if D%N==0: #print ainv E = EllipticCurve(K,list(ainv)) if E.conductor().norm() == 179: print E 
       
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
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
e = big_list_new29[34] 
       
ap(EllipticCurve(K,[e[0]+e[1]*a,e[2]+e[3]*a]),K.ideal(a+5)) 
       
5
5
len(big_list_new29) 
       
392
392
5%3+10 
       
12
12
 
       
type(mod(5,3)) 
       
<type 'sage.rings.finite_rings.integer_mod.IntegerMod_int'>
<type 'sage.rings.finite_rings.integer_mod.IntegerMod_int'>
inverse_mod( 
       
def various_lifts(A,B,p): q=(p+1)/2 if p%3==1: v = (2*p+1)/3 if p%3==2: v = (p+1)/3 ret = [] for s in [0,q,q*a,q+q*a]: for r in [v*s^2,v*(s^2+1),v*(s^2-1),v*(s^2+a),v*(s^2-a),v*(s^2+a+1),v*(s^2+a-1),v*(s^2-a+1),v*(s^2-a-1)]: for t in [0,q,q*a,q+q*a]: a1 = K(2*s)[0]%p+K(2*s)[1]%p*a a2 = K(3*r-s^2)[0]%p+K(3*r-s^2)[1]%p*a if a2[0]>1: comp0=a2[0]-p else: comp0 = a2[0] if a2[1]>1: comp1 = a2[1]-p else: comp1 = a2[1] a2 = comp0+comp1*a a3 = K(2*t)[0]%p+K(2*t)[1]%p*a a4 = K(A+3*r^2-2*s*t)[0]%p+K(A+3*r^2-2*s*t)[1]%p*a a6 = K(B+r*A+r^3-t^2)[0]%p+K(B+r*A+r^3-t^2)[1]%p*a for c in [a4,a4-p,a4-p*a,a4-p-p*a]: for d in [a6,a6-p,a6-p*a,a6-p-p*a]: #print (a1,a2,a3,c,d) ret.append((a1,a2,a3,c,d)) return ret 
       
int(mod(5,3))+10 
       
12
12
E = EllipticCurve(K,[3*a+2,5*a]) 
       
E.a_invariants() in various_lifts(3*a+2,5*a,11) 
       
True
True
def ap(E,p): return E.change_ring(p.residue_field()).trace_of_frobenius() 
       
for i,c in enumerate(bigger_list_new): for c_c in bigger_list_new[i+1:]: if c == c_c: print 'hi' 
       
firstCurves = [] for E in mod11[-5]: firstCurves.append((int(E.a4()),int(E.a6()))) 
       
secondCurves = [] for E in mod11[3]: secondCurves.append((int(E.a4()),int(E.a6()))) 
       
big_list_new29 = split_prime_combine(29, firstCurves29,secondCurves29) 
       
big_list_new19 = split_prime_combine(19, firstCurves19,secondCurves19) 
       
big_list_new11 = split_prime_combine(11,firstCurves,secondCurves) 
       
len(big_list_new11) 
       
50
50
bigger_list_new = integral_combine(11*19,11,19,big_list_new11, big_list_new19) 
       
cond = 12*a+5 for c in bigger_list_new: E = EllipticCurve(K,[c[0]+a*c[1],c[2]+a*c[3]]) D = E.discriminant() if cond.divides(D): while cond.divides(D): D /= cond try: D = Integer(D.norm()**(1/12)) E = EllipticCurve(K,[c[0]+a*c[1],c[2]+a*c[3]]) new_cond = E.conductor() print new_cond, c except TypeError: pass 
       
Integer((12)**(1/12)) 
       
Traceback (click to the left of this block for traceback)
...
TypeError: unable to convert x (=12^(1/12)) to an integer
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_295.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("SW50ZWdlcigoMTIpKiooMS8xMikp"),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpc1H0Jr/___code___.py", line 3, in <module>
    exec compile(u'Integer((_sage_const_12 )**(_sage_const_1 /_sage_const_12 ))
  File "", line 1, in <module>
    
  File "integer.pyx", line 651, in sage.rings.integer.Integer.__init__ (sage/rings/integer.c:7253)
  File "expression.pyx", line 694, in sage.symbolic.expression.Expression._integer_ (sage/symbolic/expression.cpp:4333)
TypeError: unable to convert x (=12^(1/12)) to an integer
firstCurves29 = [] for E in mod29[7]: firstCurves29.append((int(E.a4()),int(E.a6()))) secondCurves29 = [] for E in mod29[5]: secondCurves29.append((int(E.a4()),int(E.a6()))) 
       
K.primes_above(29)[1].integral_basis() 
       
[29, a + 5]
[29, a + 5]
lifts(mod11r(E.a4()), mod11r(3*a-1))[1] 
       
3*a + 1
3*a + 1
K.primes_above(19)[1].integral_basis() 
       
[19, a + 4]
[19, a + 4]
for E in mod19[1]: for A in lifts(mod11r(E.a4()), mod11r(3*a-1)): for B in lifts(mod11r(E.a6()), mod11r(3*a-1)): try: E = EllipticCurve(p1,[eval(str(A)),eval(str(B))]) if E in mod11[3]: print E except ArithmeticError: pass 
       
def over_split_prime(first, second, ring, firstP, secondP): ret = [] secondP.<c,b> = Ok.quo(Ok.ideal(secondP)) for E in first: for A in lifts(ring(E.a4()), ring(firstP)): for B in lifts(ring(E.a6()), ring(firstP)): try: E = EllipticCurve(secondP,[eval(str(A)),eval(str(B))]) E = EllipticCurve(K, [eval(str(E.a4())), eval(str(E.a6()))]) if E in second: ret.append(EllipticCurve(K,[eval(str(A)),eval(str(B))])) except ArithmeticError: pass return ret 
       
bigger_list = over_split_prime(big_list, big_list2, mod209r, 11, 19) 
       
len(big_list) 
       
50
50
len(bigger_list) 
       
108
108
E.change_ring(K.ideal(3*a-2).residue_field()).trace_of_frobenius() 
       
4
4
for i,E in enumerate(bigger_list): print i, E.conductor().norm() 
       
0 1609275361536
1 206128411096320
2 173979991905280
3 16793600
4 170026781646080
5 3485383376896
6 848326596598016
7 4295950935104
8 593527014656
9 6229600241920
10 1308839578277120
11 102967853824
12 26556420306176
13 25262361856
14 1504661146968320
15 4267887448829184
16 3488761309918464
17 292142133202176
18 399743942400
19 13862015022080
20 57190674288896
21 1938544171264
22 881671834880
23 1638797947600
24 499522003664
25 201353347136
26 320196120252416
27 10127972429824
28 3474487949854976
29 852308761112576
30 5156864
31 1769990344130816
32 1280076177600
33 4599919736064
34 398103978816
35 20078508007744
36 1076634701056
37 2501063909696
38 3965639746816
39 13217656622336
40 192386365520
41 47137747201280
42 360518575200064
43 37405766416
44 731632803514624
45 26365666082816
46 20350147907584
47 7535295041536
48 3943132676506880
49 248007312064976
50 379448193921280
51 9085118209280
52 25398814766336
53 1516393899977984
54 294118994265344
55 2530164638450944
56 176068896027904
57 264507454720
58 825799626154816
59 1220520054016
60 306080715632896
61 223777104683264
62 2642084176
63 3338692952144
64 1381584088265984
65 676990354064
66 529676416064
67 416119549136896
68 31476263609600
69 67034168576
70 14680591006976
71 43142080414976
72 10985024
73 35184026795264
74 2086803862784
75 1356064280576
76 21081220310016
77 52357026370816
78 4165635190464
79 1784937218008320
80 873397903032576
81 6883795701904
82 6860053575936
83 26153810110720
84 1337350959229184
85 1927704551680
86 4260796367104
87 4626594138566656
88 164350503680
89 192468865024
90 2355845140736
91 41184320
92 716939455873024
93 283925460736
94 19333327458304
95 137224800282944
96 2258564608722176
97 5107345593871616
98 218436600478976
99 1986900071680
100 51957682954496
101 164253336024320
102 2763192453357824
103 5438880882944
104 125949309058304
105 5211012619520
106 3352786053696
107 22096728064
0 1609275361536
1 206128411096320
2 173979991905280
3 16793600
4 170026781646080
5 3485383376896
6 848326596598016
7 4295950935104
8 593527014656
9 6229600241920
10 1308839578277120
11 102967853824
12 26556420306176
13 25262361856
14 1504661146968320
15 4267887448829184
16 3488761309918464
17 292142133202176
18 399743942400
19 13862015022080
20 57190674288896
21 1938544171264
22 881671834880
23 1638797947600
24 499522003664
25 201353347136
26 320196120252416
27 10127972429824
28 3474487949854976
29 852308761112576
30 5156864
31 1769990344130816
32 1280076177600
33 4599919736064
34 398103978816
35 20078508007744
36 1076634701056
37 2501063909696
38 3965639746816
39 13217656622336
40 192386365520
41 47137747201280
42 360518575200064
43 37405766416
44 731632803514624
45 26365666082816
46 20350147907584
47 7535295041536
48 3943132676506880
49 248007312064976
50 379448193921280
51 9085118209280
52 25398814766336
53 1516393899977984
54 294118994265344
55 2530164638450944
56 176068896027904
57 264507454720
58 825799626154816
59 1220520054016
60 306080715632896
61 223777104683264
62 2642084176
63 3338692952144
64 1381584088265984
65 676990354064
66 529676416064
67 416119549136896
68 31476263609600
69 67034168576
70 14680591006976
71 43142080414976
72 10985024
73 35184026795264
74 2086803862784
75 1356064280576
76 21081220310016
77 52357026370816
78 4165635190464
79 1784937218008320
80 873397903032576
81 6883795701904
82 6860053575936
83 26153810110720
84 1337350959229184
85 1927704551680
86 4260796367104
87 4626594138566656
88 164350503680
89 192468865024
90 2355845140736
91 41184320
92 716939455873024
93 283925460736
94 19333327458304
95 137224800282944
96 2258564608722176
97 5107345593871616
98 218436600478976
99 1986900071680
100 51957682954496
101 164253336024320
102 2763192453357824
103 5438880882944
104 125949309058304
105 5211012619520
106 3352786053696
107 22096728064
big_list = over_split_prime(mod11[-5], mod11[3], mod11r, 3*a-1, 3*a-2) 
       
big_list2 = over_split_prime(mod19[1], mod19[-4], mod19r, -4*a+3, -4*a+1) for E in big_list2: print E.conductor().norm() 
       
WARNING: Output truncated!  
full_output.txt



1902281984
961144064
1334951936
199819520
2251862336
277590016
15037696
50155520
1263234304
5637376
467255296
2092466944
2974976
4910336
326986496
610445504
8421574400
4422518080
1359536704
1950552064
2124534016
1377243136
1000844480
3164480
2475678656
6309958400
1283796224
173518144
92299520
449350400
1494713600
2148121600
4833280
3288494080
11905280
290923264
717703424
349680896
3158441216
805924864
4688002304
131966720
2528792576
2754738944
260612864
1354804480
503246080
56317936
3007744
1293716224
1957990400
1657406144
4309127936
4085790976
5623941376
5190697216
1855306816
135536896
14480

...

614926080
211479984
122425344
388924416
744443136
206966016
115406080
8407937024
232385680
4934594816
16140214016
4037857280
935065280
5476638464
10821184
170872064
778083136
543945424
1434224
1107783424
24598353664
2219393024
593920
9872384
34782784
6278719744
1003481344
2510884864
13001948416
220402944
1106735104
291844864
77824
472404736
363969280
3439083520
11775787776
398022336
7549127424
10684224
3303431424
5092782336
5962639616
13394744576
1162833920
1865970944
166882304
3452943104
3165158656
504753920
134641856
246552896
267463936
838763776
2372679424
19169115904
1282207744
305601536
326610944
77015296
WARNING: Output truncated!  
full_output.txt



1902281984
961144064
1334951936
199819520
2251862336
277590016
15037696
50155520
1263234304
5637376
467255296
2092466944
2974976
4910336
326986496
610445504
8421574400
4422518080
1359536704
1950552064
2124534016
1377243136
1000844480
3164480
2475678656
6309958400
1283796224
173518144
92299520
449350400
1494713600
2148121600
4833280
3288494080
11905280
290923264
717703424
349680896
3158441216
805924864
4688002304
131966720
2528792576
2754738944
260612864
1354804480
503246080
56317936
3007744
1293716224
1957990400
1657406144
4309127936
4085790976
5623941376
5190697216
1855306816
135536896
14480

...

614926080
211479984
122425344
388924416
744443136
206966016
115406080
8407937024
232385680
4934594816
16140214016
4037857280
935065280
5476638464
10821184
170872064
778083136
543945424
1434224
1107783424
24598353664
2219393024
593920
9872384
34782784
6278719744
1003481344
2510884864
13001948416
220402944
1106735104
291844864
77824
472404736
363969280
3439083520
11775787776
398022336
7549127424
10684224
3303431424
5092782336
5962639616
13394744576
1162833920
1865970944
166882304
3452943104
3165158656
504753920
134641856
246552896
267463936
838763776
2372679424
19169115904
1282207744
305601536
326610944
77015296
for E in bigger_list: print E.conductor() 
       
Fractional ideal (-512*a - 11312)
Fractional ideal (112*a + 528)
Fractional ideal (864*a - 9296)
Fractional ideal (-232*a - 1904)
Fractional ideal (-32*a - 2552)
Fractional ideal (144*a - 1216)
Fractional ideal (-17040*a + 7792)
Fractional ideal (16688*a - 12576)
Fractional ideal (4272*a + 22768)
Fractional ideal (10800*a - 5184)
Fractional ideal (-4544*a + 2816)
Fractional ideal (384*a - 14080)
Fractional ideal (-832*a + 544)
Fractional ideal (-6080*a + 2848)
Fractional ideal (-6560*a + 1744)
Fractional ideal (-11648*a + 6704)
Fractional ideal (2096)
Fractional ideal (-10992*a + 7808)
Fractional ideal (1216*a - 18368)
Fractional ideal (2488*a - 15520)
Fractional ideal (208*a + 3888)
Fractional ideal (3680*a - 19376)
Fractional ideal (-1080*a + 800)
Fractional ideal (21344*a - 8592)
Fractional ideal (40*a + 176)
Fractional ideal (48*a - 416)
Fractional ideal (-320*a + 1968)
Fractional ideal (4000*a - 2064)
Fractional ideal (9120*a - 2768)
Fractional ideal (-864*a + 216)
Fractional ideal (3456*a - 1728)
Fractional ideal (812*a + 5488)
Fractional ideal (-4544*a + 2816)
Fractional ideal (-5792*a + 2256)
Fractional ideal (-4248*a + 2900)
Fractional ideal (13360*a - 4224)
Fractional ideal (-320*a + 2672)
Fractional ideal (448*a - 3576)
Fractional ideal (-384*a - 11392)
Fractional ideal (-1152*a - 6832)
Fractional ideal (64*a - 368)
Fractional ideal (-3904*a + 2112)
Fractional ideal (-248*a - 1928)
Fractional ideal (64*a + 1024)
Fractional ideal (26848*a - 13712)
Fractional ideal (12736*a - 8192)
Fractional ideal (-1824*a + 976)
Fractional ideal (160*a - 1168)
Fractional ideal (520*a + 5136)
Fractional ideal (5616)
Fractional ideal (-512*a - 11312)
Fractional ideal (112*a + 528)
Fractional ideal (864*a - 9296)
Fractional ideal (-232*a - 1904)
Fractional ideal (-32*a - 2552)
Fractional ideal (144*a - 1216)
Fractional ideal (-17040*a + 7792)
Fractional ideal (16688*a - 12576)
Fractional ideal (4272*a + 22768)
Fractional ideal (10800*a - 5184)
Fractional ideal (-4544*a + 2816)
Fractional ideal (384*a - 14080)
Fractional ideal (-832*a + 544)
Fractional ideal (-6080*a + 2848)
Fractional ideal (-6560*a + 1744)
Fractional ideal (-11648*a + 6704)
Fractional ideal (2096)
Fractional ideal (-10992*a + 7808)
Fractional ideal (1216*a - 18368)
Fractional ideal (2488*a - 15520)
Fractional ideal (208*a + 3888)
Fractional ideal (3680*a - 19376)
Fractional ideal (-1080*a + 800)
Fractional ideal (21344*a - 8592)
Fractional ideal (40*a + 176)
Fractional ideal (48*a - 416)
Fractional ideal (-320*a + 1968)
Fractional ideal (4000*a - 2064)
Fractional ideal (9120*a - 2768)
Fractional ideal (-864*a + 216)
Fractional ideal (3456*a - 1728)
Fractional ideal (812*a + 5488)
Fractional ideal (-4544*a + 2816)
Fractional ideal (-5792*a + 2256)
Fractional ideal (-4248*a + 2900)
Fractional ideal (13360*a - 4224)
Fractional ideal (-320*a + 2672)
Fractional ideal (448*a - 3576)
Fractional ideal (-384*a - 11392)
Fractional ideal (-1152*a - 6832)
Fractional ideal (64*a - 368)
Fractional ideal (-3904*a + 2112)
Fractional ideal (-248*a - 1928)
Fractional ideal (64*a + 1024)
Fractional ideal (26848*a - 13712)
Fractional ideal (12736*a - 8192)
Fractional ideal (-1824*a + 976)
Fractional ideal (160*a - 1168)
Fractional ideal (520*a + 5136)
Fractional ideal (5616)
p2 = K.residue_field(K.ideal(-4*a+1)) 
       
from psage.modform.hilbert.sqrt5 import sqrt5_fast as sqrt5 
       
K.<a> = NumberField(x**2-x-1) 
       
K.primes_above(11) 
       
[Fractional ideal (3*a - 2), Fractional ideal (3*a - 1)]
[Fractional ideal (3*a - 2), Fractional ideal (3*a - 1)]
mod19r = sqrt5.ResidueRingModN(K.ideal(19)) 
       
p1 
       
Residue class ring modulo the ideal (11) of norm 121
Residue class ring modulo the ideal (11) of norm 121
p2 = sqrt5.ResidueRing(K.ideal(3*a - 1),1) 
       
sqrt5.ResidueRingModN(11) 
       
Traceback (click to the left of this block for traceback)
...
AttributeError: 'sage.rings.integer.Integer' object has no attribute
'smallest_integer'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "_sage_input_59.py", line 10, in <module>
    exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("c3FydDUuUmVzaWR1ZVJpbmdNb2ROKDExKQ=="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
  File "", line 1, in <module>
    
  File "/tmp/tmpjynkLm/___code___.py", line 3, in <module>
    exec compile(u'sqrt5.ResidueRingModN(_sage_const_11 )
  File "", line 1, in <module>
    
  File "sqrt5_fast.pyx", line 1378, in psage.modform.hilbert.sqrt5.sqrt5_fast.ResidueRingModN.__init__ (psage/modform/hilbert/sqrt5/sqrt5_fast.c:14277)
  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 175, in sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2699)
AttributeError: 'sage.rings.integer.Integer' object has no attribute 'smallest_integer'
E.change_ring(mod11r) 
       
Elliptic Curve defined by y^2 = x^3 + 2*x + 4 over Quotient of Maximal
Order in Number Field in a with defining polynomial x^2 - x - 1 by the
ideal (11)
Elliptic Curve defined by y^2 = x^3 + 2*x + 4 over Quotient of Maximal Order in Number Field in a with defining polynomial x^2 - x - 1 by the ideal (11)
       
Elliptic Curve defined by y^2 = x^3 + 2*x + 4 over Finite Field of size
11
Elliptic Curve defined by y^2 = x^3 + 2*x + 4 over Finite Field of size 11
e = sqrt5.ResidueRingElement 
       
Ok = K.ring_of_integers() mod209r.<b,c> = Ok.quotient(Ok.ideal(209)) 
       
mod11r(1) 
       
1
1
x = parent = modllr e._parent = parent assert x.parent() is parent.F v = x._coefficients() self.x[1] = 0 if len(v) == 0: self.x[0] = 0 return elif len(v) == 1: self.x[0] = v[0] % self._parent.n0 return self.x[0] = v[0] + parent.im_gen0*v[1] self.x[0] = self.x[0] % self._parent.n0 self.x[1] = 0 
       
<type 'psage.modform.hilbert.sqrt5.sqrt5_fast.ResidueRingElement'>
<type 'psage.modform.hilbert.sqrt5.sqrt5_fast.ResidueRingElement'>