WorksMathematics
Test of p-rationality of a number field–pari/gp programs
Abstract
We give a new computational approach of p-rationality of a number field k, when the method using ray class groups is out of reach in a reasonable time when the degree of k and p are too large. The method is based for a part on the utilisation of the Logp-function that we have defined in the 80's. The general pari/gp program makes no assumptions about k and p. For quadratic fields, we give other programs giving more information (surprisingly these programs, with many instructions, are much faster).
Introduction and Main computational results
We intend to furnish various PARI/GP [20] programs testing the -rationality1 for any and any number field given by means of an irreducible monic polynomial ; the first one (Program 1.1.2) is new, completely general and runs much faster. Except for few “bad primes”, the program does not use ray class groups. For comparison, we give again the classical program (Program 1.2.1) only using ray class groups of suitable modulus (adapted version of [10 Program II, p. 37]). The two others (Programs 1.3.1, 1.4.1) are specified for quadratic fields and do not use ray class groups.
In general, we provide only simple versions of the instructions of the PARI/GP language, so that any reader (whether or not they use PARI/GP) can analyze the program and make use of it. The programs may be copied and pasted from any tex or pdf file; if necessary, the reader can download the PAR/GP-pakage from https://pari.math.u-bordeaux.fr/gpwasm.html.
I apologize if certain programs appear to be causing issues; I would appreciate any information you could provide about this. In case of doubt, it is always possible to check using the program involving ray class groups, provided that is not too large; but our purpose is to analyse, for some generalized conjectures (e.g. [8]), the huge giving a non -rationality.
In the next section, we give Program 2.2 for the test of triviality of the normalized -adic regulator .2 Then we give the Programs 3.2.1, 3.2.2, 3.2.3, testing, with various approaches, the necessary condition of -rationality: , in terms of local and global -groups of roots of unity. Finally, Program 7.2.3 is testing if the -Hilbert class field of is or not linearly disjoint from the compositum of the -extensions of , which gives the tricky invariant .
General program for any number field and any prime number
Refer to the Section 5.1 for some class field theory justifications and the definition of the finite -modules , , (in Hinfty, MLogE, W, respectively in the programs)3, being such that the -rationality of is equivalent to . Program 1.1.2 is not based on computations of ray class groups, except for few bad primes that otherwise would need very complicated sub-algorithms. See Definition 6.1 for the notion of bad primes for which the programs use classical way; the subset of bad primes, which are needed, may depend of the purpose of the program. These primes are few in number and generally small; for the non-bad primes, computations are much easier and faster.
Bad primes associated to the field
The following program gives the prime numbers dividing the class number , the discriminant Dk = k.disc, the denominators of the integer basis k.zk[i] of ; it adds the primes less than (see Definition 6.1):
allocatemem(800000000)
{P=x^29+7*x^3−14*x−7;d=poldegree(P);if(polisirreducible(P)==0,break);
print("P=",P);k=bnfinit(P,1);print("Hk=",k.cyc);Pbad=List;
forprime(p=2,d+1,listput(Pbad,p));Z=k.zk;denB=1;
for(j=1,d,Bzk=lift(Z[j]);for(i=0,d−1,
denB=lcm(denominator(polcoeff(Bzk,i)),denB));
\PRIME DIVISORS OF hk,Dk,denB:
Fbad=factor(k.no*abs(k.disc)*denB);
df=matresize(Fbad[1]);for(i=1,d,p=component(Fbad,1)[i];
if(p>d+1,listput(Pbad,p));print("Pbad=",Pbad)}
time = 14,763 ms.
Let’s give the results for various P:
P=x^9+7*x^3-14*x-7 Hk=[]
Pbad=List([2,3,5,7,251,4649])
P=x^19+7*x^3-14*x-7 Hk=[]
Pbad=List([2,3,5,7,11,13,17,19,1158587,290260991,335367508213])
P=x^29+7*x^3-14*x-7 Hk=[]
Pbad=List([2,3,5,7,11,13,17,19,23,29,67,251,265403,8929674616619,
55306100356254142133177])
Remarks 1.1. (i) One verifies that primes dividing denominators of units, divide that of integer basis elements.
(ii) The huge bad primes will probably not be considered by the selected intervals in the program(s); they are due in general to ramified primes as for the above polynomial where the field discriminant is Dₖ = 7 · 251 · 265403 · 8929674616619 · 55306100356254142133177.
For such huge primes, one checks easily that , but remains a possible obstruction (Borel–Cantelli probability very close to 0). If the prime p is not bad but too large for the program, one may use the specific Program 2.2.2 testing only the regulator.
(iii) The primes less than or equal to are sometimes considered as bad primes since they may give .
1.1.2. Program P1. The reader has only to choose the polynomial P and the interval [bp, Bp] at will. The upper bound Maxbad avoid the huge bad primes and may be modified. Since is unramified, hatt = N = 2. Unless otherwise stated, the polynomials, in our examples, have been chosen at random:
{P=x^9+7*x^3-14*x-7;d=poldegree(P);bp=2;Bp=10^6;
Maxbad=5*10^3;
if(polisirreducible(P)==0,break);print("P=",P);k=bnfinit(P,1);
print("class group=",k.cyc);kP=nfinit(P);rk=kP[2][2]+1;
print("number of independent Z_p-extensions=",rk);
E=k.fu;rE=kP[2][1]+kP[2][2]-1;print("Z-rank of the unit group=",rE);
\\BAD PRIMES:
Pbad=List;
\\SMALL BAD PRIMES:
Minbad=d+1;dbad=0;
forprime(p=bp,Minbad,listput(Pbad,p);dbad=dbad+1);
\\DENOMINATORS OF THE INTEGER BASIS:
denB=1;for(j=1,d,Bzk=lift(k.zk[j]);for(i=0,d-1,
denB=lcm(denominator(polcoeff(Bzk,i)),denB)));
\\PRIME DIVISORS OF hk,Dk,denB:
Fbad=factor(k.no*abs(k.disc)*denB);dF=matsize(Fbad)[1];
gbad=0;for(i=1,dF,p=component(Fbad,1)[i];
if(p>Minbad,listput(Pbad,p);gbad=gbad+1));
print("Pbad=",Pbad);Nbad=dbad+gbad;
\\PRODUCT OF ALL THE BAD PRIMES:
Prodbad=1;for(q=1,Nbad,Prodbad=Prodbad*Pbad[q]);
\\TEST OF p-RATIONALITY FOR THE BAD PRIMES < Maxbad:
for(j=1,Nbad,p=Pbad[j];if(p>Maxbad,next);
\\USE OF A RAY CLASS GROUP:
nup=2;if(p==2,nup=3);Tk=List;L=List;
kpnup=bnrinit(k,p^nup);Hpnup=kpnup.cyc;
e=component(matsize(Hpnup),2);R=0;for(j=1,e,
c=Hpnup[e-j+1];if(Mod(c,p)==0,R=R+1;
listput(L,p^valuation(c,p)));
\\WRITINGS: p-RATIONALITY/NON-p-RATIONALITY:
\\SUPPRESS \\ BELOW TO WRITE ALL p-RATIONAL FIELDS:
\\if(R==rk,print("k is ",p,"-rational"));
if(R>rk,for(i=1,R-rk,c=L[i];listput(Tk,c));
print("p=",p," rank of the ",p,"-torsion group Tk=",R-rk);
print("k is not ",p,"-rational");
print("**********************")));
\\TEST FOR THE NON-BAD PRIMES < Bp:
\\DECOMPOSITION OF p IN k, COMPUTATION OF M:
forprime(p=bp,Bp,if(Mod(Prodbad,p)==0,next);
F=idealfactor(k,p);g=matsize(F)[1];M=1;for(i=1,g,
Primei=component(F,1)[i];fi=Primei[4];M=lcm(M,p^fi-1));
\\TEST OF INVERSIBILITY OF THE REGULATOR:
N=2;mod=p^N;hatt=N;LogE=List;
for(ell=1,rE,epsilonM=Mod(Mod(lift(E[ell]),mod),P)^M;
pi=Mod(lift(lift(epsilonM)),P)-1;
\\COMPUTATION OF Logarithms:
Log=pi;t=1;pit=pi;while(t<=hatt,t=t+1;pit=pi*pit;
Log=Log+(-1)^(t+1)*pit/t;
\\REDUCTION OF Log MODULO mod:
Log=Mod(Mod(lift(Log),mod),P));
Log=Mod(lift(lift(Log)),P);
listput(LogE,Log));
\\MATRIX MLogE ((rE,d)-matrix) GIVING Rk MODULO p:
ME=List;for(ell=1,rE,Lell=LogE[ell];Lell=lift(Lell)/p;
Lc=List;LellZ=nfalgtobasis(k,Mod(Lell,P));
for(j=1,d,coeff=Mod(LellZ[j],p);
listput(Lc,coeff));listput(ME,Lc));
MLogE=matrix(rE,d,u,v,ME[u][v]);
\\COMPUTATION OF THE Z/pZ-rank OF MLogE:
RLog=matrank(MLogE);
\\WRITTINGS: p-RATIONALITY/NON-p-RATIONALITY:
\\if(RLog==rE,print("k is ",p,"-rational"));
if(RLog<rE,print("p=",p," rank(MLogE)=",RLog);
print("k is not ",p,"-rational");
print("**********************")))}
P=x^9+7*x^3-14*x-7
class group=[]
number of independent Z_p-extensions=4
Z-rank of the unit group=5
Pbad=List([2,3,5,7,251,4649])
**********************
p=2 rank(MLogE)=1
k is not 2-rational
**********************
**********************
p=61 rank(MLogE)=4
k is not 61-rational
**********************
**********************
p=5419 rank(MLogE)=4
k is not 5419-rational
**********************
**********************
p=12703 rank(MLogE)=4
k is not 12703-rational
**********************
for p<10^4: time = 720 ms.
for p<10^5: time = 8,345 ms.
for p<10^6: time = 1min, 34,310 ms.
for p<10^7: time = 15min, 44,164 ms.
There is no other solutions up to .
In this curious example the integer basis k.zk is given in part by the fundamental units E[i]:
nfalgtobasis(k,E[1]) = [0,0,0,0,-1,0,0,0,0]
nfalgtobasis(k,E[2]) = [0,0,0,0,0,0,-1,0,0]
nfalgtobasis(k,E[3]) = [0,0,0,0,0,1,0,0,0]
nfalgtobasis(k,E[4]) = [0,0,1,1,-1,-1,0,0,0]
nfalgtobasis(k,E[5]) = [0,0,0,1,-1,0,0,0,0]
Classical program testing -rationality with ray class groups
This program is using the structure of a suitable ray class group:
Program
The values nup = 2 for , nup = 3 for , are sufficient for computing the -rank of the -torsion group ; otherwise, take a larger value of nup to get its complete structure (knowing the -rank of , it suffices to stabilize the corresponding components given by kpnup.cyc, the rk first ones, being due to the -extensions, and tend to infinity with nup):
allocatemem(1000000000)
{\P=x^4+8*x^2+324;
P=x^9+7*x^3-14*x-7;
if(polisirreducible(P)==0,break);bp=2;Bp=10^4;
print("P=",P);rk=nfinit(P)[2][2]+1;
print("number of independent Z_p-extensions: ",rk);
k=bnfinit(P,1);print("class group=",k.cyc);
\\PRIMES p AND CHOICE OF nup:
forprime(p=bp,Bp,Tk=List;L=List;
nup=2;if(p==2,nup=3);
\\COMPUTATION OF THE RANK OF THE RAY CLASS GROUP:
kpnup=bnrinit(k,p^nup);Hpnup=kpnup.cyc;
e=component(matsize(Hpnup),2);R=0;for(j=1,e,c=Hpnup[e-j+1];
if(Mod(c,p)==0,R=R+1;listput(L,p^valuation(c,p))));
if(R>rk,for(j=1,R-rk,c=L[j];listput(Tk,c));print();
\\STRUCTURE OF Tk[p]:
print("rk(Tk)=",R-rk," k is not ",p,"-rational"," Tk[p]=",Tk))}
P=x^9+7*x^3-14*x-7
number of independent Z_p-extensions: 4
class group=[]
rk(Tk)=1 k is not 2-rational Tk[p]=List([2])
rk(Tk)=1 k is not 61-rational Tk[p]=List([61])
rk(Tk)=1 k is not 5419-rational Tk[p]=List([5419])
time = 201 ms for p<10^2.
time = 17,130 ms for p<10^3.
time = 1h, 35min, 7,927 ms for p<10^4.
The program is very slow for large primes and must be used only for small ones; moreover, one must increase the memory (e.g., allocatemem(1000000000)). It is difficult to compute beyond , but Program 1.1.2 takes time = 15min, 42,660ms up to !
Specific program for imaginary quadratic fields
The program is without use of a ray class group. The method consists of calculating separately (immediate tests limited to 2 and 3 since ), and (more difficult since we must compute the part of the Hilbert class field contained in the compositum of the -extensions of , which uses the -adic Log-function, whence the “Fermat quotients” of the pseudo-units given by ideal classes); in fact, for , , the anti-cyclotomic -extension. Note that in the program, for quadratic fields, if pi is any integer of of non-zero -valuations for all -places, then is a -integer for all , which is not the case in some framework of ramification of (this explains that ramified primes are “bad” ones). If is unramified in , then is a multiple of .
Program for imaginary quadratic fields and
The case will be treated separately (Program 1.3.2 below). Once the test on is done and since there is no regulator, only fields with a non-trivial -class group are tested. Since and quadratic, then . The reader has to indicate the intervals for and for :
allocatemem(800000000)
\p 600
{minm=2;maxm=10^4;minp=3;maxp=10^4;
for(m=minm,maxm,if(core(m)!=m,next);P=x^2+m;k=bnfinit(P);
\\COMPUTATION OF W:
W=1;if(-m!=-3 & Mod(-m,9)==-3,W=3;print("-m=",-m,
" k non ",3,"rational"," W=",3));
\\TESTS ON THE p-CLASS GROUP RANK:
Hk=k.clgp;Nk=Hk[2];A=Hk[3];dA=matsize(A)[2];
forprime(p=3,k.no,valhkp=valuation(Hk[1],p);
if(valhkp==0,next);dp=0;for(i=1,dA,if(Mod(Nk[i],p)==0,
dp=dp+1));if(dp>1,print("-m=",-m,
" k non ",p,"-rational, rankHk=",dp," W=",W," Hk=",Nk);next);
\\THE p-CLASS GROUP IS NOW p-CYCLIC (A0,N0):
for(i=1,dA,if(Mod(Nk[i],p)==0,N0=Nk[i];A0=A[i];break));
n0=valuation(N0,p);N=n0+2;mod=p^N;
\\DECOMPOSITION OF p:
F=idealfactor(k,p);g=matsize(F)[1];Prime=component(F,1)[1];
\\PRIME-TO-p GENERATOR B0 OF THE p-CLASS GROUP:
B0=A0;Norm0=idealnorm(k,B0);w0=valuation(Norm0,p);
if(w0!=0,
\\RAMIFIED CASE:
if(Mod(m,p)==0,z=idealappr(k,B0);B0=idealdiv(k,z,B0));
\\UNRAMIFIED CASE:
if(Mod(m,p)!=0,Bp=idealmul(k,B0,p);z=idealappr(k,Bp);
B0=idealdiv(k,z,Bp)));
\\COMPUTATION of THE VALUATION OF Log(U)^-:
if(p!=3,if(Mod(-m,p)!=0,vLogU=1);if(Mod(-m,p)==0,vLogU=0));
if(p==3,if(Mod(-m,3)!=0,vLogU=1);if(Mod(-m,3)==0 & Mod(-m,9)!=-3,vLogU=0);
if(Mod(-m,3)==0 & Mod(-m,9)==-3,vLogU=1));Minval=vLogU;
\\DECOMPOSITION OF (p)--COMPUTATION OF M (p^f-1):
rho=Prime[3];f=Prime[4];M=p^f-1;
\\COMPUTATION OF beta0 AND alpha0M:
C0=idealpow(k,B0,N0);beta0=bnfisprincipal(k,C0)[2];
alpha0=Mod(beta0[1]*k.zk[1]+beta0[2]*k.zk[2],P);
\\REDUCTION OF alpha0^M MODULO mod:
alpha0M=Mod(Mod(lift(alpha0),mod),P)^M;
pi=Mod(lift(lift(alpha0M))-1,P);if(pi==0,pi=Mod(mod,P));
\\COMPUTATION OF hatt FOR THE LOG SERIES:
rho=Prime[3];Delta=idealval(k,pi,Prime);
n=1;while(p^n*Delta-rho*(N+n)<0,n=n+1);
hatn=n;if(hatn==1,hatt=N);if(hatn>1,hatt=p^hatn;
while(hatt*Delta-(valuation(hattj,p)+N)*rho>0,hatt=hatt-1));
\\COMPUTATION OF Log0=Log(alpha0M):
t=1;pit=pi;Log0=pi;while(t<=hatt,t=t+1;pit=pi*pit;
Log0=Log0+(-1)^(t+1)*pit/t;
\\REDUCTION OF Log0 MODULO mod:
Log0=Mod(Mod(lift(Log0),mod),P));
a=polcoeff(lift(Log0),1);if(a==0,vala=N);if(a!=0,vala=valuation(a,p));
vlog=vala-n0;Minval=min(vLogU,vlog);
Index=vLogU-Minval;valhkinfty=valhkp-Index;if(valhkinfty>0,
print("-m=",-m," k non ",p,"-rational"," W=",W," Index=",p^Index,
" hkinfty=",p^valhkinfty," Hk=",Nk))))}
time = 26,767 ms.
There are many non--rational fields fields for and but essentially when and when , , for .
For , one finds:
-m=-4106 k non 29-rational Index=1 hkinfty=29 Hk=[58]
-m=-4682 k non 31-rational Index=1 hkinfty=31 Hk=[62]
-m=-5333 k non 31-rational Index=1 hkinfty=31 Hk=[62]
-m=-8597 k non 31-rational Index=1 hkinfty=31 Hk=[62]
-m=-9203 k non 31-rational Index=1 hkinfty=31 Hk=[31]
For and a cyclic 3-class group such that , we obtain, up to :
-m=-1879 k non 3-rational Index=9 hkinfty=3 Hk=[27]
-m=-2759 k non 3-rational Index=9 hkinfty=3 Hk=[54]
-m=-3299 k non 3-rational Index=9 hkinfty=3 Hk=[9,3]
-m=-3671 k non 3-rational Index=27 hkinfty=3 Hk=[81]
-m=-3943 k non 3-rational Index=9 hkinfty=3 Hk=[27]
-m=-4119 k non 3-rational Index=9 hkinfty=3 Hk=[54]
-m=-4397 k non 3-rational Index=9 hkinfty=3 Hk=[54]
-m=-4541 k non 3-rational Index=9 hkinfty=3 Hk=[54,2]
-m=-5703 k non 3-rational Index=9 hkinfty=3 Hk=[18,3]
-m=-7661 k non 3-rational Index=9 hkinfty=3 Hk=[54,2]
-m=-7703 k non 3-rational Index=27 hkinfty=3 Hk=[81]
-m=-8426 k non 3-rational Index=9 hkinfty=3 Hk=[54,2]
-m=-8506 k non 3-rational Index=9 hkinfty=3 Hk=[54]
-m=-8807 k non 3-rational Index=27 hkinfty=3 Hk=[81]
-m=-8867 k non 3-rational Index=9 hkinfty=3 Hk=[27]
-m=-8951 k non 3-rational Index=9 hkinfty=3 Hk=[135]
-m=-9031 k non 3-rational Index=9 hkinfty=3 Hk=[54]
-m=-9074 k non 3-rational Index=9 hkinfty=3 Hk=[54,2]
-m=-9574 k non 3-rational Index=9 hkinfty=3 Hk=[18,3]
-m=-9663 k non 3-rational Index=9 hkinfty=3 Hk=[54]
-m=-9749 k non 3-rational Index=2 hkinfty=3 Hk=[162]
-m=-9831 k non 3-rational Index=9 hkinfty=3 Hk=[54,2]
Complementary Program P3 for
The case is particular because of the computation of ; so, in that case the use of the classical way is preferable since the modulus of the ray class group is only 8. Before we compute :
{minm=2;maxm=10^4;for(m=minm,maxm,if(core(m)!=m,next);
P=x^2+m;k=bnfinit(P);rk=2;
\COMPUTATION OF W:
if(-m!=-1 & (Mod(-m,8)==1 || Mod(-m,8)==-1),print("-m=",-m,
" k is not ",2,"-rational"," W=",2));
\COMPUTATION OF THE 2-RANK OF Tk:
kpnup=bnrinit(k,8);Hpnup=kpnup.cyc;
e=component(matsize(Hpnup),2);R=0;for(j=1,e,
c=Hpnup[e-j+1];if(Mod(c,2)==0,R=R+1));if(R>rk,print("-m=",-m,
" k is not ",2,"-rational"," rk(Tk)=",R-rk))}
time = 6,209 ms.
-m=-7 k is not 2-rational W=2
-m=-14 k is not 2-rational rk(Tk)=1
-m=-15 k is not 2-rational W=2
-m=-17 k is not 2-rational W=2
-m=-21 k is not 2-rational rk(Tk)=1
(...)
-m=-1785 k is not 2-rational W=2
-m=-1785 k is not 2-rational rk(Tk)=3
(...)
-m=-9993 k is not 2-rational W=2
-m=-9994 k is not 2-rational rk(Tk)=1
-m=-9995 k is not 2-rational rk(Tk)=1
-m=-9997 k is not 2-rational rk(Tk)=1
-m=-9998 k is not 2-rational rk(Tk)=1
Classical program, for imaginary quadratic fields, using ray class groups
The classical program using ray class groups takes much time; it gives the same results. An interest is that increasing nup (giving a modulus large enough), one obtains the group structure of Tk (but without giving the orders of the three invariants):
{bp=2;Bp=10^4;for(m=2,10^4,if(core(m)!=m,next);P=x^2+m;
k=bnfinit(P);forprime(p=bp,Bp,nup=2;if(p==2,nup=3);
kpnup=bnrinit(k,p^nup);Hpnup=kpnup.cyc;
e=component(matsize(Hpnup),2);R=0;for(j=1,e,
c=Hpnup[e-j+1];if(Mod(c,p)==0,R=R+1));if(R>2,
print("-m=",-m," Hk=",k.cyc," k is not ",p,"-rational"," rk(Tk)=",R-2)))}
time = 28,361 ms for p<10^2.
time = 25min, 48,895 ms for p<10^4.
As for a random polynomial the use of ray class groups is not satisfactory for imaginary quadratic fields, even if there is no regulator.
Specific programs for real quadratic fields
There is some similarities with the imaginary case, the pseudo-units being replaced by the fundamental unit ; in the real case, , except for , when , , in which case, .
Program P4 for real quadratic fields
The program, without use of a ray class group, is valid for any prime and begins by the test on , then on for ; then .
{minm=2;maxm=10^4;minp=2;maxp=10^4;
for(m=minm,maxm,if(core(m)!=m,next);P=x^2-m;k=bnfinit(P,1);
forprime(p=minp,maxp,N=2;if(p==2,N=3);mod=p^N;
\\COMPUTATION OF Hinfty:
Hinfty=p^(valuation(k.no,p));if(p==2 & m!=2 & Mod(m,8)==2,
Hinfty=Hinfty/2);
\\COMPUTATION OF W FOR p=2,3:
W=1;
if(p==2 & (Mod(m,8)==1 || Mod(m,8)==-1),W=2);
if(p==3 & Mod(m,9)==-3,W=3);
if(p==2 & (W==2 || Mod(Hinfty,2)==0),print("m=",m,
" k non-p-rational for p=",2," W=",W," Hinfty=",Hinfty);next);
if(p==3 & (W==3 || Mod(Hinfty,3)==0),print("m=",m,
" k non-p-rational for p=",3," W=",W," Hinfty=",Hinfty);next);
if(p>3 & Mod(Hinfty,p)==0,print("m=",m,
" k non-p-rational for p=",p," W=",W," Hinfty=",Hinfty);next);
\\COMPUTATION OF THE p-ADIC REGULATOR:
F=idealfactor(k,p);g=matsize(F)[1];
Prime=component(F,1)[1];rho=Prime[3];f=Prime[4];
\\COMPUTATION OF M (p-1 or p+1):
if(f==1,M=p-1);if(f==2,M=p+1);
\\ELIMINATION OF DENOMINATORS 2 FOR p=2 SPLIT AND
\\USE OF A UNIT OF NORM 1 FOR p=2 INERT:
epsilon=k.fu[1];if(p!=2,alpha=epsilon^2);
if(p==2 & f==2,alpha=epsilon^6);if(p==2 & f==1,alpha=epsilon^3);
\\COMPUTATION OF alpha^M MODULO mod = p^N:
alphaM=Mod(Mod(lift(alpha),mod),P)^M;
\\COMPUTATION OF hatt AND Log(alphaM):
pi=Mod(lift(lift(alphaM))-1,P);if(pi==0,pi=Mod(mod,P));
if(p==2,hatt=4);if(p>2,hatt=N);
Log=pi;t=1;pit=pi;
while(t<=hatt,t=t+1;pit=pi*pit;Log=Log+(-1)^(t+1)*pit/t;
\\REDUCTION OF Log MODULO mod:
Log=Mod(Mod(lift(Log),mod),P));
Log=lift(lift(Log));if(Log==0,Log=Mod(mod,P));
\\TEST OF NON-p-RATIONALITY:
if(p!=2,if(Mod(m,p)==0 & valuation(Log,p)>0,
print("m=",m," k non-p-rational for p=",p,
" W=",W," Hinfty=",Hinfty));
if(Mod(m,p)!=0 & valuation(Log,p)>1,
print("m=",m," k non-p-rational for p=",p,
" W=",W," Hinfty=",Hinfty)));
\\COMPUTATION OF rd FOR p=2:
if(p==2,rd=1;if(Mod(m,8)==2,rd=0);if(Mod(m,8)==5,rd=2);
if(valuation(Log,2)>rd,print("m=",m,
" k non-p-rational for p=",2," W=",W," Hinfty=",Hinfty)))))}
time = 2min, 52,705 ms.
It follows from these particular cases of definition of that the non--rationality is equivalent to include at the end of the program, the following instructions, noting that for the unit , implies (for PARI/GP, is the polynomial indeterminate whose value is ):
(i) The case is related to the ramified case when is of non-zero valuation, which means since PARI/GP considers as a polynomial:
if(p!=2,if(Mod(m,p)==0 & valuation(Log,p)>0,print("m=",m,
"k non-p-rational for p=",p);next);
if(Mod(m,p)!=0 & valuation(Log,p)>1,print("m=",m,
"k non-p-rational for p=",p);next))
(ii) The case takes into account the interpretation of the valuation of ; the ramified case is similar as the previous one. The case corresponds to inert when , but in that case and a simple calculation shows that and , whence a non-trivial regulator if and only if .
In the other cases, the condition is since , hence :
if(p==2,rd=1;if(Mod(m,8)==2,rd=0);if(Mod(m,8)==5,rd=2);
if(valuation(Log,2)>rd,print("m=",m,
"k non-p-rational for p=",2);next))
These tests on valuation(Log, p) imply that all the reductions modulo are with for and for .
One obtains 17253 non--rational examples. Contrary to the imaginary case, the non--rationality can occur for many primes ; we give the following excerpt when the non--rationality is due to :
m=37 k non-p-rational for p=7 W=1 Hinfty=1
m=37 k non-p-rational for p=89 W=1 Hinfty=1
m=37 k non-p-rational for p=257 W=1 Hinfty=1
m=37 k non-p-rational for p=631 W=1 Hinfty=1
m=42 k non-p-rational for p=2 W=1 Hinfty=1
m=42 k non-p-rational for p=3 W=3 Hinfty=1
m=42 k non-p-rational for p=5 W=1 Hinfty=1
m=42 k non-p-rational for p=43 W=1 Hinfty=1
m=42 k non-p-rational for p=71 W=1 Hinfty=1
m=109 k non-p-rational for p=3 W=1 Hinfty=1
m=109 k non-p-rational for p=5 W=1 Hinfty=1
m=109 k non-p-rational for p=11 W=1 Hinfty=1
m=109 k non-p-rational for p=19 W=1 Hinfty=1
m=109 k non-p-rational for p=359 W=1 Hinfty=1
m=109 k non-p-rational for p=809 W=1 Hinfty=1
m=4061 k non-p-rational for p=2 W=1 Hinfty=1
m=4061 k non-p-rational for p=3 W=1 Hinfty=1
m=4061 k non-p-rational for p=5 W=1 Hinfty=1
m=4061 k non-p-rational for p=7 W=1 Hinfty=1
m=4061 k non-p-rational for p=11 W=1 Hinfty=1
m=4061 k non-p-rational for p=359 W=1 Hinfty=1
m=4061 k non-p-rational for p=433 W=1 Hinfty=1
m=4061 k non-p-rational for p=461 W=1 Hinfty=1
m=4061 k non-p-rational for p=2459 W=1 Hinfty=1
We have except for and , where . For , we have the following excerpts mp[k.cyc]:
79 3 [3], 142 3 [3], 223 3 [3], 229 3 [3], 235 3 [6], 254 3 [3],...
401 5 [5], 439 5 [5], 499 5 [5], 727 5 [5], 817 5 [5], 982 5 [5],...
577 7 [7], 1009 7 [7], 1087 7 [7], 1294 7 [7], 1534 7 [14],...
1297 11 [11], 4009 11 [11], 4762 11 [22], 5182 11 [11],...
4759 13 [13], 8101 13 [13], 8441 13 [13], 8647 13 [13],...
7054 17 [17],...
Program using a ray class group
Similarly, we give the usual program with ray class groups:
{minm=2;maxm=10^4;minp=2;maxp=10^4;
for(m=minm,maxm,if(core(m)!=m,next);
P=x^2-m;k=bnfinit(P,1);
forprime(p=minp,maxp,nup=2;if(p==2,nup=3);
kpnup=bnrinit(k,p^nup);Hpnup=kpnup.cyc;
e=component(matsize(Hpnup),2);R=0;
for(j=1,e,c=Hpnup[e-j+1];if(Mod(c,p)==0,R=R+1));
if(R>1,print("m=",m," Hk=",k.cyc,
" k is not ",p,"-rational"," rk(Tk)=",R-1)))}
It finds again the previous examples, but takes a very long time.
Test for Lg for any number field and non-bad Lg
Matrix associated to Lg
2.1. Matrix associated to . Assume that is not ramified and does not divide the denominator of the integer basis elements. Thus, is a -basis.
Let , , be a fundamental system of units of , congruent to 1 modulo . Put
Then we define the -matrix:
where all the coefficients are considered modulo by the program. Then the regulator is invertible if and only if the -rank of the matrix is ; the following part of the program was used in Program 1, where has been computed in Lell = LogE[ell] (lift form of the logarithms).
Programms testing Lg
2.2. Programms testing . The following program can be used independently when is not ramified and does not divide the denominators of the integer basis elements (the other primes of Definition 6.1 are not bad for ). Note that computation of units requests bnfinit(P, 1)).
Recall that if (as -module), we say that (as regulator) is invertible, which is more suitable since, to test the condition of invertibility, the program computes the -rank of the above matrix.
2.2.1. Test for non-bad primes. Since the regulator is most often invertible, we only give an excerpt of non-invertible examples:
{P=x^4-17540*x^3-1542*x^2+4*x+1;d=poldegree(P);maxp=10^7;
print("P=",P);kP=nfinit(P);r1=kP[2][1];r2=kP[2][2];rE=r1+r2-1;
k=bnfinit(P,1);Dk=k.disc;Zk=k.zk;forprime(p=2,maxp,
if(Mod(Dk,p)==0,print("bad prime ",p);next);
denB=1;for(j=1,d,Bzk=lift(Zk[j]);for(i=0,d-1,
denB=lcm(denominator(polcoeff(Bzk,i)),denB));
if(Mod(denB,p)==0,print("bad prime ",p);next);
F=idealfactor(k,p);g=matsize(F)[1];M=1;
for(i=1,g,fi=component(F,1)[i][4];M=lcm(M,p^fi-1));
\\TEST ON THE REGULATOR:
N=2;if(p==2,N=3);mod=p^N;LogE=List;
E=k.fu;for(ell=1,rE,epsilonM=Mod(Mod(lift(E[ell]),mod),P)^M;
pi=Mod(lift(lift(epsilonM)),P)-1;if(pi==0,pi=Mod(mod,P));
\\COMPUTATION OF hatt:
hatt=0;for(j=1,g,Primej=component(F,1)[j];rhoj=Primej[3];
Deltaj=idealval(k,pi,Primej);rhoj= Primej[3];
hatx=floor((log(rhoj)-log(Deltaj*log(p)))/log(p))+1;
n=max(1,hatx);while(p^n*Deltaj-rhoj*(N+n)<0,n=n+1);
hatn=n;if(hatn==1,hattj=N);if(hatn>1,hattj=p^hatn;
while(hattj*Deltaj-(valuation(hattj,p)+N)*rhoj>0,hattj=hattj-1));
hatt=max(hatt,hattj));
Log=pi;t=1;pit=pi;while(t<hatt,t=t+1;pit=pi*pit;
Log=Log+(-1)^(t+1)*pit/t);
\\REDUCTION OF Log MODULO mod:
Log=Mod(Mod(lift(Log),mod),P);
listput(LogE,lift(lift(Log))));
ME=List;for(ell=1,rE,Lell=LogE[ell];
Lc=List;for(i=0,d-1,coeff=Mod(polcoeff(Lell/p,i),p);
listput(Lc,coeff);listput(ME,Lc));
MLogE=matrix(rE,d,u,v,ME[u][v]);RLog=matrank(MLogE);
\\if(RLog==rE,print("The ",p,"-regulator is invertible"));
if(RLog<rE,print("p=",p," rank(MLogE)=",RLog);
print("k is not ",p,"-rational: R non-invertible");
print("**********************")))}
x^4-17540*x^3-1542*x^2+4*x+1
bad prime 2
bad prime 3
p=5 rank(MLogE)=2
k is not 5-rational: R non-invertible
**********************
bad prime 11
bad prime 19
p=23 rank(MLogE)=1
k is not 23-rational: R non-invertible
**********************
p=29 rank(MLogE)=2
k is not 29-rational: R non-invertible
**********************
bad prime 43
p=47 rank(MLogE)=2
k is not 47-rational: R non-invertible
**********************
p=1873 rank(MLogE)=2
k is not 1873-rational: R non-invertible
**********************
p=2692343 rank(MLogE)=2
k is not 2692343-rational: R non-invertible
**********************
time = 15,410 ms for p<10^6.
time = 3min, 41,622 ms for p<10^7.
Up to , all the other regulators are invertible.
2.2.2. Program testing for huge primes . It remains the case of a huge prime not dividing the denominators of the coefficients of the integer basis elements. We assume that we have checked that . The following example of an imaginary abelian field shows the method; this program finds again the examples of the previous one, but the method increase substantially the speed and must be used for primes such that epsilonM = Mod(Mod(lift(E[ell]), mod), P)$M is unworkable because of . The whole set of bad primes is:
[2,3,5,7,11,13,17,19,151,331,727,773,1097,1109,1861,17489,19219,22441,33091, 514081,1042381,1323871,28665829,127637651,3257494459,28161933524443])
Thus, the program is valid under the above assumptions; for small bad primes, it can be cancelled by absurd calculations modulo due to denominators; in this example, only 13, 17, 19 (divisors of the discriminant) are bad primes. For all the others (except for which is non 2-rational), the program concludes that the regulator is invertible. For the list of 23 primes we get: time = 47, 042 ms.
Since the direct computation of is impossible (enormous time and memory), we use a classical induction with reductions of modulo the minimal polynomial of the unit (of degree in this example), and many reductions modulo mod; the induction with powers of m = 2 may be replaced by m = 3, . . . to have an optimal run:
allocatemem(1000000000)
{P=polsubcyclo(17*13*19,16)[1];print(P);d=poldergree(P);
p=28161933524443;kP=nfinit(P);r1=kP[2][1];r2=kP[2][2];
rE=r1+r2-1;k=bnfinit(P,1);F=idealfactor(k,p);g=matsize(F)[1];M=1;
for(i=1,g,fi=component(F,1)[i][4];M=lcm(M,p^fi-1));
N=2;mod=p^N;E=k.fu;LogE=List;
\\COMPUTATION OF pi for epsiloni:
for(i=1,rE,epsiloni=E[i];Z=minpoly(epsiloni);
m=2;XM=1;q=M;while(q>0,xM=x;
n0=floor(log(q)/log(m));
for(j=1,n0,xM=Mod(Mod(xM^m,mod),Z));
XM=lift(lift(xM*XM));q=q-m^n0);
epsiloniM=0;for(ell=0,poldegree(XM),epsiloniM=
epsiloniM+polcoeff(XM,ell)*epsiloni^ell);
pi=Mod(epsiloniM,P)-1;if(pi==0,pi=Mod(mod,P));
\\COMPUTATION OF hatt AND Log(epsiloni):
hatt=0;for(j=1,g,Primej=component(F,1)[j];
Deltaj=idealval(k,pi,Primej);rhoj=Primej[3];
hatx=floor((log(rhoj)-log(Deltaj*log(p)))/log(p))+1;
n=max(1,hatx);while(p^n*Deltaj-rhoj*(N+n)<0,n=n+1);
hatn=n;if(hatn==1,hattj=N);if(hatn>1,hattj=p^hatn;
while(hattj*Deltaj-(valuation(hattj,p)+N)*rhoj>0,hattj=hattj-1));
hatt=max(hatt,hattj));Log=pi;t=1;pit=pi;while(t<=hatt,
t=t+1;pit=pi*pit;Log=Log+(-1)^(t+1)*pit/t);listput(LogE,lift(Log)));
\\ MATRIX MLogE:
ME=List;for(ell=1,rE,Lell=LogE[ell]/p;Lc=List;
LellZ=Mod(nfalgtobasis(k,Lell),p);listput(ME,LellZ));
MLogE=matrix(rE,d,u,v,ME[u][v]);RLog=matrank(MLogE);
if(RLog==rE,print("The ",p,"-regulator is invertible"));
if(RLog<rE,print("p=",p," rank(MLogE)=",RLog);
print("k is not ",p,"-rational: R non-invertible"))}
P=polsubcyclo(17*13*19,16)[1]
P=x^16+x^15-352*x^14-259*x^13+27980*x^12-77359*x^11+2274382*x^10
-17610397*x^9+219273240*x^8-1531270581*x^7+13716090512*x^6
-27702275513*x^5+238906342429*x^4+658286108804*x^3
-4878604426700*x^2-15240684713648*x+164805474108224
The 28161933524443-regulator is invertible
time = 2,119 ms.
Programs testing Lg for any number field
We will give programs about for any and . Since the condition is necessary for the -rationality, it is useful to test this condition before any other one. Contrary to what one might think, except obvious cases, the determination of is not immediate.
Local and global roots of unity with pari/gp
The instruction nfrootsof1(k)[1] gives the order of the global group , but under the instruction k = nfinit(P) which may use many time; to our knowledge, the case of the local groups is not given and needs to compute the decomposition of using k = bnfinit(P). Similarly, k = bnfinit(P) computes unnecessary parameters for our purpose.
We assume that the field is given with the knowledge of a defining monic irreducible polynomial of degree . We propose three programs depending on the order of magnitude of . For instance, in the last Program 3.2.3, for some polynomials, the sole instruction nfinit(P) would need: time = 29,075 ms and nfinit(Q) would be out of reach since is the compositum of with various cyclotomic polynomials; so, we compute the local degrees from the -adic factorisation of and , via factorpadic(P,p,1) and factorpadic(Q,p,1).
Nevertheless, in case of a problem, one may use another program; for instance, with the polynomial and , the first program has a problem because of , probably with the unnecessary computation of:
while the two other programs need time = 19ms and time = 23ms, respectively: We know that for since must divide a local degree of ; so the number of possible primes is finite and we will consider PW, in the programs, the set of primes such that .
An obvious case giving is when (e.g., ) and when splits at least into two -places in .
So we get the following criterion depending on the number of -places:
(i) . Then, if and only if there exists at least a -place of such that .
(ii) (e.g., ). Then if and only if, either splits at least into two -places of , or else is unique and .
To compute the local groups , we use the following criterion:
Lemma 3.1. Let be any number field defined via a polynomial of degree . Let for . Let ( for , for ) be the order of and put . Then locally, if and only if totally splits in , whence, if and only if the residue degree of in is equal to .
Proof. Obvious; note that by definition of .
The program with its three variants
In a computational point of view, we will first apply the tests of decomposition of when , then the tests of divisibilities of the by . Whence the two possibilities:
(i) . We test if there exists a non-trivial ;
(ii) and unique. We test if is larger than .
To give more information, in case (ii) we test even if is not unique (otherwise, put break instead of next); so it is possible that will be computed for several places.
The usual PARI/GP instructions k = bnfinit(P) and K = nfinit(Q) may be the main obstruction to the speed of a program execution, especially for large degrees; moreover they compute non-necessary invariants.
Program for small degrees
This program only uses k = nfinit(P) and K = nfinit(Q) for the compositum of P with cyclotomic polynomials:
PROGRAM FOR SMALL DEGREES:
{P=x^9-8*x^3-18*x+46;
\\x^9-8*x^3-18*x+48;
d=poldegree(P);NW=0;PW=List;
forprime(p=2,d+1,listput(PW,p);NW=NW+1);
print();print(P);print("PW=",PW);
\\COMPUTATION OF Muglobal:
k=nfinit(P);Muglobal=nfrootsof1(k)[1];
\\PRIME p IN PW,
\\LIST OF LOCAL DEGREES FOR k:
for(ell=1,NW,p=PW[ell];
F=idealfactor(k,p);g=matsize(F)[1];Ldv=List;
for(i=1,g,Primei=component(F,1)[i];
listput(Ldv,Primei[3]*Primei[4]));
wp=valuation(Muglobal,p);if(wp>0 & g>1,
print("W(",p,") non-trivial:wp>0 and g>1"," Ldv=",Ldv);
print("k is not p-rational");
print("********************");next);
\\TEST p-1 DIVIDES dv FOR AT LEAST ONE PLACE:
test=0;for(i=1,g,if(Mod(Ldv[i],p-1)==0,test=1;break));
if(test==0,print("p=",p," no local/global p-roots of unity");next);
\\LIST OF LOCAL DEGREES FOR K:
Q=polcompositum(P,polcyclo(p^(wp+1)))[1];K=nfinit(Q);
FKp=idealfactor(K,p);gK=matsize(FKp)[1];Ldw=List;
for(i=1,gK,PrimeiK=component(FKp,1)[i];
listput(Ldw,PrimeiK[3]*PrimeiK[4]));
\\TEST OF SPLITTING IN K/k:
Delta=poldegree(Q)/d;if(Delta!=p^wp*(p-1),
print("p=",p," no linear disjunction");
print("p=",p," Mupglobal=",p^wp," Delta=",Delta);
\\LISTS OF LOCAL DEGREES:
Ldv=List(vecsort(Ldv));Ldw=List(vecsort(Ldw));
print("Ldv=",Ldv);print("Ldw=",Ldw);
\\COMPARISON OF THE LISTS:
t=0;deltav=0;while(t<g,t=t+1;delta=0;lambda=0;
while(delta<Delta,deltav=deltav+1;
lambdav=Ldw[deltav]/Ldv[t];print("dw/v(",p,")=",lambdav);
if(lambdav==1,print("Wv(",p,") non-trivial");
print("k is not ",p,"-rational");
print("**********************"));delta=delta+lambdav)))}
x^9-8*x^3-18*x+46
PW=List([2,3,5,7])
p=2 Mupglobal=2 Delta=2
Ldv=List([9])
Ldw=List([18])
dw/v(2)=2
p=3 Mupglobal=1 Delta=2
Ldv=List([3,6])
Ldw=List([6,12])
dw/v(3)=2
dw/v(3)=2
p=5 no local/global p-roots of unity
p=7 no local/global p-roots of unity
time = 88 ms.
Program for intermediate degrees
Since the polynomial varies and is of hight degree, this program does not use , replaced by the -adic decomposition of ; it only uses .
PROGRAM FOR LARGER DEGREES:
{P=x^19+8*x^3-18*x-18;
\\x^9-8*x^3-18*x+48;
d=poldegree(P);NW=0;PW=List;
forprime(p=2,d+1,listput(PW,p);NW=NW+1);
print();print(P);print("PW=",PW);
k=nfinit(P);
\\COMPUTATION OF Muglobal:
Muglobal=nfrootsof1(k)[1];
\\PRIME p
for(ell=1,NW,p=PW[ell];
\\COMPUTATION OF Mupglobal:
F=idealfactor(k,p);g=matsize(F)[1];Ldv=List;
for(i=1,g,Primei=component(F,1)[i];
listput(Ldv,Primei[3]*Primei[4]));
wp=valuation(Muglobal,p);if(wp>0 & g>1,
print("W(",p,") non-trivial:wp>0 and g>1"," Ldv=",Ldv);
print("k is not ",p,"-rational");
print("**********************");next);
\\TEST p-1 DIVIDES dv FOR AT LEAST ONE PLACE:
test=0;for(i=1,g,if(Mod(Ldv[i],p-1)==0,test=1;break));if(test==0,
print("p=",p," no local/global p-roots of unity");next);
\\LIST OF LOCAL DEGREES FOR K:
Q=polcompositum(P,polcyclo(p^(wp+1)))[1];Ldw=List;
FQ=factorpadic(Q,p,1);FQ=component(lift(FQ),1);
gK=matsize(FQ)[1];for(j=1,gK,listput(Ldw,poldegree(FQ[j])));
Delta=poldegree(Q)/d;
if(Delta!=p^wp*(p-1),print("p=",p," no linear disjunction"));
print("p=",p," Mupglobal=",p^wp," Delta=",Delta);
Ldv=List(vecsort(Ldv));Ldw=List(vecsort(Ldw));
print("Ldv=",Ldv);print("Ldw=",Ldw);
t=0;deltav=0;while(t<g,t=t+1;delta=0;lambda=0;
while(delta<Delta,deltav=deltav+1;
lambdav=Ldw[deltav]/Ldv[t];print("dw/v(",p,")=",lambdav);
if(lambdav==1,print("Wv(",p,") non-trivial");
print("k is not ",p,"-rational");
print("**********************"));delta=delta+lambdav)))}
x^19+8*x^3-18*x-18
PW=List([2,3,5,7,11,13,17,19])
p=2 Mupglobal=2 Delta=2
Ldv=List([19])
Ldw=List([38])
dw/v(2)=2
p=3 Mupglobal=1 Delta=2
Ldv=List([1,1,2,2,2,3,4,4])
Ldw=List([2,2,4,4,4,6,8,8])
dw/v(3)=2
dw/v(3)=2
dw/v(3)=2
dw/v(3)=2
dw/v(3)=2
dw/v(3)=2
dw/v(3)=2
dw/v(3)=2
p=5 no local/global p-roots of unity
p=7 no local/global p-roots of unity
p=11 no local/global p-roots of unity
p=13 no local/global p-roots of unity
p=17 no local/global p-roots of unity
p=19 no local/global p-roots of unity
time = 65 ms.
Program for large degrees
This program does not use nor , replaced by the -adic decomposition of and .
PROGRAM FOR VERY LARGE DEGREES:
allocatemem(800000000)
{P=x^29+8*x^3-18*x-18;
\\x^9-8*x^3-18*x+48;
d=poldegree(P);NW=0;PW=List;
forprime(p=2,d+1,listput(PW,p);NW=NW+1);
print();print(P);print("PW=",PW);
for(ell=1,NW,p=PW[ell];
w=0;while(poldegree(polcompositum(P,polcyclo(p^w))[1])==d,
w=w+1);wp=w-1;
Ldv=List;FP=factorpadic(P,p,1);FP=component(lift(FP),1);
g=matsize(FP)[1];for(j=1,g,dv=poldegree(FP[j]);listput(Ldv,dv));
if(wp>0 & g>1,print("W(",p,") non-trivial:wp>0 and g>1"," Ldv=",Ldv);
print("k is not ",p,"-rational");print("**********************");next);
\\TEST p-1 DIVIDES dv FOR AT LEAST ONE PLACE:
test=0;for(i=1,g,if(Mod(Ldv[i],p-1)==0,test=1;break));if(test==0,
print("p=",p," no local/global p-roots of unity");next);
Q=polcompositum(P,polcyclo(p^(wp+1)))[1];
Ldw=List;FQ=factorpadic(Q,p,1);FQ=component(lift(FQ),1);
gK=matsize(FQ)[1];for(j=1,gK,listput(Ldw,poldegree(FQ[j])));
Delta=poldegree(Q)/d;
if(Delta!=p^wp*(p-1),print("p=",p," no linear disjunction"));
print("p=",p," Mupglobal=",p^wp," Delta=",Delta);
Ldv=List(vecsort(Ldv));Ldw=List(vecsort(Ldw));
print("Ldv=",Ldv);print("Ldw=",Ldw);
t=0;deltav=0;while(t<g,t=t+1;delta=0;lambda=0;
while(delta<Delta,deltav=deltav+1;
lambdav=Ldw[deltav]/Ldv[t];
print("dw/v(",p,")=",lambdav);
if(lambdav==1,print("Wv(",p,") non-trivial");
print("k is not ",p,"-rational");
print("**********************"));delta=delta+lambdav)))}
x^29+8*x^3-18*x-18
PW=List([2,3,5,7,11,13,17,19,23,29])
p=2 Mupglobal=2 Delta=2
Ldv=List([29])
Ldw=List([58])
dw/v(2)=2
p=3 no local/global p-roots of unity
p=5 Mupglobal=1 Delta=4
Ldv=List([8,21])
Ldw=List([32,84])
dw/v(5)=4
dw/v(5)=4
p=7 no local/global p-roots of unity
p=11 no local/global p-roots of unity
p=13 no local/global p-roots of unity
p=17 Mupglobal=1 Delta=16
Ldv=List([3,4,6,16])
Ldw=List([48,64,96,256])
dw/v(17)=16
dw/v(17)=16
dw/v(17)=16
dw/v(17)=16
p=19 no local/global p-roots of unity
p=23 no local/global p-roots of unity
p=29 no local/global p-roots of unity
time = 10,683 ms.
Of course, the three programs give immediately the obvious cases of a quadratic fields; a useful check. But for random polynomials, it is extremely difficult to find examples with , except for when for instance 2 splits in since . The case is often possible. We have rare examples with ; the following ones show the complexity of the decomposition of the -places and the structure of ; we use Program 3.2.3:
{for(a=0,200,P=x^15+a*x^6-2*x+1;if(polisirreducible(P)==0,next);
d=poldegree(P);NW=0;PW=List;forprime(p=2,d+1,listput(PW,p);NW=NW+1);
print();print("a=",a);print(P);print("PW=",PW);
\\PRIME p
for(ell=1,NW,p=PW[ell];nup=16;
\\COMPUTATION OF Mupglobal:
w=0;while(poldegree(polcompositum(P,polcyclo(p^w))[1])==d,
w=w+1);wp=w-1;Ldv=List;FP=factorpadic(P,p,nup);FP=component(lift(FP),1);
g=matsize(FP)[1];for(j=1,g,dv=poldegree(FP[j]);listput(Ldv,dv));
if(wp>0 & g>1,print("W(",p,") non-trivial:wp>0 and g>1"," Ldv=",Ldv);
print("k is not ",p,"-rational");
print("**********************");next);
test=0;for(i=1,g,if(Mod(Ldv[i],p-1)==0,test=1;break));if(test==0,
print("p=",p," no local/global p-roots of unity");next);
Q=polcompositum(P,polcyclo(p^(wp+1)))[1];Ldw=List;
FQ=factorpadic(Q,p,1);gK=matsize(FQ)[1];FQ=component(FQ,1);
for(j=1,gK,listput(Ldw,poldegree(lift(FQ[j]))));Delta=poldegree(Q)/d;
if(Delta!=p^wp*(p-1),print("p=",p," no linear disjunction"));
print("p=",p," Mupglobal=",p^wp," Delta=",Delta);
Ldv=List(vecsort(Ldv));Ldw=List(vecsort(Ldw));
print("Ldv=",Ldv);print("Ldw=",Ldw);t=0;deltav=0;while(t<g,
t=t+1;delta=0;lambda=0;while(delta<Delta,deltav=deltav+1;
lambdav=Ldw[deltav]/Ldv[t];print("dw/v(",p,")=",lambdav);
if(lambdav==1,print("Wv(",p,") non-trivial");
print("k is not ",p,"-rational");
print("**********************"));delta=delta+lambdav)))}
time = 33,524 ms.
Examples:
a=23
p=5 Mupglobal=1 Delta=4
Ldv=List([2,4,9])
Ldw=List([4,4,4,4,8,36])
dw/v(5)=2
dw/v(5)=2
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=2
dw/v(5)=4
a=48
p=5 Mupglobal=1 Delta=4
Ldv=List([2,4,9])
Ldw=List([4,4,4,4,4,4,36])
dw/v(5)=2
dw/v(5)=2
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=4
a=123
p=5 Mupglobal=1 Delta=4
Ldv=List([1,1,4,9])
Ldw=List([4,4,4,4,4,4,36])
dw/v(5)=4
dw/v(5)=4
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
dw/v(5)=1
Wv(5) non-trivial
k is not 5-rational
**********************
For , the two places of residue degree 1 in do not split in ; the place of residue degree 4 in , totally splits in , so that is contained in , then the last place of does not split.
To check, Program 1.2.1 finds:
P=x^15+123*x^6-2*x+1 class group=[]
number of independent Z_p-extensions: 8
rk(Tk)=1 k is not 2-rational Tk[2]=List([2])
rk(Tk)=1 k is not 5-rational Tk[5]=List([5])
Tests for -rationality in the literature
We have decided against providing an extensive bibliography due to the vast number of articles on the subject; instead, we have limited ourselves to the seminal articles on the definition and characterization of the notion of -rationality, which generally contain very comprehensive bibliographies, nevertheless we give papers describing some algorithms of computation.
Overview of the main articles
To our knowledge, the main papers giving some material to test the -rationality of a number field, are [10, 21, 18, 13]. In [10 Program II, p. 37] and [21], the method is essentially based on the computation of ray class groups of modulus a sufficient power of . As we have explained, these computations use, for instance with the PARI/GP package, the instructions k = bnfinit(P, 1) and kpnup = bnrinit(k, p^nup), Hpnup = kpnup.cyc, for nup large enough; but if is large, the programs are very slow and may take hours or days. The authors of [21] do not provide an effective program; they only say “All the computations have been done using the PARI/GP system”; there is interesting statistics for quadratic, cubic and quintic fields, with their interpretations via Cohen–Lenstra heuristics.
In [18] the examples about -rationality come from a deep study of some isotopic components of the Galois group of the maximal -ramified pro--extension of , connected in one way or another to the regulators since they use (as for many papers) cases where units are algebraically explicit.
The method of Hofmann–Johnston [13] makes especially a focus on the -adic regulator of the field, at the disadvantage of a general computation of the difficult degree
where is the compositum of the -extensions of ; of course, when is totally real, is the cyclotomic -extension for which the computation of this index is obvious. The authors define the notion of quasi--rational field when . Several applications are given about cyclotomic fields and constructions of Galois representations with open images.
Another fact is that many examples in the literature are such that the -class group is trivial, so that .
Finally, in most cases, computing resources are either not accessible at all or only partially, and often require knowledge about the used package, without possibility of copy and past effective programs.
Examples of abelian fields considered by Maire–Rougnant
In [18] are given numerical results from the use of Balady-Lecechaux polynomials giving explicit units. Let’s give (with Program 1.1.2) few examples giving again results of [18 Appendix A]:
(A1) Cyclic cubic fields:
P=x^3+309*x^2-10*x-1 class group=[3]
number of independent Z_p-extensions=1
Pbad=List([2,3,11,13,79])
p=3 rank of the 3-torsion group:Tk[p]=List([3])
k is not 3-rational
***********************
p=19 rank(MlogE)=1
k is not 19-rational
**********************
p=439 rank(MLogE)=1
k is not 439-rational
**********************
p=2887 rank(MLogE)=1
k is not 2887-rational
**********************
p=59060857 rank(MLogE)=1
k is not 59060857-rational
**********************
p=122648623 rank(MLogE)=1
k is not 122648623-rational
time = 10min, 46,093 ms.
P=x^3+12286733*x^2-9970*x-1 class group=[20811,3]
number of independent Z_p-extensions=1
Pbad=List([2,3,7,13,157,991,1051,9973])
p=3 rank of the 3-torsion group:Tk[p]=List([3,3,3])
k is not 3-rational
**********************
p=7 rank of the 7-torsion group:Tk[p]=List([7])
k is not 7-rational
**********************
p=991 rank of the 991-torsion group:Tk[p]=List([991])
k is not 991-rational
**********************
p=43 rank(MLogE)=1
k is not 43-rational
**********************
p=14783491 rank(MLogE)=1
k is not 14783491-rational
**********************
Cyclic quartic field
x^4-7588*x^3-870*x^2+4*x+1 class group=[4]
number of independent Z_p-extensions=1
Pbad=List([2,3,5,11,73])
p=2 rank of the 2-torsion group:Tk[p]=List([4])
k is not 2-rational
**********************
p=17 rank(MLogE)=2
k is not 17-rational
**********************
p=19363829 rank(MLogE)=2
k is not 19363829-rational
**********************
p=26900513 rank(MLogE)=2
k is not 26900513-rational
**********************
These values are those obtained in [18 Table A.2.1.]. One may be surprised by the order of magnitude of these solutions regarding our conjecture of finiteness of primes such that ; but this is a phenomenon of -adic property of the units. Indeed, varying the field and fixing it is not difficult to get huge solutions; for instance set , then Program 1.4.1 gives immediately a non--rationality for and other large primes, but nothing else up to ; why ?
m=10028029413722402 k non-p-rational for p=2 W=1 Hinfty=2^5
m=10028029413722402 k non-p-rational for p=10007
m=10028029413722402 k non-p-rational for p=503137
m=10028029413722402 k non-p-rational for p=21807883
One may force a finite number of -adic properties of the units, but this has no influence on the -adic properties of the units for the other primes; moreover we do not know any way giving such ad-hoc solutions with bounded discriminants; a fundamental task would be to relate the -adic regulator and the discriminant, which is only known for real framework (see [22] and subsequent papers on the subject); in other words, we would need the -adic version of this result, but this would be proving Leopoldt’s conjecture.
We give some excerpts of the Balady–Washington polynomials considered in [18] (real cyclic fields of degree 4), for :
(Program 1.1.2 needing less that 10 mn for the above 41 polynomials, up to ):
(B) Cyclic quartic fields:
P=x^4-33764*x^3-2406*x^2+4*x+1 class group=[4]
Pbad=List([2,3,5,67,107])
p=2 rank of the 2-torsion group Tk=1
k is not 2-rational
**********************
p=3 rank of the 3-torsion group Tk=1
k is not 3-rational
**********************
p=19 rank(MLogE)=2
k is not 19-rational
**********************
p=353 rank(MLogE)=2
k is not 353-rational
**********************
p=379 rank(MLogE)=2
k is not 379-rational
**********************
p=2273 rank(MLogE)=2
k is not 2273-rational
**********************
p=4159 rank(MLogE)=2
k is not 4159-rational
**********************
p=349051 rank(MLogE)=2
k is not 349051-rational
**********************
p=408809 rank(MLogE)=2
k is not 408809-rational
**********************
P=x^4+10300*x^3-1182*x^2+4*x+1 class group=[2,2,2]
Pbad=List([2,3,5,11,67])
p=2 rank of the 2-torsion group Tk=3
k is not 2-rational
**********************
p=3 rank of the 3-torsion group Tk=1
k is not 3-rational
**********************
p=29 rank(MLogE)=2
k is not 29-rational
**********************
p=43 rank(MLogE)=2
k is not 43-rational
**********************
p=73 rank(MLogE)=2
k is not 73-rational
**********************
p=271 rank(MLogE)=2
k is not 271-rational
**********************
p=409 rank(MLogE)=2
k is not 409-rational
**********************
p=1163 rank(MLogE)=2
k is not 1163-rational
**********************
p=9151 rank(MLogE)=2
k is not 9151-rational
**********************
p=28477 rank(MLogE)=2
k is not 28477-rational
**********************
P=x^4+12716*x^3-1356*x^2+4*x+1 class group=[2]
Pbad=List([2,3,5,227,619])
p=2 rank of the 2-torsion group Tk=1
k is not 2-rational
**********************
P=x^4-17540*x^3-1542*x^2+4*x+1 class group=[12,2,2]
Pbad=List([2,3,5,11,19,43])
p=2 rank of the 2-torsion group Tk=3
k is not 2-rational
**********************
p=3 rank of the 3-torsion group Tk=2
k is not 3-rational
**********************
p=5 rank of the 5-torsion group Tk=1
k is not 5-rational
**********************
p=23 rank(MLogE)=1
k is not 23-rational
**********************
p=29 rank(MLogE)=2
k is not 29-rational
**********************
p=47 rank(MLogE)=2
k is not 47-rational
**********************
p=1873 rank(MLogE)=2
k is not 1873-rational
**********************
p=2692343 rank(MLogE)=2
k is not 2692343-rational
**********************
P=x^4+18628*x^3-1740*x^2+4*x+1 class group=[4,4,2,2,2]
Pbad=List([2,3,5,11,73,97])
p=2 rank of the 2-torsion group Tk=5
k is not 2-rational
**********************
p=43 rank(MLogE)=2
k is not 43-rational
**********************
p=113 rank(MLogE)=2
k is not 113-rational
**********************
p=1021 rank(MLogE)=2
k is not 1021-rational
**********************
p=1667 rank(MLogE)=2
k is not 1667-rational
**********************
p=176677 rank(MLogE)=2
k is not 176677-rational
**********************
p=9697459 rank(MLogE)=2
k is not 9697459-rational
p=224035927 rank(MLogE)=2 k is not 224035927-rational
Examples of abelian fields considered by Hofmann–Johnston
Let’s take, the first and last interesting numerical examples in [13], Appendix A, tbl:4, using polynomials giving totally real number fields ; we use Program (1.1.2) for up to :
(C) Cyclic quintic field:
P=x^5-68410*x^3-136820*x^2+1120453185*x-876769924 class group=[5]
number of independent Z_p-extensions=1
Pbad=List([2,3,5,7,179,6841])
**********************
p=2 Structure of the 2-torsion group:Tk=List([2,2,2,2])
k is not 2-rational
**********************
p=11 rank(MLogE)=3
k is not 11-rational
**********************
p=61 rank(MLogE)=3
k is not 61-rational
**********************
p=131 rank(MLogE)=3
k is not 131-rational
**********************
p=3701 rank(MLogE)=3
k is not 3701-rational
**********************
p=4421 rank(MLogE)=3
k is not 4421-rational
**********************
p=9311 rank(MLogE)=3
k is not 9311-rational
**********************
p=93581 rank(MLogE)=3
k is not 93581-rational
**********************
time = 4min, 55,199 ms.
Note that for , the -class group is non-trivial, but since the field is Galois real, the Log-function is explicit (see [6], Exercise IV.3.3.1), and gives .
(D) Real abelian field of discriminant
P=x^20-3*x^19-119*x^18+177*x^17+5889*x^16-1381*x^15-152812*x^14-117981*x^13
+2164979*x^12+3491841*x^11-15663089*x^10-38883595*x^9+42546574*x^8
+187263905*x^7+52059719*x^6-314665312*x^5-318011368*x^4+4965810*x^3
+106222904*x^2+21505161*x-6072119 class group=[]
Pbad=List([2,3,5,7,11,13,17,19,83,401,487,797,1483,2897,11549,20903,
22277,24793,117329,771179,981263,2563217,5570717,81887591])
**********************
p=2 Structure of the 2-torsion group:Tk=List([2,2,2,2,2])
k is not 2-rational
**********************
p=3 Structure of the 3-torsion group:Tk=List([3])
k is not 3-rational
**********************
p=5 Structure of the 5-torsion group:Tk=List([5,5,5,5,5])
k is not 5-rational
**********************
p=17 Structure of the 17-torsion group:Tk=List([17])
k is not 17-rational
**********************
p=23 rank(MLogE)=18
k is not 23-rational
p=29 rank(MLogE)=18 k is not 29-rational
p=1093 rank(MLogE)=18 k is not 1093-rational
p=3251 rank(MLogE)=18p k is not 3251-rational
p=19709 rank(MLogE)=17 k is not 19709-rational
p=38953 rank(MLogE)=18 k is not 38953-rational
p=228299 rank(MLogE)=17 k is not 228299-rational
p=272927 rank(MLogE)=18 k is not 272927-rational
p=1525021 rank(MLogE)=18 k is not 1525021-rational
p=1709287 rank(MLogE)=18 k is not 1709287-rational
time = 5h, 24min, 28,854 ms.
Another interesting polynomial, from [13 Appendix A, Table 4], is:
of quaternionic Galois group. Up to , Program 1.1.2 gives:
(E)
P=x^8-9668*x^6+14526170*x^4-4580040976*x^2+224422007824 class group=[2]
number of independent Z_p-extensions=1
Pbad=List([2,3,5,7,23,71,2417])
p=2 Structure of the 2-torsion group:Tk[p]=List([4,4])
k is not 2-rational
**********************
p=13 rank(MLogE)=6
k is not 13-rational
**********************
p=31 rank(MLogE)=6
k is not 31-rational
**********************
p=68059 rank(MLogE)=6
k is not 68059-rational
**********************
p=636863 rank(MLogE)=6
k is not 636863-rational
**********************
p=1546463 rank(MLogE)=6
k is not 1546463-rational
**********************
Theoretical aspects and the Lg-function
The method is based, on the systematic use of the ordinary -adic log-function, and in part, on the Log-function, defined on modulo , where is the group of prime-to- ideals of and the ray of modulus ; then, the kernel of Log is zero if and only if is -rational (under the Leopoldt conjecture).
Generalities on Lg-ramification theory
Let be the compositum of the -extensions of and let be the maximal abelian -ramified pro- extension of ; then the torsion group is finite, and a characterization of the -rationality is . Let be the -class group of and let be the -Hilbert class field of .
We will recall below that , giving methods of computation.
The advantage of the Log-function is that it gives the computation of the most difficult factor , such that is isomorphic to the Galois group of the maximal sub-extension of contained in .
Then, it is necessary to compute separately the two other invariants, , the normalized -adic regulator ([9 Section 5]) and , in terms of local and global -groups of roots of unity.
Most of the non--rational cases are due to small primes giving in particular and/or , since a necessary condition is that divides a local degree , , of , which is always the case for and very frequent for . Since , a necessary condition to get is that there exists at least a -place such that , whence , giving and a fortiori .
Recall that fixes the Bertrandias–Payan field and that is probably the best invariant in -ramification theory.
The triviality of these three -modules characterizes the -rationality, according to the following diagram of abelian -ramification theory over any number field :

Figure 1.
The group of -principal local units , whose images via local reciprocity maps give inertia groups in , is of the form , where ( prime ideal associated to the place ). Then , where is the topological closure in of the diagonal embedding of the group of -principal global units of . Thus, we have, under the Leopoldt conjecture:
where denotes the usual -adic logarithm, with image in , where is the ring of integer of with obvious notations. When is not ramified, then .
Then is -rational if and only if . Thus, having checked the necessary condition , formula 5.1 reduces to the computation of ; in other words, we do not need any “regulator formula” as that given by analytic formulas. This is the object of Proposition 5.2 in a computational point of view using the fact that when , is equivalent to direct factor in , which is easily characterized by the -rank of a matrix. In other words, as soon as we find such that , , is not -rational.
Lemma 5.1. Under the Leopoldt conjecture for in the number field of degree and signature , with , a necessary condition for the -rationality of is that the -rank of its -class group be strictly less than . If one knows that , the cyclotomic -extension of , is totally ramified, then the condition becomes: strictly less than .
Proof. Under the Leopoldt conjecture for , ; thus, if , necessarily the -Hilbert class field of is contained in the compositum of the -extensions of , whence the claim.
In cyclic -extensions with sufficiently ramified primes, genus theory (Chevalley–Herbrand formula [1 pp. 402-406]) leads to large -ranks, hence the non--rationality of ; at the opposite, this formula allows to characterize trivial -class groups in cyclic -extensions.
See [5] characterizing abelian -rational -extensions for , via a fixed point formula for the -modules in a -extension. The paper [3] introduces the similar property of -regularity. In [17] are characterized the -extensions in which -rationality propagates; this introduces the notion of -primitive ramification, related to suitable Frobenius elements whose images are in the isomorphism [6 IV.3, (b), Example IV.3.5.1].
Proposition 5.2. Let be a fundamental system of units of . Assume that is unramified in . Put (with pari/gp notations in the programs, where Lell = LogE[ell] denotes ):
Then, the normalized -adic regulator is invertible if and only if the matrix , , , is of maximal -rank .
Proof. Under the assumptions, and plays the role of a local integer basis. We know that , where is the topological closure in of the diagonal embedding of the group of -principal global units of ; then if and only if is a direct factor in , whence the result.
The Lg
The general study of and its torsion group is done in our book, and we have the following canonical isomorphism, whatever the base-field and the prime :
where is the group of prime-to- ideals of and the sub-group of principal ideals; then:
Via the Artin Symbol, defines an isomorphism . Whence the formula (product of three integers):
giving a test of non--rationality, the new needed invariant being the difficult denominator obtained from the Log-function, which reduces to the usual logarithm. The -space is only relevant of the Leopoldt conjecture that we assume, and does not need the numerical knowledge of the units (for instance, in the totally real case, ).
Remarks 5.3. (i) Set ; the degree only depends on the Fermat quotients of the 's deduced from the 's, via the relation .
(ii) In the particular case where (imaginary quadratic fields), the formula becomes , with the usual -adic logarithm.
(iii) If is a real quadratic field of fundamental unit , the formula needs the computation of ; in that case, a direct computation is possible since the ramification in the cyclotomic -extension is well known. So, the case of totally real fields satisfying Leopoldt’s conjecture is much easier; but our purpose is to write a general program for fields of any signature. We will use the Log-function in the case of imaginary quadratic fields which reduces to the case of cyclic -class groups for (Lemma 5.1).
Technical pari/gp considerations
The difficulties, in a computational viewpoint, is the orders of magnitude of and/or the degree of the field defined via a monic irreducible polynomial . So, if is small as well as , our classical program using ray class groups of suitable modulus (power of ) may be sufficient. However, under some circonstances, the PARI/GP computation of a ray class group with large modulus may be hopeless; in this case the new algorithm does not need ray class groups and only computes -adic logarithms of algebraic numbers.
Another enormous difficulty is the order of magnitude of coefficients of some algebraic numbers (e.g., the units epsilon = Mod(e(x), P), with possibly numerators of the coefficients e(x) with thousands of digits), so that any banal operation takes much time. Since one only tests , coefficients may be computed modulo a suitable modulus ( or ); then many reductions are done in the programs, which significantly increases the speed of execution.
Bad primes
In the -adic log framework, a difficulty does appear when ramifies in (slow convergence of the log maps) and when the algebraic numbers (units, pseudo-units, integer basis elements given by k.zk) have non-invertible denominators in their coefficients. So we may define the “bad primes”, few in number, as follows, and use for them, a ray class group of modulus for , for :
Definition 6.1. Let be a number field defined by the monic irreducible polynomial , of degree . Let be the -class group of and let be its discriminant. Then we define, in the programs, the set PW of the following “bad” prime numbers:
(i) Primes ( avoid the computation of );
(ii) Primes dividing the discriminant ( simplifies the computation of the regulator and makes logarithmic calculations easier);
(iii) Primes dividing the class group ( avoid the computation of );
(iv) Primes dividing the denominators of coefficients of the integer basis elements given by PARI/GP under the form k.zk[i] = Mod(ci(x), P), where (such primes make more difficult the reductions modulo ).
All these “bad primes” are easily known from the very beginning. Then the programs process them first. However, in the case of quadratic fields , we do not use ray class groups for these primes since for these fields, is known, the bad denominator reduces to (when ), and some specificities can help; so it remains some more delicate computations of logarithms (see § 6.4):
Ramified primes are given via the instructions Dk = k.disc computing the discriminant of , then F = factor(Dk), component(F, 1) (list of the matsize(F)[1] prime divisors); the prime divisors of the class group are computed in the same way from k.no and k.cyc.
It will be necessary to compute separately , which is the unique invariant that may be non-trivial for some . We have conjectured, in various papers, that this happens only for a finite number of primes, in other words that is -rational for almost all .
Once we know that , we use the Log-function to compute the difficult invariant (see § 5.2, Formula (5.2)). In a computational aspect, the programs will use the PARI/GP instruction bnfininit(P, 1) from which we get the class group Hk = k.clgp and a system Ek = k.fu of fundamental units,.
Of course, the program using ray class groups is very short (few lines); moreover, with a suitable larger modulus, it computes the structure of , but need some interpretation of the result since PARI/GP gives the complete structure, that is of the form ; hence the -rationality if and only if . So the reader may be surprised by the lengthy main Program 1.1.2, but with an extremely fast running. This comes from a systematic optimization of some computations (e.g., large power of a large algebraic number and log computations with the usual series, that we justify in the next § 6.4).
Principal algebraic numbers and prime-to- ideals
If is a prime-to- algebraic number of , the computation of its -adic logarithm needs to work with a number congruent to modulo the product of the prime ideals of dividing (called “principal”); this obvious theoretical fact is not easy in a computational one since we must calculate a prime-to- power of that may be extremely large.
For this, we must have all classes represented by prime-to- ideals ; indeed, a suitable power gives the number , called a “pseudo-unit”, needed for the computation of . So one can use the following program giving the PARI/GP representative ideals Ai (from Hk = k.clgp where Hk[1] gives the class number, Hk[2] the group structure of the class group (orders ni of Ai), and Hk[3] representative ideals), but with ideals Ai non-necessarily prime to . In the program, Ni is the norm of the ideal Ai); a list of prime-to- ideals Bi is given in LHkp; the instruction z = idealappr(k, Aip) is the key for this:
idealappr(nf,x,{flag}): x being a fractional ideal, gives an element b such that
v_p(b)=v_p(x) for all prime ideals p dividing x, and v_p(b)>=0 for all other p;
x may also be a prime ideal factorization with possibly zero exponents.
{P=x^2-2*3*5*7*11*17;p=23;k=bnfinit(P);Hk=k.clgp;LHkp=List([]);
dA=matsize(Hk[3])[2];for(j=1,dA,Ai=Hk[3][j];Ni=component(Ai,1)[1];
if(Mod(Ni,p)!=0,listput(LHkp,Ai));
if(Mod(Ni,p)==0,Aip=idealmul(k,Ai,p);z=idealappr(k,Aip);
Bi=idealdiv(k,z,Aip);listput(LHkp,Bi)));
print("p=",p," Hk=",Hk," LHkp=",LHkp)}
p=23 Hk=[32,[4,2,2,2],[[29,27;0,1],[23,3;0,1],[85,0;0,1],[46,20;0,1]]]
LHkp=List([[29,27;0,1],[8535,15;0,5],[85,0;0,1],[27353261,5959649;0,1]])
The instruction Aip = idealmul(k, Ai, p) does not modify the class and makes certain that idealdiv(k, z,Aip) will be prime to all -places. The two ideals of norms 23 and 46 have been replaced by ideals of norms 42675 and 27353261, respectively.
Relation Lg
We define the minimal integer (depending on the residue degrees of the -places) such that for any prime-to- number , is congruent to 1 modulo all the -places of . In the programs, the number is denoted pi. It generates an ideal of the form:
If is unramified in , then .
Computation of
We assume that the residue degrees of the -places of are given in the list Lf = ([f1,...,fg). A canonical solution is the least common multiple of the . But can be so large that one must compute modulo some coefficients.
Computation of (mod ), for with -integer coefficients.
For instance, the following program, with a large unramified prime , computes the prime ideals Primei dividing (list ldeal), ramification indices (list Lrho), residue degrees (list Lf), the integer M, and (mod ):
allocatemem(800000000)
{P=x^17-31*x-1;p=100000007;N=2;mod=p^N;alpha=Mod(x,P);
k=bnfinit(P);Ideal=List;Lrho=List;Lf=List;F=ideal factor(k,p);
g=matsize(F)[1];for(i=1,g,Primei=component(F,1)[i];listput(Ideal,Primei);
rhoi=Primei[3];fi=Primei[4];listput(Lrho,rhoi);listput(Lf,fi));
``
M=1;for(i=1,g,Mi=p^Lf[i]-1;M=lcm(M,Mi));
alphaM=Mod(Mod(lift(alpha),mod),P)^M;
print("Lrho=",Lrho," Lf=",Lf);print("M=",M);
print("alphaM=",lift(lift(alphaM)))}
Lrho=List([1,1,1,1,1]) Lf=List([1,1,2,4,9])
M=100000085000033120007822601247358141463991700
5539111378155216975637693591518786629056793341442400
alphaM=3409200238644*x^16+5484595083921629*x^15+2119742948381996*x^14
+8987355229114822*x^13+7850508049535525*x^12+7732600941282028*x^11
+7477157623400997*x^10+2088556446198941*x^9+1916618434163281*x^8
+6251496237604706*x^7+400278228019474*x^6+326693722868559*x^5
+8452449591671430*x^4+6869203380844203*x^3+9922633494584296*x^2
+439241030746870*x+6959356087154893
=1+100000007*(34092*x^16+54845947*x^15+21197428*x^14+89873546*x^13
+78505075*x^12+77326004*x^11+74771571*x^10+20885563*x^9+19166183*x^8
+62514958*x^7+4002782*x^6+3266937*x^5+84524490*x^4+68692029*x^3
+99226328*x^2+4392410*x+69593556)
time = 1,901 ms.
The run takes time = 1, 901 ms, the main part being due to the instruction for of large degree. It is clear that, for huge primes , the discriminant of and its class number are in general prime to , so that we will have the -adic approximations modulo (e.g., for logarithms).
Computation of Lg
Set , where ; one has , where plays the role of a -Fermat quotient of , most often trivial. As usual, we must estimate a minimal number of terms of the series that may give a congruence (for equal in general to 2 or 3 depending on ), of the form:
Minimal index of the log series
Let be the number of prime ideals of ; let be the ramification index of in . Then the relation implies that a computation modulo is satisfied as soon as it is satisfied modulo each power .
Since the -valuations of the number can take any value , the computation of the minimal limit term of the series strongly depends on the ramification of in , then is not so obvious and must work in any case in a program:
Proposition 6.2. Let and let , where , for all . Put (here, ).
Let be the minimal integer such that and .
Let be the maximal integer such that .
a) If for all (which supposes for all ), then is the maximal integer such that , whence . If moreover, is unramified, then (e.g., for , and we then have the usual well-known relation ).
b) Let . Then .
c) The approximation of is a -integer as soon as is unramified in .
Proof. If , then . In the most frequent case ; this does not apply for , but applies for and . For , this apply if moreover .
The purpose is to consider the following steps for each prime ideal :
Determination of , then proof that, in the interval , the terms of the form , , have a strictly increasing -valuation and can be neglected;
Proof that for all , for any value of .
Determination of in .
Let , for (-valuation function of the terms ); its derivative is , giving the minimum of for:
Thus, is strictly increasing from . One verifies that when does not ramify, then for all ; this is not true if ramifies (e.g., and ).
So, there exists such that for all . This writes:
If , then is increasing and positive for all ; this condition is equivalent to ; it is satisfied if does not ramify; for quadratic fields it is satisfied for whatever the ramification.
So, it remains to prove that all , , may be neglected modulo . For this, it suffices to prove the inequality in this interval; put , for and ( if ); we have, using (5):
Whence points (i), (ii); points (i) and (iii) being solved by the program using the instruction while; it will then take obtained from the above computation.
Assume that for all and put for all ; then , which is non-negative for all and all ; whence property (c), which applies in particular to quadratic fields.
Let’s give the basic algorithm, where Delta is the -valuation of pi and rho its ramification index:
Computation of and of the Log series up to
We give fictive data for which some coefficients of Log have the denominator p = 2 and rho > 2; so, the reduction modulo mod = gives some difficulties with the instructions Mod(Log, p); the following program is valid for any data p, P, Delta, rho, N, mod = , pi, obtained from the main programs testing the p-rationality:
{p=2;P=x^8-2;Delta=1;rho=8;N=3;mod=p^N;pi=Mod(x,P);
\COMPUTATION OF THE MINIMUM hatx=p^x-Delta-x.rho:
hatx=floor((log(rho)-log(Delta*log(p)))/log(p))+1;
\COMPUTATION OF THE MAXIMAL INDICES hatn AND hatt:
n=max(1,hatx);while(p^n*Delta-rho*(N+n)<0,n=n+1);
\COMPUTATION OF hatt FOR A PRIME:
hatn=n;if(hatn==1,hatt=N);if(hatn>1,hatt=p^hatn;
while(hatt*Delta-(valuation(hatt,p)+N)*rho>0,hatt=hatt-1));
\COMPUTATION OF Log MOD mod:
Log=pi;t=1;pit=pi;while(t<=hatt,t=t+1;pit=pi*pit;Log=Log+(-1)^(t+1)*pit/t;
\VALUATION OF THE DENOMINATOR OF Log:
vLog=min(valuation(lift(Log),p),0);Log=lift(Log)*p^-vLog;
\REDUCTION MODULO mod*p^-vLog AND RESTITUTION OF Log:
Log=lift(Mod(Log,mod*p^-vLog));Log=Mod(Log*p^vLog,P);
print("n=",n," hatn=",hatn," hatt=",hatt);print("Log=",Log);
print("val(norm(Log))=",valuation(norm(Log),p))}
n=7 hatn=7 hatt=64
Log=Mod(x^7+3/2*x^6+3*x^5+13/4*x^4+5*x^3+9/2*x^2+7*x,x^8-2)
valuation(norm(Log),2)=-12
time = 1 ms.
Note that if is unramified and large enough such that , for all , whence , then and and , without any more computations; this is the case when .
In the opposite case, a tricky example may be when with large ramification indices and the number such that for all ; we give an example in which the numerical data may be modified at will:
allocatemem(800000000)
{p=2;P=x^16-32*x^4+8*x-2;
N=3;mod=p^N;k=bnfinit(P,1);alpha=k.fu[1];
\\DECOMPOSITION OF p:
Ideal=List;Lrho=List;Lf=List;LM=List;F=idealfactor(k,p);
g=matsize(F)[1];for(i=1,g,Primei=component(F,1)[i];
listput(Ideal,Primei);rhoi=Primei[3];fi=Primei[4];listput(Lrho,rhoi);
listput(Lf,fi);listput(LM,p^fi-1));
\\COMPUTATION OF M:
M=1;for(i=1,g,M=lcm(M,LM[i]));
\\COMPUTATION OF alpha^M:
alphaM=alpha;valphaM=min(valuation(lift(alphaM),p),0);
alphaM=Mod(Mod(lift(alphaM),mod*p^-valphaM),P)^M;
pi=Mod(lift(lift(alphaM))-1,P);if(pi==0,pi=Mod(mod,P));
\\COMPUTATION OF hatt:
for(i=1,g,Primei=Ideal[i];Deltai=idealval(k,pi,Primei);rhoi=Lrho[i];
hatx=floor((log(rhoi)-log(Deltai*log(p)))/log(p))+1;
n=max(1,hatx);while(p^n*Deltai-rhoi*(N+n)<0,n=n+1);
hatn=n;if(hatn==1,hattj=N);if(hatn>1,hatti=p^hatn;
while(hatti*Deltai-(valuation(hatti,p)+N)*rhoi>0,hatti=hatti-1));
hatt=max(hatt,hatti));
\\COMPUTATION OF Log(alpha):
Log=pi;t=1;pit=pi;while(t<=hatt,t=t+1;pit=pi*pit;
Log=Log+(-1)^(t+1)*pit/t;
\\REDUCTION MODULO mod:
vLog=min(valuation(Log,p),0);Log=lift(Log)*p^-vLog;
Log =Mod(Log,mod*p^-vLog);Log=Mod(lift(Log)*p^vLog,P));
print("p=",p," hatt=",hatt);print("Log=",Log);for(j=1,g,
valLog=idealval(k,Log,Ideal[j]);print("valLogj=",valLog))}
p=2 hatt=128
Log=Mod(7*x^15+1/2*x^14+5*x^12+7*x^11+5*x^10+3*x^9+15/8*x^8
+x^7+6*x^5+19/4*x^4+2*x^3+9/2*x^2+9/2*x+5/2, x^16-32*x^4+8*x-2)
valLogi=-40
time = 1,191 ms. ms.
The number Log is not a 2-integer; the ramification index of is 16 (too large, see Proposition 6.2), whence:
It is interesting to see the progression of the -valuation of , as increases, regarding ; we have of valuation 1. This illustrates Proposition 6.2:
1,-14,3,-28,5,-10,7,-40,9,-6,11,-20,13,-2,15,-48,17,2,19,-12,21,6,23,-24,25,10,27,
-4,29,14,1,-48,33,18,35,4,37,22,39,-8,41,26,43,12,45,30,47,-16,49,34,51,20,53,38,
55,8,57,42,5,28,61,46,63,-32,65,50,67,36,69,54,71,24,73,58,75,44,77,62,79,16,81,66,
83,52,85,70,87,40,89,74,91,60,93,78,95,16,97,82,99,68,101,86,103,56,105,90,107,76,
109,94,111,48,113,98,115,84,117,102,119,72,121,106,123,92,125,110,127,16,129,
The summation is significant, but many negative valuations will give the denominator 8, and the necessary number 16 appears at the end; furthermore, removing unnecessary terms, greater than 64, does not change the execution time.
The following example with a large prime is general and the running needs less than 3 seconds, noting that most of the time is spent by bnfinit(P, 1):
allocatemem(800000000)
{P=x^17-31*x-1;p=100000007;N=2;mod=p^N;k=bnfinit(P,1);
alpha=Mod(x,P);Ideal=List;Lrho=List;Lf=List;LDelta=List;LM=List;
F=idealfactor(k,p);g=matsize(F)[1];
for(j=1,g,Primej=component(F,1)[j];listput(Ideal,Primej);
rhoj=Primej[3];fj=Primej[4];listput(Lrho,rhoj);listput(Lf,fj);listput(LM,p^fj-1));
M=1;for(j=1,g,M=lcm(M,LM[j]));alphaM=alpha;
valphaM=min(valuation(lift(alphaM),p),0);
alphaM=Mod(Mod(lift(alphaM),mod*p^-valphaM),P)^M;
pi=Mod(lift(lift(alphaM-1)),P);if(pi==0,pi=Mod(mod,P));
for(j=1,g,Primej=Ideal[j];Deltaj=idealval(k,pi,Primej);rhoj=Lrho[j];
hatt=0;hatx=floor((log(rhoj)-log(Deltaj*log(p)))/log(p))+1;
n=max(1,hatx);while(p^n*Deltaj-rhoj*(N+n)<0,n=n+1);
hatn=n;if(hatn==1,hattj=N);if(hatn>1,hattj=p^hatn;
while(hattj*Deltaj-(valuation(hattj,p)+N)*rhoj>0,hattj=hattj-1));
hatt=max(hatt,hattj));Log=pi;t=1;pit=pi;
while(t<=hatt,t=t+1;pit=pi*pit;Log=Log+(-1)^(t+1)*pit/t;
vLog=min(valuation(lift(Log),p),0);Log=lift(Log)*p^-vLog;
Log=Mod(Log,mod*p^-vLog);Log=Mod(lift(Log)*p^vLog,P));
print("valuations(pi)=",LDelta);print("t maximal=",hatt);
print("ramifications=",Lrho);print("residue degrees=",Lf);
print("LM=",LM);print("M=",M);print("pi=",pi);print("Log=",Log)}
valuations(pi)=List([1,1,1,1,1]) t maximal=2
ramifications=List([1,1,1,1,1]) residue degrees=Lf=List([1,1,2,4,9])
LM=List([100000006,100000006,10000001400000048,100000028000002940000137200002400,
1000000630000176400028812003025260211768209882516296475485188320940353606])
M=100000085000033120007822601247358141463991700553911137815521697563769359
1518786629056793341442400
pi=Mod(3409200238644*x^16+5484595083921629*x^15+2119742948381996*x^14
+8987355229114822*x^13+7850508049535525*x^12+7732600941282028*x^11
+7477157623400997*x^10+2088556446198941*x^9+1916618434163281*x^8
+6251496237604706*x^7+400278228019474*x^6+326693722868559*x^5
+8452449591671430*x^4+6869203380844203*x^3+9922633494584296*x^2
+439241030746870*x+6959356087154892,x^17-31*x-1)
Log=3409200238644*x^16+5484595083921629*x^15+2119742948381996*x^14
+8987355229114822*x^13+7850508049535525*x^12+7732600941282028*x^11
+7477157623400997*x^10+2088556446198941*x^9+1916618434163281*x^8
+6251496237604706*x^7+400278228019474*x^6+326693722868559*x^5
+8452449591671430*x^4+6869203380844203*x^3+9922633494584296*x^2
+439241030746870*x+6959356087154892
time = 1,925 ms
Program testing for any number field
The Log-function allows to determine the structure of ; this leads to an elaborate program, unnecessary since our method is to test if or not. We first give the case of an imaginary quadratic field, then we generalize to an arbitrary number field of any signature.
Case of an imaginary quadratic field
The main characteristic is that there is no normalized -adic regulator.
Generalities
We have the identity ; the computation of is immediate, that of being much more complex since which needs the use of the Log-function. Of course, since the number of primes dividing is finite, for almost all . This conclusion is only obvious for imaginary quadratic fields; as soon as there are units of infinite order, this constitutes a conjecture, for regulators of algebraic numbers, given in many of our papers.
Remark 7.1. If the -rank of is strictly larger than , then is non--rational. For imaginary quadratic fields and it is well known that the part of the -Hilbert class field contained in is in fact contained in the anti-cyclotomic -extension (see [12] for programs about the first layer of ), so is non--rational as soon as . For instance, consider the first known imaginary quadratic fields with (Diaz y Diaz [2], Appendice 1]); for all them, and Program 1.1.2 confirms the non-3-rationality. Up to only the case gives a non--rationality for a prime larger than 3:
x^2+5067967
class group=[69,3,3] Pbad=List([2,3,23,5067967])
**********************
p=2 Structure of the 2-torsion group:Tk=List([2])
k is not 2-rational
**********************
p=3 Structure of the 3-torsion group:Tk=List([3,3])
k is not 3-rational
**********************
p=23 Structure of the 23-torsion group:Tk=List([23])
k is not 23-rational
**********************
For , ; thus is cyclic and its order is given by the “minus components” of the action of the complex conjugation ; whence for imaginary quadratic, , and cyclic:
where is of the form ; whence:
So, if is the -module , , the -valuation of is given in the program by:
The case is particular since the action of is not semi-simple. The case is also particular because of the existence of for . So the test of 2 and 3-rationalities of with the ray class group of modulus 8 and 9, is faster.
7.1.2. Program computing and for . For , we know that if is unramified in (i.e. ), and if , if , then if and (cf. [12], Lemma 2.6).
In the PARI/GP notation, a canonical generator of the -module is and , respectively.
The program does not print the (numerous) cases where . A sufficient precision is necessary, only for few values of , because of the instruction bnfispincipal(k,C0)[2]; recall that here, :
allocatemem(800000000)
\p 550
{minm=2;maxm=10^4;minp=3;maxp=10^4;
for(m=minm,maxm,if(core(m)!=m,next);P=x^2+m;k=bnfinit(P);
\\TEST ON W:
if(-m!=-3 & Mod(-m,9)==-3,next);
\\TESTS ON THE CYCLICITY OF THE p-CLASS GROUP:
Hk=k.clgp;Nk=Hk[2];A=Hk[3];dA=matsize(A)[2];
forprime(p=minp,maxp,valhkp=valuation(k.no,p);if(valhkp==0,next);
Hkp=List();dp=0;for(i=1,dA,vN=valuation(Nk[i],p);
if(vNk!=0,dp=dp+1;listput(Hkp,p^vNk));if(dp>1,next);
``
\\THE p-CLASS GROUP IS NOW p-CYCLIC (A0,N0):
for(i=1,dA,if(Mod(Nk[i],p)==0,N0=Nk[i];A0=A[i];break));
n0=valuation(N0,p);N=n0+2;mod=p^N;
\\DECOMPOSITION OF p:
F=idealfactor(k,p);g=matsize(F)[1];Prime=component(F,1)[1];
\\PRIME-TO-p GENERATOR B0 OF THE p-CLASS GROUP:
B0=A0;Norm0=idealnorm(k,B0);w0=valuation(Norm0,p);if(w0!=0,
\\RAMIFIED CASE:
if(Mod(m,p)==0,z=idealappr(k,B0);B0=idealdiv(k,z,B0));
\\UNRAMIFIED CASE:
if(Mod(m,p)!=0,Bp=idealmul(k,B0,p);z=idealappr(k,Bp);
B0=idealdiv(k,z,Bp)));
\\COMPUTATION of THE VALUATION OF Log(U)^-:
if(p!=3,if(Mod(m,p)!=0,vLogU=1);if(Mod(m,p)==0,vLogU=0));
if(p==3,if(Mod(m,3)!=0,vLogU=1);if(Mod(m,3)==0 & Mod(m,9)!=3,vLogU=0);
if(Mod(m,3)==0 & Mod(m,9)==3,vLogU=1));Minval=vLogU;
\\DECOMPOSITION OF (p)--COMPUTATION OF M (p-1 or p^2-1):
rho=Prime[3];f=Prime[4];if(f==1,M=p-1);if(f==2,M=p^2-1);
\\COMPUTATION OF beta0 AND alpha0M:
C0=idealpow(k,B0,N0);beta0=bnfisprincipal(k,C0)[2];
alpha0=Mod(beta0[1]*k.zk[1]+beta0[2]*k.zk[2],P);
\\REDUCTION OF alpha0^M MODULO mod:
alpha0M=Mod(Mod(lift(alpha0),mod),P)^M;
pi=Mod(lift(lift(alpha0M))-1,P);if(pi==0,pi=Mod(mod,P));
\\COMPUTATION OF hatt AND THE LOG SERIES MODULO mod:
for(j=1,g,Primej=component(F,1)[j];
Deltaj=idealval(k,pi,Primej);rhoj= Primej[3];
hatx=floor((log(rhoj)-log(Deltaj*log(p)))/log(p))+1;
n=max(1,hatx);while(p^n*Deltaj-rhoj*(N+n)<0,n=n+1);
hatn=n;if(hatn==1,hattj=N);if(hatn>1,hattj=p^hatn;
hatt=0;while(hattj*Deltaj-(valuation(hattj,p)+N)*rhoj>0,hattj=hattj-1));
hatt=max(hatt,hattj));Log0=pi;t=1;pit=pi;Log0=pi;t=1;pit=pi;
\\COMPUTATION OF Log0=Log(alpha0M):
while(t<=hatt,t=t+1;pit=pi*pit;Log0=Log0+(-1)^(t+1)*pit/t);
Log0=Mod(lift(Log0),mod);a=polcoeff(Log0,1);
if(a==0,vala=N+2);if(a!=0,vala=valuation(a,p));
vlog=vala-n0;Minval=min(vLogU,vlog);
Index=vLogU-Minval;valhkinfty=valhkp-Index;if(valhkinfty>0,
print("-m=",-m," k non ",p,"-rational"," Index=",p^Index,
" Hkp=",Hkp," hkinfty=",p^valhkinfty))))}
time = 25,816 ms.
(...)
-m=-9527 k non 11-rational Index=1 Hkp=List([11]) hkinfty=11
-m=-9529 k non 7-rational Index=1 Hkp=List([7]) hkinfty=7
-m=-9553 k non 5-rational Index=1 Hkp=List([5]) hkinfty=5
-m=-9554 k non 5-rational Index=1 Hkp=List([5]) hkinfty=5
-m=-9557 k non 13-rational Index=1 Hkp=List([13]) hkinfty=13
-m=-9587 k non 23-rational Index=1 Hkp=List([23]) hkinfty=23
-m=-9593 k non 5-rational Index=1 Hkp=List([5]) hkinfty=5
-m=-9622 k non 3-rational Index=1 Hkp=List([9]) hkinfty=9
-m=-9626 k non 3-rational Index=3 Hkp=List([9]) hkinfty=3
-m=-9634 k non 7-rational Index=1 Hkp=List([7]) hkinfty=7
-m=-9663 k non 3-rational Index=9 Hkp=List([27]) hkinfty=3
(...)
Case of an arbitrary number field
In that case, the three -modules , and may be non-trivial; we refer to Programs 2.2, for and to Program 3.2 for an independent test of .
Generalities and hypothesis
We assume that we know that (otherwise is non -rational) and that (otherwise ). We will use the method of determining the bad primes to which we apply the usual classical computation of ; this simplifies the log and matrix computations. Then we must first compute .
Once this is done, with invertible and , it remains the most difficult invariant where some simplifications arise (non-ramification of , meaning that is direct factor in ). This point is essential since the image of takes place in the -vector space .
It is clear that is a -basis of when is not bad, especially if does not divide the discriminant , nor the denominators of integer basis elements; by security, we compute the corresponding matrix determinant; indeed, it is not certain that primes dividing the polynomial discriminant are non-bad. The integer basis of is given by k.zk, where:
So we compute the -valuation of :
{P=x^9+7*x^3-1400*x-7;maxp=10^8;d=poldegree(P);
if(polisirreducible(P)==0,break);k=bnfinit(P);Dk=k.disc;
print(factor(Dk));
denB=1;for(j=1,d,Bzk=lift(k.zk[j]);for(i=0,d-1,
denB=lcm(denominator(polcoeff(Bzk,i)),denB));
forprime(p=2,maxp,if(Mod(Dk*denB,p)==0,
print("bad prime p=",p);next);
Mz=List;for(j=1,d,zj = k.zk[j];Lc=List;for(i=0,d-1,
coeff=Mod(polcoeff(zj,i),p);listput(Lc,coeff));
listput(Mz,Lc));MZ=matrix(d,d,u,v,Mz[u][v]);
valdet=valuation(matdet(MZ),p);if(valdet!=0,
print("p=",p," warning"," valdeterminant=",valdet))}
Dk=5^3*7^8*249517*6670822160235662179
bad prime p=5
bad prime p=7
bad prime p=17
bad prime p=249517
time = 54,537 ms for p<10^7.
time = 7min, 52,584 ms for p<10^8.
The prime is unramified but divides the denominator of several elements of k.zk, as: .
Test for for any number field
We assume that the normalized -adic regulator has been computed and is invertible (otherwise, is non--rational). It is crucial to take a sufficient precision, still because of the instruction betai = bnfisprincipal(k,Bi)[2] giving the components on the integer basis of the pseudo-units generating .
Then, the program gives the components of modulo ; for this, we have the following lemma:
Lemma 7.2. Assume that is unramified in , does not divide the denominators of the integer basis elements of and that . Put and . Let be a fundamental system of pseudo-units of ; put , , where the are the generating classes given by PARI/GP in . Set:
Let be the -matrix defined by the coefficients and modulo $p.
Then, the invariant is non-trivial if and only if the rank of this -matrix is strictly less than (rE + rhk in the program).
Proof. Since is unramified, we have and any is of the form (mod ), with . We have if and only if there exists a class , of order , such that . Put , up to a principal ideal, with , not all zero (this means that the class is of order ). Since and:
is a direct factor in ; thus, the relation is equivalent to for some ; since represents the same class of order , one may write:
The left member is in , so ; since by (7), is a direct factor in , is non-zero if and only if . Since , , implies one may assume that . In fact depends on the valuations of the left member. Whence, from (8), the existence of elements such that , with coefficients not all zero; so the -rank of the matrix is strictly less that . Since is invertible by (7), the rank of is at least rE (the program verifies that is invertible; if not it concludes that is not -rational).
The program
The hypothesis are those given in Lemma 7.2.
allocatemem(8000000000)
\p 1000
{for(a=1,100, P=x^8-7*a*x^4-1;bp=2;Bp=10^4;
if(polisirreducible(P)==0,next);d=poldegree(P);k=bnfinit(P,1);
kP=nfinit(P);r1=kP[2][1];r2=kP[2][2];rE=r1+r2-1;rk=r2+1;
\\BAD PRIMES (ramified + divisors of denominators of k.zk):
Pbad=List;
\\DENOMINATORS OF THE INTEGER BASIS and Dk:
denB=1;for(j=1,d,Bzk=lift(k.zk[j]);for(i=0,d-1,
denB=lcm(denominator(polcoeff(Bzk,i)),denB));
Fbad=factor(abs(k.disc)*denB);dF=matsize(Fbad)[1];
Prodbad=1;for(i=1,dF,p=component(Fbad,1)[i];
listput(Pbad,p);Prodbad=Prodbad*p);
\\TEST FOR THE NON-BAD PRIMES:
\\DECOMPOSITION OF p IN k, COMPUTATION OF M:
forprime(p=3,Bp,if(Mod(Prodbad,p)==0,next);
valhkp=valuation(k.no,p);if(valhkp==0,next);print();
print("a=",a," P=",P);print("class group=",k.cyc);print("Pbad=",Pbad);
print("number of independent Z_p-extensions=",rk);
print("Z-rank of the group of units=",rE);
\\ p-RANK OF Hk, LIST OF PRIME-TO-p IDEALS:
Hk=k.clgp;Nk=Hk[2];A=Hk[3];dA=matsize(A)[2];B=List;
N=0;rhk=0;for(i=1,dA,Nu=Nk[i];vi=valuation(Nu,p);
if(vi>0,rhk=rhk+1;N=max(N,vi)+2; CA=A[i];nu=idealnorm(k,CA);
if(Mod(nu,p)==0,Y=idealmul(k,CA,p);z=idealappr(k,Y);
Z=idealdiv(k,z,Y);listput(B,Z));if(Mod(nu,p)!=0,listput(B,CA)));
mod=p^(N+3);F=idealafactor(k,p);g=matsize(F[1])[1];M=1;
for(i=1,g,fi=component(F,1)[i][4];M=lcm(M,p^fi-1));
\\COMPUTATION OF THE LOG(alpha):
LogA=List;for(i=1,rhk,Bi=idealpow(k,B[i],Nk[i]);
betai=bnfisprincipal(k,Bi)[2];alphai=0;
for(j=1,d,alphai=alphai+Mod(betai[j]*k.zk[j],P));
\\REDUCTION OF alphai^M MODULO mod:
alphaiM=Mod(Mod(lift(alphai),mod),P)^M;
pi=Mod(lift(lift(alphaiM)),P)-1;if(pi==0,pi=Mod(mod,P));
\\COMPUTATION OF hatt FOR Log(alphaiM) MODULO mod:
for(j=1,g,Primej=component(F,1)[j];rhoj=Primej[3];
Deltaj=idealval(k,pi,Primej);rhoj=Primej[3];
hatx=floor((log(rhoj)-log(Deltaj*log(p)))/log(p))+1;
n=max(1,hatx);while(p^n*Deltaj-rhoj*(N+n)<0,n=n+1);
hatn=n;if(hatn==1,hattj=N);if(hatn>1,hattj=p^hatn;
hatt=0;while(hattj*Deltaj-(valuation(hattj,p)+N)*rhoj>0,hattj=hattj-1));
hatt=max(hatt,hattj));Log=pi;t=1;pit=pi;
while(t<=hatt,t=t+1;pit=pi*pit;Log=Log+(-1)^(t+1)*pit/t);
listput(LogA,lift(Log)));
\\COMPUTATION OF THE Log(ai)=1/ni*log(alphai)
MA=List;for(ell=1,rhk,Lell=LogA[ell]/p;
Lc=List;for(i=0,d-1,coeff=polcoeff(Lell,i);
listput(Lc,coeff));listput(MA,Lc));
MLogA=matrix(rhk,d,u,v,Mod(MA[u][v],p));
\\TEST ON THE REGULATOR:
E=k.fu;LogE=List;for(ell=1,rE,
epsilonellM=Mod(Mod(lift(E[ell]),mod),P)^M;
pi=Mod(lift(lift(epsilonellM)),P)-1;
\\COMPUTATION OF hatt FOR Log(epsilonellM):
N0=2;if(p==2,N0=3);
for(j=1,g,Primej=component(F,1)[j];rhoj=Primej[3];
Deltaj=idealval(k,pi,Primej);rhoj=Primej[3];
hatx=floor((log(rhoj)-log(Deltaj*log(p)))/log(p))+1;
n=max(1,hatx);while(p^n*Deltaj-rhoj*(N0+n)<0,n=n+1);
hatn=n;if(hatn==1,hattj=N);if(hatn>1,hattj=p^hatn;
hatt=0;while(hattj*Deltaj-(valuation(hattj,p)+N)*rhoj>0,hattj=hattj-1));
hatt=max(hatt,hattj));Log=pi;t=1;pit=pi;
while(t<=hatt,t=t+1;pit=pi*pit;Log=Log+(-1)^(t+1)*pit/t);
listput(LogE,lift(Log)));
ME=List;for(ell=1,rE,Lell=LogE[ell]/p;
Lc=List;for(i=0,d-1,coeff=Mod(polcoeff(Lell,i),p);
listput(Lc,coeff));listput(ME,Lc));
MLogE=matrix(rE,d,u,v,ME[u][v]);rankE=matrank(MLogE);
if(rankE<rE,print(p,"-regulator non invertible,",
" k is not ",p,"-rational: Hinfty>1");next);
X=concat(MLogA~,MLogE~);rankX=matrank(X);
print("p=",p," rank(R)=",matrank(MLogE)," rank(X)=",matrank(X));
if(rankX==rE+rhk,print("Hinfty=1"));
if(rankE<rE || rankX<rE+rhk,
print("k is not ",p,"-rational: Hinfty>1"))))}
time = 1min, 35,921 ms.
Let’s give some examples:
7.2.4. Case . Program 2.2 shows that :
a=5 P=x^8 - 35*x^4 - 1 class group=[3,3]
Pbad=List([2,1229])
number of independent Z_p-extensions=4
Z-rank of the group of units=4
p=3 rank(R)=4 rank(X)=5
k is not 3-rational: Hinfty>1
Since 3 is not a bad prime, we can describe logarithms modulo 3 on the -basis to find the various -relations, knowing (direct factor, of -dimension 4, of , of -dimension 8). Matrix has the following form:
pseudo-units:
logz1=[1,1,1,0,2,0,0,2]
logz2=[0,2,2,0,0,0,0,1]
units:
loge1=[2,0,0,0,1,0,0,0]
loge2=[0,1,0,0,0,2,0,1]
loge3=[1,2,1,1,2,2,0,0]
loge4=[1,1,1,2,2,1,0,0]
One verifies easily that logz1 + logz2 = [1,0,0,0,2,0,0,0] = 2 * loge1 which means that, modulo , the image of a 3-class is trivial (whence is not linearly disjoint from the compositum of the -extensions of ).
To see that is not contained in , we note for instance that is of order 3 in . A direct computation of the structure of confirms the above calculations since, from Program 1.2.1: rk(Tk) = 1 k is not 3 − rational Tk[p] = List([3]).
Case
a=90 P=x^8 - 630*x^4 - 1 class group=[94]
Pbad=List([2, 49613])
number of independent Z_p-extensions=4
Z-rank of the group of units=4
p=47 rank(R)=4 rank(X)=4
k is not 47-rational: Hinfty>1
pseudo-unit:
logz=[5,19,36,14,44,19,5,46]
units:
loge1=[33,0,0,0,46,0,0,0]
loge2=[0,16,0,21,0,0,0,17]
loge3=[37,8,4,34,6,0,11,32]
loge4=[0,35,0,44,0,27,0,38]
One finds logz = 10 * loge1 + 23 * loge2 + 9 * loge3 + 39 * loge4 in , proving that the image of the -class group in is not trivial; so that is not 47-rational.
Remark 7.3. It is possible that all the be zero modulo ; this happens rarely. We have the following example with another polynomial and :
P=x^4-438*x^3+4*x-1 class group=[6,2,2]
Pbad=List([2,5,29,563,148861])
number of independent Z_p-extensions=2
Z-rank of the group of units=2
p=3 rank(R)=2 rank(X)=2
k is not 3-rational: Hinfty>1
Indeed, verifying independently, one finds that the ideal class , of order 6, gives an element of the form (after reduction modulo 81:
a=Mod(Mod(37,81)*x^3+Mod(75,81)*x^2+Mod(30,81)*x+Mod(37,81),P)
Since M=80, one finds:
a^M-1=Mod(Mod(27,81)*x^3+Mod(9,81)*x^2+Mod(54,81)*x+Mod(27,81),x^4-438*x^3+4*x-1)
pseudounit:
logz=[Mod(0,3) Mod(0,3) Mod(0,3) Mod(0,3)]
units:
loge1=[Mod(0,3) Mod(2,3) Mod(1,3) Mod(0,3)]
loge2=[Mod(0,3) Mod(0,3) Mod(0,3) Mod(1,3)]
Case
In this case, for various reasons:
a=21 P=x^8-147*x^4-1 class group=[273]
Pbad=List([2,21613])
number of independent Z_p-extensions=4
Z-rank of the group of units=4
P=x^8-147*x^4-1 3-regulator non invertible,
k is not 3-rational: Hinfty>1
P=x^8-147*x^4-1 7-regulator non invertible,
k is not 7-rational: Hinfty>1
p=13 rank(R)=4 rank(X)=4
k is not 13-rational: Hinfty>1
References
Villa la Gardette, 4 Chemin de Château Gagnière, F-38520 Le Bourg d’Oisans Email address: [email protected] URL: https://orcid.org/0000-0002-1318-4414
References
- [1][Che1933] C. Chevalley, “Sur la théorie du corps de classes dans les corps finis et les corps locaux”, Thèse no. 155, J. of the Faculty of Sciences Tokyo 2 (1933), p. 365–476. http://archive.numdam.org/item/THESE_1934__15__365_0/ 25
- [2][DYD1974] F. Diaz y Diaz, “Sur les corps quadratiques imaginaires dont le 3-rang du groupe des classes est supérieur à 1”, Séminaire Delange–Pisot–PoItou. Théorie des nombres 15, no. 2 (1973–1974). http://www.numdam.org/item?id=SDPP_1973-1974__15_2_A10_0 32
- [3][GJ1989] G. Gras & J-F. Jaulent, “Sur les corps de nombres réguliers”, Math. Z. 202 (1989), p. 342–365. https://doi.org/10.1007/BF01159964 25
- [5][Gra1986] G. Gras, “Remarks on K₂ of number fields”, Jour. Number Theory 23 (1986), p. 322–335. https://doi.org/10.1016/0022-314X(86)90077-6 2, 25
- [6][Gra2005] G. Gras, Class Field Theory: from theory to practice, corr. 2nd ed. Springer Monographs in Mathematics, Springer, xiii+507 pages (2005). 22, 25
- [8][Gra2016] G. Gras, “Les 0-régulateurs locaux d’un nombre algébrique : Conjectures p-adiques”, Canad. J. Math. 68 (2016), no. 3, p. 571–624. English translation: https://arxiv.org/abs/1701.02618 https://doi.org/10.4153/CJM-2015-026-3 2
- [9][Gra2018] G. Gras, “The p-adic Kummer–Leopoldt Constant: Normalized p-adic Regulator”, Int. J. Number Theory 14 (2018), no. 2, p. 329–337. https://doi.org/10.1142/S1793042118500203 24
- [10][Gra2019a] G. Gras, “On p-rationality of number fields. Applications – PARI/GP programs”, Publications Mathématiques de Besançon 1 (2019), no. 2, p. 29–51. http://pmb.cedram.org/item?id=PMB_2019__2_29_0 2, 18DOI
- [12][Gra2026] G. Gras, “Initiator of the anti-cyclotomic Zₚ-extension of ℚ(√−m) and capitulation phenomenon”. J. Number Theory 280 (2026), no. 3, p. 634–701. https://doi.org/10.1016/j.jnt.2025.09.004 32
- [13][HJ2026] T. Hofmann & H. Johnston, “Algorithms for p-rationality and for p-saturation of units”. https://doi.org/10.48550/arXiv.2609.15190 18, 23
- [17][Mov1988] A. Movahhedi, “Sur les p-extensions des corps p-rationnels”, Thèse, Univ. Paris VII (1988). http://www.unilim.fr/pages_perso/chazad.movahhedi/These_1988.pdf 2, 25
- [18][MR2019] C. Maire & M. Rougnant, “Composantes isotypiques de pro-p-extensions de corps de nombres et p-rationalité”. Publ. Math. Debrecen 94/1 (2019), no. 2, p. 123–155. https://doi.org/10.5486/PMD.2019.8281 18, 19, 20
- [20][Pari2019] The PARI Group, PARI/GP, Version 2.11.2 (2019), Univ. Bordeaux. https://pari.math.u-bordeaux.fr/gpwasm.html 2
- [21][PV2015] F. Pitoun & F. Varescon, “Computing the torsion of the p-ramified module of a number field”, Math. Comput. 84 (2015), no. 291, p. 371–383. https://doi.org/10.1090/S0025-5718-2014-02838-X 18
- [22][Si1984] J.H. Silverman, “An inequality relating the regulator and the discriminant of a number field”, J. Number Theory 19 (1984), no. 3, p. 437–442. https://mathscinet.ams.org/mathscinet/relay-station?mr=769793 20DOI