HEAP=[170, if(sizebyte(0)==16,95769,97412)];
default(realprecision,154); Pi; default(realprecision,38);
dobnf(T,flag=0,tech=[])= setrand(1); my(K = bnfinit(T,flag,tech)); [K.cyc,K.fu];
\e
\\ Initialisations diverses
p2=Pol([1,3021,-786303,-6826636057,-546603588746,3853890514072057]);
fa=[11699,6;2392997,2;4987333019653,2];
setrand(1);N=10^8;a=matrix(3,5,j,k,vectorv(5,l,random\N));
nfpol=x^5-5*x^3+5*x+25; nf=nfinit(nfpol)
nfinit(nfpol,2)
nfinit(nfpol,3)[2]
nf3=nfinit(x^6+108);
setrand(1);bnf2=bnfinit(y^3-y-1);nf2=bnf2[7];
setrand(1);bnf=bnfinit(x^2-x-57,,[0.2,0.2])
dobnf(x^2-x-100000,1)
\p19
setrand(1);sbnf=bnfcompress(bnfinit(x^3-x^2-14*x-1))
K=bnfinit(sbnf); bnfisprincipal(K, idealprimedec(K,3)[2])
\p38
bnr=bnrinit(bnf,[[5,3;0,1],[1,0]],1); bnr.cyc
bnr2=bnrinit(bnf,[[25,13;0,1],[1,1]]); bnr2.bid
rnfinit(nf2,x^5-x-2)
\\
bnfcertify(bnf)
dobnf(x^4+24*x^2+585*x+1791,,[0.1,0.1])
bnrconductor(bnf,[[25,13;0,1],[1,1]])
bnrconductorofchar(bnr,[2])
bnfisprincipal(bnf,[5,1;0,1],0)
bnfisprincipal(bnf,[5,1;0,1])
bnfisunit(bnf,Mod(3405*x-27466,x^2-x-57))
bnfnarrow(bnf)
bnfsignunit(bnf)
bnrclassno(bnf,[[5,3;0,1],[1,0]])
lu=ideallist(bnf,55,3);
bnrclassnolist(bnf,lu)
bnrdisc(bnr,Mat(6))
bnrdisc(bnr)
bnrdisc(bnr2,,,2)
bnrdisc(bnr,Mat(6),,1)
bnrdisc(bnr,,,1)
bnrdisc(bnr2,,,3)
bnrdisclist(bnf,lu)
bnrdisclist(bnf,20)
bnrisprincipal(bnr,idealprimedec(bnf,7)[1])
dirzetak(nfinit(x^3-10*x+8), 30)
factornf(x^3+x^2-2*x-1,t^3+t^2-2*t-1)
\\
vp=idealprimedec(nf,3)[1]
idx=idealhnf(nf,vp)
idealred(nf,idx,[1,5,6])
idy=idealdiv(nf,5,idealprimedec(nf,5)[1])
idx2=idealmul(nf,idx,idx)
idt=idealmul(nf,idx,idx,1)
idz=idealintersect(nf,idx,idy)
aid=[idx,idy,idz,1,idx];
idealadd(nf,idx,idy)
idealaddtoone(nf,idx,idy)
idealaddtoone(nf,[idy,idx])
idealappr(nf,idy)
idealappr(nf,idealfactor(nf,idy))
idealcoprime(nf,idx,idx)
idealdiv(nf,idy,idt)
idealdiv(nf,idx2,idx,1)
idealfactor(nf,idz)
idealhnf(nf,vp[2],3)
ideallist(bnf,20)
bid=idealstar(nf2,54)
ideallog(nf2,y,bid)
idealmin(nf,idx,[1,2,3])
idealnorm(nf,idt)
idp=idealpow(nf,idx,7)
idealpow(nf,idx,5,1)
idealprimedec(nf,2)
idealprimedec(nf,3)
idealprimedec(nf,11)
idealtwoelt(nf,idy)
idealtwoelt(nf,idy,10)
idealstar(nf2,54)
idealval(nf,idp,vp)
\\
ba=nfalgtobasis(nf,x^3+5)
bb=nfalgtobasis(nf,x^3+x)
bc=matalgtobasis(nf,[x^2+x;x^2+1])
matbasistoalg(nf,bc)
nfbasis(x^3+4*x+5)
nfbasistoalg(nf,ba)
nfdisc(x^3+4*x+12)
nfeltdiv(nf,ba,bb)
nfeltdiveuc(nf,ba,bb)
nfeltdivrem(nf,ba,bb)
nfeltmod(nf,ba,bb)
nfeltmul(nf,ba,bb)
nfeltpow(nf,bb,5)
nfeltreduce(nf,ba,idx)
nfeltval(nf,ba,vp)
nffactor(nf2,x^3+x)
aut=nfgaloisconj(nf3)
nfgaloisapply(nf3,aut[5],Mod(x^5,x^6+108))
nfhilbert(nf,3,5)
nfhilbert(nf,3,5,vp)
nfhnf(nf,[a,aid])
da=nfdetint(nf,[a,aid])
nfhnfmod(nf,[a,aid],da)
nfisideal(bnf[7],[5,1;0,1])
nfisincl(x^2+1,x^4+1)
nfisincl(x^2+1,nfinit(x^4+1))
nfisisom(x^3+x^2-2*x-1,x^3+x^2-2*x-1)
nfisisom(x^3-2,nfinit(x^3-6*x^2-6*x-30))
nfroots(nf2,x+2)
nfrootsof1(nf)
nfsnf(nf,[a[,1..3], [1,1,1], [idealinv(nf,idx),idealinv(nf,idy),1]])
nfsubfields(nf)
polcompositum(x^4-4*x+2,x^3-x-1)
polcompositum(x^4-4*x+2,x^3-x-1,1)
polgalois(x^6-3*x^2-1)
polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
polred(x^4-28*x^3-458*x^2+9156*x-25321,3)
polred(x^4+576,1)
polred(x^4+576,3)
polred(p2,0,fa)
polred(p2,1,fa)
polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
polredabs(x^5-2*x^4-4*x^3-96*x^2-352*x-568,1)
polredord(x^3-12*x+45*x-1)
polsubcyclo(31,5)
setrand(1);poltschirnhaus(x^5-x-1)
\\
p=x^5-5*x+y; aa=rnfpseudobasis(nf2,p)
rnfbasis(bnf2,aa)
rnfdisc(nf2,p)
rnfequation(nf2,p)
rnfequation(nf2,p,1)
rnfhnfbasis(bnf2,aa)
rnfisfree(bnf2,aa)
rnfsteinitz(nf2,aa)
\\
setrand(1);quadclassunit(1-10^7,,[1,1])
setrand(1);quadclassunit(10^9-3,,[0.5,0.5])
if (getheap()!=HEAP, getheap())
