---
title: "Associated Structures"
canonical: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/functions.html"
source: "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/functions.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": "Parametrized Structures", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/automorphisms.md"}
next: {"title": "Automorphisms", "source": "https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/automorphisms-2.md"}
intrinsics:
  - {"name": "FunctionField", "signature": "FunctionField(X): CrvMod -> FldFun"}
  - {"name": "jFunction", "signature": "jFunction(X): CrvMod -> FldFunElt"}
  - {"name": "BaseCurve", "signature": "BaseCurve(X): CrvMod -> CrvMod, MapSch"}
examples:
  - "ex-d78d4a"
---

# Associated Structures

<a id="function-functionfield-crvmod"></a>
## `FunctionField(X): CrvMod -> FldFun`

Returns the function field of the modular curve $X$.

<a id="function-jfunction-crvmod"></a>
## `jFunction(X): CrvMod -> FldFunElt`

Given a modular curve $X$ over a field, returns the $j$-invariant as a function on the curve.

<a id="function-basecurve-crvmod"></a>
## `BaseCurve(X): CrvMod -> CrvMod, MapSch`

Given one of the standard models $X$ for the modular curve $X_0(N)$, returns the base model curve $X(1)$ and the morphism $\pi: X_0(N) \rightarrow X(1)$.

<a id="example-ex-d78d4a"></a>
## `Example: Base Curve of a Modular Curve (ex-d78d4a)`

In this example we demonstrate the relation of a modular curve with its base curve $X(1)$.

```magma
> D := ModularCurveDatabase("Atkin");
> X0 := ModularCurve(D,17);
> X1, pi := BaseCurve(X0);
```

The discriminants $-4$, $-8$, $-16$, $-19$, $-43$, and $-67$ are the class number $1$ discriminants in which $17$ is a split prime. We use this to construct the corresponding moduli points on the curve $X_0(17)$ and map these back down to the curve $X(1)$. Refer to Section [Class Polynomials](https://docs.magma-maths.org/v2.30-1/ModularArithmeticGeometry/ModularCurves/attribute-3.md#crvmod-class-polys) for a description of the function `HilbertClassPolynomial`.

```magma
> discs := [ -4, -8, -16, -19, -43, -67 ];
> jinvs := [ Roots(HilbertClassPolynomial(D))[1][1] : D in discs ];
> jinvs;
[ 1728, 8000, 287496, -884736, -884736000, -147197952000 ]
> pnts := &cat[ ModuliPoints(X0, EllipticCurveFromjInvariant(j))
>               : j in jinvs ];
> pnts;
[ (-2, 1728), (-3, 8000), (-4, 287496), (-1, -884736), (2, -884736000),
(7, -147197952000) ]
> [ pi(P) : P in pnts ];
[ (1728, 1728), (8000, 8000), (287496, 287496), (-884736, -884736),
(-884736000, -884736000), (-147197952000, -147197952000) ]
```

We note that $X(1)$ is defined to be the classical modular curve, defined by the diagonal image of the $j$-line in ${\mathbb{P}}^2$.
