Function: mfeisenstein
Section: modular_forms
C-Name: mfeisenstein
Prototype: LDGDG
Help: mfeisenstein(k,{CHI1},{CHI2}): create the Eisenstein
 E_k(CHI1,CHI2), where an omitted character is considered as trivial.
Doc: create the Eisenstein series $E_{k}(\chi_{1},\chi_{2})$, where $k \geq 1$,
 $\chi_{i}$ are Dirichlet characters and an omitted character is considered as
 trivial. This form belongs to ${\cal E}_{k}(\Gamma_{0}(N), \chi)$ with $\chi =
 \chi_{1}\chi_{2}$ and $N$ is the product of the conductors of $\chi_{1}$ and
 $\chi_{2}$.
 \bprog
 ? CHI = Mod(3,4);
 ? E = mfeisenstein(3, CHI);
 ? mfcoefs(E, 6)
 %2 = [-1/4, 1, 1, -8, 1, 26, -8]
 ? CHI2 = Mod(4,5);
 ? mfcoefs(mfeisenstein(3,CHI,CHI2), 6)
 %3 = [0, 1, -1, -10, 1, 25, 10]
 ? mfcoefs(mfeisenstein(4,CHI,CHI), 6)
 %4 = [0, 1, 0, -28, 0, 126, 0]
 ? mfcoefs(mfeisenstein(4), 6)
 %5 = [1/240, 1, 9, 28, 73, 126, 252]
 @eprog\noindent Note that \kbd{mfeisenstein}$(k)$ is 0 for $k$ odd and
 $-B_{k}/(2k) \cdot E_{k}$ for $k$ even, where
 $$E_{k}(q) = 1 - (2k/B_{k})\sum_{n\geq 1} \sigma_{k-1}(n) q^{n}$$
 is the standard Eisenstein series. In other words it is normalized so that its
 linear coefficient is $1$.

 \misctitle{Important note} This function is currently implemented only when
 $\Q(\chi)$ is the field of definition of $E_{k}(\chi_{1},\chi_{2})$. If it is a
 strict subfield, an error is raised:
 \bprog
 ? mfeisenstein(6, Mod(7,9), Mod(4,9));
  ***   at top-level: mfeisenstein(6,Mod(7,9),Mod(4,9))
  ***                 ^---------------------------------
  *** mfeisenstein: sorry, mfeisenstein for these characters is not
  *** yet implemented.
 @eprog\noindent The reason for this is that each modular form is attached
 to a modular form space $M_{k}(\Gamma_{0}(N),\chi)$. This is a $\C$-vector
 space but it allows a basis of forms defined over $\Q(\chi)$ and is only
 implemented as a $\Q(\chi)$-vector space: there is
 in general no mechanism to take linear combinations of forms in the space
 with coefficients belonging to a larger field. (Due to their importance,
 eigenforms are the single exception to this restriction; for an eigenform
 $F$, $\Q(F)$ is built on top of $\Q(\chi)$.) When the property $\Q(\chi) =
 \Q(E_{k}(\chi_{1},\chi_{2})$ does not hold, we cannot express $E$ as a
 $\Q(\chi)$-linear combination of the basis forms and many operations will
 fail. For this reason, the construction is currently disabled.
