---
title: "Predicates"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/predicates.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/predicates.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": "Arithmetic", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/arithmetic.md"}
next: {"title": "Properties", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/properties.md"}
intrinsics:
  - {"name": "IsAmbientSpace", "signature": "IsAmbientSpace(M): ModFrm -> BoolElt"}
  - {"name": "IsCuspidal", "signature": "IsCuspidal(M): ModFrm -> BoolElt"}
  - {"name": "IsEisenstein", "signature": "IsEisenstein(M): ModFrm -> BoolElt"}
  - {"name": "IsEisensteinSeries", "signature": "IsEisensteinSeries(f): ModFrmElt -> BoolElt"}
  - {"name": "IsGamma0", "signature": "IsGamma0(M): ModFrm -> BoolElt"}
  - {"name": "IsGamma1", "signature": "IsGamma1(M): ModFrm -> BoolElt"}
  - {"name": "IsNew", "signature": "IsNew(M): ModFrm -> BoolElt"}
  - {"name": "IsNewform", "signature": "IsNewform(f): ModFrmElt -> BoolElt"}
  - {"name": "IsRingOfAllModularForms", "signature": "IsRingOfAllModularForms(M): ModFrm -> BoolElt"}
examples:
  - "ex-830f17"
---

# Predicates

<a id="function-isambientspace-modfrm"></a>
## `IsAmbientSpace(M): ModFrm -> BoolElt`

Returns `true` if and only if $M$ is an ambient space. Ambient spaces are those space constructed in Section [Ambient Spaces](https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/creation.md#sec-ambient-spaces).

<a id="function-iscuspidal-modfrm"></a>
## `IsCuspidal(M): ModFrm -> BoolElt`

Returns `true` if $M$ is contained in the cuspidal subspace of the ambient space.

<a id="function-iseisenstein-modfrm"></a>
## `IsEisenstein(M): ModFrm -> BoolElt`

Returns `true` if $M$ is contained in the Eisenstein subspace of the ambient space.

<a id="function-iseisensteinseries-modfrmelt"></a>
## `IsEisensteinSeries(f): ModFrmElt -> BoolElt`

Returns `true` if $f$ is an Eisenstein newform or was computed using the intrinsic `EisensteinSeries`. (See Section [Eisenstein Series](https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularForms/eisenstein-series.md#sec-eisenstein).)

<a id="function-isgamma0-modfrm"></a>
## `IsGamma0(M): ModFrm -> BoolElt`

Returns `true` if $M$ is a space of modular forms for $\Gamma_0(N)$.

<a id="function-isgamma1-modfrm"></a>
## `IsGamma1(M): ModFrm -> BoolElt`

Returns `true` if $M$ was created explicitly as a space of modular forms for $\Gamma_1(N)$, or if the `AmbientSpace` of $M$ is such a space. (Note that `IsGamma1` will return `false` for any space `ModularForms(chars,k)`, even if `chars` consists of all mod $N$ Dirichlet characters.)

<a id="function-isnew-modfrm"></a>
## `IsNew(M): ModFrm -> BoolElt`

Returns `true` if $M$ is contained in the new subspace of its `AmbientSpace`.

<a id="function-isnewform-modfrmelt"></a>
## `IsNewform(f): ModFrmElt -> BoolElt`

Returns `true` if $f$ was created using `Newforms`. (Sometimes `true` in other cases in which $f$ is obviously a newform. In number theory, “newform” means “normalized eigenform that lies in the new subspace”.)

<a id="function-isringofallmodularforms-modfrm"></a>
## `IsRingOfAllModularForms(M): ModFrm -> BoolElt`

Returns `true` if and only if $M$ is the ring of all modular forms over a given ring.

<a id="example-ex-830f17"></a>
## `Example: Predicates for Modular Forms (ex-830f17)`

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

```magma
> M := ModularForms(Gamma1(11),3);
> f := Newform(M,1);
> IsAmbientSpace(M);
true
> IsAmbientSpace(CuspidalSubspace(M));
false
> IsCuspidal(M);
false
> IsCuspidal(CuspidalSubspace(M));
true
> IsEisenstein(CuspidalSubspace(M));
false
> IsEisenstein(EisensteinSubspace(M));
true
> IsGamma1(M);
true
> IsNew(M);
true
> IsNewform(M.1);
false
> IsNewform(f);
true
> IsRingOfAllModularForms(M);
false
> Level(f);
11
> Level(M);
11
> Weight(f);
3
> Weight(M);
3
> Weight(M.1);
3
```
