betaFeedback

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 pp-rationality1 for any pp and any number field kk given by means of an irreducible monic polynomial PP; 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 pp is not too large; but our purpose is to analyse, for some generalized conjectures (e.g. [8]), the huge pp giving a non pp-rationality.

In the next section, we give Program 2.2 for the test of triviality of the normalized pp-adic regulator Rk\mathcal{R}_k.2 Then we give the Programs 3.2.1, 3.2.2, 3.2.3, testing, with various approaches, the necessary condition of pp-rationality: Wkbp:=⨁vμp(kv)/μp(k)=1\mathcal{W}^{\mathrm{bp}}_k := \bigoplus_{v}\mu_p(k_v)/\mu_p(k)=1, in terms of local and global pp-groups of roots of unity. Finally, Program 7.2.3 is testing if the pp-Hilbert class field of kk is or not linearly disjoint from the compositum of the Zp\mathbb{Z}_p-extensions of kk, which gives the tricky invariant Hk∞\mathcal{H}^{\infty}_k.

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 Zp\mathbb{Z}_p-modules Hk∞\mathcal{H}^{\infty}_k, Rk\mathcal{R}_k, Wkbp\mathcal{W}^{\mathrm{bp}}_k (in Hinfty, MLogE, W, respectively in the programs)3, being such that the pp-rationality of kk is equivalent to Hk∞=Rk=Wkbp=1\mathcal{H}^{\infty}_k=\mathcal{R}_k=\mathcal{W}^{\mathrm{bp}}_k=1. 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 kk

The following program gives the prime numbers pp dividing the class number hk⁡=k.no⁡\operatorname{hk}=k.\operatorname{no}, the discriminant Dk = k.disc, the denominators of the integer basis k.zk[i] of kk; it adds the primes less than d+1d+1 (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 Hk∞=Wkbp=1\mathcal{H}^{\infty}_{k}=\mathcal{W}^{\mathrm{bp}}_{k}=1, but Rk≠1R_k\ne1 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 d+1d+1 are sometimes considered as bad primes since they may give Wkbp≠1\mathcal{W}^{\mathrm{bp}}_{k}\ne1.

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 p>2p>2 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 10910^9.

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 pp-rationality with ray class groups

This program is using the structure of a suitable ray class group:

Program P2P2

The values nup = 2 for p>2p > 2, nup = 3 for p=2p = 2, are sufficient for computing the pp-rank of the pp-torsion group Tk\mathcal{T}_k; otherwise, take a larger value of nup to get its complete structure (knowing the pp-rank of Tk\mathcal{T}_k, it suffices to stabilize the corresponding R−rkR-\mathrm{rk} components given by kpnup.cyc, the rk first ones, being due to the Zp\mathbb{Z}_p-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 10410^4, but Program 1.1.2 takes time = 15min, 42,660ms up to 10710^7!

Specific program for imaginary quadratic fields

The program is without use of a ray class group. The method consists of calculating separately Wkbp(p)\mathcal{W}^{\mathrm{bp}}_k(p) (immediate tests limited to 2 and 3 since [Qp(μp):Qp]=p−1[\mathbb{Q}_p(\mu_p):\mathbb{Q}_p]=p-1), and Hk∞\mathcal{H}^{\infty}_k (more difficult since we must compute the part of the Hilbert class field HknrH^{\mathrm{nr}}_k contained in the compositum k~\widetilde{k} of the Zp\mathbb{Z}_p-extensions of kk, which uses the pp-adic Log-function, whence the “Fermat quotients” of the pseudo-units given by ideal classes); in fact, for p>2p>2, Hknr∩k~⊂kacH^{\mathrm{nr}}_k\cap\widetilde{k}\subset k^{\mathrm{ac}}, the anti-cyclotomic Zp\mathbb{Z}_p-extension. Note that in the program, for quadratic fields, if pi is any integer of kk of non-zero pp-valuations for all pp-places, then log⁡(1+pi)\log(1+\mathrm{pi}) is a pp-integer for all p≥2p\geq2, which is not the case in some framework of ramification of pp (this explains that ramified primes are “bad” ones). If p≥2p\geq2 is unramified in kk, then log⁡(1+pi)\log(1+\mathrm{pi}) is a multiple of pp.

Program P3P3 for imaginary quadratic fields and p>2p>2

The case p=2p=2 will be treated separately (Program 1.3.2 below). Once the test on WW is done and since there is no regulator, only fields with a non-trivial pp-class group are tested. Since p>2p>2 and kk quadratic, then x^p<1\hat{x}_p<1. The reader has to indicate the intervals [minm:maxm][\mathrm{minm}:\mathrm{maxm}] for m≥2m\geq2 and [minp:maxp][\mathrm{minp}:\mathrm{maxp}] for p≥3p\geq3:

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-pp-rational fields fields for m∈[2,104]m \in[2,10^4] and p∈[3,104]p \in[3,10^4] but essentially when Wkbp≠1\mathcal{W}_k^{\mathrm{bp}} \ne1 and when Hk∞≠1\mathcal{H}_k^\infty\ne1, rank⁡p(Hk)>2\operatorname{rank}_p(\mathcal{H}_k)>2, for p=3,5,7,11,13,17,19,23p=3,5,7,11,13,17,19,23.

For p∈[29,106]p \in[29,10^6], 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 p=3p=3 and a cyclic 3-class group such that Hknr⊂kacH_k^{\mathrm{nr}} \subset k^{\mathrm{ac}}, we obtain, up to 10410^4:

-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 p=2p = 2

The case p=2p = 2 is particular because of the computation of Hk∞\mathcal{H}_k^\infty; 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 #Wkbp(2)\#\mathcal{W}_k^{\mathrm{bp}}(2):

{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 pnupp^{\mathrm{nup}} 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 αi\alpha_i being replaced by the fundamental unit ε\varepsilon; in the real case, Hk∞=Hk\mathcal{H}_k^\infty=\mathcal{H}_k, except for p=2p=2, when m≡2(mod8)m\equiv2\pmod{8}, m≠2m\ne2, in which case, #Hk∞=12#Hk\#\mathcal{H}_k^\infty=\frac{1}{2}\#\mathcal{H}_k.

Program P4 for real quadratic fields

The program, without use of a ray class group, is valid for any prime pp and begins by the test on Hk∞\mathcal{H}_k^\infty, then on Wkbp\mathcal{W}_k^{\mathrm{bp}} for p=2,3p=2,3; then Hk∞\mathcal{H}_k^\infty.

{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 α\alpha that the non-pp-rationality is equivalent to include at the end of the program, the following instructions, noting that for the unit α\alpha, Nk/Q(α)=1N_{k/\mathbb{Q}}(\alpha)=1 implies log⁡(αM)=a⋅x\log(\alpha^M)=a\cdot x (for PARI/GP, xx is the polynomial indeterminate whose value is m\sqrt{m}):

(i) The case p≠2p\ne2 is related to the ramified case when log⁡(αM)=a⋅π∼a⋅m\log(\alpha^M)=a\cdot\pi\sim a\cdot\sqrt{m} is of non-zero valuation, which means vp(a)≥1v_p(a)\ge1 since PARI/GP considers a⋅xa\cdot x 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 p=2p=2 takes into account the interpretation of the valuation of log⁡(αM)=a⋅x\log(\alpha^M)=a\cdot x; the ramified case m≡2(mod8)m\equiv2\pmod{8} is similar as the previous one. The case m≡5(mod8)m\equiv5\pmod{8} corresponds to 22 inert when #Rk∼12log⁡(ε)\#\mathcal{R}_k\sim\frac{1}{2}\log(\varepsilon), but in that case α=ε6\alpha=\varepsilon^6 and a simple calculation shows that π∈4Ok\pi\in4\mathcal{O}_k and log⁡(αM)∈4Ok\log(\alpha^M)\in4\mathcal{O}_k, whence a non-trivial regulator if and only if v2(log⁡(αM))>2v_2(\log(\alpha^M))>2.

In the other cases, the condition is v2(log⁡(αM))>0v_2(\log(\alpha^M))>0 since π∈2⋅xOk\pi\in2\cdot x\mathcal{O}_k, hence v2(a)>1v_2(a)>1:

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 pNp^N are with N=2N=2 for p≠2p\ne2 and N=3N=3 for p=2p=2.

One obtains 17253 non-pp-rational examples. Contrary to the imaginary case, the non-pp-rationality can occur for many primes pp; we give the following excerpt when the non-pp-rationality is due to Rk\mathcal{R}_k:

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 Wkbp=Hk∞=1\mathcal{W}^{\mathrm{bp}}_k=\mathcal{H}^{\infty}_k=1 except for m=42m=42 and p=3p=3, where #Wkbp=3\#\mathcal{W}^{\mathrm{bp}}_k=3. For Hk∞≠1\mathcal{H}^{\infty}_k\ne1, 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 Rk\mathcal{R}_k. Assume that pp is not ramified and does not divide the denominator of the integer basis elements. Thus, {1,x,…,xd−1}\{1,x,\ldots,x^{d-1}\} is a Zp\mathbb{Z}_p-basis.

Let Ek:={ε1,…,εr}E_k:=\{\varepsilon_1,\ldots,\varepsilon_r\}, r=r1+r2−1r=r_1+r_2-1, be a fundamental system of units of kk, congruent to 1 modulo (p)(p). Put

1plog⁡(εℓ)=∑j=0d−1bjℓ⋅xj,ℓ∈[1,r], bjℓ∈Zp.\frac{1}{p}\log(\varepsilon_\ell)=\sum_{j=0}^{d-1}b_j^\ell\cdot x^j,\quad\ell\in[1,r],\ b_j^\ell\in\mathbb{Z}_p.

Then we define the (d,r)(d,r)-matrix:

Mk:=(b01⋯b0r⋮⋮⋮bd−11⋯bd−1r)(1)\mathcal{M}_k:=\begin{pmatrix} b_0^1 & \cdots& b_0^r\\ \vdots& \vdots& \vdots\\ b_{d-1}^1 & \cdots& b_{d-1}^r \end{pmatrix} \tag*{(1)}

where all the coefficients are considered modulo pp by the program. Then the regulator is invertible if and only if the Fp\mathbb{F}_p-rank of the matrix is rr; the following part of the program was used in Program 1, where log⁡(εℓ)\log(\varepsilon_\ell) has been computed in Lell = LogE[ell] (lift form of the logarithms).

Programms testing Lg

2.2. Programms testing Rk(p)≠1\mathcal{R}_k(p)\ne1. The following program can be used independently when pp 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 Rk(p)\mathcal{R}_k(p)). Note that computation of units requests bnfinit(P, 1)).

Recall that if Rk(p)=1\mathcal{R}_k(p)=1 (as Zp\mathbb{Z}_p-module), we say that Rk(p)\mathcal{R}_k(p) (as regulator) is invertible, which is more suitable since, to test the condition of invertibility, the program computes the Fp\mathbb{F}_p-rank of the above matrix.

2.2.1. Test Rk(p)≠1\mathcal{R}_k(p)\ne1 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 10710^7, all the other regulators are invertible.

2.2.2. Program testing Rk(p)≠1\mathcal{R}_k(p) \ne1 for huge primes pp. 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 Hk∞=Wkbp=1H_k^\infty= W_k^{\mathrm{bp}} = 1. 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 MM. 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 pp due to denominators; in this example, only 13, 17, 19 (divisors of the discriminant) are bad primes. For all the others (except p=2p = 2 for which kk 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 π=εiM−1=εi28161933524443−1−1\pi= \varepsilon_i^M - 1 = \varepsilon_i^{28161933524443-1} - 1 is impossible (enormous time and memory), we use a classical induction with reductions of xMx^M modulo the minimal polynomial of the unit εi\varepsilon_i (of degree ≤8\le8 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 Wkbp(p)\mathcal{W}^{\mathrm{bp}}_k(p) for any kk and pp. Since the condition Wkbp(p)=1\mathcal{W}^{\mathrm{bp}}_k(p)=1 is necessary for the pp-rationality, it is useful to test this condition before any other one. Contrary to what one might think, except obvious cases, the determination of ⨁vμp(kv)\bigoplus_v \mu_p(k_v) is not immediate.

Local and global roots of unity with pari/gp

The instruction nfrootsof1(k)[1] gives the order of the global group μ(k)\mu(k), but under the instruction k = nfinit(P) which may use many time; to our knowledge, the case of the local groups μp(kv)\mu_p(k_v) is not given and needs to compute the decomposition of pp using k = bnfinit(P). Similarly, k = bnfinit(P) computes unnecessary parameters for our purpose.

We assume that the field kk is given with the knowledge of a defining monic irreducible polynomial PP of degree dd. We propose three programs depending on the order of magnitude of dd. 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 QQ is the compositum of PP with various cyclotomic polynomials; so, we compute the local degrees from the pp-adic factorisation of PP and QQ, 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 P=x9−8∗x3−18∗x+48P=x^9-8*x^3-18*x+48 and p=7p=7, the first program has a problem because of k=nfinit(P)k = nfinit(P), probably with the unnecessary computation of:

nfdisc⁡(P)=2165832547340333875200=230⋅311⋅52⋅455461,\operatorname{nfdisc}(P)=2165832547340333875200=2^{30}\cdot3^{11}\cdot5^2\cdot455461,

while the two other programs need time = 19ms and time = 23ms, respectively: We know that Wkbp(p)=1\mathscr{W}^{\mathrm{bp}}_k(p)=1 for p>d+1p>d+1 since p−1p-1 must divide a local degree of kk; so the number of possible primes pp is finite and we will consider PW, in the programs, the set of primes p≥2p\geq2 such that p≤d+1p\leq d+1.

An obvious case giving Wkbp(p)≠1\mathscr{W}^{\mathrm{bp}}_k(p)\neq1 is when μp(k)≠1\mu_p(k)\neq1 (e.g., p=2p=2) and when pp splits at least into two pp-places in kk.

So we get the following criterion depending on the number of pp-places:

(i) μp(k)=1\mu_p(k)=1. Then, Wkbp(p)≠1\mathscr{W}^{\mathrm{bp}}_k(p)\neq1 if and only if there exists at least a pp-place vv of kk such that μp(kv)≠1\mu_p(k_v)\neq1.

(ii) μp(k)≠1\mu_p(k)\neq1 (e.g., p=2p=2). Then Wkbp(p)≠1\mathscr{W}^{\mathrm{bp}}_k(p)\neq1 if and only if, either pp splits at least into two pp-places of kk, or else v∣pv\mid p is unique and #μp(kv)>#μp(k)\#\mu_p(k_v)>\#\mu_p(k).

To compute the local groups μp(kv)\mu_p(k_v), we use the following criterion:

Lemma 3.1. Let kk be any number field defined via a polynomial PP of degree dd. Let dv:=[kv:Qp]d_v:=[k_v:\mathbb{Q}_p] for v∣pv\mid p. Let pnp^n (n≥0n\geq0 for p>2p>2, n≥1n\geq1 for p=2p=2) be the order of μp(k)\mu_p(k) and put K=k(μpn+1)K=k(\mu_{p^{n+1}}). Then locally, #μp(kv)>#μp(k)\#\mu_p(k_v)>\#\mu_p(k) if and only if vv totally splits in K/kK/k, whence, if and only if the residue degree of w∣vw\mid v in K/QK/\mathbb{Q} is equal to dvd_v.

Proof. Obvious; note that [K:k]≠1[K:k]\neq1 by definition of pnp^n.

The program with its three variants

In a computational point of view, we will first apply the tests of decomposition of v∣pv\mid p when μp(k)≠1\mu_p(k)\neq1, then the tests of divisibilities of the dvd_v by p−1p-1. Whence the two possibilities:

(i) μp(k)=1\mu_p(k)=1. We test if there exists a non-trivial μp(kv)≠1\mu_p(k_v)\neq1;

(ii) μp(k)≠1\mu_p(k)\neq1 and vv unique. We test if μp(kv)\mu_p(k_v) is larger than μp(k)\mu_p(k).

To give more information, in case (ii) we test μp(kv)\mu_p(k_v) even if vv is not unique (otherwise, put break instead of next); so it is possible that #μp(kv)>#μp(k)\#\mu_p(k_v)>\#\mu_p(k) 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 QQ varies and is of hight degree, this program does not use K=nfinit⁡(Q)K = \operatorname{nfinit}(Q), replaced by the pp-adic decomposition of QQ; it only uses k=nfinit⁡(P)k = \operatorname{nfinit}(P).

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 k=nfinit(P)k = \texttt{nfinit(P)} nor K=nfinit(Q)K = \texttt{nfinit(Q)}, replaced by the pp-adic decomposition of PP and QQ.

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 Wkbp(p)≠1\mathcal{W}_k^{\mathrm{bp}}(p) \ne1, except for p=2p = 2 when for instance 2 splits in kk since −1∈k-1 \in k. The case p=3p = 3 is often possible. We have rare examples with p=5p = 5; the following ones show the complexity of the decomposition of the pp-places and the structure of Wkbp\mathcal{W}_k^{\mathrm{bp}}; 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
**********************
dw5=4\frac{d_w}{\sqrt{5}}=4

For a=123a=123, the two places of residue degree 1 in kk do not split in Kw/kvK_w/k_v; the place of residue degree 4 in kk, totally splits in Kw/kvK_w/k_v, so that μ5\mu_5 is contained in kvk_v, then the last place of kk 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 pp-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 pp-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 pp-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 pp. 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 pp 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 pp-rationality come from a deep study of some isotopic components of the Galois group of the maximal pp-ramified pro-pp-extension of kk, 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 pp-adic regulator of the field, at the disadvantage of a general computation of the difficult degree

[k~Hknr:k~]=#Hk∞,[\widetilde{k}H_k^{\mathrm{nr}}:\widetilde{k}]=\#\mathcal{H}_k^{\infty},

where k~\widetilde{k} is the compositum of the Zp\mathbb{Z}_p-extensions of kk; of course, when kk is totally real, k~\widetilde{k} is the cyclotomic Zp\mathbb{Z}_p-extension for which the computation of this index is obvious. The authors define the notion of quasi-pp-rational field when Rk=Wkbp=1\mathcal{R}_k=\mathcal{W}_k^{\mathrm{bp}}=1. 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 pp-class group is trivial, so that Hk∞=1\mathcal{H}_k^{\infty}=1.

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 pp such that Tk(p)≠1\mathcal{T}_k(p) \ne1; but this is a phenomenon of pp-adic property of the units. Indeed, varying the field kk and fixing pp it is not difficult to get huge solutions; for instance set m=1+100074m = 1 + 10007^4, then Program 1.4.1 gives immediately a non-pp-rationality for p=10007p = 10007 and other large primes, but nothing else up to 10910^9; 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 pp-adic properties of the units, but this has no influence on the qq-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 pp-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 pp-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 p≤107p \le10^{7}:

P=x4+4∗(s3−s2+2∗s−1)∗x3−6∗(s2+1)∗x2+4∗x+1,s∈[−20,20]\mathrm{P} = x^{4} + 4 * (s^{3} - s^{2} + 2 * s - 1) * x^{3} - 6 * (s^{2} + 1) * x^{2} + 4 * x + 1, s \in[-20,20]

(Program 1.1.2 needing less that 10 mn for the above 41 polynomials, pp up to 10610^{6}):

(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 kk; we use Program (1.1.2) for pp up to 10710^7:

(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 p=5p=5, the pp-class group is non-trivial, but since the field kk is Galois real, the Log-function is explicit (see [6], Exercise IV.3.3.1), and gives #TkGal⁡(k/Q)=#TQ=1\#\mathcal{T}_k^{\operatorname{Gal}(k/\mathbb{Q})}=\#\mathcal{T}_{\mathbb{Q}}=1.

(D) Real abelian field of discriminant 40115401^{15}

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:

P=x8−9668∗x6+14526170∗x4−4580040976∗x2+224422007824P = x^{8} - 9668 \ast x^{6} + 14526170 \ast x^{4} - 4580040976 \ast x^{2} + 224422007824

of quaternionic Galois group. Up to 10710^{7}, 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 pp-adic log-function, and in part, on the Log-function, defined on Ik⊗ZpI_k \otimes\mathbb{Z}_p modulo Pk,∞:=⋂nPk(pn)⊗ZpP_{k,\infty}:=\bigcap_n P_k(p^n) \otimes\mathbb{Z}_p, where IkI_k is the group of prime-to-pp ideals of kk and Pk(pn)P_k(p^n) the ray of modulus (pn)(p^n); then, the kernel of Log is zero if and only if kk is pp-rational (under the Leopoldt conjecture).

Generalities on Lg-ramification theory

Let k~\widetilde{k} be the compositum of the Zp\mathbb{Z}_p-extensions of kk and let HkprH_k^{\mathrm{pr}} be the maximal abelian pp-ramified pro-pp extension of kk; then the torsion group Tk=Gal⁡(Hkpr/k~)\mathcal{T}_k=\operatorname{Gal}(H_k^{\mathrm{pr}}/\widetilde{k}) is finite, and a characterization of the pp-rationality is Tk=1\mathcal{T}_k=1. Let Hk\mathcal{H}_k be the pp-class group of kk and let HknrH_k^{\mathrm{nr}} be the pp-Hilbert class field of kk.

We will recall below that #Tk=#Hk∞×#Rk×#Wkbp\#\mathcal{T}_k=\#\mathcal{H}_k^{\infty}\times\#\mathcal{R}_k\times\#\mathcal{W}_k^{\mathrm{bp}}, giving methods of computation.

The advantage of the Log-function is that it gives the computation of the most difficult factor Hk∞\mathcal{H}_k^{\infty}, such that Hk/Hk∞\mathcal{H}_k/\mathcal{H}_k^{\infty} is isomorphic to the Galois group of the maximal sub-extension of HknrH_k^{\mathrm{nr}} contained in k~\widetilde{k}.

Then, it is necessary to compute separately the two other invariants, Rk\mathcal{R}_k, the normalized pp-adic regulator ([9 Section 5]) and Wkbp=⨁v∣pμp(kv)/μp(k)\mathcal{W}_k^{\mathrm{bp}}=\bigoplus_{v\mid p}\mu_p(k_v)/\mu_p(k), in terms of local and global pp-groups of roots of unity.

Most of the non-pp-rational cases are due to small primes pp giving in particular Wkbp(2)≠1\mathcal{W}_k^{\mathrm{bp}}(2)\ne1 and/or Wkbp(3)≠1\mathcal{W}_k^{\mathrm{bp}}(3)\ne1, since a necessary condition is that p−1p-1 divides a local degree dvd_v, v∣pv\mid p, of k/Qk/\mathbb{Q}, which is always the case for p=2p=2 and very frequent for p=3p=3. Since [Qp(μp):Qp]=[Q(μp):Q]=p−1[\mathbb{Q}_p(\mu_p):\mathbb{Q}_p]=[\mathbb{Q}(\mu_p):\mathbb{Q}]=p-1, a necessary condition to get Wkbp(p)≠1\mathcal{W}_k^{\mathrm{bp}}(p)\ne1 is that there exists at least a pp-place v∣pv\mid p such that μp(kv)≠1\mu_p(k_v)\ne1, whence p−1∣dv=evfvp-1\mid d_v=e_vf_v, giving p≤max⁡v∣p(dv+1)p\le\max_{v\mid p}(d_v+1) and a fortiori p≤d+1p\le d+1.

Recall that Wkbp(p)\mathcal{W}_k^{\mathrm{bp}}(p) fixes the Bertrandias–Payan field HkbpH_k^{\mathrm{bp}} and that Tkbp:=Gal⁡(Hkbp/k~)\mathcal{T}_k^{\mathrm{bp}}:=\operatorname{Gal}(H_k^{\mathrm{bp}}/\widetilde{k}) is probably the best invariant in pp-ramification theory.

The triviality of these three Zp\mathbb{Z}_p-modules characterizes the pp-rationality, according to the following diagram of abelian pp-ramification theory over any number field kk:

Diagram of abelian p-ramification theory

Figure 1.

The group of pp-principal local units Uk\mathcal{U}_k, whose images via local reciprocity maps give inertia groups in Hkpr/HknrH_k^{\mathrm{pr}}/H_k^{\mathrm{nr}}, is of the form Uk=⨁v∣pUkv\mathcal{U}_k=\bigoplus_{v\mid p}\mathcal{U}_k^v, where Ukv:=1+pv\mathcal{U}_k^v:=1+\mathfrak{p}_v (pv=\mathfrak{p}_v= prime ideal associated to the place vv). Then Gal⁡(Hkpr/Hknr)≃Uk/E‾k\operatorname{Gal}(H_k^{\mathrm{pr}}/H_k^{\mathrm{nr}})\simeq\mathcal{U}_k/\overline{E}_k, where E‾k\overline{E}_k is the topological closure in Uk\mathcal{U}_k of the diagonal embedding ιp(Ek)\iota_p(E_k) of the group of pp-principal global units of kk. Thus, we have, under the Leopoldt conjecture:

Rk=tor⁡Zp(log⁡(Uk)/log⁡(E‾k)),1⟶tor⁡Zp(Uk)⋅E‾k/E‾k=Wkbp⟶Uk/E‾k⟶log⁡(Uk)/log⁡(E‾k)⟶0.(2)\begin{aligned} \mathcal{R}_k&=\operatorname{tor}_{\mathbb{Z}_p}\left(\log(\mathcal{U}_k)/\log(\overline{E}_k)\right),\\ 1&\longrightarrow\operatorname{tor}_{\mathbb{Z}_p}(\mathcal{U}_k)\cdot\overline{E}_k/\overline{E}_k=\mathcal{W}_k^{\mathrm{bp}}\longrightarrow\mathcal{U}_k/\overline{E}_k\longrightarrow\log(\mathcal{U}_k)/\log(\overline{E}_k)\longrightarrow0. \tag*{(2)} \end{aligned}

where log⁡=log⁡p=(log⁡v)v∣p\log=\log_p=(\log_v)_{v\mid p} denotes the usual pp-adic logarithm, with image in Ok[1/p]\mathcal{O}_k[1/p], where Ok\mathcal{O}_k is the ring of integer ⨁v∣pOv\bigoplus_{v\mid p}\mathcal{O}_v of ⨁v∣pkv\bigoplus_{v\mid p}k_v with obvious notations. When p>2p>2 is not ramified, then log⁡(Uk)=pOk\log(\mathcal{U}_k)=p\mathcal{O}_k.

Then kk is pp-rational if and only if Tk=1\mathcal{T}_k=1. Thus, having checked the necessary condition Wkbp=1\mathcal{W}_k^{\mathrm{bp}}=1, formula 5.1 reduces to the computation of Rk=tor⁡Zp(log⁡(Uk)/log⁡(E‾k))\mathcal{R}_k=\operatorname{tor}_{\mathbb{Z}_p}(\log(\mathcal{U}_k)/\log(\overline{E}_k)); 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 Wkbp=1\mathcal{W}_k^{\mathrm{bp}}=1, tor⁡Zp(Uk/E‾k)=1\operatorname{tor}_{\mathbb{Z}_p}(\mathcal{U}_k/\overline{E}_k)=1 is equivalent to log⁡(E‾k)\log(\overline{E}_k) direct factor in log⁡(Uk)\log(\mathcal{U}_k), which is easily characterized by the Fp\mathbb{F}_p-rank of a matrix. In other words, as soon as we find u∈Uku\in\mathcal{U}_k such that up∈E‾ku^p\in\overline{E}_k, u∉E‾ku\notin\overline{E}_k, kk is not pp-rational.

Lemma 5.1. Under the Leopoldt conjecture for pp in the number field kk of degree dd and signature (r1,r2)(r_1,r_2), with d=r1+2r2d=r_1+2r_2, a necessary condition for the pp-rationality of kk is that the pp-rank of its pp-class group Hk\mathcal{H}_k be strictly less than r2+1r_2+1. If one knows that kc/kk^{\mathrm{c}}/k, the cyclotomic Zp\mathbb{Z}_p-extension of kk, is totally ramified, then the condition becomes: strictly less than r2r_2.

Proof. Under the Leopoldt conjecture for pp, Gal⁡(Hkpr/k)≃Zpr2+1×Tk\operatorname{Gal}(H_k^{\mathrm{pr}}/k)\simeq\mathbb{Z}_p^{r_2+1}\times\mathcal{T}_k; thus, if Hk∞=1H_k^{\infty}=1, necessarily the pp-Hilbert class field of kk is contained in the compositum of the Zp\mathbb{Z}_p-extensions of kk, whence the claim.

In cyclic pp-extensions with sufficiently ramified primes, genus theory (Chevalley–Herbrand formula [1 pp. 402-406]) leads to large pp-ranks, hence the non-pp-rationality of kk; at the opposite, this formula allows to characterize trivial pp-class groups in cyclic pp-extensions.

See [5] characterizing abelian pp-rational pp-extensions for p=2,3p=2,3, via a fixed point formula for the Zp\mathbb{Z}_p-modules T\mathcal{T} in a pp-extension. The paper [3] introduces the similar property of pp-regularity. In [17] are characterized the pp-extensions in which pp-rationality propagates; this introduces the notion of pp-primitive ramification, related to suitable Frobenius elements (k~k)q\left(\frac{\widetilde{k}}{k}\right)_{\mathfrak{q}} whose images are Log⁡(q)\operatorname{Log}(\mathfrak{q}) in the isomorphism Gal⁡(k~/k)≃Log⁡(Ik⊗Zp)\operatorname{Gal}(\widetilde{k}/k)\simeq\operatorname{Log}(I_k\otimes\mathbb{Z}_p) [6 IV.3, (b), Example IV.3.5.1].

Proposition 5.2. Let ε1,…,εr\varepsilon_1,\ldots,\varepsilon_r be a fundamental system of units of kk. Assume that p≠2p\ne2 is unramified in k/Qk/\mathbb{Q}. Put (with pari/gp notations in the programs, where Lell = LogE[ell] denotes log⁡(εℓ)\log(\varepsilon_\ell)):

Lell/p=LogE[ℓ]/p=Mod⁡(a0ℓ+a1ℓ∗x+⋯+ad−1ℓ∗xd−1,P),ajℓ∈Zp.\mathrm{Lell}/p=\mathrm{LogE}[\ell]/p=\operatorname{Mod}(a_0^\ell+a_1^\ell*x+\cdots+a_{d-1}^\ell*x^{d-1},P),\quad a_j^\ell\in\mathbb{Z}_p.

Then, the normalized pp-adic regulator Rk\mathcal{R}_k is invertible if and only if the matrix (Mod⁡(ajℓ,p))(\operatorname{Mod}(a_j^\ell,p)), ℓ∈[1,r]\ell\in[1,r], j∈[0,d−1]j\in[0,d-1], is of maximal Fp\mathbb{F}_p-rank rr.

Proof. Under the assumptions, log⁡(Uk)=p⋅Ok\log(\mathcal{U}_k)=p\cdot\mathcal{O}_k and {1,x,…,xd−1}\{1,x,\ldots,x^{d-1}\} plays the role of a local integer basis. We know that Rk=tor⁡Zp(log⁡(Uk)/log⁡(Ek))\mathcal{R}_k=\operatorname{tor}_{\mathbb{Z}_p}(\log(\mathcal{U}_k)/\log(E_k)), where E‾k\overline{E}_k is the topological closure in Uk\mathcal{U}_k of the diagonal embedding ιp(Ek)\iota_p(E_k) of the group of pp-principal global units of kk; then Rk=1\mathcal{R}_k=1 if and only if log⁡(E‾k)\log(\overline{E}_k) is a direct factor in log⁡(Uk)\log(\mathcal{U}_k), whence the result.

The Lg

The general study of Ak:=Gal⁡(Hkpr/k)\mathcal{A}_k:=\operatorname{Gal}(H_k^{\mathrm{pr}}/k) and its torsion group Tk\mathcal{T}_k is done in our book, and we have the following canonical isomorphism, whatever the base-field kk and the prime pp:

Gal⁡(k~∩Hknr/k)≃Log⁡(Ik⊗Zp)/Log⁡(Pk⊗Zp),(3)\operatorname{Gal}(\widetilde{k}\cap H_k^{\mathrm{nr}}/k)\simeq\operatorname{Log}(I_k\otimes\mathbb{Z}_p)/\operatorname{Log}(P_k\otimes\mathbb{Z}_p), \tag*{(3)}

where IkI_k is the group of prime-to-pp ideals of kk and PkP_k the sub-group of principal ideals; then:

Log⁡(a):=1hlog⁡(α)(modQplog⁡(Ek)),if ah=(α),(α)∈Pk⊗Zp.\operatorname{Log}(\mathfrak{a}):=\frac{1}{h}\log(\alpha)\pmod{\mathbb{Q}_p\log(E_k)},\quad\text{if }\mathfrak{a}^h=(\alpha),\quad(\alpha)\in P_k\otimes\mathbb{Z}_p.

Via the Artin Symbol, Log⁡\operatorname{Log} defines an isomorphism Log⁡(Ik⊗Zp)≃Gal⁡(k~/k)\operatorname{Log}(I_k\otimes\mathbb{Z}_p)\simeq\operatorname{Gal}(\widetilde{k}/k). Whence the formula (product of three integers):

#Tk=#Hk∞⋅#Rk⋅#Wkbp=#Hk[Log⁡(Ik⊗Zp):Log⁡(Pk⊗Zp)]⋅#Rk⋅#Wkbp,(4)\#\mathcal{T}_k=\#\mathcal{H}_k^\infty\cdot\#\mathcal{R}_k\cdot\#\mathcal{W}_k^{\mathrm{bp}}= \frac{\#\mathcal{H}_k}{[\operatorname{Log}(I_k\otimes\mathbb{Z}_p):\operatorname{Log}(P_k\otimes\mathbb{Z}_p)]}\cdot\#\mathcal{R}_k\cdot\#\mathcal{W}_k^{\mathrm{bp}}, \tag*{(4)}

giving a test of non-pp-rationality, the new needed invariant being the difficult denominator obtained from the Log-function, which reduces to the usual logarithm. The Qp\mathbb{Q}_p-space Qplog⁡(Ek)\mathbb{Q}_p\log(E_k) 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, Qplog⁡(Ek)⊕Qp=⨁l∣pkl\mathbb{Q}_p\log(E_k)\oplus\mathbb{Q}_p=\bigoplus_{\mathfrak{l}\mid p}k_{\mathfrak{l}}).

Remarks 5.3. (i) Set Hk=⟨cl⁡(a1)⟩⊕⋯⊕⟨cl⁡(ah)⟩\mathcal{H}_k=\langle\operatorname{cl}(\mathfrak{a}_1)\rangle\oplus\cdots\oplus\langle\operatorname{cl}(\mathfrak{a}_h)\rangle; the degree [k~∩Hknr:k][\widetilde{k}\cap H_k^{\mathrm{nr}}:k] only depends on the Fermat quotients of the αi\alpha_i's deduced from the αi\alpha_i's, via the relation aini=(αi)\mathfrak{a}_i^{n_i}=(\alpha_i).

(ii) In the particular case where Ek⊗Zp=1E_k\otimes\mathbb{Z}_p=1 (imaginary quadratic fields), the formula becomes #Tk=#Hk[log⁡(Ik⊗Zp):log⁡(Pk⊗Zp)]⋅#Wkbp\#\mathcal{T}_k=\dfrac{\#\mathcal{H}_k}{[\log(I_k\otimes\mathbb{Z}_p):\log(P_k\otimes\mathbb{Z}_p)]}\cdot\#\mathcal{W}_k^{\mathrm{bp}}, with the usual pp-adic logarithm.

(iii) If kk is a real quadratic field of fundamental unit ε\varepsilon, the formula needs the computation of [k~∩Hknr:k]=[kc∩Hknr:k][\widetilde{k}\cap H_k^{\mathrm{nr}}:k]=[k^{\mathrm{c}}\cap H_k^{\mathrm{nr}}:k]; in that case, a direct computation is possible since the ramification in the cyclotomic Zp\mathbb{Z}_p-extension kck^{\mathrm{c}} 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 pp-class groups for p>2p>2 (Lemma 5.1).

Technical pari/gp considerations

The difficulties, in a computational viewpoint, is the orders of magnitude of pp and/or the degree dd of the field kk defined via a monic irreducible polynomial PP. So, if pp is small as well as dd, our classical program using ray class groups of suitable modulus (power of pp) 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 pp-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 #Tk≡0(modp)\#\mathcal{T}_k\equiv0\pmod p, coefficients may be computed modulo a suitable modulus mod⁡=pN\operatorname{mod}=p^N (N=2N=2 or 33); then many reductions are done in the programs, which significantly increases the speed of execution.

Bad primes

In the pp-adic log framework, a difficulty does appear when pp ramifies in kk (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 88 for p=2p=2, p2p^2 for p≥3p\geq3:

Definition 6.1. Let kk be a number field defined by the monic irreducible polynomial P∈Z[x]P\in\mathbb{Z}[x], of degree dd. Let Hk\mathcal{H}_k be the pp-class group of kk and let Dk\mathcal{D}_k be its discriminant. Then we define, in the programs, the set PW of the following “bad” prime numbers:

(i) Primes p≤d+1p\leq d+1 (p>d+1p>d+1 avoid the computation of Wkbp(p)=1\mathcal{W}_k^{\mathrm{bp}}(p)=1);

(ii) Primes pp dividing the discriminant Dk\mathcal{D}_k (p∤Dkp\nmid\mathcal{D}_k simplifies the computation of the regulator Rk\mathcal{R}_k and makes logarithmic calculations easier);

(iii) Primes pp dividing the class group Hk\mathcal{H}_k (Hk=1\mathcal{H}_k=1 avoid the computation of Hk∞(p)=1\mathcal{H}_k^\infty(p)=1);

(iv) Primes pp dividing the denominators of coefficients of the dd integer basis elements given by PARI/GP under the form k.zk[i] = Mod(ci(x), P), where ci(x)∈Q[x]c_i(x)\in\mathbb{Q}[x] (such primes make more difficult the reductions modulo pNp^N).

All these “bad primes” are easily known from the very beginning. Then the programs process them first. However, in the case of quadratic fields k=Q(±m)k=\mathbb{Q}(\sqrt{\pm m}), we do not use ray class groups for these primes since for these fields, Wkbp\mathcal{W}_k^{\mathrm{bp}} is known, the bad denominator reduces to p=2p=2 (when ±m≡1(mod4)\pm m\equiv1\pmod4), 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 kk, 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 Rk\mathcal{R}_k, which is the unique invariant that may be non-trivial for some p≫0p\gg0. We have conjectured, in various papers, that this happens only for a finite number of primes, in other words that kk is pp-rational for almost all pp.

Once we know that Wkbp=Rk=1\mathcal{W}_k^{\mathrm{bp}}=\mathcal{R}_k=1, we use the Log-function to compute the difficult invariant #(Hk/Hk∞)=[Log⁡(Ik⊗Zp):Log⁡(k⊗Zp)]\#(\mathcal{H}_k/\mathcal{H}_k^\infty)=[\operatorname{Log}(I_k\otimes\mathbb{Z}_p):\operatorname{Log}(k\otimes\mathbb{Z}_p)] (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 Tk\mathcal{T}_k, but need some interpretation of the result since PARI/GP gives the complete structure, that is of the form Zpr2+1⊕⨁i=1sZ/ptiZ\mathbb{Z}_p^{r_2+1}\oplus\bigoplus_{i=1}^{s}\mathbb{Z}/p^{t_i}\mathbb{Z}; hence the pp-rationality if and only if s=0s=0. 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-pp ideals

If α\alpha is a prime-to-pp algebraic number of kk, the computation of its pp-adic logarithm needs to work with a number congruent to 11 modulo the product of the prime ideals of kk dividing pp (called “principal”); this obvious theoretical fact is not easy in a computational one since we must calculate a prime-to-pp power MM of α\alpha that may be extremely large.

For this, we must have all classes represented by prime-to-pp ideals ai\mathfrak{a}_i; indeed, a suitable power aini\mathfrak{a}_i^{n_i} gives the number αi\alpha_i, called a “pseudo-unit”, needed for the computation of Log⁡(ai)\operatorname{Log}(\mathfrak{a}_i). 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 pp. In the program, Ni is the norm of the ideal Ai); a list of prime-to-pp 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 pp-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 MM (depending on the residue degrees of the pp-places) such that for any prime-to-pp number α∈k×\alpha\in k^\times, αM\alpha^M is congruent to 1 modulo all the pp-places of kk. In the programs, the number αM−1\alpha^M-1 is denoted pi. It generates an ideal of the form:

(π)=a⋅∏p∣pp1+δi(α),δi(α)≥0, and a prime to p.(\pi)=\mathfrak{a}\cdot\prod_{\mathfrak{p}\mid p}\mathfrak{p}^{1+\delta_i(\alpha)},\quad\delta_i(\alpha)\geq0,\text{ and }\mathfrak{a}\text{ prime to }p.

If pp is unramified in k/Qk/\mathbb{Q}, then (π)=a⋅(p)⋅∏p∣ppδi(α)(\pi)=\mathfrak{a}\cdot(p)\cdot\prod_{\mathfrak{p}\mid p}\mathfrak{p}^{\delta_i(\alpha)}.

Computation of MM

We assume that the residue degrees of the pp-places of kk are given in the list Lf = ([f1,...,fg). A canonical solution is the least common multiple MM of the pfi−1p^{f_i}-1. But MM can be so large that one must compute modulo mod⁡=pN\operatorname{mod}=p^N some coefficients.

Computation of αM\alpha^M (mod pNp^N), for α\alpha with pp-integer coefficients.

For instance, the following program, with a large unramified prime pp, computes the prime ideals Primei dividing pp (list ldeal), ramification indices (list Lrho), residue degrees (list Lf), the integer M, and αM\alpha^M (mod pNp^N):

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 k=bnfinit⁡(P)k = \operatorname{bnfinit}(P) for PP of large degree. It is clear that, for huge primes pp, the discriminant of kk and its class number are in general prime to pp, so that we will have the pp-adic approximations modulo mod⁡=p2\operatorname{mod} = p^2 (e.g., for logarithms).

Computation of Lg

Set αM=1+π\alpha^M = 1+\pi, where (π)=:a⋅∏p∣ppΔp(\pi) =: \mathfrak{a}\cdot\prod_{\mathfrak{p}\mid p}\mathfrak{p}^{\Delta_{\mathfrak{p}}}; one has Δp=1+δp\Delta_{\mathfrak{p}} = 1+\delta_{\mathfrak{p}}, where pδpp^{\delta_{\mathfrak{p}}} plays the role of a pp-Fermat quotient of α\alpha, most often trivial. As usual, we must estimate a minimal number of terms of the series log⁡(αM)=∑t=1∞(−1)t+1⋅πt/t\log(\alpha^M)=\sum_{t=1}^{\infty}(-1)^{t+1}\cdot\pi^t/t that may give a congruence (for NN equal in general to 2 or 3 depending on pp), of the form:

log⁡(αM)=log⁡(1+π)≡∑t=1t^(−1)t+1⋅πt/t(modpN).\log(\alpha^M)=\log(1+\pi)\equiv\sum_{t=1}^{\hat{t}}(-1)^{t+1}\cdot\pi^t/t\pmod{p^N}.

Minimal index t^\hat{t} of the log series

Let gg be the number of prime ideals p∣p\mathfrak{p}\mid p of kk; let ρp≥1\rho_{\mathfrak{p}}\geq1 be the ramification index of p\mathfrak{p} in k/Qk/\mathbb{Q}. Then the relation (p)=∏p∣ppρp(p)=\prod_{\mathfrak{p}\mid p}\mathfrak{p}^{\rho_{\mathfrak{p}}} implies that a computation modulo pNp^N is satisfied as soon as it is satisfied modulo each power pN⋅ρp\mathfrak{p}^{N\cdot\rho_{\mathfrak{p}}}.

Since the p\mathfrak{p}-valuations of the number π\pi can take any value ≥1\geq1, the computation of the minimal limit term of the series strongly depends on the ramification of pp in kk, then is not so obvious and must work in any case in a program:

Proposition 6.2. Let N≥1N\geq1 and let α=1+π\alpha=1+\pi, where (π)=a⋅∏p∣ppΔp(\pi)=\mathfrak{a}\cdot\prod_{\mathfrak{p}\mid p}\mathfrak{p}^{\Delta_{\mathfrak{p}}}, Δp≥1\Delta_{\mathfrak{p}}\geq1 for all p∣p\mathfrak{p}\mid p. Put xp:=[log⁡(ρp)−log⁡(Δp⋅log⁡(p))]/log⁡(p)x_{\mathfrak{p}}:=[\log(\rho_{\mathfrak{p}})-\log(\Delta_{\mathfrak{p}}\cdot\log(p))]/\log(p) (here, log⁡=log⁡∞\log=\log_{\infty}).

Let n^p\hat{n}_{\mathfrak{p}} be the minimal integer nn such that n≥max⁡(1,[xp]+1)n\geq\max(1,[x_{\mathfrak{p}}]+1) and pn⋅Δp−n⋅ρp≥N⋅ρpp^n\cdot\Delta_{\mathfrak{p}}-n\cdot\rho_{\mathfrak{p}}\geq N\cdot\rho_{\mathfrak{p}}.

Let t^p\hat{t}_{\mathfrak{p}} be the maximal integer t≤pn^p−1t\leq p^{\hat{n}_{\mathfrak{p}}}-1 such that pt⋅Δp−vp(t)⋅ρp<N⋅ρpp^t\cdot\Delta_{\mathfrak{p}}-v_p(t)\cdot\rho_{\mathfrak{p}}<N\cdot\rho_{\mathfrak{p}}.

a) If n^p=1\hat{n}_{\mathfrak{p}}=1 for all p∣p\mathfrak{p}\mid p (which supposes N≤p⋅Δp/ρp−1N\leq p\cdot\Delta_{\mathfrak{p}}/\rho_{\mathfrak{p}}-1 for all p∣p\mathfrak{p}\mid p), then t^p\hat{t}_{p} is the maximal integer t≤p−1t\leq p-1 such that pt⋅Δp<N⋅ρpp^t\cdot\Delta_{\mathfrak{p}}<N\cdot\rho_{\mathfrak{p}}, whence t^p=⌊log⁡(N⋅ρp)/log⁡(p)⌋+1\hat{t}_{p}=\lfloor\log(N\cdot\rho_{\mathfrak{p}})/\log(p)\rfloor+1. If moreover, p>2p>2 is unramified, then t^=N\hat{t}=N (e.g., N=2N=2 for p>2p>2, and we then have the usual well-known relation ∑t=1∞(−1)t+1⋅πt/t≡∑t=1N(−1)t+1⋅πt/t(modpN)\sum_{t=1}^{\infty}(-1)^{t+1}\cdot\pi^t/t\equiv\sum_{t=1}^{N}(-1)^{t+1}\cdot\pi^t/t\pmod{p^N}).

b) Let t^:=max⁡p∣p(t^p)\hat{t}:=\max_{\mathfrak{p}\mid p}(\hat{t}_{\mathfrak{p}}). Then ∑t=1∞(−1)t+1⋅πt/t≡∑t=1t^(−1)t+1⋅πt/t(modpN)\sum_{t=1}^{\infty}(-1)^{t+1}\cdot\pi^t/t\equiv\sum_{t=1}^{\hat{t}}(-1)^{t+1}\cdot\pi^t/t\pmod{p^N}.

c) The approximation of log⁡(1+π)\log(1+\pi) is a pp-integer as soon as pp is unramified in kk.

Proof. If n^p=1\hat{n}_{\mathfrak{p}}=1, then N≤p⋅Δp/ρp−1N\leq p\cdot\Delta_{\mathfrak{p}}/\rho_{\mathfrak{p}}-1. In the most frequent case Δp=ρp=1\Delta_{\mathfrak{p}}=\rho_{\mathfrak{p}}=1; this does not apply for p=2p=2, but applies for p≥3p\geq3 and N=2N=2. For p=2p=2, this apply if moreover Δp≥2\Delta_{\mathfrak{p}}\geq2.

The purpose is to consider the following steps for each prime ideal p\mathfrak{p}:

  1. Determination of n^p\hat{n}_{\mathfrak{p}}, then proof that, in the interval [pn^p,∞][\mathfrak{p}^{\hat{n}_{\mathfrak{p}}},\infty], the terms of the form πpn/pn\pi^{\mathfrak{p}^{n}}/\mathfrak{p}^{n}, n≥n^pn \ge\hat{n}_{\mathfrak{p}}, have a strictly increasing p\mathfrak{p}-valuation and can be neglected;

  1. Proof that πn/n≡0(modpN)\pi^{n}/n \equiv0 \pmod{\mathfrak{p}^{N}} for all n∈[pn^p,pn^p+1]n \in[\mathfrak{p}^{\hat{n}_{\mathfrak{p}}},\mathfrak{p}^{\hat{n}_{\mathfrak{p}}+1}], for any value of n^p\hat{n}_{\mathfrak{p}}.

  1. Determination of t^\hat{t} in [pn^p−1,pn^p[[\mathfrak{p}^{\hat{n}_{\mathfrak{p}}-1},\mathfrak{p}^{\hat{n}_{\mathfrak{p}}}[.

Let g(x):=px⋅Δp−x⋅ρpg(x):=\mathfrak{p}^{x}\cdot\Delta_{\mathfrak{p}}-x\cdot\rho_{\mathfrak{p}}, for x≥0x\geq0 (p\mathfrak{p}-valuation function of the terms πpx/px\pi^{\mathfrak{p}^{x}}/\mathfrak{p}^{x}); its derivative is g′(x)=px⋅Δp⋅log⁡(p)−ρpg'(x)=\mathfrak{p}^{x}\cdot\Delta_{\mathfrak{p}}\cdot\log(\mathfrak{p})-\rho_{\mathfrak{p}}, giving the minimum of g(x)g(x) for:

xp=log⁡(ρp)−log⁡(Δp⋅log⁡(p))log⁡(p).x_{\mathfrak{p}}=\frac{\log(\rho_{\mathfrak{p}})-\log(\Delta_{\mathfrak{p}}\cdot\log(\mathfrak{p}))}{\log(\mathfrak{p})}.

Thus, g(x)g(x) is strictly increasing from x=xpx=x_{\mathfrak{p}}. One verifies that when p\mathfrak{p} does not ramify, then g(xp)=(1+log⁡(Δp⋅log⁡(p))/log⁡(p)>0g(x_{\mathfrak{p}})=(1+\log(\Delta_{\mathfrak{p}}\cdot\log(\mathfrak{p}))/\log(\mathfrak{p})>0 for all p≥2\mathfrak{p}\geq2; this is not true if p\mathfrak{p} ramifies (e.g., Δp=1\Delta_{\mathfrak{p}}=1 and log⁡(ρp)>1+log⁡(log⁡(p))/log⁡(p)\log(\rho_{\mathfrak{p}})>1+\log(\log(\mathfrak{p}))/\log(\mathfrak{p})).

So, there exists n^p≥max⁡(1,[xp]+1)\hat{n}_{\mathfrak{p}}\geq\max(1,[x_{\mathfrak{p}}]+1) such that vp(πpn/pn)≥N⋅ρpv_{\mathfrak{p}}(\pi^{\mathfrak{p}^{n}}/\mathfrak{p}^{n})\geq N\cdot\rho_{\mathfrak{p}} for all n≥npn\geq n_{\mathfrak{p}}. This writes:

vp(πpn/pn)=pn⋅Δp−n⋅ρp−N⋅ρp≥0,for all n≥np.(5)v_{\mathfrak{p}}(\pi^{\mathfrak{p}^{n}}/\mathfrak{p}^{n})=\mathfrak{p}^{n}\cdot\Delta_{\mathfrak{p}}-n\cdot\rho_{\mathfrak{p}}-N\cdot\rho_{\mathfrak{p}}\geq0,\quad\text{for all }n\geq n_{\mathfrak{p}}. \tag*{(5)}

If xp≤1x_{\mathfrak{p}}\leq1, then g(x)g(x) is increasing and positive for all x≥1x\geq1; this condition is equivalent to ρp≤p⋅Δp⋅log⁡(p)\rho_{\mathfrak{p}}\leq\mathfrak{p}\cdot\Delta_{\mathfrak{p}}\cdot\log(\mathfrak{p}); it is satisfied if p\mathfrak{p} does not ramify; for quadratic fields it is satisfied for p≥3\mathfrak{p}\geq3 whatever the ramification.

So, it remains to prove that all t∈]pn,pn+1[t\in]\mathfrak{p}^{n},\mathfrak{p}^{n+1}[, n≥n^pn\geq\hat{n}_{\mathfrak{p}}, may be neglected modulo pN\mathfrak{p}^{N}. For this, it suffices to prove the inequality vp(πt/t)≥N⋅ρpv_{\mathfrak{p}}(\pi^{t}/t)\geq N\cdot\rho_{\mathfrak{p}} in this interval; put t=pn+λprt=\mathfrak{p}^{n}+\lambda\mathfrak{p}^{r}, for λ∈[1,p−1]\lambda\in[1,\mathfrak{p}-1] and r∈[0,n]r\in[0,n] (λ<p−1\lambda<\mathfrak{p}-1 if r=nr=n); we have, using (5):

vp(πt/t)=t⋅Δp−r⋅ρp=(pn+λpr)⋅Δp−r⋅ρp=pn⋅Δp+λpr⋅Δp−r⋅ρp≥n⋅ρp+N⋅ρp+λpr⋅Δp−r⋅ρp≥N⋅ρp+(n−r)⋅ρp+λpr⋅Δp>N⋅ρp.(6)\begin{aligned} v_{\mathfrak{p}}(\pi^{t}/t)&=t\cdot\Delta_{\mathfrak{p}}-r\cdot\rho_{\mathfrak{p}}=(\mathfrak{p}^{n}+\lambda\mathfrak{p}^{r})\cdot\Delta_{\mathfrak{p}}-r\cdot\rho_{\mathfrak{p}}\\ &=\mathfrak{p}^{n}\cdot\Delta_{\mathfrak{p}}+\lambda\mathfrak{p}^{r}\cdot\Delta_{\mathfrak{p}}-r\cdot\rho_{\mathfrak{p}}\geq n\cdot\rho_{\mathfrak{p}}+N\cdot\rho_{\mathfrak{p}}+\lambda\mathfrak{p}^{r}\cdot\Delta_{\mathfrak{p}}-r\cdot\rho_{\mathfrak{p}}\\ &\geq N\cdot\rho_{\mathfrak{p}}+(n-r)\cdot\rho_{\mathfrak{p}}+\lambda\mathfrak{p}^{r}\cdot\Delta_{\mathfrak{p}}>N\cdot\rho_{\mathfrak{p}}. \tag*{(6)} \end{aligned}

Whence points (i), (ii); points (i) and (iii) being solved by the program using the instruction while; it will then take t^=max⁡p∣p(t^p)\hat{t}=\max_{\mathfrak{p}\mid p}(\hat{t}_{\mathfrak{p}}) obtained from the above computation.

Assume that ρp≤2\rho_{\mathfrak{p}}\leq2 for all p∣p\mathfrak{p}\mid p and put w:=vp(t)w:=v_{\mathfrak{p}}(t) for all t≥1t\geq1; then vp(πt/t)=tΔp−vp(t)≥pwΔp−ρpw≥pw−2wv_{\mathfrak{p}}(\pi^{t}/t)=t\Delta_{\mathfrak{p}}-v_{\mathfrak{p}}(t)\geq p^{w}\Delta_{\mathfrak{p}}-\rho_{\mathfrak{p}}w\geq p^{w}-2w, which is non-negative for all w≥0w\geq0 and all p≥2p\geq2; whence property (c), which applies in particular to quadratic fields.

Let’s give the basic algorithm, where Delta is the p\mathfrak{p}-valuation of pi and rho its ramification index:

Computation of t^p\hat{t}_{\mathfrak{p}} and of the Log series up to πt^p\pi^{\hat{t}_{\mathfrak{p}}}

We give fictive data for which some coefficients of Log have the denominator p = 2 and rho > 2; so, the reduction modulo mod = pN\mathfrak{p}^{N} gives some difficulties with the instructions Mod(Log, p); the following program is valid for any data p, P, Delta, rho, N, mod = pN\mathfrak{p}^{N}, 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 pp is unramified and large enough such that p⋅Δp−(N+1)>0p \cdot\Delta_p - (N + 1) > 0, for all p∣p\mathfrak{p} \mid p, whence p>(N+1)/Δpp > (N + 1)/\Delta_p, then x^<0\hat{x} < 0 and t^=2\hat{t} = 2 and sp=N−2s_p = N - 2, without any more computations; this is the case when p≥[k:Q]⋅(N+1)p \ge[k : \mathbb{Q}] \cdot(N + 1).

In the opposite case, a tricky example may be when p=2p = 2 with large ramification indices and the number π\pi such that Δp=1\Delta_p = 1 for all p∣p\mathfrak{p} \mid p; 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 p∣2\mathfrak{p} \mid2 is 16 (too large, see Proposition 6.2), whence:

(log⁡(αM))=[(4)⋅p8]−1(\log(\alpha^M)) = \left[(4) \cdot p^{8}\right]^{-1}

It is interesting to see the progression of the pp-valuation of πt/t\pi^t/t, as tt increases, regarding mod⁡=24=Primei⁡64\operatorname{mod} = 2^4 = \operatorname{Primei}^{64}; we have π=Mod⁡(x3+15∗x+14,x16−32∗x4+8∗x−2)\pi= \operatorname{Mod}(x^3 + 15 \ast x + 14, x^{16} - 32 \ast x^4 + 8 \ast x - 2) 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 pp 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 Hk∞≠1\mathcal{H}_k^\infty\ne1 for any number field

The Log-function allows to determine the structure of Gal⁡(k∞nr/k~)\operatorname{Gal}(\widetilde{k_\infty^{\mathrm{nr}}/k}); this leads to an elaborate program, unnecessary since our method is to test if Hk∞=1\mathcal{H}_k^\infty=1 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 pp-adic regulator.

Generalities

We have the identity #Tk=#Hk∞⋅#Wkbp\#\mathcal{T}_k=\#\mathcal{H}_k^\infty\cdot\#\mathcal{W}_k^{\mathrm{bp}}; the computation of #Wkbp\#\mathcal{W}_k^{\mathrm{bp}} is immediate, that of Hk∞\mathcal{H}_k^\infty being much more complex since Gal⁡(k~/k)≃Zp2\operatorname{Gal}(\widetilde{k}/k)\simeq\mathbb{Z}_p^2 which needs the use of the Log-function. Of course, since the number of primes pp dividing #Hk\#\mathcal{H}_k is finite, Tk=1\mathcal{T}_k=1 for almost all pp. 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 pp-rank of Hk\mathcal{H}_k is strictly larger than r2+1r_2+1, then kk is non-pp-rational. For imaginary quadratic fields and p>2p>2 it is well known that the part of the pp-Hilbert class field contained in k~\widetilde{k} is in fact contained in the anti-cyclotomic Zp\mathbb{Z}_p-extension kack^{\mathrm{ac}} (see [12] for programs about the first layer of kack^{\mathrm{ac}}), so kk is non-pp-rational as soon as rank⁡p(Hk)≥2\operatorname{rank}_p(\mathcal{H}_k)\geq2. For instance, consider the first known imaginary quadratic fields with rank⁡p(Hk)≥3\operatorname{rank}_p(\mathcal{H}_k)\geq3 (Diaz y Diaz [2], Appendice 1]); for all them, Wkbp=1\mathcal{W}_k^{\mathrm{bp}}=1 and Program 1.1.2 confirms the non-3-rationality. Up to 10710^7 only the case −m=−5067967-m=-5067967 gives a non-pp-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 p>2p>2, k~∩Hknr=kac∩Hknr\widetilde{k}\cap H_k^{\mathrm{nr}}=k^{\mathrm{ac}}\cap H_k^{\mathrm{nr}}; thus Gal⁡(kac∩Hknr/k)\operatorname{Gal}(k^{\mathrm{ac}}\cap H_k^{\mathrm{nr}}/k) is cyclic and its order is given by the “minus components” of the action of the complex conjugation τ\tau; whence for kk imaginary quadratic, p>2p>2, Wkbp=1\mathcal{W}_k^{\mathrm{bp}}=1 and Hk\mathcal{H}_k cyclic:

#Hk=#Hk∞=#Hk[⟨1nlog⁡(α)⟩+log⁡(Uk)−:log⁡(Uk)−]\#\mathcal{H}_k=\#\mathcal{H}_k^{\infty}=\frac{\#\mathcal{H}_k}{\left[\left\langle\frac{1}{n}\log(\alpha)\right\rangle+\log(\mathcal{U}_k)^-:\log(\mathcal{U}_k)^-\right]}

where log⁡(α)−=1−τ2⋅log⁡(α)\log(\alpha)^-=\frac{1-\tau}{2}\cdot\log(\alpha) is of the form Mod⁡(a⋅x,x2+m)\operatorname{Mod}(\mathbf{a}\cdot x,x^2+m); whence:

⟨1nlog⁡(α)⟩=a⋅Zp×−m,a∈pZ.\left\langle\frac{1}{n}\log(\alpha)\right\rangle=\mathbf{a}\cdot\mathbb{Z}_p^{\times}\sqrt{-m},\quad\mathbf{a}\in p^{\mathbb{Z}}.

So, if log⁡(Uk−)\log(\mathcal{U}_k^-) is the Zp\mathbb{Z}_p-module b⋅Zp×−m\mathbf{b}\cdot\mathbb{Z}_p^{\times}\sqrt{-m}, b∈pN\mathbf{b}\in p^{\mathbb{N}}, the pp-valuation of #Hk∞\#\mathcal{H}_k^{\infty} is given in the program by:

valuation⁡(hk,p)=[valuation⁡(a,p)−valuation⁡(b,p)].\operatorname{valuation}(\mathrm{hk},p)=\left[\operatorname{valuation}(\mathbf{a},p)-\operatorname{valuation}(\mathbf{b},p)\right].

The case p=2p=2 is particular since the action of τ\tau is not semi-simple. The case p=3p=3 is also particular because of the existence of μ3(kv)≠1\mu_3(k_v)\neq1 for −m≡−3(mod9)-m\equiv-3\pmod9. So the test of 2 and 3-rationalities of k=Q(−m)k=\mathbb{Q}(\sqrt{-m}) with the ray class group of modulus 8 and 9, is faster.

7.1.2. Program computing Hk∞\mathcal{H}_k^{\infty} and [k~∩Hknr:k][\widetilde{k}\cap H_k^{\mathrm{nr}}:k] for Q(−m)\mathbb{Q}(\sqrt{-m}). For p≠2p\neq2, we know that log⁡(Uk)−=pZp−m\log(\mathcal{U}_k)^-=p\mathbb{Z}_p\sqrt{-m} if pp is unramified in kk (i.e. p∤mp\nmid m), and log⁡(Uk)−=Zp−m\log(\mathcal{U}_k)^-=\mathbb{Z}_p\sqrt{-m} if p∣mp\mid m, −m≢−3(mod9)-m\not\equiv-3\pmod9 if p=3p=3, then log⁡(Uk)−=3Z3−m\log(\mathcal{U}_k)^-=3\mathbb{Z}_3\sqrt{-m} if p=3p=3 and −m≡−3(mod9)-m\equiv-3\pmod9 (cf. [12], Lemma 2.6).

In the PARI/GP notation, a canonical generator of the Zp\mathbb{Z}_p-module log⁡(Uk)−\log(\mathcal{U}_k)^- is Mod⁡(p∗x,P)\operatorname{Mod}(\mathbf{p}*x,P) and Mod⁡(x,P)\operatorname{Mod}(x,P), respectively.

The program does not print the (numerous) cases where Wkbp(3)=3\mathcal{W}_k^{\mathrm{bp}}(3)=3. A sufficient precision is necessary, only for few values of mm, because of the instruction bnfispincipal(k,C0)[2]; recall that here, mod⁡=pn0+2\operatorname{mod}=p^{n_0+2}:

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 Zp\mathbb{Z}_p-modules Hk∞\mathcal{H}_k^\infty, Rk\mathcal{R}_k and Wkbp\mathcal{W}_k^{\mathrm{bp}} may be non-trivial; we refer to Programs 2.2, for Rk\mathcal{R}_k and to Program 3.2 for an independent test of Wkbp\mathcal{W}_k^{\mathrm{bp}}.

Generalities and hypothesis

We assume that we know that Wkbp=1\mathcal{W}^{\mathrm{bp}}_{k}=1 (otherwise kk is non pp-rational) and that Hk≠1\mathcal{H}_{k}\ne1 (otherwise k~∩Hknr=k\widetilde{k}\cap H^{\mathrm{nr}}_{k}=k). We will use the method of determining the bad primes to which we apply the usual classical computation of rank⁡p(Tp)\operatorname{rank}_{p}(\mathcal{T}_{p}); this simplifies the log and matrix computations. Then we must first compute Rk=tor⁡Zp(Uk/Ek)≃tor⁡Zp(log⁡(1+p⋅Ok)/log⁡(E‾k))\mathcal{R}_{k}=\operatorname{tor}_{\mathbb{Z}_{p}}(\mathcal{U}_{k}/E_{k})\simeq\operatorname{tor}_{\mathbb{Z}_{p}}\left(\log(1+p\cdot\mathcal{O}_{k})/\log(\overline{E}_{k})\right).

Once this is done, with Rk\mathcal{R}_{k} invertible and Wk=1\mathcal{W}_{k}=1, it remains the most difficult invariant Hk∞\mathcal{H}^{\infty}_{k} where some simplifications arise (non-ramification of pp, Rk=1\mathcal{R}_{k}=1 meaning that log⁡(E‾k)\log(\overline{E}_{k}) is direct factor in log⁡(U)=p⋅Ok\log(\mathcal{U})=p\cdot\mathcal{O}_{k}). This point is essential since the image of Log⁡\operatorname{Log} takes place in the Qp\mathbb{Q}_{p}-vector space ⨁v∣pkv/Qplog⁡(Ek)\bigoplus_{v\mid p}k_{v}/\mathbb{Q}_{p}\log(E_{k}).

It is clear that {1,x,…,xd−1}\{1,x,\ldots,x^{d-1}\} is a Zp\mathbb{Z}_{p}-basis of Ok\mathcal{O}_{k} when pp is not bad, especially if pp does not divide the discriminant Dk\mathcal{D}_{k}, 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 kk is given by k.zk, where:

k.zk[i]=Mod⁡(c0i+c1i∗x+…,cd−1i∗xd−1,P),i=1,…,d.\mathrm{k.zk}[i]=\operatorname{Mod}(c^{i}_{0}+c^{i}_{1}*x+\ldots,c^{i}_{d-1}*x^{d-1},P),\quad i=1,\ldots,d.

So we compute the pp-valuation of det⁡(cji)\det(c^{i}_{j}):

{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 p=17p=17 is unramified but divides the denominator of several elements of k.zk, as: 317∗x8−217∗x7+717∗x6+117∗x5+517∗x4+817∗x3+2717∗x2−1817∗x−36951717\frac{3}{17}*x^{8}-\frac{2}{17}*x^{7}+\frac{7}{17}*x^{6}+\frac{1}{17}*x^{5}+\frac{5}{17}*x^{4}+\frac{8}{17}*x^{3}+\frac{27}{17}*x^{2}-\frac{18}{17}*x-\frac{369517}{17}.

Test for Hk∞≠1\mathcal{H}^{\infty}_{k}\ne1 for any number field

We assume that the normalized pp-adic regulator has been computed and is invertible (otherwise, kk is non-pp-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 αi\alpha_{i} generating ainia_{i}^{n_{i}}.

Then, the program gives the dd components of Log⁡(ai)\operatorname{Log}(a_{i}) modulo Log⁡(Rk⊗Zp)\operatorname{Log}(\mathcal{R}_{k}\otimes\mathbb{Z}_{p}); for this, we have the following lemma:

Lemma 7.2. Assume that pp is unramified in kk, does not divide the denominators of the integer basis elements of kk and that Rk=1\mathcal{R}_{k}=1. Put r:=rank⁡Z(Ek)r:=\operatorname{rank}_{\mathbb{Z}}(E_{k}) and h=rank⁡p(Hk)h=\operatorname{rank}_{p}(\mathcal{H}_{k}). Let A={α1,…,αh;ε1,…,εr}A=\{\alpha_{1},\ldots,\alpha_{h};\varepsilon_{1},\ldots,\varepsilon_{r}\} be a fundamental system of pseudo-units of kk; put (αi)=aini(\alpha_{i})=\mathfrak{a}_{i}^{n_{i}}, ni≡0(modp)n_{i}\equiv0\pmod p, where the cl⁡(ai)\operatorname{cl}(\mathfrak{a}_{i}) are the generating classes given by PARI/GP in k.clgp⁡k.\operatorname{clgp}. Set:

{1plog⁡(αi)=∑ℓ=0d−1aℓi⋅xℓ∈Zp[x],i∈[1,h],1plog⁡(εj)=∑ℓ=0d−1bℓj⋅xℓ∈Zp[x],j∈[1,r].\left\{ \begin{aligned} \frac{1}{p}\log(\alpha_{i})&=\sum_{\ell=0}^{d-1}a^{i}_{\ell}\cdot x^{\ell}\in\mathbb{Z}_{p}[x],\quad i\in[1,h],\\ \frac{1}{p}\log(\varepsilon_{j})&=\sum_{\ell=0}^{d-1}b^{j}_{\ell}\cdot x^{\ell}\in\mathbb{Z}_{p}[x],\quad j\in[1,r]. \end{aligned} \right.

Let Xk\mathcal{X}_{k} be the (d,h+r)(d,h+r)-matrix defined by the coefficients aℓia^{i}_{\ell} and bℓjb^{j}_{\ell} modulo $p.

Then, the invariant Hk∞\mathcal{H}_k^\infty is non-trivial if and only if the rank of this Fp\mathbb{F}_p-matrix is strictly less than rank⁡p(Rk)+rank⁡p(Hk)=rank⁡Z(Ek)+rank⁡p(Hk)\operatorname{rank}_p(\mathcal{R}_k) + \operatorname{rank}_p(\mathcal{H}_k) = \operatorname{rank}_{\mathbb{Z}}(E_k) + \operatorname{rank}_p(\mathcal{H}_k) (rE + rhk in the program).

Proof. Since pp is unramified, we have log⁡(Uk)=p⋅Ok\log(\mathcal{U}_k) = p \cdot\mathcal{O}_k and any 1plog⁡(u)\frac{1}{p}\log(u) is of the form a0+a1⋅pa_0+a_1 \cdot p (mod p2p^2), with a0,a1∈[0,p−1]a_0, a_1 \in[0,p-1]. We have Hk∞≠1\mathcal{H}_k^\infty\ne1 if and only if there exists a class cℓ(a)c\ell(\mathfrak{a}), of order pp, such that Log⁡(a)=0\operatorname{Log}(\mathfrak{a}) = 0. Put a=∏i=1haiλi⋅ni/p\mathfrak{a} = \prod_{i=1}^{h} \mathfrak{a}_i^{\lambda_i \cdot n_i/p}, up to a principal ideal, with λi∈Fp\lambda_i \in\mathbb{F}_p, not all zero (this means that the class is of order pp). Since log⁡(Uk)=p⋅Ok\log(\mathcal{U}_k) = p \cdot\mathcal{O}_k and:

Rk≃tor⁡Zp(log⁡(Uk)/log⁡(E‾k))=1,(7)\mathcal{R}_k \simeq\operatorname{tor}_{\mathbb{Z}_p}\left(\log(\mathcal{U}_k)/\log(\overline{E}_k)\right) = 1, \tag*{(7)}

log⁡(E‾k)\log(\overline{E}_k) is a direct factor in p⋅Okp \cdot\mathcal{O}_k; thus, the relation Log⁡(a)∈Log⁡(Pk⊗Zp)\operatorname{Log}(\mathfrak{a}) \in\operatorname{Log}(P_k \otimes\mathbb{Z}_p) is equivalent to Log⁡(a⋅(u)−1)=0\operatorname{Log}(\mathfrak{a} \cdot(u)^{-1}) = 0 for some u∈Oku \in\mathcal{O}_k; since a⋅(u)−1\mathfrak{a} \cdot(u)^{-1} represents the same class of order pp, one may write:

∑i=1hλi1plog⁡(αi)=pz⋅1plog⁡(ε),z∈Z, ε∈E‾k.(8)\sum_{i=1}^{h} \lambda_i \frac{1}{p}\log(\alpha_i) = p^z \cdot\frac{1}{p}\log(\varepsilon), \quad z \in\mathbb{Z},\ \varepsilon\in\overline{E}_k. \tag*{(8)}

The left member is in Op\mathcal{O}_p, so pz⋅1plog⁡(ε)∈Opp^z \cdot\frac{1}{p}\log(\varepsilon) \in\mathcal{O}_p; since by (7), 1plog⁡(E‾k)=:Op′\frac{1}{p}\log(\overline{E}_k) =: \mathcal{O}'_p is a direct factor in Op\mathcal{O}_p, (pz⋅Op′)∩Op(p^z \cdot\mathcal{O}'_p) \cap\mathcal{O}_p is non-zero if and only if z≥0z \ge0. Since log⁡(ε)≡0(modpm+1)\log(\varepsilon) \equiv0 \pmod{p^{m+1}}, m≥0m \ge0, implies ε=ηpm\varepsilon= \eta^{p^m} one may assume that 1plog⁡(ε)∈Uk\frac{1}{p}\log(\varepsilon) \in\mathcal{U}_k. In fact zz depends on the valuations of the left member. Whence, from (8), the existence of elements μj∈Fp\mu_j \in\mathbb{F}_p such that ∑i=1hλi1plog⁡(αi)+∑j=1rμj1plog⁡(εj)≡0(modp)\sum_{i=1}^{h} \lambda_i \frac{1}{p}\log(\alpha_i) + \sum_{j=1}^{r} \mu_j \frac{1}{p}\log(\varepsilon_j) \equiv0 \pmod p, with coefficients λi\lambda_i not all zero; so the Fp\mathbb{F}_p-rank of the matrix Xk\mathcal{X}_k is strictly less that rank⁡Z(Ek)+rank⁡p(Hk)=rE+rhk\operatorname{rank}_{\mathbb{Z}}(E_k) + \operatorname{rank}_p(\mathcal{H}_k) = \mathrm{rE} + \mathrm{rhk}. Since Rk\mathcal{R}_k is invertible by (7), the rank of Xk\mathcal{X}_k is at least rE (the program verifies that Rk\mathcal{R}_k is invertible; if not it concludes that kk is not pp-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 a=5a = 5. Program 2.2 shows that Rk=1\mathcal{R}_k = 1:

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 33-basis {1,x,…,x7}\{1,x,\ldots,x^7\} to find the various F3\mathbb{F}_3-relations, knowing log⁡Ek\log E_k (direct factor, of Z3\mathbb{Z}_3-dimension 4, of Ok\mathcal{O}_k, of Z3\mathbb{Z}_3-dimension 8). Matrix Xk\mathcal{X}_k 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 Q3log⁡(Ek)\mathbb{Q}_3\log(E_k), the image of a 3-class is trivial (whence HknrH_k^{\mathrm{nr}} is not linearly disjoint from the compositum of the Z3\mathbb{Z}_3-extensions of kk).

To see that HknrH_k^{\mathrm{nr}} is not contained in k~\widetilde{k}, we note for instance that Log⁡(α1)\operatorname{Log}(\alpha_1) is of order 3 in Log⁡(Ik⊗Zp)\operatorname{Log}(I_k\otimes\mathbb{Z}_p). A direct computation of the structure of Tk\mathcal{T}_k confirms the above calculations since, from Program 1.2.1: rk(Tk) = 1 k is not 3 − rational Tk[p] = List([3]).

Case a=90a = 90

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 F3\mathbb{F}_3, proving that the image of the pp-class group in Gal⁡(k~/k)\operatorname{Gal}(\widetilde{k}/k) is not trivial; so that kk is not 47-rational.

Remark 7.3. It is possible that all the 1plog⁡(αi)\frac{1}{p}\log(\alpha_i) be zero modulo pp; this happens rarely. We have the following example with another polynomial and p=3p = 3:

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 cl⁡(a)\operatorname{cl}(\mathfrak{a}), of order 6, gives an element α\alpha 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 a=21a = 21

In this case, Hinf>1H_{\mathrm{inf}} > 1 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. [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. [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. [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
  4. [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
  5. [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
  6. [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
  7. [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
  8. [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
  9. [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
  10. [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
  11. [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
  12. [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
  13. [20][Pari2019] The PARI Group, PARI/GP, Version 2.11.2 (2019), Univ. Bordeaux. https://pari.math.u-bordeaux.fr/gpwasm.html 2
  14. [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
  15. [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

Paper details

vlnc:W_zkhuezpu
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents