Sharedwww / talks / 20070604-banff / modformspaces.htmlOpen in CoCalc
Author: William A. Stein
SAGE Worksheet: modformspaces
jsMath

Tutorial: Computing With Modular Forms Using Magma

Contents, General, Modular Forms, Modular Symbols, Future

Defining Ambient and Cuspidal Spaces of Modular Forms

ModularForms(11)
       
Space of modular forms on Gamma_0(11) of weight 2 and dimension 2 over Integer
Ring.
Space of modular forms on Gamma_0(11) of weight 2 and dimension 2 over Integer Ring.
ModularForms(Gamma1(2007))
       
Space of modular forms on Gamma_1(2007) of weight 2 and dimension 150960 over
Integer Ring.
Space of modular forms on Gamma_1(2007) of weight 2 and dimension 150960 over Integer Ring.
CuspForms(Gamma1(13),3)
       
Space of modular forms on Gamma_1(13) of weight 3 and dimension 8 over Integer
Ring.
Space of modular forms on Gamma_1(13) of weight 3 and dimension 8 over Integer Ring.
G<a> := DirichletGroup(13,CyclotomicField(12));
CuspForms(a^2,2)
       
Space of modular forms on Gamma_1(13) with character all conjugates of [a^2],
weight 2, and dimension 2 over Integer Ring.
Space of modular forms on Gamma_1(13) with character all conjugates of [a^2], weight 2, and dimension 2 over Integer Ring.
M := ModularForms(Gamma0(11),2); M
       
Space of modular forms on Gamma_0(11) of weight 2 and dimension 2 over Integer
Ring.
Space of modular forms on Gamma_0(11) of weight 2 and dimension 2 over Integer Ring.
M := ModularForms(Gamma1(13),2); M
       
Space of modular forms on Gamma_1(13) of weight 2 and dimension 13 over Integer
Ring.
Space of modular forms on Gamma_1(13) of weight 2 and dimension 13 over Integer Ring.
M := CuspForms(Gamma1(13),2); M
       
Space of modular forms on Gamma_1(13) of weight 2 and dimension 2 over Integer
Ring.
Space of modular forms on Gamma_1(13) of weight 2 and dimension 2 over Integer Ring.
M := ModularForms(Gamma1(1000),2); M
       
Space of modular forms on Gamma_1(1000) of weight 2 and dimension 31080 over
Integer Ring.
Space of modular forms on Gamma_1(1000) of weight 2 and dimension 31080 over Integer Ring.
       
       


Explicit Basis

M := ModularForms(Gamma1(13),2); M
       
Space of modular forms on Gamma_1(13) of weight 2 and dimension 13 over Integer
Ring.
Space of modular forms on Gamma_1(13) of weight 2 and dimension 13 over Integer Ring.
SetPrecision(M,20)
       
Basis(M)
       
[
1 + 17940*q^13 - 68328*q^14 + 58812*q^15 + 68796*q^16 - 58500*q^17 - 161304*q^18
+ 87048*q^19 + O(q^20),
q + 9920*q^13 - 37946*q^14 + 32946*q^15 + 37922*q^16 - 32517*q^17 - 89682*q^18 +
48510*q^19 + O(q^20),
q^2 + 4188*q^13 - 15943*q^14 + 13765*q^15 + 16009*q^16 - 13657*q^17 - 37660*q^18
+ 20344*q^19 + O(q^20),
q^3 + 862*q^13 - 3125*q^14 + 2496*q^15 + 3342*q^16 - 2658*q^17 - 7321*q^18 +
3876*q^19 + O(q^20),
q^4 - 634*q^13 + 2602*q^14 - 2495*q^15 - 2358*q^16 + 2253*q^17 + 6213*q^18 -
3456*q^19 + O(q^20),
q^5 - 1021*q^13 + 4015*q^14 - 3631*q^15 - 3862*q^16 + 3454*q^17 + 9530*q^18 -
5214*q^19 + O(q^20),
q^6 - 886*q^13 + 3415*q^14 - 2992*q^15 - 3384*q^16 + 2928*q^17 + 8079*q^18 -
4380*q^19 + O(q^20),
q^7 - 599*q^13 + 2257*q^14 - 1903*q^15 - 2313*q^16 + 1929*q^17 + 5314*q^18 -
2849*q^19 + O(q^20),
q^8 - 340*q^13 + 1241*q^14 - 989*q^15 - 1331*q^16 + 1055*q^17 + 2909*q^18 -
1536*q^19 + O(q^20),
q^9 - 165*q^13 + 574*q^14 - 419*q^15 - 655*q^16 + 486*q^17 + 1335*q^18 -
690*q^19 + O(q^20),
q^10 - 68*q^13 + 219*q^14 - 139*q^15 - 269*q^16 + 183*q^17 + 502*q^18 - 252*q^19
+ O(q^20),
q^11 - 23*q^13 + 64*q^14 - 30*q^15 - 89*q^16 + 53*q^17 + 146*q^18 - 70*q^19 +
O(q^20),
q^12 - 6*q^13 + 12*q^14 - 3*q^15 - 18*q^16 + 9*q^17 + 26*q^18 - 12*q^19 +
O(q^20)
]
[
1 + 17940*q^13 - 68328*q^14 + 58812*q^15 + 68796*q^16 - 58500*q^17 - 161304*q^18 + 87048*q^19 + O(q^20),
q + 9920*q^13 - 37946*q^14 + 32946*q^15 + 37922*q^16 - 32517*q^17 - 89682*q^18 + 48510*q^19 + O(q^20),
q^2 + 4188*q^13 - 15943*q^14 + 13765*q^15 + 16009*q^16 - 13657*q^17 - 37660*q^18 + 20344*q^19 + O(q^20),
q^3 + 862*q^13 - 3125*q^14 + 2496*q^15 + 3342*q^16 - 2658*q^17 - 7321*q^18 + 3876*q^19 + O(q^20),
q^4 - 634*q^13 + 2602*q^14 - 2495*q^15 - 2358*q^16 + 2253*q^17 + 6213*q^18 - 3456*q^19 + O(q^20),
q^5 - 1021*q^13 + 4015*q^14 - 3631*q^15 - 3862*q^16 + 3454*q^17 + 9530*q^18 - 5214*q^19 + O(q^20),
q^6 - 886*q^13 + 3415*q^14 - 2992*q^15 - 3384*q^16 + 2928*q^17 + 8079*q^18 - 4380*q^19 + O(q^20),
q^7 - 599*q^13 + 2257*q^14 - 1903*q^15 - 2313*q^16 + 1929*q^17 + 5314*q^18 - 2849*q^19 + O(q^20),
q^8 - 340*q^13 + 1241*q^14 - 989*q^15 - 1331*q^16 + 1055*q^17 + 2909*q^18 - 1536*q^19 + O(q^20),
q^9 - 165*q^13 + 574*q^14 - 419*q^15 - 655*q^16 + 486*q^17 + 1335*q^18 - 690*q^19 + O(q^20),
q^10 - 68*q^13 + 219*q^14 - 139*q^15 - 269*q^16 + 183*q^17 + 502*q^18 - 252*q^19 + O(q^20),
q^11 - 23*q^13 + 64*q^14 - 30*q^15 - 89*q^16 + 53*q^17 + 146*q^18 - 70*q^19 + O(q^20),
q^12 - 6*q^13 + 12*q^14 - 3*q^15 - 18*q^16 + 9*q^17 + 26*q^18 - 12*q^19 + O(q^20)
]
S := CuspidalSubspace(M);
       
Basis(S)
       
[
q - 4*q^3 - q^4 + 3*q^5 + 6*q^6 - 3*q^8 + q^9 - 6*q^10 - 2*q^12 + 2*q^13 +
10*q^16 - 3*q^17 - 3*q^18 - 6*q^19 + O(q^20),
q^2 - 2*q^3 - q^4 + 2*q^5 + 2*q^6 - 2*q^8 + q^9 - 3*q^10 + 3*q^13 - 2*q^15 +
5*q^16 - 3*q^17 - 2*q^18 - 2*q^19 + O(q^20)
]
[
q - 4*q^3 - q^4 + 3*q^5 + 6*q^6 - 3*q^8 + q^9 - 6*q^10 - 2*q^12 + 2*q^13 + 10*q^16 - 3*q^17 - 3*q^18 - 6*q^19 + O(q^20),
q^2 - 2*q^3 - q^4 + 2*q^5 + 2*q^6 - 2*q^8 + q^9 - 3*q^10 + 3*q^13 - 2*q^15 + 5*q^16 - 3*q^17 - 2*q^18 - 2*q^19 + O(q^20)
]
       
       


Cutting Out Submodules: Eisenstein, Cuspidal, New, Old

M := ModularForms(Gamma0(54)); M;
       
Space of modular forms on Gamma_0(54) of weight 2 and dimension 15 over Integer
Ring.
Space of modular forms on Gamma_0(54) of weight 2 and dimension 15 over Integer Ring.
EisensteinSubspace(M)
       
Space of modular forms on Gamma_0(54) of weight 2 and dimension 11 over Integer
Ring.
Space of modular forms on Gamma_0(54) of weight 2 and dimension 11 over Integer Ring.
CuspidalSubspace(M)
       
Space of modular forms on Gamma_0(54) of weight 2 and dimension 4 over Integer
Ring.
Space of modular forms on Gamma_0(54) of weight 2 and dimension 4 over Integer Ring.
NewSubspace(M)
       
Space of modular forms on Gamma_0(54) of weight 2 and dimension 2 over Integer
Ring.
Space of modular forms on Gamma_0(54) of weight 2 and dimension 2 over Integer Ring.
Basis(NewSubspace(M))
       
[
q + q^4 - q^7 + O(q^8),
q^2 - 3*q^5 + O(q^8)
]
[
q + q^4 - q^7 + O(q^8),
q^2 - 3*q^5 + O(q^8)
]
       
       


Newforms

M := ModularForms(Gamma0(54)); M;
       
Space of modular forms on Gamma_0(54) of weight 2 and dimension 15 over Integer
Ring.
Space of modular forms on Gamma_0(54) of weight 2 and dimension 15 over Integer Ring.
Newforms(M)
       
[* [*
q - q^2 + q^4 + 3*q^5 - q^7 + O(q^8)
*], [*
q + q^2 + q^4 - 3*q^5 - q^7 + O(q^8)
*]*]
[* [*
q - q^2 + q^4 + 3*q^5 - q^7 + O(q^8)
*], [*
q + q^2 + q^4 - 3*q^5 - q^7 + O(q^8)
*]*]
n := Newforms(CuspidalSubspace(ModularForms(43)));
n
       
[* [*
q - 2*q^2 - 2*q^3 + 2*q^4 - 4*q^5 + 4*q^6 + O(q^8)
*], [*
q + a*q^2 - a*q^3 + (-a + 2)*q^5 - 2*q^6 + (a - 2)*q^7 + O(q^8),
q + b*q^2 - b*q^3 + (-b + 2)*q^5 - 2*q^6 + (b - 2)*q^7 + O(q^8)
*]*]
[* [*
q - 2*q^2 - 2*q^3 + 2*q^4 - 4*q^5 + 4*q^6 + O(q^8)
*], [*
q + a*q^2 - a*q^3 + (-a + 2)*q^5 - 2*q^6 + (a - 2)*q^7 + O(q^8),
q + b*q^2 - b*q^3 + (-b + 2)*q^5 - 2*q^6 + (b - 2)*q^7 + O(q^8)
*]*]
/*  What is a? */

print Parent(n[2][1]);

/* so a = sqrt(2) */
       
Space of modular forms on Gamma_0(43) of weight 2 and dimension 2 over Number
Field with defining polynomial x^2 - 2 over the Rational Field.
Space of modular forms on Gamma_0(43) of weight 2 and dimension 2 over Number Field with defining polynomial x^2 - 2 over the Rational Field.
Reductions(n[2][1],3)
       
[* [*
q + $.1^6*q^2 + $.1^2*q^3 + $.1*q^5 + q^6 + $.1^5*q^7 + O(q^8),
q + $.1^2*q^2 + $.1^6*q^3 + $.1^3*q^5 + q^6 + $.1^7*q^7 + O(q^8)
*]*]
[* [*
q + $.1^6*q^2 + $.1^2*q^3 + $.1*q^5 + q^6 + $.1^5*q^7 + O(q^8),
q + $.1^2*q^2 + $.1^6*q^3 + $.1^3*q^5 + q^6 + $.1^7*q^7 + O(q^8)
*]*]
Reductions(n[2][1],2)
       
[* [*
q + O(q^8)
*]*]
[* [*
q + O(q^8)
*]*]


Hecke Operators

M := ModularForms(43);
       
HeckeOperator(M,2)
       
[ 3  0  6  4]
[ 0  0  2 -2]
[ 0  1 -1 -1]
[ 0  0 -1 -1]
[ 3  0  6  4]
[ 0  0  2 -2]
[ 0  1 -1 -1]
[ 0  0 -1 -1]
       


Atkin-Lehner Operators

M := CuspForms(33);
       
w := AtkinLehnerOperator(M,3); w
       
[   1    0    0]
[ 1/3  1/3 -4/3]
[ 1/3 -2/3 -1/3]
[   1    0    0]
[ 1/3  1/3 -4/3]
[ 1/3 -2/3 -1/3]
Factorization(CharacteristicPolynomial(w))
       
[
<x - 1, 2>,
<x + 1, 1>
]
[
<x - 1, 2>,
<x + 1, 1>
]