# construct a Hecke character in MAGMA with given infinity type

I need to do some numerical computation on special values of a Hecke L-function $L(s,\chi)$. To do this, I want to construct a Hecke character in MAGMA, given that I know its infinity type.

In other words, suppose we are working on a totally real field $K$. My Hecke character $\chi$ is first defined over the principal ideals by

$$\chi((\alpha))=\prod sgn(\sigma_i(\alpha))^{m_i}|\sigma_i(\alpha)|^{n_i}$$

where $\sigma_i$'s are the real embeddings, $m_i=0$ or $1$, and $n_i\in \mathbb{C}$. For some good values of $m,n$ this can be extended to all ideals, thus becomes a Hecke character.

I tried to read https://magma.maths.usyd.edu.au/magma/handbook/text/410 for related information. It looks like the functions related to Hecke Grössencharacters are close to what I need, but it requires CM field to work, while I want to deal, say with $K=\mathbb{Q}(\sqrt{3})$.

Edit1: Thanks to Jeremy Rouse, I read http://magma.maths.usyd.edu.au/magma/handbook/text/1485 about creating a general L-series in Magma. It assumes that the shifts in the gamma factors are rational, while I want to do the following example:

$K=\mathbb{Q}(\sqrt{3})$, $\chi(\alpha)=Sgn(\alpha\alpha')(\alpha/\alpha')^{i\pi/R}$ where $R$ is the regulator (so that $\chi$ is $1$ on units).

$L(\chi)=\sum_{I\subset O_K}\chi(I)N(I)^{-s}$, whose gamma factor is

$$\nu(s)=(dπ^{−2})^{s/2}Γ(s/2+1/2+πi/2R)Γ(s/2+1/2−πi/2R).$$

K:=QuadraticField(3);
C<i>:=ComplexField();
pi:=Pi(C);
d:=AbsoluteDiscriminant(K); d;
r:=Regulator(K);
mu:=pi/2/r; mu;
L := LSeries(1, [mu,-mu], d, 0: Sign:=1);
N := LCfRequired(L); N;


which results in "Runtime error in 'LSeries': elements of gamma must be integer or rational numbers". (So as Jeremy commented later, this cannot be doen with Magma. with add some detail if I work it out.)

• I am skeptical that the $L$-function properly has "special values", as it is not motivic. – kantelope Dec 8 '15 at 22:46
• @kantelope I should say that I want to evaluate it at some integer/half integer. – Ted Mao Dec 8 '15 at 23:11

It sounds like Magma does not currently include the exact functionality that you want to use. An alternative that you could try is manually building the $L$-function you wish to evaluate numerically (see the section of the Magma documentation "Arithmetic Geometry - $L$-functions - Constructing a general L-series"). This accesses the algorithms (primarily based on work of Tim Dokchitser) for computing $L$-functions. I have manually built and evaluated many $L$-functions (including for example, symmetric power $L$-functions of modular forms).
• Thanks for the information. However, I am still confused about my case. The "General L-series" Magma page has an assumption on the gamma factor $\nu(s)=\Gamma(s+\lambda_1 /2)\ldots\Gamma(s+\lambda_d /2)$. Now we just have real places and there will be $\Gamma(s/2)$ type factors only. Does it still work? – Ted Mao Dec 8 '15 at 18:23
• Or, can you give me an example, say $\chi(\alpha)=Sgn(\alpha\bar{\alpha}) (\alpha\bar{\alpha}^{-1})^{i\pi/R}$ where $R$ is the regulator (so $\chi$ is 1 on the units), and $L(s)=\sum_{I\subset O_K} \chi(I) N(I)^{-s}$, where $K=\mathbb{Q}(\sqrt{3})$. In this case $\nu(s)=(d\pi^{-2})^{s/2} \Gamma(s/2+1/2+i\pi/2R)\Gamma(s/2+1/2-i\pi/2R)$ – Ted Mao Dec 8 '15 at 18:31
• So, after playing with this for a while, it turns out you cannot do this in Magma. The form of the gamma factors in the Magma documentation is a typo - instead they are expected to be $\Gamma\left(\frac{s+\lambda_{1}}{2}\right) \cdots$. However, Magma expects the $\lambda_{i}$ to be rational, and this is a problem in your example! This is a factor of the Magma implementation - if you use Tim Dokchitser's original PARI script, you'll be fine. Another possibility is Michael Rubinstein's "lcalc". – Jeremy Rouse Dec 8 '15 at 20:05