Modular forms of weight 1 can be defined using the usual constructors. For these spaces, the Dimension, the CuspidalSubspace and EisensteinSubspace, EisensteinSeries, a qExpansionBasis, and Hecke operators are available, as well as basic functionality such as element arithmetic.
The algorithm used to determine spaces of weight 1 forms is as follows. The Eisenstein series are constructed directly as q-expansions. The cuspidal eigenforms correspond to Galois representations; those corresponding to dihedral Galois representations are obtained explicitly (from characters on ray class groups of quadratic fields). If the dihedral forms span the full space of cusp forms, this is proved by comparing with suitable spaces of integral weight forms; if not, a q-expansion basis for the cuspidal space is obtained using the integral-weight spaces (this is the most time-consuming part of the process).
For a space of weight 1, this returns the cuspidal eigenforms in M corresponding to dihedral Galois representations, broken up according to character. A list of tuples is returned; each tuple contains an element of the DirichletCharacters of M, followed by a list of eigenforms.