What is the rank of the period lattice of modular forms? Let $f$ be a weight $2$ cusp form for the group $\Gamma_0(N)$. I was experimenting with integrals of the form
$$ \int_r^s f(z) \, dz$$
where $r, s \in \mathbf{P}^1(\mathbf{Q})$ and the integral above is over the geodesic in the upper-half plane connecting $r$ and $s$. When I plotted these period integrals, I noticed that the resulting values formed a rank $2$ lattice in $\mathbf{C}$. I have two questions about this:

*

*Why would the above period lattice have rank $2$? Since we are integrating $f(z) \, dz$ over paths in the relative homology group $H^1(X_0(N), \{\text{cusps}\}, \mathbf{Z})$, I would expect the rank of the period lattice to grow with the rank of this homology group. Why is the rank of the period lattice always $2$, even if the rank of the homology group is bigger?


*Inside the period lattice obtained from integrating over $H^1(X_0(N), \{\text{cusps}\}, \mathbf{Z})$, we can consider the sublattice from integrating over just the ordinary homology group $H^1(X_0(N), \mathbf{Z})$, omitting paths that are not closed loops in $X_0(N)$. (Equivalently, the sublattice is formed by only plotting $\int_r^s f(z) \, dz$ when  $r$ and $s$ are $\Gamma_0(N)$-equivalent.) What is the index of this sublattice inside the full period lattice? Can one answer this in general?
 A: My attempt.
$f$ is an eigenform with integer coefficients $\in S_2(\Gamma_0(N))$, otherwise it is usually not true that its periods form a lattice in $\Bbb{C}$. As $f=\sum_{d|N} c_d \tilde{f}(dz)$ for some newform of lower level, we can restrict to the case that $f$ is a newform.
Following Cremona, taking finitely many $\alpha\in \Bbb{Q}$ representing the finitely many cusps, for some prime $p\equiv 1\bmod N$ not dividing the numerator and denominator of any $\alpha$, $$(1+p-a_p(f))\int_\alpha^{i\infty} f(z)dz=\int_\alpha^{i\infty} (1+p-T_p)  f(z)dz$$ $$=\int_\alpha^{p\alpha} f(z)dz+\sum_{k=0}^{p-1} \int_\alpha^{(\alpha+k)/p} f(z)dz\tag{1}$$
$p\alpha$ and $(\alpha+k)/p$ are $\Gamma_0(N)$ equivalent to $\alpha$, whence the RHS is equal to a sum of integrals over closed-loops in $X_0(N)$.
From the convergence of the Rankin Selberg integral $\langle f E_2,f\rangle$ you'll get that $p+1-a_p(f)\ne 0$ for some $p\equiv 1\bmod N$ not dividing the numerator and denominator of the $\alpha$, obtaining that the subgroup of $\Bbb{C}$ generated by the $\int_\alpha^\beta f(z),\alpha,\beta\in \Bbb{Q}\cup i\infty$ is a lattice iff $\{\int_\gamma f(z),\gamma$ closed-loop in $X_0(N)\}$ is a lattice.
Then the theorem we need is that with $g=\dim_\Bbb{C} S_2(\Gamma_0(N))$ then $ \pi_1(X_0(N))^{ab}\cong \Bbb{Z}^{2g}$.
$S_2(\Gamma_0(N))$ has a $\Bbb{C}$-basis $f_1,\ldots,f_g$ of modular forms with integer coefficients. We choose it such that $f_1=f$. With $\gamma_1,\ldots,\gamma_{2g}$ a $\Bbb{Z}$-basis of $\pi_1(X_0(N))^{ab}$, and $\lambda_l=(\int_{\gamma_l} f_1(z)dz),\ldots,\int_{\gamma_l} f_g(z)dz))$, using that a harmonic function on $X_0(N)$ must be constant,you'll get that the columns of the $2g\times 2g$ matrix with rows $(\Re(\lambda_l),\Im(\lambda_l))$ are $\Bbb{R}$-linearly independent, whence so are its rows, so the $\lambda_l$ generate a lattice $\Lambda$ in $\Bbb{C}^g$.
Let $\Bbb{T}$ be the $\Bbb{Z}$-algebra generated by the Hecke operators. Using that $f_1$ is a newform we can take an element $P\in \Bbb{T}$ such that $Pf_j=0$ except for $Pf_1=cf_1\ne 0$.
Each $\int_\gamma Pf_j(z)dz$ is given by integrating $f_j$ on some curves from cusps to cusps, with the same $p$ as above and the second equality of $(1)$ you'll get that there is some $d$ such that for all closed-loop $\gamma$ in $X_0(N)$,
$$(\int_\gamma (1+p-T_p)Pf_1(z)dz,\ldots,\int_\gamma (1+p-T_p)Pf_g(z)dz) \in \frac1d\Lambda$$

This proves that for any $\lambda\in \Lambda$, $((1+p-a_p(f))c\lambda_1,0\ldots,0) \in \frac1d\Lambda$, and hence $\{ \int_\gamma f_1(z)dz, \gamma \in \pi_1(X_0(N))\}$ is a lattice in $\Bbb{C}$, from which the $\int_\alpha^\beta f_1(z)dz,\alpha,\beta\in \Bbb{Q}\cup i\infty$ generate a lattice in $\Bbb{C}$.

A: For Q1: I'm assuming your $f$ is a normalized Hecke newform of level $N$ with coefficients in $\mathbf{Z}$. Then the choice of $f$ determines a splitting of the homology as
$$H_1(X_0(N), \{cusps\}, \mathbf{Q}) = (f\text{-generalised eigenspace}) \oplus \text{(other stuff)}.$$
By the Eichler--Shimura isomorphism, we see that the $f$-generalized eigenspace is semisimple (i.e. it's a genuine eigenspace) and has dimension 2. When we integrate against $f$, it kills the "other stuff"; so the map $H_1(X_0(N), \{cusps\}, \mathbf{Z}) \to \mathbf{C}$ given by integration against $f$ factors through the image of $H_1(X_0(N), \{cusps\}, \mathbf{Z})$ in the $f$-eigenspace of $H_1(X_0(N), \{cusps\}, \mathbf{Q})$, and a little elementary linear algebra shows that this eigenspace quotient has to be free of rank 2.
So the image in $\mathbf{C}$ has rank at most 2. Since this lattice has non-trivial intersection with both $\mathbf{R}$ and $i \mathbf{R}$, its rank must be exactly 2.
For Q2, the comparison of lattices arising from "usual" and "relative" homology: one can show that the cokernel of the natural map from $H_1(X_0(N)) \to H_1(X_0(N), \{cusps\})$ is a free $\mathbf{Z}$-module of finite rank which is Eisenstein as a Hecke module, i.e. every Hecke eigenvalue system that shows up looks like an Eisenstein series (this is essentially the Manin--Drinfeld theorem). It follows that, for a given cuspidal eigenform $f$ as above, the only primes $p$ that can divide the index of the two period lattices are those such that $f$ is congruent mod $p$ to an Eisenstein series. If I remember correctly, you see this concretely with the unique weight 2 newform of level 11: it is congruent to an Eisenstein series mod 5, and the quotient between the two lattices is a cyclic group of order 5.
If you want to learn more, then you should read about modular symbols; the books by John Cremona and William Stein are both excellent references.
