# Associated Structures

## `FunctionField(X): CrvMod -> FldFun`

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

## `jFunction(X): CrvMod -> FldFunElt`

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

## `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)$.

## `Example: Modular base 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](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$.
