# Bases

## `Basis(M): ModSym -> SeqEnum`

Basis for the space of modular symbols $M$.

## `IntegralBasis(M): ModSym -> SeqEnum`

First suppose that the space of modular symbols $M$ equals `AmbientSpace(M)`. Then this intrinsic returns a basis $x_1, \ldots, x_n$ for $M$ such that ${\mathbb{Z}}x_1 + \cdots + {\mathbb{Z}}x_n$ is the ${\mathbb{Z}}$-submodule of $M$ generated by all modular symbols $X^i\cdot Y^{k-2-i}\{\alpha,\beta\}$ with $i=0,\ldots,k-2$ and $\alpha,\beta\in \bf P^1({\mathbb{Q}})$. If $M$ is not `AmbientSpace(M)`, then this intrinsic returns a ${\mathbb{Z}}$-basis for $M \cap ({\mathbb{Z}}x_1 + \cdots  + {\mathbb{Z}}x_n),$ where $x_1, \ldots, x_n$ is an integral basis for `AmbientSpace(M)`. The base field of $M$ must be ${\mathbb{Q}}$.

## `Example: Integral Basis (ex-e6fd22)`

```magma
> M := ModularSymbols(1,12);
> Basis(M);
[
    X^10*{0, oo},
    X^8*Y^2*{0, oo},
    X^9*Y*{0, oo}
]
> IntegralBasis(M);
[
    1/48*X^9*Y*{0, oo},
    1/14*X^8*Y^2*{0, oo},
    X^10*{0, oo}
]

```

`IntegralBasis(M)` is a basis for the ${\mathbb{Z}}$-module spanned by the following symbols:

```magma
> R<X,Y> := PolynomialRing(Rationals(),2);
> [M!<X^i*Y^(10-i),[Cusps()|0,Infinity()]> : i in [0..10]];
[
    -X^10*{0, oo},
    X^9*Y*{0, oo},
    -X^8*Y^2*{0, oo},
    -25/48*X^9*Y*{0, oo},
    9/14*X^8*Y^2*{0, oo},
    5/12*X^9*Y*{0, oo},
    -9/14*X^8*Y^2*{0, oo},
    -25/48*X^9*Y*{0, oo},
    X^8*Y^2*{0, oo},
    X^9*Y*{0, oo},
    X^10*{0, oo}
]

```

We can also compute an integral basis of a subspace.

```magma
> C := CuspidalSubspace(M);
> IntegralBasis(C);
[
    1/48*X^9*Y*{0, oo},
    1/14*X^8*Y^2*{0, oo}
]

```

In Remark 3 on page 69 of [[Merel, 1994](../../references.md#cite-merel1585)], Merel says “it would be interesting to find a basis in terms of Manin symbols” for the ${\mathbb{Z}}$-module of Eisenstein symbols (see Section [Subspaces](subspaces.md#subspaces) for the definition of `EisensteinSubspace`). Here are the first few examples in the case of level $1$:

```magma
> M := ModularSymbols(1,12);
> E := EisensteinSubspace(M);
> IntegralBasis(E);
[
    691*X^10*{0, oo} + 1620*X^8*Y^2*{0, oo}
]
> ManinSymbol(IntegralBasis(E)[1]);
[
    <691*X^10, (0 1)>,
    <1620*X^8*Y^2, (0 1)>
]

```

To more easily compute several examples, we define a function:

```magma
> function EisZ(k)
>    E := EisensteinSubspace(ModularSymbols(1,k));
>    B := IntegralBasis(E);
>    return [ManinSymbol(z) : z in B];
> end function;
> EisZ(12);
[
    [
        <691*X^10, (0 1)>,
        <1620*X^8*Y^2, (0 1)>
    ]
]
> EisZ(16);
[
    [
        <16380*X^12*Y^2, (0 1)>,
        <3617*X^14, (0 1)>
    ]
]
> EisZ(18);
[
    [
        <43867*X^16, (0 1)>,
        <270000*X^14*Y^2, (0 1)>
    ]
]
> EisZ(20);
[
    [
        <174611*X^18, (0 1)>,
        <1349460*X^16*Y^2, (0 1)>
    ]
]
> EisZ(22);
[
    [
        <748125*X^18*Y^2, (0 1)>,
        <77683*X^20, (0 1)>
    ]
]

```

Send me an email if you determine the basis in general. In each example above the coefficient of $X^{k-2}$ is, up to sign, `Numerator(Bernoulli(k)/k)`.
