An ambient space of modular symbols is created by specifying a character, weight, and optional sign. The signature ModularSymbols(eps, k, sign) is the most general. (The level is the modulus of the character eps.)
Warning: Certain functions, such as DualVectorSpace, may fail when given as input a space of modular symbols over a field of positive characteristic, because the Hecke operators T_p, with p prime to the level, need not be semisimple.
The space of modular symbols of level N, weight 2, and trivial character over the rational numbers.
The space of modular symbols of level N, weight k, and trivial character over the rational numbers.
The space of modular symbols of level N, weight k, and trivial character over the field F.
The space of modular symbols of level N, weight k, trivial character, and given sign over the rational numbers.
The space of modular symbols of level N, weight k, trivial character, and given sign, over the field F.
The space of modular symbols of weight k and character varepsilon. Note that varepsilon determines the level and the base field, so they do not need to be specified.
The space of modular symbols of weight k and character varepsilon. The level and base field are specified as part of varepsilon. The third argument "sign" allows for working in certain quotients. The possible values are -1, 0, and +1, which correspond to the -1 quotient, full space, and +1 quotient, respectively. The +1 quotient of M is M/( * -1)M, where * is StarInvolution(M).
Ambient modular symbols spaces M can create circular references, which cause the memory manager to never de-allocate M. Calling DisownChildren forces the circular references created by M to be deleted. In practice, if you are doing a computation involving many different spaces of modular symbols, it's probably best to use a scripting language such as Perl, Python, or even Magma, and start a separate Magma process for each computation.
> M37 := ModularSymbols(37); M37;
Full Modular symbols space of level 37, weight 2, and dimension 5
> Basis(M37);
[
{-1/29, 0},
{-1/22, 0},
{-1/12, 0},
{-1/18, 0},
{oo, 0}
]
As M37 is a space of modular symbols, it is not incorrect
that its dimension is different than that of the three-dimensional
space of modular forms M_(2)(Gamma_0(37)). We have
dim Mm_(2)(Gamma_0(37)) = 2 x ( (dim cusp forms)) +
1 x ( (dim Eisenstein series)) = 5.
> MF := ModularForms(Gamma0(37),2); > 2*Dimension(CuspidalSubspace(MF)) + Dimension(EisensteinSubspace(MF)); 5
Next we decompose M37 with respect to the Hecke operators T_2, T_3, and T_5.
> D := Decomposition(M37,5); D;
[
Modular symbols space of level 37, weight 2, and dimension 1,
Modular symbols space of level 37, weight 2, and dimension 2,
Modular symbols space of level 37, weight 2, and dimension 2
]
The first factor corresponds to the standard Eisenstein series, and
the second corresponds to an elliptic curve:
> E := EllipticCurve(D[2]); E; Elliptic Curve defined by y^2 + y = x^3 + x^2 - 23*x - 50 over Rational Field > Rank(E); 0
We now create the space Mm_(12)(1) of weight 12 modular symbols of level 1.
> M12 := ModularSymbols(1,12); M12;
Full Modular symbols space of level 1, weight 12, and dimension 3
> Basis(M12);
[
X^10*{0, oo},
X^8*Y^2*{0, oo},
X^9*Y*{0, oo}
]
> DimensionCuspFormsGamma0(1,12); 1 > R<z>:=PowerSeriesRing(Rationals()); > Delta(z)+ O(z^7); z - 24*z^2 + 252*z^3 - 1472*z^4 + 4830*z^5 - 6048*z^6 + O(z^7)As a module, cuspidal modular symbols equal cuspforms with multiplicity two.
> M12 := ModularSymbols(1,12);
> HeckeOperator(CuspidalSubspace(M12),2);
[-24 0]
[ 0 -24]
> qExpansionBasis(CuspidalSubspace(M12),7);
[
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 + O(q^7)
]
For efficiency purposes, since one is often interested only
in q-expansion, it is possible to work in the quotient
of the space of modular symbols by all relations
*x = x (or *x= - x), where * is StarInvolution(M). In either
of these quotients (except possibly in characteristic p>0)
the cusp forms appear with multiplicity one instead of two.
> M12plus := ModularSymbols(1,12,+1);
> Basis(M12plus);
[
X^10*{0, oo},
X^8*Y^2*{0, oo}
]
> CuspidalSubspace(M12plus);
Modular symbols space of level 1, weight 12, and dimension 1
> qExpansionBasis(CuspidalSubspace(M12),7);
[
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 + O(q^7)
]
The following is an example of how to create Dirichlet characters in Magma, and how to create a space of modular symbols with nontrivial character. For more details, see Section Dirichlet Characters.
> G<a,b,c> := DirichletGroup(16*7,CyclotomicField(EulerPhi(16*7))); > Order(a); 2 > Conductor(a); 4 > Order(b); 4 > Conductor(b); 16 > Order(c); 6 > Conductor(c); 7 > eps := a*b*c; > M := ModularSymbols(eps,2); M; Full Modular symbols space of level 112, weight 2, character a*b*c, and dimension 32 > BaseField(M); Cyclotomic Field of order 48 and degree 16
It is also possible to create many spaces of modular symbols for Gamma_0(N) by passing a "descriptive label" as an argument to ModularSymbols. The most specific label is a string of the form [Level]k[Weight][IsogenyClass], where [Level] is the level, [Weight] is the weight, [IsogenyClass] is a letter code: A, B, ..., Z, AA, BB, ..., ZZ, AAA, ..., and k is a place holder to separate the level and the weight. If the label is [Level][IsogenyClass], then the weight k is assumed equal to 2. If the label is [Level]k[Weight] then the cuspidal subspace of the full ambient space of modular symbols of weight k and level N is returned. The following are valid labels: 11A, 37B, 3k12A, 11k4. The ordering used on isogenies classes is lt; see the documentation for SortDecomposition.
Note: There is currently no intrinsic that, given a space of modular symbols, returns its label.
Warning: For 146 of the levels between 56 and 450, our ordering of weight 2 rational newforms disagrees with the ordering used in [Cre97]. Fortunately, it is easy to create a space of modular symbols from one of Cremona's labels using the associated elliptic curve.
> E := EllipticCurve(CremonaDatabase(),"56A"); > M1 := ModularSymbols(E);Observe that Cremona's "56A" is different from ours.
> M2 := ModularSymbols("56A");
> M2 eq M1;
false
The space of modular symbols described by a label.
> Del := ModularSymbols("1k12A"); Del;
Modular symbols space of level 1, weight 12, and dimension 2
> qEigenform(Del,5);
q - 24*q^2 + 252*q^3 - 1472*q^4 + O(q^5)
Next, we create the space corresponding to the first newform on Gamma_0(11)
of weight 4.
> M := ModularSymbols("11k4A"); M;
Modular symbols space of level 11, weight 4, and dimension 4
> AmbientSpace(M);
Full Modular symbols space of level 11, weight 4, and dimension 6
> qEigenform(M,5);
q + a*q^2 + (-4*a + 3)*q^3 + (2*a - 6)*q^4 + O(q^5)
> Parent($1);
Power series ring in q over Univariate Quotient Polynomial
Algebra in a over Rational Field with modulus a^2 - 2*a - 2
We next create the +1 quotient of the cuspidal subspace of weight-4 modular symbols of level 37.
> M := ModularSymbols("37k4",+1); M;
Modular symbols space of level 37, weight 4, and dimension 9
> AmbientSpace(M);
Full Modular symbols space of level 37, weight 4, and dimension 11
> Factorization(CharacteristicPolynomial(HeckeOperator(M,2)));
[
<x^4 + 6*x^3 - x^2 - 16*x + 6, 1>,
<x^5 - 4*x^4 - 21*x^3 + 74*x^2 + 102*x - 296, 1>
]
Suppose M is a space of weight k modular symbols over a field F. A modular symbol P(X, Y){alpha, beta} is input as M!<P(X,Y),[alpha,beta]>, where P(X, Y) in ()F[X, Y] is homogeneous of degree k - 2, and alpha, beta in P^1(Q). Here is an example:
Any space M of modular symbols is finitely generated. One proof of this uses that every modular symbol is a linear combination of Manin symbols. Let P^1(Z/NZ) be the set of pairs (/line(u), /line(v)) in Z/NZ x Z NZ such that ( GCD)(u, v, N)=1, where u and v are lifts of /line(u) and /line(v) to Z. A Manin symbols < P(X, Y), (/line(u), /line(v)) > is a pair consisting of a homogeneous polynomial P(X, Y) in F[X, Y] of degree k - 2 and an element (/line(u), /line(v)) in P^1(Z/NZ). The modular symbol associated to < P(X, Y), (/line(u), /line(v)) > is constructed as follows. Choose lifts u, v of /line(u), /line(v) such that ( GCD)(u, v)=1. Then there is a matrix g=pmatrix(w&z cr u&v) in SL_2(Z) whose lower two entries are u and v. The modular symbol is then g(P(X, Y){0, Infinity}). The intrinsic ConvertFromManinSymbol computes the modular symbol attached to a Manin symbol. Ever modular symbol can be written as a linear combination of Manin symbols using the intrinsic ManinSymbol.
> F7 := GF(7); > M := ModularSymbols(3,4,F7); > R<X,Y> := PolynomialRing(F7,2);Now we input (X^2 - 2XY){0, 1}.
> M!<X^2-2*X*Y,[Cusps()|0,1]>;
6*Y^2*{oo, 0}
Note that (X^2 - 2XY){0, 1} = 6Y^2{Infinity, 0} in M.
When k=2, simply enter M!<1,[alpha,beta]>.
> M := ModularSymbols(11,2);
> M!<1,[Cusps()|0,Infinity()]>;
-1*{oo, 0}
> M![<1,[Cusps()|0,Infinity()]>, <1,[Cusps()|0,1/11]>];
-2*{oo, 0}
> F5 := GF(5);
> M := ModularSymbols(6,4,F5);
> R<X,Y> := PolynomialRing(F5,2);
> ConvertFromManinSymbol(M,<X^2+Y^2,[1,4]>);
(3*X^2 + 3*X*Y + 2*Y^2)*{-1/2, 0} + (X^2 + 4*X*Y + 4*Y^2)*{-1/3,
0} + (X^2 + X*Y + 4*Y^2)*{1/3, 1/2}
> ManinSymbol(M.1-3*M.2);
[
<X^2, (0 1)>,
<2*X^2, (1 2)>
]
Thus the element M.1-3*M.2 of M
corresponds to the sum of Manin symbols
< X^2, (0, 1) > + 2< X^2, (1, 2) >.
The coercion of x into M. Here x can be either a modular symbol that lies in a subspace of M, a 2-tuple that describes a modular symbol, a sequence of such 2-tuples, or anything that can be coerced into VectorSpace(M). If x is a valid sequence of such 2-tuples, then M!x is the sum of the coercions into M of the elements of the sequence x.
The modular symbol associated to the 2-tuple x = < P(X, Y), [u, v] >, where P(X, Y) in F[X, Y] is homogeneous of degree k - 1, F is the base field of M, and [u, v] is a sequence of 2 integers that defines an element of P^1(Z/NZ), where N is the level of M.
An expression for x in terms of Manin symbols, which are represented as 2-tuples < P(X, Y), [u, v] >.
> M := ModularSymbols(14,2); M;
Full Modular symbols space of level 14, weight 2, and dimension 5
> Basis(M);
[
{oo, 0},
{-1/8, 0},
{-1/10, 0},
{-1/12, 0},
{-1/2, -3/7}
]
> M!<1,[1,0]>;
0
> M!<1,[0,1/11]>;
{-1/10, 0} + -1*{-1/12, 0}
> M![<1,[0,1/2]>, <-1,[0,1/7]>]; // sequences are added
{-1/8, 0} + -1*{-1/12, 0} + -1*{-1/2, -3/7}
> M!<1,[0,1/2]> - M!<1,[0,1/7]>;
{-1/8, 0} + -1*{-1/12, 0} + -1*{-1/2, -3/7}
> M!<1,[Cusps()|Infinity(),0]>; // Infinity() is in Cusps().
{oo, 0}
We can also coerce sequences into the underlying vector space of M.
> VectorSpace(M);
Full Vector space of degree 5 over Rational Field
Mapping from: Full Vector space of degree 5 over Rational Field
to ModSym: M given by a rule [no inverse]
Mapping from: ModSym: M to Full Vector space of degree 5 over
Rational Field given by a rule [no inverse]
> Eltseq(M.3);
[ 0, 0, 1, 0, 0 ]
> M![ 0, 0, 1, 0, 0 ];
{-1/10, 0}
> M.3;
{-1/10, 0}
The "polynomial coefficients" of the modular symbols
are homogeneous polynomials in 2 variables of degree k - 2.
> M := ModularSymbols(1,12);
> Basis(M);
[
X^10*{0, oo},
X^8*Y^2*{0, oo},
X^9*Y*{0, oo}
]
> R<X,Y> := PolynomialRing(Rationals(),2);
> M!<X^9*Y,[Cusps()|0,Infinity()]>;
X^9*Y*{0, oo}
> M!<X^7*Y^3,[Cusps()|0,Infinity()]>;
-25/48*X^9*Y*{0, oo}
> Eltseq(M!<X*Y^9,[1/3,1/2]>);
[ -19171, -58050, -30970 ]
> M![1,2,3];
X^10*{0, oo} + 2*X^8*Y^2*{0, oo} + 3*X^9*Y*{0, oo}
> ManinSymbol(M![1,2,3]);
[
<X^10, (0 1)>,
<2*X^8*Y^2, (0 1)>,
<3*X^9*Y, (0 1)>
]
Let R be a ring. Then a Dirichlet character over R of modulus N is a homomorphism varepsilon : (Z/NZ)^ * -> R^ * , where R^ * is the group of invertible elements of R. We extend varepsilon to a set theoretic map on the whole of Z by defining varepsilon(x) = 0 if gcd(x, N) != 1. The conductor of varepsilon is the smallest positive integer M such that the homomorphism (Z/NZ)^ * -> R^ * factors through (Z/MZ)^ * via the natural map (Z/NZ)^ * -> (Z/MZ)^ *.
The following functions support computations involving Dirichlet characters.
The group of Dirichlet characters modulo N with image in RationalField(). This is a group of exponent at most 2.
The group of Dirichlet characters modulo N with image in the ring R.
The group of Dirichlet characters mod N with image in the order-r cyclic subgroup of the ring R generated by the root of unity z. Here z must be an element of R of exact order r. The reason r must be input is that, for certain rings, it is not possible to determine the order of a general element.
The Dirichlet characters in G.
The Kronecker character n |-> (D/n), where D is a fundamental discriminant or 1. Thus Evaluate(KroneckerCharacter(D),n) equals KroneckerSymbol(D,n).
The Kronecker character n |-> (D/n) over the ring R.
A random element of G.
The number of generators of G.
Assign names to the generators of G.
Evaluate x at the integer n.
True if and only if Evaluate(x,-1) is equal to 1. Note that in characteristic 0, the space of modular forms of weight k and character x is zero if x is even and k is odd.
True if and only if Evaluate(x,-1) is equal to -1. Note that in characteristic 0, the space of modular forms of weight k and character x is zero if x is odd and k is even.
True if and only if x has order 1.
Base extension of G to R.
Base extension of G to R that identifies the distinguished root of unity of the base ring of G with z.
The product of x and y. This is a Dirichlet character of modulus equal to the least common multiple of the moduli of x and y. The base rings and chosen roots of unity of the parents of x and y are equal.
The Dirichlet character x raised to the power of n.
> G<a> := DirichletGroup(5); G; // The default base field is Q. Group of Dirichlet characters of modulus 5 over Rational Field > #G; 2 > [Evaluate(a,n) : n in [1..5]]; [ 1, -1, -1, 1, 0 ] > Eltseq(a); [ 1 ] > a eq G![1]; true > IsEven(a); true > IsOdd(a); false > IsTrivial(a); falseNext we create a character by building it up "locally".
> G1<a4> := DirichletGroup(4); > Conductor(a4); 4 > G2<a5> := DirichletGroup(25); > Conductor(a5); 5 > eps := a4*a5; > Modulus(eps); 100 > Conductor(eps); 20 > Evaluate(eps,7) eq Evaluate(a4,7)*Evaluate(a5,7); trueCharacters can be constructed over various fields.
> G<a> := DirichletGroup(7,GF(7)); > #G; 6 > Evaluate(a,2); 2 > > G<a3,a5> := DirichletGroup(15,CyclotomicField(EulerPhi(15))); > G; Group of Dirichlet characters of modulus 15 over Cyclotomic Field of order 8 and degree 4 > #G; 8 > Conductor(a3); 3 > Conductor(a5); 5 > Order(a5); 4 > Evaluate(a5,2); zeta_8^2If D is a fundamental discriminant, then KroneckerCharacter(D) is the quadratic Dirichlet character corresponding to the quadratic field Q(Sqrt(D)). The following code verifies that KroneckerCharacter and KroneckerSymbol agree in the case D=209.
> chi := KroneckerCharacter(209); > for n in [1..209] do > assert Evaluate(chi,n) eq KroneckerSymbol(209,n); > end for;If E is an elliptic curve with newform f_E, then the twist E_D corresponds to f_E twisted by this character, as illustrated below.
> E := EllipticCurve(CremonaDatabase(),"11A"); > f := qEigenform(E,8); f; q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 + O(q^8) > chi := KroneckerCharacter(-7); > qEigenform(QuadraticTwist(E,-7),8); q - 2*q^2 + q^3 + 2*q^4 - q^5 - 2*q^6 + O(q^8) > R<q> := Parent(f); > &+[Evaluate(chi,n)*Coefficient(f,n)*q^n : n in [1..7]] + O(q^8); q - 2*q^2 + q^3 + 2*q^4 - q^5 - 2*q^6 + O(q^8)