Introduction#
The first version of this package was released in V2.29 (October 2025). It has been developed further in each subsequent release, and is still under development. We encourage users to send feedback regarding the package, and desirable features or improvements.
The package contains implementations of algebraic modular forms for orthogonal and unitary groups. The primary focus is on orthogonal groups of small rank and trivial weight. Higher weight spaces are also handled; however some features are only available for trivial weight, and the main routines are better optimized in trivial weight. All levels \({\rm O}(\Lambda)\) are allowed, where \(\Lambda\) is an integral lattice in the underlying polar space.
The main purposes of the current functionality are to efficiently compute Hecke operators on these spaces, to decompose spaces into newforms, and to efficiently obtain large numbers of eigenvalues for newforms (at least those having small degree). Some additional features such as twisting by the spinor norm, and creating associated L-series, are also included.
Definitions and Background#
Algebraic modular forms are a generalization of classical modular forms where the modular group is replaced by a subgroup of a compact reductive group \(G\). More precisely, if \({\bf G}\) is a reductive group defined over \({\mathbb{Q}}\), such that \({\bf G}^{{\rm ad}}({\mathbb{R}})\) is compact, and \(G = {\bf G}({\mathbb{Q}})\), one considers modular forms for arithmetic subgroups of \(G\).
This section gives a brief and partly informal introduction to algebraic modular forms. The sections about the algorithms also introduce more terminology in order to use the package!
The papers by Gross [Gross, 1999] and by Greenberg and Voight [Greenberg and Voight, 2014] are good references for standard material on algebraic modular forms.
Let \({\bf G}\) be a reductive group over \({\mathbb{Q}}\) such that \({\bf G}({\mathbb{R}})\) is compact modulo its center. A weight is a representation \(\rho \colon {\bf G}({\mathbb{Q}}) \to {\rm GL}(W)\) with \(W\) a finite-dimensional \({\mathbb{Q}}\)-vector space. Define \(\widehat{{\mathbb{Z}}} = \prod_p' {\mathbb{Z}}_p\), and \(\widehat{{\mathbb{Q}}}= \prod_p' {\mathbb{Q}}_p\) (restricted products with respect to the local subgroups \({\mathbb{Z}}_p\), i.e. the adèles of \({\mathbb{Q}}\)). A level is a compact open subgroup \(\widehat{K}\subset {\bf G}(\widehat{{\mathbb{Q}}})\). The space of algebraic modular forms (on \(G\)) of weight \(W\) and level \(\widehat{K}\) is
An element \(f \in M(\widehat{K},W)\) is determined by its values on a set of representatives for the class set of level \(\widehat{K}\)
The class set is finite, and choosing representatives \(\{\widehat{x}_1,...,\widehat{x}_h\}\) defines an isomorphism
where each \(\Gamma_i := {\bf G}({\mathbb{Q}})\cap \widehat{x}_i \widehat{K}\widehat{x}_i^{-1}\) is a finite group and \(W^{\Gamma_i}\) is the subspace of \(\Gamma_i\)-invariants. In particular, when \(W={\mathbb{Q}}\) is trivial the space \(M(\widehat{K}, W)\) is simply the \({\mathbb{Q}}\)-vector space of functions \({\rm Cls}(\widehat{K})\rightarrow {\mathbb{Q}}\). An immediate consequence of the above isomorphism is that the space \(M(\widehat{K},W)\) is a finite-dimensional \({\mathbb{Q}}\)-vector space.
For each \(\widehat{\alpha}\in {\bf G}(\widehat{{\mathbb{Q}}})\) there is a natural Hecke operator \(T_{\widehat{\alpha}}\) acting on the space \(M(\widehat{K},W)\) as follows: decompose \(\widehat{K}\widehat{\alpha}\widehat{K}= \bigsqcup_i \widehat{\alpha}_i \widehat{K}\) into (finitely many) left cosets, and then define \((T_{\widehat{\alpha}} \phi)(\widehat{g}) := \sum_i \phi(\widehat{g}\widehat{\alpha}_i)\). The space \(M(\widehat{K},W)\) is semisimple for the action of the Hecke algebra generated by these operators.
Let \(C\) be the largest commutative quotient of \(G\). The natural quotient map \(\nu : G \to C\) induces a map \(\widehat{\nu}^* : M(\widehat{\nu}(\widehat{K}),W) \to M(\widehat{K}, W)\) defined by \(\widehat{\nu}^* \phi(\widehat{g}) = \phi(\widehat{\nu}(\widehat{g}))\). We denote its image by \(E(\widehat{K}, W) = \widehat{\nu}^* (M(\widehat{\nu}(\widehat{K}), W))\), and call it the Eisenstein subspace of \(M(\widehat{K}, W)\).
The space \(M(\widehat{K}, W)\) carries an inner product, defined in [Gross, 1999]. This inner product induces a decomposition \(M(\widehat{K},W) = E(\widehat{K}, W)\oplus S(\widehat{K}, W)\), where the cuspidal subspace \(S(\widehat{K},W)\) is the orthogonal complement of the Eisenstein subspace.
Algorithms and Supported Groups#
The algorithms implemented for computing the Hecke action on spaces of algebraic modular forms are using lattice methods and are based on enumerating Kneser’s \(p\)-neighbors. The algorithms are currently only implemented in the following cases:
- (i)
\(G = {\rm O}(V)\) is the orthogonal group of a totally positive definite quadratic space.
- (ii)
\(G = {\operatorname{SO}}(V)\) is the special orthogonal group of a totally positive definite quadratic space.
- (iii)
\(G = {\rm U}(V)\) is the unitary group of a totally positive definite hermitian space.
An exposition of the algorithm is given in [Greenberg and Voight, 2014], in addition to the subsequent improvements described in [Rama and Tornaría, 2020], [Assaf et al., 2022] and [Assaf et al., [2024] ©2024].
Orthogonal Modular Forms#
We elaborate on the special case where \({\bf G}\) is an orthogonal group of a totally definite quadratic space. Let \((V,Q)\) be a quadratic space over a field \(F\) of dimension \(n\). Let \(\Lambda\subset V\) be a \({\mathbb{Z}}_F\)-lattice in \(V\), namely a finitely-generated projective \({\mathbb{Z}}_F\)-module such that \(F \cdot \Lambda = V\).
The orthogonal group \({\rm O}(V)\) of \(V\) is the group of \(F\)-linear automorphisms of \(V\) that preserve the quadratic form, the isometries of \(V\); the orthogonal group \({\rm O}(\Lambda)\) of \(\Lambda\) is the subgroup of \({\rm O}(V)\) that stabilizes \(\Lambda\). If \(\Lambda'=\gamma(\Lambda)\) for \(\gamma \in {\rm O}(V)\), we say \(\Lambda\) is isometric to \(\Lambda'\) and we write simply \(\Lambda \simeq \Lambda'\).
If \(F\) is a number field and \(P\) is a prime ideal of \({\mathbb{Z}}_F\), denote by \(F_{P}\) and \({\mathbb{Z}}_{F,P}\) the completions of \(F\) and \({\mathbb{Z}}_F\) at \(P\), respectively. Let \(\Lambda_{P} := \Lambda \otimes {\mathbb{Z}}_{F,P} \subset V_p := V \otimes_{F} F_{P}\).
The genus of \(\Lambda\) is the set of lattices
i.e., the set of lattices which become isometric to \(\Lambda\) in each completion.
The orthogonal group \({\rm O}(V)\) acts on the genus \({\rm Gen}(\Lambda)\), and we define the class set to be the set of global isometry classes
Assume \(F\) is totally real and \(V\) is totally positive definite. Then \(G = {\rm O}(V)\) is compact, and we can describe the space of algebraic modular forms for \(G\) of level \(\widehat{K}= {\rm O}(\widehat{\Lambda})\), where \(\widehat{\Lambda} := \prod_{P} \Lambda_{P}\). Since \({\rm Cls}(\Lambda)\) is finite, we can write \({\rm Cls}(\Lambda) = \{[\Lambda_1],\dots,[\Lambda_h]\}\) with \(\Lambda=\Lambda_1\). Given a finite-dimensional representation \(\rho \colon {\rm O}(V) \to {\rm GL}(W)\), the space of orthogonal modular forms \(M(\Lambda,W)\) of level \(\Lambda\) and weight \(W\) is the space of functions on \({\rm Cls}(\Lambda)\) with values in \(W\), equivariant with respect to the orthogonal group, with
Unitary Modular Forms#
We elaborate on the special case where \({\bf G}\) is a unitary group of a totally definite hermitian space. Let \(K\) be a quadratic extension of the field \(F\), and let \((V,H)\) be a Hermitian space over \(K\) of dimension \(n\). Let \(\Lambda\subset V\) be a \({\mathbb{Z}}_K\)-lattice in \(V\), namely a finitely-generated projective \({\mathbb{Z}}_K\)-module such that \(K \cdot \Lambda = V\).
The unitary group \({\rm U}(V)\) of \(V\) is the group of \(K\)-linear automorphisms of \(V\) that preserve the hermitian form, the isometries of \(V\); the unitary group \({\rm U}(\Lambda)\) of \(\Lambda\) is the subgroup of \({\rm U}(V)\) that stabilizes \(\Lambda\). If \(\Lambda'=\gamma(\Lambda)\) for \(\gamma \in {\rm U}(V)\), we say \(\Lambda\) is isometric to \(\Lambda'\) and we write simply \(\Lambda \simeq \Lambda'\).
If \(F\) is a number field and \(P\) is a prime ideal of \({\mathbb{Z}}_F\), denote by \(F_{P}\) and \({\mathbb{Z}}_{F,P}\) the completions of \(F\) and \({\mathbb{Z}}_F\) at \(P\), respectively. Let \(\Lambda_{P} := \Lambda \otimes {\mathbb{Z}}_{K,P} \subset V_p := V \otimes_{K} K_{P}\).
The genus of \(\Lambda\) is the set of lattices
i.e., the set of lattices which become isometric to \(\Lambda\) in each completion.
The unitary group \({\rm U}(V)\) acts on the genus \({\rm Gen}(\Lambda)\), and we define the class set to be the set of global isometry classes
Assume \(F\) is totally real and \(V\) is totally positive definite. Then \(G = {\rm U}(V)\) is compact, and we can describe the space of algebraic modular forms for \(G\) of level \(\widehat{K}= {\rm U}(\widehat{\Lambda})\), where \(\widehat{\Lambda} := \prod_{P} \Lambda_{P}\). Since \({\rm Cls}(\Lambda)\) is finite, we can write \({\rm Cls}(\Lambda) = \{[\Lambda_1],\dots,[\Lambda_h]\}\) with \(\Lambda=\Lambda_1\). Given a finite-dimensional representation \(\rho \colon {\rm U}(V) \to {\rm GL}(W)\), the space of orthogonal modular forms \(M(\Lambda,W)\) of level \(\Lambda\) and weight \(W\) is the space of functions on \({\rm Cls}(\Lambda)\) with values in \(W\), equivariant with respect to the unitary group, with
Categories#
The Magma category for spaces of algebraic modular forms is ModFrmAlg, while elements in these spaces have type ModFrmAlgElt.
Verbose Output#
To see some information printed during computation about what the program is doing, use SetVerbose("AlgebraicModularForms",n), where n is \(0\) (silent, by default), \(1\) (prints concise information), \(2\) or \(3\) (which may display bulky data).