Function: mslattice
Section: modular_symbols
C-Name: mslattice
Prototype: GDG
Help: mslattice(M, {H}): M being a full modular symbol space,
 as given by msinit, H a Q-subspace or a matrix of modular symbols.
 Return the canonical integral structure of H.
Doc: Let $\Delta:=\text{Div}^0(\P^1(\Q))$ and $V_k = \Q[x,y]_{k-2}$.
 Let $M$ be a full modular symbol space, as given by \kbd{msinit}
 and let $H$ be a subspace, e.g. as given by \kbd{mscuspidal}.
 This function returns a canonical $\Z$
 structure on $H$ defined as follows.
 Consider the map $c: M=\Hom_{\Gamma_0(N)}(\Delta, V_k) \to
 H^1(\Gamma_0(N), V_k)$ given by
 $\phi \mapsto \var{class}(\gamma \to \phi(\{0, \gamma^{-1} 0\}))$.
 Let $L_k=\Z[x,y]_{k-2}$ be the natural $\Z$-structure of $V_k$. The result of
 \kbd{mslattice} is a $\Z$-basis of the inverse image by $c$ of
 $H^1(\Gamma_0(N), L_k)$ in the space of modular symbols generated by $H$.

 For user convenience, $H$ can be defined by a matrix representing the
 $\Q$-basis of $H$ (in terms of the canonical $\Q$-basis of $M$ fixed by
 \kbd{msinit} and used to represent modular symbols).

 If omitted, $H$ is the cuspidal part of $M$ as given by \kbd{mscuspidal}.
 The Eisenstein part $\Hom_{\Gamma_0(N)}(\text{Div}(\P^1(\Q)), V_k)$ is in
 the kernel of $c$, so the result has no meaning for the Eisenstein part
 \kbd{H}.

 \bprog
 ? M=msinit(11,2);
 ? [S,E] = mscuspidal(M,1); S[1] \\ a primitive Q-basis of S
 %2 =
 [ 1  1]
 [-5  0]
 [ 0 -5]
 ? mslattice(M,S)
 %3 =
 [-1/5 -1/5]
 [   1    0]
 [   0    1]
 ? mslattice(M,E)
 %4 =
 [1]
 [0]
 [0]
 ? M=msinit(5,4);
 ? S=mscuspidal(M); S[1]
 %6 =
 [  7  20]
 [  3   3]
 [-10 -23]
 [-30 -30]
 ? mslattice(M,S)
 %7 =
 [-1/10 -11/130]
 [    0  -1/130]
 [ 1/10    6/65]
 [    0    1/13]
 @eprog
