Z := IntegerRing(); ZX := PolynomialRing(Z); //////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /// // Carakter @param p premier // @param ordre divise p-1 ... exemple p=31 et ordre =3 // @return un caractère d'ordre ordre /////////////////////////////////////////////////////////////////////////////// Carakter := function(p,ordre) // ordre divise p-1 // caractère d'ordre ordre Cyclo := CyclotomicField(p-1); BASE := {y^i : i in [0..p-2]}; K:=GF(p); // pas bon l'anneau !!! GENS := PrimitiveElement(K); //Chi_GENS := map {0} join BASE | l :-> GCD(p,l) eq 1 select y^(Log(K!GENS, K!l)) else 0 > ; Chiordre := map < Z -> {0} join BASE | l :-> GCD(p,l) eq 1 select y^(ExactQuotient(p-1,ordre)*Log(K!GENS, K!l)) else 0 > ; return Chiordre; end function ; //////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// /// // Extension @param q1 q2 premier, ordrei divise qi-1 : exemple q=31 et ordre =3 // // @return un polynôme de groupe de Galois Cordre1xCordre2 c Z/q1Z)^* x Z/q2)^* // ///////////////////////////////////////////////////////////////////////////////////////////////////////// Extension := function(q1,ordre1,q2,ordre2) //q1 := 13 ; q2 := 31 ; d,u,v := XGCD(q1,q2) ; uq1 := u*q1 ; vq2 := v*q2 ; assert 1 eq uq1 + vq2 ; q1q2 := q1*q2 ; // Isomorphisme chinois : Z/q1Z x Z/q2Z -> Z/q1q2Z : (y,z) -> x = vq2*y + uq1*z IsoChinois := func < y,z | (vq2 * y + uq1 * z) mod q1q2 > ; Uq1q2 := [x : x in [1..q1q2-1] | Gcd(x,q1q2) eq 1] ; Cordre1xCordre2 := {IsoChinois(x^ExactQuotient(q1-1,ordre1),x^ExactQuotient(q2-1,ordre2)) : x in Uq1q2} ; Fibres := [[x : x in Uq1q2 | IsoChinois(x^ExactQuotient(q1-1,ordre1),x^ExactQuotient(q2-1,ordre2)) eq y] : y in Cordre1xCordre2] ; L := CyclotomicField(q1q2) ; LT := PolynomialRing(L) ; S := [&+[z^k : k in C] : C in Fibres] ; F := &*[T - s : s in S] ; return F ; end function; ////////////////////////////////////////////////////////: //// //// Un exemple ... //// /////////////////////////////////////////////////////// p :=29; ordre1 := 7; q:=31; ordre2 :=3; /// 7 divise 29-1 et 3 divise 31-1 Chi3bis := Carakter(q,ordre2); /// carakter de Z/pqZ)^* D'ordre 3 provenant de Z/qZ)^* Chi3 := Carakter(p,ordre1); /// carakter de Z/pqZ)^* D'ordre 7 provenant de Z/pZ)^* Qj:= CyclotomicField((p-1)*(q-1)); QjT := PolynomialRing(Qj) ; zeta := map < Z -> ZX | m :-> ZX!&*[1 - Chi3(m)^i*Chi3bis(m)^j * T : i in [0..ordre1-1], j in [0..ordre2-1]] > ; F := Extension(p,ordre1,q,ordre2); R := PolynomialRing(Rationals()); > K := NumberField(R!F); K; > OK:= MaximalOrder(K); time [ : p in PrimesInInterval(1, 20)]; time [ : p in PrimesInInterval(1, 20) ];