CoCalc Shared Files2016-12-15-191547.sagews
Author: acx01bc .
Views : 7
Description: test splitting prime ideals modulo p
E = EllipticCurve([0,- 1, 0, 0, -1])
E.anlist(20)

[0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, -2, 0, 2, 0, -6, 0, -1, 0]
p = 13;
a = 1; b = 1;
F = GF(p);
R.<x> = F[];
(x^3-a*x-b).factor()
E = EllipticCurve(F,[0, 0, 0, -a, -b])
E.cardinality()
E2 = EllipticCurve([0, 0, 0, -a, -b])
E2.anlist(20)

R.<x> = QQ[]
K.<a,b> = NumberField([x^2-31, x^3-x^2-1])
Z = K.zeta_function()
Z(2)


x^3 + 12*x + 12 19 [0, 1, 0, 3, 0, -2, 0, 4, 0, 6, 0, -2, 0, -5, 0, -6, 0, 4, 0, 2, 0] 1.35165039003399
R.<x> = QQ[]
I = R.ideal(x^2-31);
h= x^3-x^2-1
h(x+1/3)

K.<a,b> = NumberField([x^2-31, x^3-x^2-1])
K.galois_group()

#K.<t> = R.quotient(I);
#S.<z> = K[];
#(z^3-z^2-1).factor()
K.<a> = NumberField(x^2-31)
S.<z> = K[];
(z^3-z^2-1).factor()
#K.<a> = NumberField(x^2-31)
#OK = K.ring_of_integers()
#OK.basis()
#I = OK.ideal([3,1+a])
#J = OK.ideal([3,1-a])
#I*J
#I.norm()
#I.factor()
#J.factor()#

#I.basis()

#H = OK.ideal(1+a)
#H.factor()

x^3 - 1/3*x - 29/27 Galois group PARI group [12, -1, 3, "D(6) = S(3)[x]2"] of degree 6 of the Number Field in a with defining polynomial x^2 - 31 over its base field z^3 - z^2 - 1


R.<x> = QQ[]
K.<a> = NumberField(x^3-19)
OK = K.ring_of_integers()
OK.basis()
I = OK.ideal(3)
I.factor()

J = OK.ideal(3)+OK.ideal(-1+a)
J.factor()
J.norm()


[1/3*a^2 + 1/3*a + 1/3, a, a^2] (Fractional ideal (3, 1/3*a^2 + 1/3*a + 1/3))^2 * (Fractional ideal (3, 1/3*a^2 + 1/3*a - 2/3)) (Fractional ideal (3, 1/3*a^2 + 1/3*a + 1/3)) * (Fractional ideal (3, 1/3*a^2 + 1/3*a - 2/3)) 9
R.<x> = QQ[]
K.<a> = NumberField(x^4+x^3+x^2+1)
OK = K.ring_of_integers()

OK.class_group()


Class group of order 1 of Number Field in a with defining polynomial x^4 + x^3 + x^2 + 1

R.<x> = QQ[]
K.<a> = NumberField(x^2-10)
OK = K.ring_of_integers()

OK.class_group()
I = OK.ideal(3,1+a)
J = OK.ideal(3,1-a)
I*J
(3-a)*(3+a)
(I*I).factor()

exit(0)

P = x^5+7*x^4-7*x^3+7*x+1
['is prime : ', P.is_prime()]
K.<a> = NumberField(P)
['is galois : ',K.is_galois()]
OK = K.ring_of_integers()

OK.class_group().gen()
I = OK.ideal(3,a^2+a+1); I
I.basis()
exit(0);

p = 3
OK(p).factor()

F = GF(p)
R.<y> = F[]
Q = R(P)
fac = Q.factor()
fac

fac1 = fac[0][0]
fac2 = fac[1][0]
[fac1,fac2]

OKR.<z> = OK[]
fac1R = OKR(fac1)
fac2R = OKR(fac2)
fac2R
I1 = OK.ideal([p,fac1R(a)])
I2 = OK.ideal([p,fac2R(a)])
[fac1R(a),fac2R(a)]
[I1,I2]
I1*I2
I2.intersection(3)
fac1R(a)*fac2R(a)/3
fac1.gcd(fac2)

Class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 - 10 Fractional ideal (3) -1 (Fractional ideal (3, a + 1))^2
Error in lines 10-10 Traceback (most recent call last): File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 995, in execute exec compile(block+'\n', '', 'single') in namespace, locals File "", line 1, in <module> File "/projects/sage/sage-7.5/local/lib/python/site.py", line 351, in __call__ raise SystemExit(code) SystemExit: 0