︠edaf3607-40cc-4a19-b2e2-cd24f5aab7c4i︠ %html

Computer Methods for Classical Modular Forms

Sage Days 20.25 talk (March 23, 2010)

William Stein, University of Washington

(see http://8tb.us/home/boothby/cover/samples/ for more)

Project: Include code in Sage for computing pictures as above for any modular form.

︡eec186bd-9aa2-4509-83c4-ed7435942685︡{"html": "

Computer Methods for Classical Modular Forms

\r\n

Sage Days 20.25 talk (March 23, 2010)

\r\n

William Stein, University of Washington

\r\n

\"\"

\r\n

(see http://8tb.us/home/boothby/cover/samples/ for more)

\r\n\r\n

Project: Include code in Sage for computing pictures as above for any modular form.

"}︡ ︠765ed1c2-6045-4d0f-a093-bdacab323207i︠ %html

This talk is mainly about approaches to solving the following:

      PROBLEM:

               Compute the Hecke module $M_k(N,\varepsilon)$ for $k\geq 2$ an
               integer, and $\varepsilon:(\ZZ/N\ZZ)^* \to \CC^*$ a Dirichlet
               character.

(We are also interested in $M_k(\Gamma_H(N))$, and many other related spaces,
but will focus this talk mostly on the above problem.)



Practical Complexity: For this talk, I mostly only care about "practical complexity", so
constants and real-world implementations matter a lot.  Thus on
practical problems, an exponential time algorithm that completes in
100 hours is far more "practical" than a polynomial time algorithm that would
take years to finish (... implementing).

 

︡e14879b1-8c54-45a7-afab-f604c0e7d943︡{"html": "

This talk is mainly about approaches to solving the following:

\r\n

      PROBLEM:

\r\n

               Compute the Hecke module $M_k(N,\\varepsilon)$ for $k\\geq 2$ an
               integer, and $\\varepsilon:(\\ZZ/N\\ZZ)^* \\to \\CC^*$ a Dirichlet
               character.

\r\n

(We are also interested in $M_k(\\Gamma_H(N))$, and many other related spaces,
but will focus this talk mostly on the above problem.)

\r\n



Practical Complexity: For this talk, I mostly only care about \"practical complexity\", so
constants and real-world implementations matter a lot.  Thus on
practical problems, an exponential time algorithm that completes in
100 hours is far more \"practical\" than a polynomial time algorithm that would
take years to finish (... implementing).

\r\n

 

"}︡ ︠209e3f25-7a89-4fcc-ae14-1e56169a87abi︠ %html

Acknowledgement: "Practical" also means open -- you get to look at the code, can change anything, etc.  Everything I'll show you in this talk today is open source and freely available in any recent copy of Sage... thanks to the hard work of:

︡8437bd8c-0f17-4236-ae99-5b2a299cad34︡{"html": "

Acknowledgement: \"Practical\" also means open -- you get to look at the code, can change anything, etc.  Everything I'll show you in this talk today is open source and freely available in any recent copy of Sage... thanks to the hard work of:

\r\n"}︡ ︠204e0e39-ce44-4f84-94bc-91396e39b4cei︠ %html

Notation for Dirichlet characters:  We represent a character by giving the images of "canonical" generators for $(\ZZ/N\ZZ)^*$, which are minimal at each cyclic prime power factor.

︡31f47dba-43d7-46a8-aa96-b8702d919284︡{"html": "

Notation for Dirichlet characters:  We represent a character by giving the images of \"canonical\" generators for $(\\ZZ/N\\ZZ)^*$, which are minimal at each cyclic prime power factor.

"}︡ ︠adda4d0d-4609-424f-bde7-6f17f558894f︠ G = DirichletGroup(4*5) G.unit_gens() ︡53fa7a71-e053-43f0-887f-ed65a2447974︡{"stdout": "[11, 17]"}︡ ︠4e1e7f83-a0f9-4032-8b6d-847571386698︠ show(list(G)) ︡4250cf07-c06d-4126-a878-de091f2500a6︡{"html": "
\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\left[\\left[1, 1\\right], \\left[-1, 1\\right], \\left[1, \\zeta_{4}\\right], \\left[-1, \\zeta_{4}\\right], \\left[1, -1\\right], \\left[-1, -1\\right], \\left[1, -\\zeta_{4}\\right], \\left[-1, -\\zeta_{4}\\right]\\right]
"}︡ ︠c6202dc5-8d16-40c4-ab8a-48a162772bf6i︠ %html

The Dimension

  1. Dimension formula for any $N,k, \varepsilon$, with $k\geq 2$.   Proofs start with Riemann-Hurwitz and get complicated.
  2. General formulas in Cohen-Oesterle, but with no proofs. Jordi Quer finally gave proofs in around 2007 when he visited Seattle to work on Sage.
  3. Dimension formulas incredibly useful double checks on all other algorithms...
  4. Computing dimension for $k=1$ is comparably much harder.
︡b0d160ee-beaa-4520-80a2-63ee0e93b8fb︡{"html": "

The Dimension

\r\n
    \r\n
  1. Dimension formula for any $N,k, \\varepsilon$, with $k\\geq 2$.   Proofs start with Riemann-Hurwitz and get complicated.
  2. \r\n
  3. General formulas in Cohen-Oesterle, but with no proofs. Jordi Quer finally gave proofs in around 2007 when he visited Seattle to work on Sage.
  4. \r\n
  5. Dimension formulas incredibly useful double checks on all other algorithms...
  6. \r\n
  7. Computing dimension for $k=1$ is comparably much harder.
  8. \r\n
"}︡ ︠c8b33712-0948-403e-a3b5-7b78a096c188︠ @interact def f(N=(13,(1..500)), k=(2..100)): for e in DirichletGroup(N).galois_orbits(): eps = e[0] html("dim $M_{%s}(%s,%s) = %s$"%(k,N,latex(eps), dimension_modular_forms(eps,k))) html("

") for e in DirichletGroup(N).galois_orbits(): eps = e[0] html("dim $S_{%s}(%s,%s) = %s$"%(k,N,latex(eps), dimension_cusp_forms(eps,k))) ︡56ea9e36-d74c-4029-bd79-efe50fed2fe6︡︡ ︠c7a8bbd4-5855-471b-a597-33471471ebe9i︠ %html

Two Subproblems: 

Modular Forms = Eisenstein Subspace $\bigoplus$ Cuspidal Subspace

︡979f19ae-0dd8-4c66-84a1-9a8cf6418b68︡{"html": "

Two Subproblems: 

\r\n

Modular Forms = Eisenstein Subspace $\\bigoplus$ Cuspidal Subspace

"}︡ ︠6c499f0b-5913-45dd-9203-23d19e255c59i︠ %html

Eisenstein Series

︡cb7e0f0e-5376-4063-a770-1c56d9e0ad12︡{"html": "

Eisenstein Series

\r\n"}︡ ︠c5a8301a-7ce3-46ce-ba13-4108dd900488i︠ %html

The formulas:

Suppose $\chi$ and $\psi$ are primitive Dirichlet characters with conductors $L$ and $R$, respectively. Let $$ E_{k,\chi,\psi}(q) = c_0 + \sum_{m \geq 1} \left( \sum_{n|m} \psi(n) \cdot \chi(m/n) \cdot n^{k-1}\right) q^{m} \in \QQ(\chi, \psi)[[q]], $$ where $$ c_0 = \begin{cases} 0 & {\rm if }\,\,\, L>1, \\ - \frac{B_{k,\psi}}{2k} & {\rm if }\,\,\, L=1. \end{cases} $$

Theorem (Miyake, Chapter 7):

Suppose $t$ is a positive integer and $\chi$, $\psi$ are as above and that $k$ is a positive integer such that $\chi(-1)\psi(-1) = (-1)^k$. Except when $k=2$ and $\chi=\psi=1$, the power series $E_{k,\chi,\psi}(q^t)$ defines an element of $M_k(RLt,\chi \psi)$. If $\chi=\psi=1$, $k=2$, $t>1$, and $E_2(q) = E_{k,\chi,\psi}(q)$, then $E_2(q) - t E_2(q^t)$ is a modular form in $M_2(\Gamma_0(t))$.

Moreover, the set of Eisenstein series in $M_k(N, \varepsilon)$ above with $RLt \mid N$ and $\chi \psi = \varepsilon$ form a basis for the Eisenstein subspace ${\rm Eis}_k(N,\varepsilon)$.

︡5b102166-421a-422b-9ba2-a1eab405257f︡{"html": "

The formulas:

\r\n

Suppose $\\chi$ and $\\psi$ are primitive Dirichlet characters with conductors $L$ and $R$, respectively. Let $$ E_{k,\\chi,\\psi}(q) = c_0 + \\sum_{m \\geq 1} \\left( \\sum_{n|m} \\psi(n) \\cdot \\chi(m/n) \\cdot n^{k-1}\\right) q^{m} \\in \\QQ(\\chi, \\psi)[[q]], $$ where $$ c_0 = \\begin{cases} 0 & {\\rm if }\\,\\,\\, L>1, \\\\ - \\frac{B_{k,\\psi}}{2k} & {\\rm if }\\,\\,\\, L=1. \\end{cases} $$

\r\n\r\n

Theorem (Miyake, Chapter 7):

\r\n

Suppose $t$ is a positive integer and $\\chi$, $\\psi$ are as above and that $k$ is a positive integer such that $\\chi(-1)\\psi(-1) = (-1)^k$. Except when $k=2$ and $\\chi=\\psi=1$, the power series $E_{k,\\chi,\\psi}(q^t)$ defines an element of $M_k(RLt,\\chi \\psi)$. If $\\chi=\\psi=1$, $k=2$, $t>1$, and $E_2(q) = E_{k,\\chi,\\psi}(q)$, then $E_2(q) - t E_2(q^t)$ is a modular form in $M_2(\\Gamma_0(t))$.

\r\n

Moreover, the set of Eisenstein series in $M_k(N, \\varepsilon)$ above with $RLt \\mid N$ and $\\chi \\psi = \\varepsilon$ form a basis for the Eisenstein subspace ${\\rm Eis}_k(N,\\varepsilon)$.

"}︡ ︠28947b16-37ca-4b95-b10d-344c021d75fa︠ @interact def f(N=(1..30), k=(12,(2..100))): for e in DirichletGroup(N).galois_orbits(): eps = e[0] html("Eis$_{%s}(%s,%s)$:"%(k,N,latex(list(eps.values_on_gens())))) for E in EisensteinForms(eps, k).eisenstein_series(): view((E.parameters(), E)) ︡7dc89ac1-1a5c-4ac3-8d7d-3d4c4bedfd62︡︡ ︠77bc1fdc-2971-4234-a151-71a8dad0f321i︠ %html

Important Trick: we can compute generalized Bernoulli numbers $B_{k,\varepsilon}$ very quickly in terms of the classical $B_c$ for $c\leq k$ (see page 656 of Cohen's Number Theory and Diophantine Equations, section 9). The $B_c$ can be computed very quickly, due to fast code in PARI and also very different fast parallel code by David Harvey. 

︡2ff363bd-45f1-4212-9016-2d0157831267︡{"html": "

Important Trick: we can compute generalized Bernoulli numbers $B_{k,\\varepsilon}$ very quickly in terms of the classical $B_c$ for $c\\leq k$ (see page 656 of Cohen's Number Theory and Diophantine Equations, section 9). The $B_c$ can be computed very quickly, due to fast code in PARI and also very different fast parallel code by David Harvey. 

"}︡ ︠eda353f3-dc04-4833-a33b-95aee0fd4193︠ @interact def f(N=(1..30), k=(12,(2..100))): for e in DirichletGroup(N).galois_orbits(): eps = e[0] html('$B_{%s,%s} = %s$'%(k, latex(eps), latex(eps.bernoulli(k)))) ︡ba2566a2-1517-4352-9cb9-f0b67038314a︡︡ ︠f6a108c6-b45d-4fa4-90da-9926c4643988i︠ %html

Project: The code for computing $B_{k,\varepsilon}$ in Sage could probably easily be made faster with some more work.  See the comments in the source code.

︡9054e823-1276-49d8-b2ee-dcce66f56693︡{"html": "

Project: The code for computing $B_{k,\\varepsilon}$ in Sage could probably easily be made faster with some more work.  See the comments in the source code.

"}︡ ︠b12b9298-6776-424b-9908-54a9a9231b71i︠ %html

Computing Cusp Forms

There are (at least) four distinct algorithms for computing classical cuspidal modular forms. Each has unique advantages over all of the others, and it is important to master all of them (no software has yet done so...).

  1. Explicit Generators
  2. The Hijikata (Eichler-Selberg) trace formula
  3. Modular symbols
  4. Rational quaternion algebras and supersingular elliptic curves
︡cdc5f414-6dc1-4819-b6d9-c010875ccb71︡{"html": "

Computing Cusp Forms

\r\n

There are (at least) four distinct algorithms for computing classical cuspidal modular forms. Each has unique advantages over all of the others, and it is important to master all of them (no software has yet done so...).

\r\n
    \r\n
  1. Explicit Generators
  2. \r\n
  3. The Hijikata (Eichler-Selberg) trace formula
  4. \r\n
  5. Modular symbols
  6. \r\n
  7. Rational quaternion algebras and supersingular elliptic curves
  8. \r\n
"}︡ ︠bd8830df-392e-4e50-9654-a12a0cd06713i︠ %html

1. Cusp Forms: Explicit Generators

Unique Advantages:

  1. Fast for large weight (using fast univariate polynomial multiplication, thanks to FLINT)
  2. Easy to understand and implement once generators are known.

 

Prototype: We have an isomorphism of rings:

$$\bigoplus_k M_k({\rm SL}_2(\ZZ)) \cong \CC[E_4, E_6]$$

where $E_4$ and $E_6$ are the weight 4 and 6 Eisenstein series.

︡92f81ab4-1968-4434-8979-cd7610e40d22︡{"html": "

1. Cusp Forms: Explicit Generators

\r\n

Unique Advantages:

\r\n
    \r\n
  1. Fast for large weight (using fast univariate polynomial multiplication, thanks to FLINT)
  2. \r\n
  3. Easy to understand and implement once generators are known.
  4. \r\n
\r\n

 

\r\n

Prototype: We have an isomorphism of rings:

\r\n

$$\\bigoplus_k M_k({\\rm SL}_2(\\ZZ)) \\cong \\CC[E_4, E_6]$$

\r\n

where $E_4$ and $E_6$ are the weight 4 and 6 Eisenstein series.

"}︡ ︠29264909-5378-4143-b9ac-68268fc1d94b︠ show(eisenstein_series_qexp(4,10)) ︡388d8bf7-7528-4650-a5f9-35a7261ac4b9︡{"html": "
\\newcommand{\\Bold}[1]{\\mathbf{#1}}\\frac{1}{240} + q + 9q^{2} + 28q^{3} + 73q^{4} + 126q^{5} + 252q^{6} + 344q^{7} + 585q^{8} + 757q^{9} + O(q^{10})
"}︡ ︠48207623-c431-4fcb-b8db-f1a6a0afdc12︠ time E = eisenstein_series_qexp(4,10^4) ︡056ad6b5-cded-416e-9e9c-f5533ddc9d05︡{"stdout": "Time: CPU 0.10 s, Wall: 0.39 s"}︡ ︠06c45430-d664-428b-b698-fc317c542f4a︠ time Delta = delta_qexp(10^5) ︡3b39bb8e-8887-42f9-9915-6a96433886a3︡{"stdout": "Time: CPU 0.22 s, Wall: 0.89 s"}︡ ︠8783044b-4773-4c34-adb5-7c8a433705c8i︠ %html

Project: Clean up some of these $q$-expansion functions.  For example, look at this mess below, where the names and input parameters for $\Delta$ and $\eta$ couldn't be more inconsistent!!  Also, there should be an easy way to find them all, e.g., modforms.[tab].

︡80f57a98-25d4-4941-8a40-6a67b1402275︡{"html": "

Project: Clean up some of these $q$-expansion functions.  For example, look at this mess below, where the names and input parameters for $\\Delta$ and $\\eta$ couldn't be more inconsistent!!  Also, there should be an easy way to find them all, e.g., modforms.[tab].

"}︡ ︠bd08bc51-100f-4555-bbb1-6937813720bd︠ delta_qexp(10,'q',ZZ) # by William Stein ︡2e402749-21d8-42b4-82ef-e4f6de40b1a9︡{"stdout": "q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7 + 84480*q^8 - 113643*q^9 + O(q^10)"}︡ ︠382d4d06-1375-4498-8981-15228a64f504︠ qexp_eta(ZZ[['q']], 10) # by David Loeffler ︡41d5e7ca-adf2-4228-b123-f977048b2d84︡{"stdout": "1 - q - q^2 + q^5 + q^7 + O(q^10)"}︡ ︠2efef111-8e95-4125-bc34-7d95c471bbcai︠ %html

Project: One can find ring generators for other levels.  Code something systematic for small levels in Sage.  

︡a0611ac3-8ca4-4f2e-aa82-1dc84b929578︡{"html": "

Project: One can find ring generators for other levels.  Code something systematic for small levels in Sage.  

"}︡ ︠5d889a2d-3be0-42a6-8ac0-4535cacdcea6i︠ %html

2. Cusp Forms: The Hijikata (Eichler-Selberg) Trace Formula

Unique Advantages:

  1. Impressive "practical complexity" to compute ${\rm Tr}(T_p)$ with $p$ big or with weight big.
  2. Relevant to certain algorithms for computing $p$-adic modular forms.

 

See http://wstein.org/Tables/hijikata.html for the 2-page formula itself, which is an enormous sum over class numbers and solutions to certain quadratic equations modulo various integers.  There is a non-optimized PARI and Magma implementation at that page, which I wrote in 1998 (!).

 

︡33317243-1756-4b58-8ce0-240160052cb9︡{"html": "

2. Cusp Forms: The Hijikata (Eichler-Selberg) Trace Formula

\r\n

Unique Advantages:

\r\n
    \r\n
  1. Impressive \"practical complexity\" to compute ${\\rm Tr}(T_p)$ with $p$ big or with weight big.
  2. \r\n
  3. Relevant to certain algorithms for computing $p$-adic modular forms.
  4. \r\n
\r\n

 

\r\n

See http://wstein.org/Tables/hijikata.html for the 2-page formula itself, which is an enormous sum over class numbers and solutions to certain quadratic equations modulo various integers.  There is a non-optimized PARI and Magma implementation at that page, which I wrote in 1998 (!).

\r\n

 

"}︡ ︠aa4148e3-0343-4dc0-b1ec-11a539d65549︠ #g = get_remote_file('http://wstein.org/Tables/hijikata.gp') g = '/home/wstein/sd20.2/hijikata.gp' ︡2e44f509-e209-47d9-9f92-fcc11ad9d611︡︡ ︠cf318192-291a-4f96-a761-b182290eb8a4︠ len(open(g).read().splitlines()) # short! ︡f5f6fc53-4263-4ac9-a69c-3722ae9f03cf︡{"stdout": "135"}︡ ︠94046b04-ed4a-4451-959c-a881c4850383︠ gp.read(g) ︡2ca92049-73a6-4cfc-a099-1d6153bbc16d︡︡ ︠92174481-97d8-4433-b4b1-4119cb37dd03i︠ %html
tr(n,k,N) = tr(T_n on S_k(Gamma_0(N))). (If n | N then n must be prime.)
︡3b83f7e9-ad3a-433e-a281-69633d334368︡{"html": "
tr(n,k,N) = tr(T_n on S_k(Gamma_0(N))). (If n | N then n must be prime.)
"}︡ ︠47ad8f05-34e7-4eed-8c00-3d04baa113ba︠ gp.eval('tr(17, 24, 1)') ︡5dccb23d-0059-454e-ab8a-0cb603f23abc︡{"stdout": "'254028147597540'"}︡ ︠eaed2c71-4ef8-4c90-a58a-127273d7f6a4︠ CuspForms(1,24).T(17).trace() ︡271177d6-eff2-49a0-8ebd-f3b6f0d6c114︡{"stdout": "254028147597540"}︡ ︠d3a0b629-d89a-41dc-a22e-2a3f32edca7f︠ time CuspForms(1,12).T(100000).trace() # this just uses explicit expansion of Delta. ︡8784d189-e220-4d31-9248-73b1776361cd︡{"stdout": "-2983637890141033828147200000\nTime: CPU 0.01 s, Wall: 0.01 s"}︡ ︠51d487b2-5ab3-42ac-bfa8-1c457252a554︠ time gp.eval('tr(100000,12,1)') # in theory should be asymptotically much better than explicit q-exp ︡6e99f042-3869-499d-9347-d3aa6b06fc37︡{"stdout": "'-2983637890141033828147200000'\nTime: CPU 0.00 s, Wall: 15.75 s"}︡ ︠6c92bbf5-ed8e-462f-a14f-edef93f12187i︠ %html

Project: Port this to Sage and make it fast enough to be useful.  Challenge: Verify that $p | \tau(p)$ for $p=7758337633$.

︡481be9c0-2d36-4660-809f-874802defe50︡{"html": "

Project: Port this to Sage and make it fast enough to be useful.  Challenge: Verify that $p | \\tau(p)$ for $p=7758337633$.

"}︡ ︠50fcd545-0a12-4dd4-af6c-a83e0c00d0a1i︠ %html

3. Cusp Forms: Modular Symbols

Unique Advantages:

  1. Fairly general (any $N,k,\varepsilon$ with $k\geq 2$).
  2. Yields unique information about special values of $L$-functions.
  3. Also, unique information about abelian varieties (and motives when $k>2$) that no other method gives.

Basic Idea: 

  1. Compute the homology group $H_1(X_0(N),\QQ, \{{\rm cusps}\})$ in terms of an explicit presentation (Manin symbols) got from images of the path $\{0,\infty\}$ from $0$ to $\infty$.     
  2. This amounts to sparse linear algebra over $\QQ$.
  3. Then compute Hecke operators using an explicit formula (and Heilbronn matrices -- see Merel's SLNM 1585). 
  4. Use dense linear algebra to decompose new subspace of $S_k$ as a direct sum of simple modules.
  5. Compute system of Hecke eigenvalues associated to each summand.
  6. Everything generalizes to higher weight, nontrivial characters, etc.
︡c33620e5-6247-49f8-8640-603bca548f59︡{"html": "

3. Cusp Forms: Modular Symbols

\r\n

Unique Advantages:

\r\n
    \r\n
  1. Fairly general (any $N,k,\\varepsilon$ with $k\\geq 2$).
  2. \r\n
  3. Yields unique information about special values of $L$-functions.
  4. \r\n
  5. Also, unique information about abelian varieties (and motives when $k>2$) that no other method gives.
  6. \r\n
\r\n\r\n

Basic Idea: 

\r\n
    \r\n
  1. Compute the homology group $H_1(X_0(N),\\QQ, \\{{\\rm cusps}\\})$ in terms of an explicit presentation (Manin symbols) got from images of the path $\\{0,\\infty\\}$ from $0$ to $\\infty$.     
  2. \r\n
  3. This amounts to sparse linear algebra over $\\QQ$.
  4. \r\n
  5. Then compute Hecke operators using an explicit formula (and Heilbronn matrices -- see Merel's SLNM 1585). 
  6. \r\n
  7. Use dense linear algebra to decompose new subspace of $S_k$ as a direct sum of simple modules.
  8. \r\n
  9. Compute system of Hecke eigenvalues associated to each summand.
  10. \r\n
  11. Everything generalizes to higher weight, nontrivial characters, etc.
  12. \r\n
"}︡ ︠214faa57-e978-43de-a53d-3535620f3a13︠ @interact def f(N=(30,(1..400))): P = P1List(N) def pnt(n,m): if m == 0: return infinity return float(n)/m def geodesic(alpha, beta): if alpha == infinity or beta == infinity: return line([(0,0),(0,.5)]) return disk(((alpha+beta)/2,0), abs((alpha-beta)/2), (0,pi), thickness=1, fill=False) G = Graphics() for i in range(len(P)): a,b,c,d = P.lift_to_sl2z(i) G += geodesic(pnt(b,d), pnt(a,c)) G.ymin(0); G.set_aspect_ratio(1) html("The %s generating Manin symbols $\\gamma\\{0,\\infty\\}$ of level %s"%(len(P), N)) show(G, figsize=10) ︡8940c1fa-f102-4730-b9a1-61dc339d6217︡︡ ︠bf966b06-822a-42e5-a13a-42b483f0b857i︠ %html

Explicit Presentation for Modular Symbols of Level 65

︡0aa290d4-5df4-427a-bfda-52427ea1df95︡{"html": "

Explicit Presentation for Modular Symbols of Level 65

"}︡ ︠2bd7e6cc-1461-43d3-ab11-33f61d98e844︠ M = ModularSymbols(65,sign=1); M ︡cd6d7874-c11c-4213-8386-59b2030a3b6b︡{"stdout": "Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field"}︡ ︠8d936531-98f2-480a-8b55-5b196b57b7ca︠ M.manin_generators() ︡3d74d780-41bc-4cf6-8066-5a8e583d4366︡{"stdout": "[(0,1), (1,0), (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (1,7), (1,8), (1,9), (1,10), (1,11), (1,12), (1,13), (1,14), (1,15), (1,16), (1,17), (1,18), (1,19), (1,20), (1,21), (1,22), (1,23), (1,24), (1,25), (1,26), (1,27), (1,28), (1,29), (1,30), (1,31), (1,32), (1,33), (1,34), (1,35), (1,36), (1,37), (1,38), (1,39), (1,40), (1,41), (1,42), (1,43), (1,44), (1,45), (1,46), (1,47), (1,48), (1,49), (1,50), (1,51), (1,52), (1,53), (1,54), (1,55), (1,56), (1,57), (1,58), (1,59), (1,60), (1,61), (1,62), (1,63), (1,64), (5,1), (5,2), (5,3), (5,4), (5,6), (5,7), (5,8), (5,9), (5,11), (5,12), (5,13), (5,18), (5,23), (13,1), (13,2), (13,3), (13,4), (13,5)]"}︡ ︠505361c8-5f6a-4051-a857-f24a8c37d57d︠ M.manin_basis() ︡52d59b35-d148-4b23-8ad7-a26daf4aada4︡{"stdout": "[1, 67, 68, 73, 75, 79, 80, 83]"}︡ ︠fe34ae3e-d0e3-4271-9cf6-88279a5d3cc3︠ M.manin_gens_to_basis()[:5] ︡d60127d5-2b91-4b7c-bc4a-987b4a5b520a︡{"stdout": "[-1 0 0 0 0 0 0 0]\n[ 1 0 0 0 0 0 0 0]\n[ 0 0 0 0 0 0 0 0]\n[ 0 1 -2 1 -1 0 1 -1]\n[ 0 0 -1 1 -1 0 1 -1]"}︡ ︠ca475293-5d46-4ad7-be61-6bf767bfd4bei︠ %html

Hecke Operators at Level 65

︡efa5cb8b-3ea1-4e66-ad29-151b6ce1adbb︡{"html": "

Hecke Operators at Level 65

"}︡ ︠b1c74bb0-11c3-44ed-b457-80a210ab6ffa︠ M = ModularSymbols(65,sign=1); M ︡e23d3ac7-8625-4bc2-981e-a247d6f752d8︡{"stdout": "Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field"}︡ ︠9106bde7-870d-482d-a496-51661438eeb7︠ T2 = M.hecke_matrix(2); T2 # wrt rational homology ︡57f62033-f648-48d1-b263-c0ffbf4b0040︡{"stdout": "[ 3 -1 2 -1 1 0 -1 1]\n[ 0 0 1 1 1 0 0 0]\n[ 0 1/2 -1 1 1/2 1/2 3/2 -2]\n[ 0 3/2 0 0 1/2 1/2 1/2 -1]\n[ 0 3/2 2 -1 3/2 1/2 -3/2 1]\n[ 0 -1/2 0 0 1/2 1/2 5/2 0]\n[ 0 0 1 0 0 2 0 1]\n[ 0 0 0 -1 0 1 0 2]"}︡ ︠257da7cd-2e96-41bd-85e4-188b0bd1e58b︠ show(factor(T2.charpoly())) ︡cdbc2ae2-dd32-4219-87a0-94c213194355︡{"html": "
\\newcommand{\\Bold}[1]{\\mathbf{#1}}(x + 1) \\cdot (x - 3)^{3} \\cdot (x^{2} - 3) \\cdot (x^{2} + 2 x - 1)
"}︡ ︠4e743600-ea70-4581-9f5a-0c363573ed96︠ M.integral_hecke_matrix(2) # integral homology ︡7aa308e8-681e-4452-918f-20812ce7dd55︡{"stdout": "[ 3 -2 2 -1 2 1 0 1]\n[ 0 1 2 0 1 1 0 1]\n[ 0 1 -1 1 0 0 1 -2]\n[ 0 3 0 0 -1 -1 -1 -1]\n[ 0 3 2 -1 0 -1 -3 1]\n[ 0 -1 0 0 1 1 3 0]\n[ 0 0 1 0 0 2 0 1]\n[ 0 0 0 -1 0 1 0 2]"}︡ ︠c19ba283-4cec-4dd3-8dd4-f1808486247ci︠ %html

Decomposition of New Subspace at Level 65

︡4bec3862-bd82-4685-a86d-bd7518def5d2︡{"html": "

Decomposition of New Subspace at Level 65

"}︡ ︠f91778ec-c560-46ea-9b37-d33f9eb1f406︠ M = ModularSymbols(65,sign=1); M ︡00737c11-8ca9-43f3-9cf2-3cfaaca62d4e︡{"stdout": "Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field"}︡ ︠6d80db6b-2af1-495b-9906-4bb2d2f8b334︠ N = M.cuspidal_subspace().new_subspace(); N ︡84f4e8b8-5895-4d57-acee-9e222c0581fc︡{"stdout": "Modular Symbols subspace of dimension 5 of Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field"}︡ ︠edf91921-2ccf-4328-b345-da7469e46d3a︠ N.decomposition() ︡ac867ed2-dfca-48fb-8e83-98c8ab1935c9︡{"stdout": "[\nModular Symbols subspace of dimension 1 of Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field,\nModular Symbols subspace of dimension 2 of Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field,\nModular Symbols subspace of dimension 2 of Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field\n]"}︡ ︠ef40ea6e-8fd6-424f-93f1-ffc10b7c0d04i︠ %html

Systems of Hecke Eigenvalues

︡2c99a170-6807-443c-9f54-e67a5b489bdc︡{"html": "

Systems of Hecke Eigenvalues

"}︡ ︠80466a78-6265-44dd-9a3f-8211c672f982︠ M = ModularSymbols(65,sign=1) D = M.cuspidal_subspace().new_subspace().decomposition() f = D[1]; f ︡ea4f7877-433a-4ca9-b85f-352acda0bdfa︡{"stdout": "Modular Symbols subspace of dimension 2 of Modular Symbols space of dimension 8 for Gamma_0(65) of weight 2 with sign 1 over Rational Field"}︡ ︠1efe11a5-56f7-4047-948a-dca585526dd7i︠ %html

There is a clever "compressed representation" of the Fourier coefficients $a_n$ that arises naturally out of the modular symbols algorithm.

︡9a12d290-fc7e-49f1-81e7-ee1bb2cf71de︡{"html": "

There is a clever \"compressed representation\" of the Fourier coefficients $a_n$ that arises naturally out of the modular symbols algorithm.

"}︡ ︠a5391f46-05e0-4425-a44c-f603e83530af︠ A, v = f.compact_system_of_eigenvalues(prime_range(30)) print v A ︡56c1469c-deca-4bca-aa2f-35e4e0c569af︡{"stdout": "(1, 1/2*alpha + 1)\n[-2 2]\n[-1 2]\n[ 1 0]\n[ 4 -4]\n[ 3 -2]\n[-1 0]\n[ 0 -4]\n[ 1 2]\n[ 1 -2]\n[-4 8]"}︡ ︠367d3c91-b996-42af-8f3e-c714d22c2f9di︠ %html

The product gives the actual eigenvalues:

︡bf947176-44b6-4932-9f97-ffd4387e504f︡{"html": "

The product gives the actual eigenvalues:

"}︡ ︠aaff3aa9-0578-4797-9446-c69bee64372c︠ A*v ︡8803405b-b8f6-428b-98ce-c7455f2432de︡{"stdout": "(alpha, alpha + 1, 1, -2*alpha, -alpha + 1, -1, -2*alpha - 4, alpha + 3, -alpha - 1, 4*alpha + 4, 3*alpha + 9, 6*alpha + 6, -2*alpha - 8, 5*alpha + 1, 2*alpha, -6*alpha - 12, 3*alpha + 9, -8, -2, -7*alpha - 5, -6*alpha - 6, 6*alpha + 6, -2*alpha - 8, 6, 4*alpha + 2)"}︡ ︠61919ddb-4dcf-4790-a3e8-603492fa2c93i︠ %html

Here is a more impressive example.  The rows of $A$ are small, but the actual Hecke eigenvalues expressed in terms of a power basis are huge (see below).

︡30b4601e-5c1e-4016-b829-fc7d38563eb2︡{"html": "

Here is a more impressive example.  The rows of $A$ are small, but the actual Hecke eigenvalues expressed in terms of a power basis are huge (see below).

"}︡ ︠43d1575e-c5cb-49b4-91a3-e3baa16a7c5b︠ f = ModularSymbols(389,sign=1)[5] A, v = f.compact_system_of_eigenvalues(prime_range(30)) A ︡529c488b-4783-45b9-b903-8432fce25022︡{"stdout": "[ -73/8 -3/4 -61/4 73/4 -9/4 -33/4 29/4 -21/4 49/4 7/2 11/4 -1/4 -1 0 33/2 -17 -1/2 -16 16 -1/4]\n[ 4 0 4 -4 0 0 0 2 -2 0 0 0 0 0 -4 4 0 4 -4 0]\n[ 6 0 6 -8 0 4 -4 2 -6 -2 0 0 0 0 -8 8 0 8 -8 0]\n[ 8 0 10 -12 4 8 -8 2 -10 -4 -4 0 0 0 -12 12 0 10 -10 0]\n[ 12 0 20 -24 4 8 -8 8 -16 -4 -4 4 0 0 -20 20 4 20 -20 0]\n[ 14 4 20 -28 8 18 -16 2 -18 -8 -8 0 4 -4 -20 20 0 20 -20 2]\n[ 169/4 -1/2 105/2 -125/2 -3/2 29/2 -13/2 57/2 -77/2 -3 -11/2 5/2 6 4 -57 58 1 52 -60 9/2]\n[ -17/4 5/2 -21/2 17/2 -1/2 -5/2 5/2 -9/2 13/2 3 3/2 -1/2 -2 -4 13 -6 -1 -12 12 -1/2]\n[-195/4 -13/2 -117/2 159/2 -23/2 -77/2 55/2 -27/2 99/2 15 29/2 -3/2 -8 10 55 -66 -3 -52 64 -11/2]\n[ -37/2 1 -25 33 -5 -5 5 -17 17 2 3 -5 0 0 26 -28 -2 -26 26 -1]"}︡ ︠c5682ea4-92b7-466e-b998-835c7388115b︠ A[1] ︡7a0e5223-1cab-4f17-bc24-958bc65982fe︡{"stdout": "(4, 0, 4, -4, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -4, 4, 0, 4, -4, 0)"}︡ ︠921e7d21-55e0-4a31-89d0-9fd4499e9990i︠ %html

versus

︡b8bdd67e-9b75-4f9e-b9f2-f5f9c350ce70︡{"html": "

versus

"}︡ ︠d849da42-4960-4d42-8bb0-4c106d32d4bd︠ (A*v)[1] ︡dc1318b2-3038-40ca-b81d-8e9fcbc036e2︡{"stdout": "-20146763/1097385680*alpha^19 + 20466323/219477136*alpha^18 + 119884773/274346420*alpha^17 - 753611053/274346420*alpha^16 - 381358355/109738568*alpha^15 + 3611475535/109738568*alpha^14 + 6349339639/1097385680*alpha^13 - 56878934241/274346420*alpha^12 + 71555185319/1097385680*alpha^11 + 163330998525/219477136*alpha^10 - 223188336749/548692840*alpha^9 - 169878973265/109738568*alpha^8 + 265944624817/274346420*alpha^7 + 199655892261/109738568*alpha^6 - 1167579836501/1097385680*alpha^5 - 619178000979/548692840*alpha^4 + 261766056911/548692840*alpha^3 + 4410485304/13717321*alpha^2 - 14646077211/274346420*alpha - 1604641167/68586605"}︡ ︠d73b9d92-afac-4fa8-9143-250e007b4958︠ (A*v)[2] ︡0bbd43c4-31ef-446a-a914-a441c99f7c37︡{"stdout": "252247073/1097385680*alpha^19 - 89195955/109738568*alpha^18 - 6876716517/1097385680*alpha^17 + 13248231811/548692840*alpha^16 + 3639338697/54869284*alpha^15 - 32041245347/109738568*alpha^14 - 367946611589/1097385680*alpha^13 + 2037515640679/1097385680*alpha^12 + 816602908511/1097385680*alpha^11 - 368120881159/54869284*alpha^10 - 19595857657/1097385680*alpha^9 + 763403091515/54869284*alpha^8 - 403904463001/137173210*alpha^7 - 1743458092745/109738568*alpha^6 + 5304122556631/1097385680*alpha^5 + 9907751136883/1097385680*alpha^4 - 704659646193/274346420*alpha^3 - 236814032039/109738568*alpha^2 + 88326575941/274346420*alpha + 37821733103/274346420"}︡ ︠922ad627-8a4c-47b6-a909-2e80f6084fcfi︠ %html

Project:  I optimized the hell out of the compact_system_of_eigenvalues command in several special cases, e.g., trivial character.  But the general case is still slow.  Fix that.

︡32327239-9216-464b-9366-2d323bb5504e︡{"html": "

Project:  I optimized the hell out of the compact_system_of_eigenvalues command in several special cases, e.g., trivial character.  But the general case is still slow.  Fix that.

"}︡ ︠b09782f1-dbc4-4e81-b9c7-797a89a3fa52i︠ %html

4. Cusp Forms: Rational Quaternion Algebras and Supersingular Elliptic Curves

 

The algorithm is the same as what John Voight talked about on Monday, but specialized to the case of $\QQ$.  In short, suppose $p^{2r+1}$ exactly divides the level $N$.  Compute an Eichler order $R$ of level $N$ in the quaternion algebra ramified at $p,\infty$, enumerate the right ideal classes in $R$, and compute Hecke operators acting on the free abelian group on these ideal classes. 

 

Unique Advantages:

  1. As a biproduct, provides explicit theta series basis for (a certain subspace of) $S_2(\Gamma_0(N))$, for certain $N$, and sometimes theta series can be efficiently computed to high precision.
  2. Provides unique input (the Monodromy Pairing) needed by my algorithm for computing Tamagawa numbers of modular abelian varieties, and also for computing Kolyvagin cohomology classes. 
  3. There is a canonical basis and the matrices of Hecke operators are extremely sparse, e.g., $T_{p}$ has (at most) $p+1$ nonzero entries per row, no matter what the level!!!
  4. Mestre Method of Graphs variant is very fast and easy to implement (when applicable).
︡3aa4dda7-401a-4239-8342-fd1f09626532︡{"html": "

4. Cusp Forms: Rational Quaternion Algebras and Supersingular Elliptic Curves

\r\n

 

\r\n

The algorithm is the same as what John Voight talked about on Monday, but specialized to the case of $\\QQ$.  In short, suppose $p^{2r+1}$ exactly divides the level $N$.  Compute an Eichler order $R$ of level $N$ in the quaternion algebra ramified at $p,\\infty$, enumerate the right ideal classes in $R$, and compute Hecke operators acting on the free abelian group on these ideal classes. 

\r\n

 

\r\n

Unique Advantages:

\r\n
    \r\n
  1. As a biproduct, provides explicit theta series basis for (a certain subspace of) $S_2(\\Gamma_0(N))$, for certain $N$, and sometimes theta series can be efficiently computed to high precision.
  2. \r\n
  3. Provides unique input (the Monodromy Pairing) needed by my algorithm for computing Tamagawa numbers of modular abelian varieties, and also for computing Kolyvagin cohomology classes. 
  4. \r\n
  5. There is a canonical basis and the matrices of Hecke operators are extremely sparse, e.g., $T_{p}$ has (at most) $p+1$ nonzero entries per row, no matter what the level!!!
  6. \r\n
  7. Mestre Method of Graphs variant is very fast and easy to implement (when applicable).
  8. \r\n
"}︡ ︠281f5ced-a084-4551-9119-fe4e78ebda66i︠ %html

Example: Level $65 = 5\cdot 13$

︡be4b40cc-ea42-4cda-bb72-2dd7de18ed77︡{"html": "

Example: Level $65 = 5\\cdot 13$

"}︡ ︠b27dc90f-dcea-4e00-9231-2595801e96e1︠ B = BrandtModule(5, 13); B ︡e7137906-1348-4fea-9350-b56b478d1845︡{"stdout": "Brandt module of dimension 6 of level 5*13 of weight 2 over Rational Field"}︡ ︠0d0571b6-bd17-428e-b099-cfb90a572467︠ B.quaternion_algebra() ︡6a6f291a-9310-439f-a813-ca62e35b97e2︡{"stdout": "Quaternion Algebra (-2, -5) with base ring Rational Field"}︡ ︠032428f1-0900-4757-a59c-08241a6361c1︠ B.order_of_level_N() ︡e50053d0-cb99-4706-9f2d-6055d2c08678︡{"stdout": "Order of Quaternion Algebra (-2, -5) with base ring Rational Field with basis (1/2 + 1/2*j + 7/2*k, 1/4*i + 1/2*j + 41/4*k, j + 7*k, 13*k)"}︡ ︠d66a9345-f39e-431f-a09c-c5ba6891fd3d︠ B.right_ideals() ︡ab304e66-c6b3-4d1a-a0d2-9fa9e59e6939︡{"stdout": "(Fractional ideal (2 + 2*j + 14*k, i + 2*j + 41*k, 4*j + 28*k, 52*k), Fractional ideal (2 + 2*j + 14*k, 2*i + 4*j + 30*k, 8*j + 4*k, 52*k), Fractional ideal (2 + 6*j + 42*k, i + 2*j + 41*k, 8*j + 56*k, 104*k), Fractional ideal (2 + 6*j + 94*k, i + 6*j + 17*k, 8*j + 56*k, 104*k), Fractional ideal (2 + 14*j + 46*k, i + 14*j + 73*k, 16*j + 112*k, 208*k), Fractional ideal (2 + 14*j + 254*k, i + 30*j + 185*k, 32*j + 224*k, 416*k))"}︡ ︠d6b0cd56-5eab-45ff-87b9-34384893abec︠ T2 = B.hecke_matrix(2); T2 ︡cd0cfd10-876e-4d7b-8b63-39257cff1776︡{"stdout": "[0 1 1 1 0 0]\n[3 0 0 0 0 0]\n[1 0 0 1 1 0]\n[1 0 1 0 1 0]\n[0 0 1 1 0 1]\n[0 0 0 0 3 0]"}︡ ︠eff63a7f-2615-427b-9205-d3989e130009︠ factor(T2.charpoly()) ︡496c03cc-3d12-4048-b590-ee4311f3408a︡{"stdout": "(x - 3) * (x + 1) * (x^2 - 3) * (x^2 + 2*x - 1)"}︡ ︠7b17013f-6b67-4203-bb99-e92bbfa5ccc5︠ B.brandt_series(2) ︡96aff0c6-bd2f-4789-ade4-e69d7c33e450︡{"stdout": "[1/2 + q + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2)]\n[ 1/6 + O(q^2) 1/6 + q + O(q^2) 1/6 + O(q^2) 1/6 + O(q^2) 1/6 + O(q^2) 1/6 + O(q^2)]\n[ 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + q + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2)]\n[ 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + q + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2)]\n[ 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + O(q^2) 1/2 + q + O(q^2) 1/2 + O(q^2)]\n[ 1/6 + O(q^2) 1/6 + O(q^2) 1/6 + O(q^2) 1/6 + O(q^2) 1/6 + O(q^2) 1/6 + q + O(q^2)]"}︡ ︠81b0708d-6ae1-4484-8cfb-7abbc6493b26i︠ %html

The Method of Graphs: For prime level

Compute Hecke action directly on the free abelian group on supersingular $j$-invariants in characteristic $p$.

︡fd45a489-66a4-46bb-ae8e-61849d83f352︡{"html": "

The Method of Graphs: For prime level

\r\n

Compute Hecke action directly on the free abelian group on supersingular $j$-invariants in characteristic $p$.

"}︡ ︠54526229-8cd1-4888-b49d-bb96677928a9︠ @interact def f(p=(131,tuple(prime_range(11,400)))): X = SupersingularModule(p) T2 = X.hecke_matrix(2) G = DiGraph(T2) G.plot(graph_border=True, vertex_labels=False, vertex_size=30).show(figsize=6) ︡aa128f2d-a0ba-404b-b4ab-04da68ce9308︡︡ ︠229b7999-a7a0-407d-b290-329c2dfb8ceai︠ %html

Project: Implement computation of Eichler orders when $p^{2r+1}$ divides the level, with $r\geq 1$.

Project: Higher weight?

︡8998af44-d34c-4be7-9cf4-4e01c1d9de44︡{"html": "

Project: Implement computation of Eichler orders when $p^{2r+1}$ divides the level, with $r\\geq 1$.

\r\n

Project: Higher weight?

"}︡ ︠93dbb547-ce88-4414-9d0e-8b3cd9043d1ci︠ %html

Closing Remarks

  1. I have only scratched the surface.  There are many, many other relevant algorithms, e.g., SLNM 1585 gives an algorithm for computing weight 1 forms in some cases.  There are also algorithms for half-integral weight forms.
  2. Edixhoven et al. have a theoretical algorithm for computing $a_p$ at level 1 in time polynomial in $\log(p)$ via a Schoff-like approach.  They posted a book about this to the arxiv, and seek feedback.
  3. I wrote a book on computing modular forms that the AMS published.  It is now totally free at my website.
︡2e397443-be94-4a89-92d2-7edf227302d0︡{"html": "

Closing Remarks

\r\n
    \r\n
  1. I have only scratched the surface.  There are many, many other relevant algorithms, e.g., SLNM 1585 gives an algorithm for computing weight 1 forms in some cases.  There are also algorithms for half-integral weight forms.
  2. \r\n
  3. Edixhoven et al. have a theoretical algorithm for computing $a_p$ at level 1 in time polynomial in $\\log(p)$ via a Schoff-like approach.  They posted a book about this to the arxiv, and seek feedback.
  4. \r\n
  5. I wrote a book on computing modular forms that the AMS published.  It is now totally free at my website.
  6. \r\n
"}︡