/* The following three functions serve the objective of computing the Dirichlet series coefficients of Hecke L functions associated to characters of the ordinary ideal class group H(K) of a number field K. */ \\ chareval (chi, grelt, H) returns chi(grelt); \\ chi, grelt and H are specified as vectors of integers: \\ H is given as the cyclic decomposition \\ grelt is the vector of appropriate coordinates \\ chi is the vector of dual coordinates. chareval (chi, grelt, H) = { local (m, i, ss); m = matsize (H)[2]; ss = 0; for (i=1, m, ss += chi[i]*grelt[i]/H[i]); exp (2*Pi*I*(numerator(ss) % denominator(ss))/denominator(ss)); } \\ dirzetachicoefficient (bnf, chi, idealsofonenorm) returns the a(k) \\ coefficient in the series \sum a(k)/k^s = \zeta (s, chi) = \sum chi(I)/NI^s. \\ idealsofonenorm is the set of all ideals of norm k in K. dirzetachicoefficient (bnf, chi, idealsofonenorm) = { local (m, i, ss); m = matsize (idealsofonenorm)[2]; ss = 0; for (i=1, m, ss = ss + chareval (chi, bnfisprincipal (bnf, idealsofonenorm[i], 2), bnf.cyc); ); ss; } \\ dirzetachi is analogous to Pari's dirzetak, except we also specify \\ the character chi to designate \zeta (s, chi). dirzetachi (bnf, chi, b) = { local (i); ideals = ideallist (bnf, b, 4); vector (b, i, dirzetachicoefficient (bnf, chi, ideals[i])); }