/* v[i] = deg S[i] mod p^prec */ static GEN get_vdegS(GEN Ftilde, GEN ell, long prec) { long i, l = lg(Ftilde); GEN v = cgetg(l, t_VEC), degell = Qp_log( cvtop(ell1(ell), ell, prec) ); for (i = 1; i < l; i++) gel(v,i) = gmulsg(Ftilde[i], degell); return v; }
/* || L ||_p^p in dimension n (L may be a scalar) */ static GEN normlp(GEN L, long p, long n) { long i,l, t = typ(L); GEN z; if (!is_vec_t(t)) return gmulsg(n, gpowgs(L, p)); l = lg(L); z = gen_0; /* assert(n == l-1); */ for (i=1; i<l; i++) z = gadd(z, gpowgs(gel(L,i), p)); return z; }
/* log N_{F_P/Q_p}(x) / deg_F P */ static GEN vtilde_i(GEN K, GEN x, GEN T, GEN deg, GEN ell, long prec) { GEN L, N, cx; if (typ(x) != t_POL) x = nf_to_scalar_or_alg(K, x); x = Q_primitive_part(x,&cx); N = RgXQ_norm(x, T); L = Qp_log(cvtop(N,ell,prec)); if (cx) { Q_pvalrem(cx, ell, &cx); if (!isint1(cx)) L = gadd(L, gmulsg(degpol(T), Qp_log(cvtop(cx,ell,prec)))); } return gdiv(L, deg); }
/* return a bound for T_2(P), P | polbase * max |b_i|^2 <= 3^{3/2 + d} / (4 \pi d) [P]_2, * where [P]_2 is Bombieri's 2-norm * Sum over conjugates */ static GEN nf_Beauzamy_bound(GEN nf, GEN polbase) { GEN lt,C,run,s, G = gmael(nf,5,2), POL, bin; long i,prec,precnf, d = degpol(polbase), n = degpol(nf[1]); precnf = gprecision(G); prec = MEDDEFAULTPREC; bin = vecbinome(d); POL = polbase + 2; /* compute [POL]_2 */ for (;;) { run= real_1(prec); s = real_0(prec); for (i=0; i<=d; i++) { GEN p1 = gnorml2(arch_for_T2(G, gmul(run, gel(POL,i)))); /* T2(POL[i]) */ if (!signe(p1)) continue; if (lg(p1) == 3) break; /* s += T2(POL[i]) / binomial(d,i) */ s = addrr(s, gdiv(p1, gel(bin,i+1))); } if (i > d) break; prec = (prec<<1)-2; if (prec > precnf) { nffp_t F; remake_GM(nf, &F, prec); G = F.G; if (DEBUGLEVEL>1) pari_warn(warnprec, "nf_factor_bound", prec); } } lt = leading_term(polbase); s = gmul(s, mulis(sqri(lt), n)); C = powrshalf(stor(3,DEFAULTPREC), 3 + 2*d); /* 3^{3/2 + d} */ return gdiv(gmul(C, s), gmulsg(d, mppi(DEFAULTPREC))); }