f = x^4 - 2*x^3 + x^2 - 5; polisirreducible(f) g = polcyclo(30) Mod(x,f)^5 lift(Mod(x,g)^15) {h = x^5 + 7*x^4 + 22550*x^3 - 281686*x^2 - 85911*x + 3821551}; polredbest(h) K = nfinit(f); K.pol K.sign K.disc K.zk w = K.zk[2]; nfalgtobasis(K,x^2) nfbasistoalg(K,[1,1,1,1]~) nfeltmul(K,[1,-1,0,0]~,x^2) nfeltnorm(K,x-2) nfelttrace(K,[0,1,2,0]~) dec = idealprimedec(K,5); #dec [pr1,pr2] = dec; pr1.f pr1.e pr1.gen pr2.f pr2.e idealhnf(K,pr1) a = idealhnf(K,[23, 10, -5, 1]~) idealnorm(K,a) idealpow(K,pr2,3) idealnorm(K,idealadd(K,a,pr2)) fa = idealfactor(K,a); #fa[,1] [fa[1,1].p, fa[1,1].f, fa[1,1].e, fa[1,2]] [fa[2,1].p, fa[2,1].f, fa[2,1].e, fa[2,2]] fa[2,1]==pr1 [fa[3,1].p, fa[3,1].f, fa[3,1].e, fa[3,2]] b = idealchinese(K,[pr1,2;pr2,1],[1,-1]); nfeltval(K,b-1,pr1) nfeltval(K,b+1,pr2) nfeltsign(K,b) c = idealchinese(K,[[pr1,2;pr2,1],[1,1]],[1,-1]); nfeltsign(K,c) L = nfinit(x^3-3*x-1); L.sign lfun(L,2) q = bestappr(lfun(L,2)/Pi^6) lfun(L,2)/(Pi^6*q) K2 = bnfinit(K); K2.nf == K K2.no K2.reg bnfcertify(K2) lift(K2.tu) K2.tu[1]==nfrootsof1(K)[1] lift(K2.fu) lfun(K,1+x+O(x^2)) res = polcoeff(lfun(K,1+x+O(x^2)),-1) {2^K2.r1*(2*Pi)^K2.r2*K2.no*K2.reg/ (K2.tu[1]*sqrt(abs(K2.disc))*res)} L = bnfinit(x^3 - x^2 - 54*x + 169); L.cyc L.gen pr = idealprimedec(L,13)[1]; [dl,g] = bnfisprincipal(L,pr); dl g idealhnf(L,pr) == idealmul(L,g,idealfactorback(L,L.gen,dl)) [dl2,g2] = bnfisprincipal(L,idealpow(L,pr,2)); dl2 g2 idealhnf(L,g2) == idealpow(L,pr,2) bnfisintnorm(L,5) bnfisintnorm(L,65) u = [0,2,1]~; nfeltnorm(L,u) bnfisunit(L,u) lift(L.fu) lift(L.tu) M = bnfinit(x^2-3019); M.fu M = bnfinit(x^2-3019,1); lift(M.fu)