curve_of_coolness_ver1

309 days ago by andrew.ohana

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 
       
mod11 = curves_in_GF(11) 
       
mod19 = curves_in_GF(19) 
       
mod11[3] 
       
[Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size
11, Elliptic Curve defined by y^2 = x^3 + 2*x + 2 over Finite Field of
size 11, Elliptic Curve defined by y^2 = x^3 + 3*x + 5 over Finite Field
of size 11, Elliptic Curve defined by y^2 = x^3 + 4*x + 1 over Finite
Field of size 11, Elliptic Curve defined by y^2 = x^3 + 5*x + 3 over
Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 6*x + 8
over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 7*x
+ 10 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 +
8*x + 6 over Finite Field of size 11, Elliptic Curve defined by y^2 =
x^3 + 9*x + 9 over Finite Field of size 11, Elliptic Curve defined by
y^2 = x^3 + 10*x + 7 over Finite Field of size 11]
[Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 2*x + 2 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 3*x + 5 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 4*x + 1 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 5*x + 3 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 6*x + 8 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 7*x + 10 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 8*x + 6 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 9*x + 9 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 10*x + 7 over Finite Field of size 11]
mod11[-5] 
       
[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 + 6*x + 5 over Finite Field of
size 11, Elliptic Curve defined by y^2 = x^3 + 7*x + 9 over Finite Field
of size 11, Elliptic Curve defined by y^2 = x^3 + 8*x + 1 over Finite
Field of size 11, Elliptic Curve defined by y^2 = x^3 + 10*x + 3 over
Finite Field of size 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 + 6*x + 5 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 7*x + 9 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 8*x + 1 over Finite Field of size 11, Elliptic Curve defined by y^2 = x^3 + 10*x + 3 over Finite Field of size 11]
def lifts(input, modulus): tmp = input ret = [tmp] tmp += modulus while tmp != input: ret.append(tmp) tmp += modulus return ret 
       
lifts(mod11r(E.a4()), mod11r(3*a-1))[1] 
       
3*a + 1
3*a + 1
mod19[1] 
       
[Elliptic Curve defined by y^2 = x^3 + 10 over Finite Field of size 19,
Elliptic Curve defined by y^2 = x^3 + 13 over Finite Field of size 19,
Elliptic Curve defined by y^2 = x^3 + 15 over Finite Field of size 19,
Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size
19, Elliptic Curve defined by y^2 = x^3 + x + 18 over Finite Field of
size 19, Elliptic Curve defined by y^2 = x^3 + 4*x + 6 over Finite Field
of size 19, Elliptic Curve defined by y^2 = x^3 + 4*x + 8 over Finite
Field of size 19, Elliptic Curve defined by y^2 = x^3 + 5*x + 9 over
Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 5*x + 12
over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 6*x
+ 6 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 +
6*x + 8 over Finite Field of size 19, Elliptic Curve defined by y^2 =
x^3 + 7*x + 4 over Finite Field of size 19, Elliptic Curve defined by
y^2 = x^3 + 7*x + 18 over Finite Field of size 19, Elliptic Curve
defined by y^2 = x^3 + 9*x + 6 over Finite Field of size 19, Elliptic
Curve defined by y^2 = x^3 + 9*x + 8 over Finite Field of size 19,
Elliptic Curve defined by y^2 = x^3 + 11*x + 4 over Finite Field of size
19, Elliptic Curve defined by y^2 = x^3 + 11*x + 18 over Finite Field of
size 19, Elliptic Curve defined by y^2 = x^3 + 16*x + 9 over Finite
Field of size 19, Elliptic Curve defined by y^2 = x^3 + 16*x + 12 over
Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 17*x + 9
over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 17*x
+ 12 over Finite Field of size 19]
[Elliptic Curve defined by y^2 = x^3 + 10 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 13 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 15 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + x + 4 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + x + 18 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 4*x + 6 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 4*x + 8 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 5*x + 9 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 5*x + 12 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 6*x + 6 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 6*x + 8 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 7*x + 4 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 7*x + 18 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 9*x + 6 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 9*x + 8 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 11*x + 4 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 11*x + 18 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 16*x + 9 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 16*x + 12 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 17*x + 9 over Finite Field of size 19, Elliptic Curve defined by y^2 = x^3 + 17*x + 12 over Finite Field of size 19]
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(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'>