---
title: "Invariants"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/attribute.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/attribute.md"
part: "Modular Arithmetic Geometry"
chapter: "Modular Curves"
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 Curves", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/index-modular-curves.md"}
prev: {"title": "Creation Functions", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/creation.md"}
next: {"title": "Modular Polynomial Databases", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/attribute-2.md"}
intrinsics:
  - {"name": "Level", "signature": "Level(X): CrvMod -> RngIntElt"}
  - {"name": "Genus", "signature": "Genus(X): CrvMod -> RngIntElt"}
  - {"name": "ModelType", "signature": "ModelType(X): CrvMod -> MonStgElt"}
  - {"name": "Indices", "signature": "Indices(X): CrvMod -> SeqEnum"}
---

# Invariants

The defining data and invariants of the curves are accessed through standard functions.

<a id="function-level-crvmod"></a>
## `Level(X): CrvMod -> RngIntElt`

Returns the level of the modular curve $X$ as an integer.

<a id="function-genus-crvmod"></a>
## `Genus(X): CrvMod -> RngIntElt`

Returns the genus of the modular curve $X$ .

<a id="function-modeltype-crvmod"></a>
## `ModelType(X): CrvMod -> MonStgElt`

Returns the type of the model for the modular curve $X$, presently limited to “Atkin”, “Canonical”, or “Classical”. This is used to determine the algorithm by which parameterized isogenies are determined.

<a id="function-indices-crvmod"></a>
## `Indices(X): CrvMod -> SeqEnum`

Returns a sequence of integers, of the form $[N,M,P]$, classifying the class of the modular curve $X$. The integer sequence defines a congruence subgroup of ${\operatorname{PSL}}_2({\mathbb{Z}})$ defined by

$$
\Gamma(N,M,P) =
       \left\{
           \left.\left({a\ b\atop c\ d}\right)\ \right\vert
               \ c \equiv 0 \bmod N,
               \ b \equiv 0 \bmod P,
               \ a \equiv 1 \bmod M
       \ \right\},
$$

where $M$ divides ${\rm LCM}(N,P)$. For the models presently available, this will be the sequence $[N,1,1]$, where is the level of $X = X_0(N)$.
