---
title: "Modular Curves and Quotients (Canonical Embeddings)"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/mod-crv-quotient.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/mod-crv-quotient.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": "Class Polynomials", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/attribute-3.md"}
next: {"title": "Modular Curves of Given Level and Genus", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/jim_mod_crvs.md"}
intrinsics:
  - {"name": "ModularCurveQuotient", "signature": "ModularCurveQuotient(N, A): RngIntElt, [RngIntElt] -> Crv"}
  - {"name": "X0NQuotient", "signature": "X0NQuotient(N, A): RngIntElt, [RngIntElt] -> Crv"}
  - {"name": "X0Nplus", "signature": "X0Nplus(N): RngIntElt -> Crv"}
  - {"name": "X0Nstar", "signature": "X0Nstar(N): RngIntElt -> Crv"}
  - {"name": "GenusX0N", "signature": "GenusX0N(N): RngIntElt -> RngIntElt"}
  - {"name": "GenusX1N", "signature": "GenusX1N(N): RngIntElt -> RngIntElt"}
  - {"name": "GenusX0NQuotient", "signature": "GenusX0NQuotient(N, As): RngIntElt, [RngIntElt] -> RngIntElt"}
  - {"name": "AtkinLehnerNumberOfFixedPoints", "signature": "AtkinLehnerNumberOfFixedPoints(N, A): RngIntElt, RngIntElt -> RngIntElt"}
examples:
  - "ex-5d6c55"
---

# Modular Curves and Quotients (Canonical Embeddings)

<a id="function-modularcurvequotient-rngintelt-rngintelt"></a>
## `ModularCurveQuotient(N, A): RngIntElt, [RngIntElt] -> Crv`

```magma
Raw   : BoolElt                    Default: false
Reduce: BoolElt                    Default: false
```

Given a level $N$ and a (possibly empty) set of Atkin-Lehner involutions represented as a sequence of integers $A$, this function computes a model for a quotient of $X_0(N)$ by $A$. When `Raw` is not set to `true`, an initial “semi-reduction” is not performed. If the `Reduce` option is `true`, then a complete `LLL`-reduction is performed on the resulting equations (this is impractical for genus greater than 50 or so). The returned curve can be: $P^1$ for a genus 0 curve, an elliptic or hyperelliptic curve, or the canonical embedding of the curve in $P^{g-1}$ where $g$ is the genus of the quotient curve (in this general case, the coordinates correspond to cusp forms invariant under the specified Atkin-Lehner involutions).

<a id="function-x0nquotient-rngintelt-rngintelt"></a>
## `X0NQuotient(N, A): RngIntElt, [RngIntElt] -> Crv`

```magma
Raw   : BoolElt                    Default: false
Reduce: BoolElt                    Default: false
```

The same as `ModularCurveQuotient`, and the name used in the example below.

<a id="function-x0nplus-rngintelt"></a>
## `X0Nplus(N): RngIntElt -> Crv`

The modular curve $X_0(N)^+$, the quotient of $X_0(N)$ by the Fricke involution $w_N$. This is `X0NQuotient(N, [N])`.

<a id="function-x0nstar-rngintelt"></a>
## `X0Nstar(N): RngIntElt -> Crv`

The modular curve $X_0(N)^*$, the quotient of $X_0(N)$ by the group generated by all of its Atkin-Lehner involutions. This is `X0NQuotient(N, A)` for `A` the sequence of prime powers $p^{v_p(N)}$ over the primes $p$ dividing $N$.

<a id="function-genusx0n-rngintelt"></a>
## `GenusX0N(N): RngIntElt -> RngIntElt`

The genus of $X_0(N)$, computed from the standard formula rather than by constructing the curve.

<a id="function-genusx1n-rngintelt"></a>
## `GenusX1N(N): RngIntElt -> RngIntElt`

The genus of $X_1(N)$, computed from the standard formula rather than by constructing the curve.

<a id="function-genusx0nquotient-rngintelt-rngintelt"></a>
## `GenusX0NQuotient(N, As): RngIntElt, [RngIntElt] -> RngIntElt`

The genus of the quotient of $X_0(N)$ by the group of automorphisms generated by the Atkin-Lehner involutions $w_A$ for $A$ in `As`, computed without constructing the quotient. Each $A$ must satisfy $A > 1$, $A \mid N$, and ${\rm GCD}(A, N/A) = 1$.

<a id="function-atkinlehnernumberoffixedpoints-rngintelt-rngintelt"></a>
## `AtkinLehnerNumberOfFixedPoints(N, A): RngIntElt, RngIntElt -> RngIntElt`

The number of fixed points of the Atkin-Lehner involution $w_A$ acting on $X_0(N)$. Both $N$ and $A$ must be greater than $1$, with $A \mid N$ and ${\rm GCD}(A, N/A) = 1$.

<a id="example-ex-5d6c55"></a>
## `Example: Quotient of X0(N) by Atkin-Lehner Involutions (ex-5d6c55)`

We compute a model for $X_0(13\cdot 29)$ quotiented by the Atkin-Lehner involutions $w_{13}$ and $w_{29}$.

```magma
> C := X0NQuotient(13*29,[13,29]); C; // defined by cubics in P^4
Curve over Rational Field defined by
-x[1]*x[2]^2 + x[1]*x[2]*x[3] - x[2]^2*x[3] + x[1]*x[2]*x[4] +
    x[2]^2*x[4] + x[2]*x[4]^2 + x[1]*x[2]*x[5],
x[1]*x[2]^2 - x[2]^3 - x[2]^2*x[3] + x[1]*x[2]*x[5] + x[2]^2*x[5] +
    x[2]*x[4]*x[5],
x[1]*x[2]*x[3] - x[2]^2*x[3] - x[2]*x[3]^2 + x[1]*x[3]*x[5] +
    x[2]*x[3]*x[5] + x[3]*x[4]*x[5],
x[1]*x[2]*x[5] - x[2]^2*x[5] - x[2]*x[3]*x[5] + x[1]*x[5]^2 +
    x[2]*x[5]^2 + x[4]*x[5]^2,
-x[1]^2*x[2] + x[1]*x[2]^2 + x[1]*x[2]*x[3] - x[1]^2*x[5] -
    x[1]*x[2]*x[5] - x[1]*x[4]*x[5],
x[1]*x[2]*x[3] + x[2]^2*x[4] + x[2]*x[3]*x[4] + x[2]*x[4]*x[5] +
    x[3]*x[4]*x[5] + x[2]*x[5]^2 + x[4]*x[5]^2,
x[1]*x[2]*x[3] + x[1]*x[2]*x[4] + x[1]*x[2]*x[5] - x[1]*x[3]*x[5] -
    x[3]^2*x[5] + x[1]*x[4]*x[5] - x[2]*x[4]*x[5] - x[3]*x[4]*x[5] +
    x[1]*x[5]^2 + x[3]*x[5]^2,
-x[1]*x[2]*x[4] + x[1]*x[3]*x[4] - x[2]*x[3]*x[4] + x[1]*x[4]^2 +
    x[2]*x[4]^2 + x[4]^3 + x[1]*x[4]*x[5],
-x[1]*x[2]*x[3] + x[1]*x[3]^2 - x[2]*x[3]^2 + x[1]*x[3]*x[4] +
    x[2]*x[3]*x[4] + x[3]*x[4]^2 + x[1]*x[3]*x[5],
-x[1]*x[2]*x[5] + x[1]*x[3]*x[5] - x[2]*x[3]*x[5] + x[1]*x[4]*x[5] +
    x[2]*x[4]*x[5] + x[4]^2*x[5] + x[1]*x[5]^2,
x[1]*x[2]*x[4] - x[2]^2*x[4] - x[2]*x[3]*x[4] + x[1]*x[2]*x[5] -
    x[1]*x[3]*x[5] + x[2]*x[3]*x[5] - x[1]*x[5]^2,
-x[1]^2*x[3] - x[1]*x[2]*x[3] + x[1]*x[3]^2 - x[2]*x[3]^2 -
    x[1]*x[2]*x[4] - x[3]^2*x[4] - x[2]*x[4]^2 + x[1]*x[3]*x[5] -
    x[2]*x[4]*x[5] - x[4]^2*x[5] - x[1]*x[5]^2,
-x[1]^2*x[2] + x[1]*x[2]^2 + x[2]^2*x[3] + x[1]^2*x[4] -
    x[1]*x[3]*x[4] + x[2]*x[3]*x[4] + x[3]*x[4]^2 + x[1]^2*x[5] -
    x[1]*x[3]*x[5] - x[3]^2*x[5] - x[1]*x[4]*x[5] - x[3]*x[4]*x[5] +
    x[2]*x[5]^2 + x[3]*x[5]^2 + x[4]*x[5]^2,
-x[1]^2*x[2] + x[1]^2*x[3] - x[1]*x[2]*x[3] + x[1]^2*x[4] +
    x[1]*x[2]*x[4] + x[1]*x[4]^2 + x[1]^2*x[5],
x[1]^2*x[2] + x[1]^2*x[3] - x[1]*x[2]*x[3] + x[2]^2*x[3] - x[1]*x[3]^2
    - x[3]^3 - x[1]*x[2]*x[4] + x[1]*x[3]*x[4] - x[2]*x[3]*x[4] -
    x[3]^2*x[4] + x[1]^2*x[5] + x[1]*x[3]*x[5] - x[2]*x[3]*x[5] +
    x[3]^2*x[5] - x[3]*x[4]*x[5] + x[1]*x[5]^2
> Genus(C);
5
```
