Victor Miller basis for higher $N$ // why is this bilinear form perfect? Hello.
I am trying to understand the proof of Thm 9.23 in
http://wstein.org/books/modform/modform/newforms.html#congruences-between-newforms
. Let $S_k(\Gamma)$ be the cusp forms for a subgroup $\Gamma_1(N)
\subseteq \Gamma \subseteq \Gamma_0(N)$. Let $\mathbb{T} :=
\mathbb{Z}[T_1, T_2, T_3, ...]$ be the hecke algebra viewed as a subset of
$End(S_k(\Gamma))$ (not as abstract double coset stuff!). Let $S_k(\Gamma,
\mathbb{Z}) := S_k(\Gamma) \cap \mathbb{Z}[[q]]$ then the author claims
that
$ \langle \cdot, \cdot \rangle : \mathbb{T} \times S_k(\Gamma, \mathbb{Z})
\mapsto \mathbb{Z},$
$\langle T, f \rangle = a_1(T(f))$
is a perfect bilinear form and because of finite-rank-arguments i already
know that it suffices to show that the $\mathbb{Z}$-module homomorphism
$T \mapsto  \langle T, \cdot \rangle \in Hom_\mathbb{Z}(S_k(\Gamma,
\mathbb{Z}), \mathbb{Z})$ is surjective but i am unable to understand why
this is the case. Only for $N=1$ i have found a workaround (see below).

This is what i have tried:
As was pointed out to me here
"Hecke algebra" finitely generated? ,
the set $S_k(\Gamma, \mathbb{Z})$ is a finitely generated free
$\mathbb{Z}$-module. Let us take a basis $S_k(\Gamma, \mathbb{Z}) =
\mathbb{Z}f_1 \oplus ... \oplus \mathbb{Z}f_n$. The
$Hom_\mathbb{Z}(S_k(\Gamma, \mathbb{Z})) = \mathbb{Z}\phi_1 \oplus ...
\oplus \mathbb{Z} \phi_n$ where $\phi_i(f_j) = \delta_{ij}$.
Let us assume that we select $\Gamma_0(N)$ with trivial character. Then,
the ring $\mathbb{T}$ is nothing else than the $\mathbb{Z}$-module
$\mathbb{T} = \mathbb{Z}T_1 + \mathbb{Z}T_2 + \mathbb{Z}T_3 + ...$
(because $T_{p^e} = T_p T_{p^{e-1}} - p^{k-1} T_1$ so that every
polynomial in the $T_m$ is actually a sum in the $T_m$). We want to show that there is a $T$ such that $\langle T, f_j \rangle = \phi_1(f_j) = \delta_{1j}$ so that we search
for a $\mathbb{Z}$ linear combination of the $T_m$ mapping to $\phi_1$, say $T = v_1 T_1 + ... + v_l T_l$. Then, $\langle T, f_j \rangle = \phi_1(f_j) = \delta_{1j}$ is equivalent to
$\begin{pmatrix} a_1(f_1) & \cdots & a_l(f_1) \\ \vdots & & \vdots \\ a_l(f_n)
& \cdots & a_l(f_n) \end{pmatrix} \cdot \begin{pmatrix} v_1 \\ \vdots \\ v_l
\end{pmatrix} = e_1$
Let us denote the matrix on the left hand side by $A$, then the question
is: is $A$ a surjective map seen as a map $A : \mathbb{Z}^l \mapsto
\mathbb{Z}^n$ (where we can select $l$ as big as we want)? Rephrased i ask for the following:

For a subgroup $\Gamma$ that satisfies some properties (i.e. $\Gamma$ a
congruence subgroup or so) is there a $\mathbb{C}$-basis $f_1, ..., f_n$ of $S_k(\Gamma)$ with fourier coefficients in $\mathbb{Z}$ such that the matrix $A$ becomes surjective
as a map from $\mathbb{Z}^l$ to $\mathbb{Z}^n$ (for example: when
selecting $n$ columns, does the matrix consisting of these columns satisfy
$\det(Matrix) = \pm 1$? I.e. is there something like a Victor Miller basis
for modular forms of higher level)?

For $\Gamma = SL_2(\mathbb{Z})$, this is easy, because one has a Miller
basis, i.e. a $\mathbb{C}$-basis $f_1, ..., f_n$ of
$S_k(SL_2(\mathbb{Z}))$ with integral fourier coefficients such that $a_i(f_j) = \delta_{ij}$ so that $A =
(Id ~~ ...)$. Note: if $f_1, ..., f_n$ are a $\mathbb{C}$-basis for $S_k(SL_2(\mathbb{Z}))$ with integral fourier coefficients then this does not necessarily imply that $f_1, ..., f_n$ form a $\mathbb{Z}$-basis for $S_k(\Gamma, \mathbb{Z})$ but this suffices to see that the Hecke algebra is finitely generated by the first $r$ Hecke operators since one can do the same argument with $\mathbb{Z}f_1 \oplus ... \oplus \mathbb{Z}f_n$ in place of $S_k(\Gamma, \mathbb{Z})$ since the behavior of an operator in $End(S_k(\Gamma))$ is determined by its actions on $f_1, ..., f_n$. 
Note that for $N > 1$ this seems to be true in "many" cases: For example, typing the following lines in magma
M := ModularForms(Gamma1(16),3);
Basis(CuspidalSubspace(M));

yields
[
q - 189*q^9 + 132*q^10 + O(q^12),
q^2 - 136*q^9 + 94*q^10 + O(q^12),
q^3 - 92*q^9 + 66*q^10 + O(q^12),
q^4 - 57*q^9 + 38*q^10 + O(q^12),
q^5 - 33*q^9 + 22*q^10 + O(q^12),
q^6 - 17*q^9 + 9*q^10 + O(q^12),
q^7 - 8*q^9 + 4*q^10 + O(q^12),
q^8 - 3*q^9 + O(q^12),
q^11 + O(q^12)
]

So here one would select columns 1,2,3,4,5,6,7,8,11.
Also note the following: Using the Sturm bound and selecting $l \geq \max(n,
\operatorname{SturmBound})$ one can show that the matrix $A$ has a full
$\mathbb{Q}$-rank, i.e. there are $v_1, ..., v_l \in \mathbb{Q}$
satisfying the above relation but can they be somehow found to be in
$\mathbb{Z}$?
Could someone help me out of this mess?
Best regards,
Fabian Werner
 A: You pose your questions for a general $\Gamma$, but I'm not sure that quite makes sense; in general the Hecke algebra won't be commutative and will have a very different structure, and $S_k(\Gamma, \mathbb{Z})$ won't necessarily span $S_k(\Gamma, \mathbb{C})$. So let's assume $\Gamma$ is $\Gamma_0(N)$ or $\Gamma_1(N)$ for some $N$.
Let $\mathcal{S} = S_k(\Gamma, \mathbb{Z})$ and $\mathcal{T} \subseteq End_{\mathbb{Z}}(\mathcal{S})$ the Hecke algebra. Then (as I think you know) it's not too hard to show that $\mathcal{T} \to Hom(\mathcal{S}, \mathbb{Z})$ and $\mathcal{S} \to Hom(\mathcal{T}, \mathbb{Z})$ are injections. This alone is enough to imply that the pairing is nondegenerate, hence becomes perfect after extending scalars to $\mathbb{Q}$.
So it suffices to show either that $\mathcal{T} \to Hom(\mathcal{S},\mathbb{Z})$ is surjective, or that $\mathcal{S} \to Hom(\mathcal{T},\mathbb{Z})$ is surjective (because the cokernels of these maps are finite groups of the same order, equal to the det of the matrix of the pairing with respect to $\mathbb{Z}$-bases of either side).
You seem to be trying to do the first, but the second is (I think) easier. Let $\phi \in Hom(\mathcal{T},\mathbb{Z})$ and consider the formal power series $f = \sum_{n \ge 1} \phi(T_n) q^n$. It's clear that $f \in \mathbb{Z}[[q]]$; but also that $f \in S_k(\Gamma, \mathbb{Q})$, so $f \in \mathcal{S}$. Clearly we have $(T_n, f) = a_n(f) = \phi(T_n)$ and thus we're done.
Now you can construct a "Miller-like" basis as follows. [EDIT: This doesn't actually work, see comments.] The $T_n$'s generate $\mathcal{T}$, so there is some finite subset which is a $\mathbb{Z}$-basis of $\mathcal{T}$; let these be $T_{n_1}, \dots, T_{n_d}$. Then there is a dual basis $f_1, \dots, f_d$ of $\mathcal{S}$ such that $(T_{n_i}, f_j) = \delta_{ij}$, and there are your Miller-like basis. (You can't necessarily take the $n_i$ to be $\{1, \dots, rk(\mathcal{S})\}$ though, as your example above shows.)
