---
title: "Properties"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/properties.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/properties.md"
part: "Modular Arithmetic Geometry"
chapter: "Modular Forms"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Modular Arithmetic Geometry", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/index-modular-arithmetic-geometry.md"}
  - {"title": "Modular Forms", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/index-modular-forms.md"}
prev: {"title": "Predicates", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/predicates.md"}
next: {"title": "Subspaces", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/subspaces.md"}
intrinsics:
  - {"name": "AmbientSpace", "signature": "AmbientSpace(M): ModFrm -> ModFrm"}
  - {"name": "BaseRing", "signature": "BaseRing(M): ModFrm -> Rng"}
  - {"name": "CoefficientRing", "signature": "CoefficientRing(M): ModFrm -> Rng"}
  - {"name": "Degree", "signature": "Degree(f): ModFrmElt -> RngIntElt"}
  - {"name": "Dimension", "signature": "Dimension(M): ModFrm -> RngIntElt"}
  - {"name": "DimensionByFormula", "signature": "DimensionByFormula(M): ModFrm -> RngIntElt"}
  - {"name": "DimensionByFormula", "signature": "DimensionByFormula(N, k): RngIntElt, FldRatElt -> RngIntElt"}
  - {"name": "DimensionByFormula", "signature": "DimensionByFormula(chi, k): GrpDrchElt, FldRatElt -> RngIntElt"}
  - {"name": "DimensionByFormula", "signature": "DimensionByFormula(N, chi, k): RngIntElt, GrpDrchElt, FldRatElt -> RngIntElt"}
  - {"name": "DirichletCharacters", "signature": "DirichletCharacters(M): ModFrm -> [GrpDrchElt]"}
  - {"name": "DirichletCharacter", "signature": "DirichletCharacter(f): ModFrmElt -> GrpDrchElt"}
  - {"name": "Eltseq", "signature": "Eltseq(f): ModFrmElt -> SeqEnum"}
  - {"name": "Level", "signature": "Level(f): ModFrmElt -> RngIntElt"}
  - {"name": "Level", "signature": "Level(M): ModFrm -> RngIntElt"}
  - {"name": "Weight", "signature": "Weight(f): ModFrmElt -> RngIntElt"}
  - {"name": "Weight", "signature": "Weight(M): ModFrm -> RngIntElt"}
  - {"name": "WeightOneHalfData", "signature": "WeightOneHalfData(H): ModFrm -> List"}
examples:
  - "ex-296bdb"
---

# Properties

<a id="function-ambientspace-modfrm"></a>
## `AmbientSpace(M): ModFrm -> ModFrm`

The full space of modular forms, in which the given space had been created as a subspace.

<a id="function-basering-modfrm"></a>
## `BaseRing(M): ModFrm -> Rng`

<a id="function-coefficientring-modfrm"></a>
## `CoefficientRing(M): ModFrm -> Rng`

The ring over which the given space of modular forms was defined.

<a id="function-degree-modfrmelt"></a>
## `Degree(f): ModFrmElt -> RngIntElt`

The number of Galois-conjugates of the modular form $f$ over the prime subfield of (the fraction field of) the base ring of $f$.

<a id="function-dimension-modfrm"></a>
## `Dimension(M): ModFrm -> RngIntElt`

The dimension of the space $M$ of modular forms or half-integral weight forms.

For spaces defined using the `ModularForms` constructors, the procedure used to obtain the dimension is to count the relevant Eisenstein series, and apply a formula giving the dimension of the relevant space of cusp forms.

<a id="function-dimensionbyformula-modfrm"></a>
## `DimensionByFormula(M): ModFrm -> RngIntElt`

The dimension of the given space of modular forms or half-integral weight forms (which must be either a full space or the cuspidal subspace of a full space), as given by the formulas in the paper by Cohen and Oesterle (in ‘Modular Forms in One Variable, VI’, Lecture Notes in Math. 627).

<a id="function-dimensionbyformula-rngintelt-fldratelt"></a>
## `DimensionByFormula(N, k): RngIntElt, FldRatElt -> RngIntElt`

<a id="function-dimensionbyformula-grpdrchelt-fldratelt"></a>
## `DimensionByFormula(chi, k): GrpDrchElt, FldRatElt -> RngIntElt`

<a id="function-dimensionbyformula-rngintelt-grpdrchelt-fldratelt"></a>
## `DimensionByFormula(N, chi, k): RngIntElt, GrpDrchElt, FldRatElt -> RngIntElt`

```magma
Cuspidal: BoolElt                    Default: false
```

The dimension of the full space of the modular forms or half-integral weight forms with level $N$, character chi (taken to be trivial if not specified) and weight $k$, as given by the formulas in the paper by Cohen and Oesterle (in ‘Modular Forms in One Variable, VI’, Lecture Notes in Math. 627).

If `Cuspidal` is set to `true`, then the dimension of the space of cusp forms is returned.

<a id="function-dirichletcharacters-modfrm"></a>
## `DirichletCharacters(M): ModFrm -> [GrpDrchElt]`

A sequence containing exactly one representative from each Galois-conjugacy class of Dirichlet characters associated to the space of modular forms $M$.

<a id="function-dirichletcharacter-modfrmelt"></a>
## `DirichletCharacter(f): ModFrmElt -> GrpDrchElt`

Suppose $f$ is a newform, created using the `Newform` command. This returns a Dirichlet character that is, up to Galois conjugacy, the Nebentypus character of f.

<a id="function-eltseq-modfrmelt"></a>
## `Eltseq(f): ModFrmElt -> SeqEnum`

The sequence $[a_1,\ldots,a_n]$ such that $f = a_1 g_1 + \cdots + a_n g_n$, where $g_1, \ldots, g_n$ is the basis of the parent of the modular form $f$.

<a id="function-level-modfrmelt"></a>
## `Level(f): ModFrmElt -> RngIntElt`

The level of the modular form $f$.

<a id="function-level-modfrm"></a>
## `Level(M): ModFrm -> RngIntElt`

The level of the space of modular forms $M$.

<a id="function-weight-modfrmelt"></a>
## `Weight(f): ModFrmElt -> RngIntElt`

The weight of the modular form $f$, if it is defined.

<a id="function-weight-modfrm"></a>
## `Weight(M): ModFrm -> RngIntElt`

The weight of the space $M$ of modular forms.

<a id="function-weightonehalfdata-modfrm"></a>
## `WeightOneHalfData(H): ModFrm -> List`

A list of tuples describing a basis of the given space of forms of weight 1/2. Each tuple is a pair $<f, t>$, where $t$ is an integer and $f$ is a Dirichlet character. The tuple $<f, t>$ designates the sum over all integers $n$ of $f(n) q^{(tn^2)}$.

<a id="example-ex-296bdb"></a>
## `Example: Properties of Modular Forms (ex-296bdb)`

We illustrate each of the above properties with some simple computations in $M_3(\Gamma_1(11))$.

```magma
> M := ModularForms(Gamma1(11),3);
> Degree(M.1);
1
> f := Newform(M,1);
> Degree(f);
4
> Dimension(M);
15
> DirichletCharacters(M);
[
    1,
    $.1,
    $.1^2,
    $.1^5
]
> Level(f);
11
> Level(M);
11
> Weight(f);
3
> Weight(M);
3
> Weight(M.1);
3
```
