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 OO(Λ) are allowed, where Λ 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.

Contents

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 G is a reductive group defined over Q, such that Gad(R) is compact, and G = G(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 [Gro99] and by Greenberg and Voight [GV14] are good references for standard material on algebraic modular forms.

Let G be a reductive group over Q such that G(R) is compact modulo its center. A defi{weight} is a representation ρ : G(Q) to GL(W) with W a finite-dimensional Q-vector space. Define widehat(Z) = ∏p' Zp, and Af = ∏p' Qp (restricted products with respect to the local subgroups Zp, i.e. the ad{èles of Q). A defi{level} is a compact open subgroup Khat ⊂G(Af). The space of defi{algebraic modular forms (on G) of weight W and level Khat} is

M(Khat, W) := {φ: G(Af) -> W : matrix( φ(γ ghat widehat(k)) = ρ(γ) .φ(ghat) for all
(γ, ghat, widehat(k))∈G(Q) x G(Af) x Khat) }.

An element f ∈M(Khat, W) is determined by its values on a set of representatives for the defi{class set} of level Khat

Cls(Khat) := G(Q)\ G(Af)/Khat.

The class set is finite, and choosing representatives {xhat1, ..., xhath} defines an isomorphism

eqalign( Φ: M(Khat, W) &buildrel(~) /(to) bigoplusi=1h WΓi
φ &longmapsto (φ(xhati))
)

where each Γi := G(Q)∩xhati Khat xhati - 1 is a finite group and WΓi is the subspace of Γi-invariants. In particular, when W=Q is trivial the space M(Khat, W) is simply the Q-vector space of functions Cls(Khat) -> Q. An immediate consequence of the above isomorphism is that the space M(Khat, W) is a finite-dimensional Q-vector space.

For each alphahat ∈G(Af) there is a natural defi{Hecke operator} Talphahat acting on the space M(Khat, W) as follows: decompose Khat alphahat Khat = bigsqcupi alphahati Khat into (finitely many) left cosets, and then define (Talphahat φ)(ghat) := ∑i φ(ghat alphahati). The space M(Khat, 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 ν : G to C induces a map nuhat * : M(nuhat(Khat), W) to M(Khat, W) defined by widehat(ν) * φ(ghat) = φ(nuhat(ghat)). We denote its image by E(Khat, W) = nuhat * (M(nuhat(Khat), W)), and call it the defi{Eisenstein subspace} of M(Khat, W).

The space M(Khat, W) carries an inner product, defined in [Gro99]. This inner product induces a decomposition M(Khat, W) = E(Khat, W) direct-sum S(Khat, W), where the defi{cuspidal subspace} S(Khat, 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 = OO(V) is the orthogonal group of a totally positive definite quadratic space.
(ii)
G = SO(V) is the special orthogonal group of a totally positive definite quadratic space.
(iii)
G = UU(V) is the unitary group of a totally positive definite hermitian space.

An exposition of the algorithm is given in [GV14], in addition to the subsequent improvements described in [RT20], [AFI+22] and [ALR+24].

Orthogonal Modular Forms

We elaborate on the special case where 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 Λ⊂V be a ZF-lattice in V, namely a finitely-generated projective ZF-module such that F .Λ = V.

The defi{orthogonal group} OO(V) of V is the group of F-linear automorphisms of V that preserve the quadratic form, the defi{isometries} of V; the orthogonal group OO(Λ) of Λ is the subgroup of OO(V) that stabilizes Λ. If Λ'=γ(Λ) for γ ∈OO(V), we say Λ is defi{isometric} to Λ' and we write simply Λ simeq Λ'.

If F is a number field and frakp is a prime ideal of ZF, denote by Ffrakp and ZF, frakp the completions of F and ZF at frakp, respectively. Let Λfrakp := Λ tensor ZF, frakp ⊂Vp := V tensor F Ffrakp.

The defi{genus} of Λ is the set of lattices

Gen(Λ) := {Λ' ⊂V : Λfrakp' simeq Λfrakp for all prime ideals frakp in ZF},

i.e., the set of lattices which become isometric to Λ in each completion.

The orthogonal group OO(V) acts on the genus Gen(Λ), and we define the defi{class set} to be the set of global isometry classes

Cls(Λ) := OO(V)\ Gen(Λ).

Assume F is totally real and V is totally positive definite. Then G = OO(V) is compact, and we can describe the space of algebraic modular forms for G of level Khat = OO(widehat(Λ)), where widehat(Λ) := ∏frakp Λfrakp. Since Cls(Λ) is finite, we can write Cls(Λ) = {[Λ1], ..., [Λh]} with Λ=Λ1. Given a finite-dimensional representation ρ : OO(V) to GL(W), the space of orthogonal modular forms M(Λ, W) of defi{level} Λ and defi{weight} W is the space of functions on Cls(Λ) with values in W, equivariant with respect to the orthogonal group, with

M(Λ, W) simeq bigoplusi=1h WOO(Λi).

Unitary Modular Forms

We elaborate on the special case where 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 Λ⊂V be a ZK-lattice in V, namely a finitely-generated projective ZK-module such that K .Λ = V.

The defi{unitary group} UU(V) of V is the group of K-linear automorphisms of V that preserve the hermitian form, the defi{isometries} of V; the unitary group UU(Λ) of Λ is the subgroup of UU(V) that stabilizes Λ. If Λ'=γ(Λ) for γ ∈UU(V), we say Λ is defi{isometric} to Λ' and we write simply Λ simeq Λ'.

If F is a number field and frakp is a prime ideal of ZF, denote by Ffrakp and ZF, frakp the completions of F and ZF at frakp, respectively. Let Λfrakp := Λ tensor ZK, frakp ⊂Vp := V tensor K Kfrakp.

The defi{genus} of Λ is the set of lattices

Gen(Λ) := {Λ' ⊂V : Λfrakp' simeq Λfrakp for all prime ideals frakp in ZF},

i.e., the set of lattices which become isometric to Λ in each completion.

The unitary group UU(V) acts on the genus Gen(Λ), and we define the defi{class set} to be the set of global isometry classes

Cls(Λ) := UU(V)\ Gen(Λ).

Assume F is totally real and V is totally positive definite. Then G = UU(V) is compact, and we can describe the space of algebraic modular forms for G of level Khat = UU(widehat(Λ)), where widehat(Λ) := ∏frakp Λfrakp. Since Cls(Λ) is finite, we can write Cls(Λ) = {[Λ1], ..., [Λh]} with Λ=Λ1. Given a finite-dimensional representation ρ : UU(V) to GL(W), the space of orthogonal modular forms M(Λ, W) of defi{level} Λ and defi{weight} W is the space of functions on Cls(Λ) with values in W, equivariant with respect to the unitary group, with

M(Λ, W) simeq bigoplusi=1h WUU(Λi).

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).

V2.29, 28 November 2025