f = x^4 - 2*x^3 + x^2 - 5; K = nfinit(f) #nfisisom(nfinit(P), nfinit(polredbest(P))) K.pol K.sign K.r1 K.r2 K.disc K.p w=K.zk[2]; K.zk 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); matsize(fa) [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) K2 = bnfinit(K); K2.nf == K K2.no K2.reg lift(K2.tu) K2.tu[1]==nfrootsof1(K)[1] lift(K2.fu) 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)