Pari/GP Reference Documentation | Contents - Global index - GP keyboard shortcuts |
Generalized modular forms Modular form spaces lfunmf mfDelta mfEH mfEk mfTheta mfatkin mfatkineigenvalues mfatkininit mfbasis mfbd mfbracket mfcoef mfcoefs mfconductor mfcosets mfcuspisregular mfcusps mfcuspval mfcuspwidth mfderiv mfderivE2 mfdescribe mfdim mfdiv mfeigenbasis mfeigensearch mfeisenstein mfembed mfeval mffields mffromell mffrometaquo mffromlfun mffromqf mfgaloisprojrep mfgaloistype mfhecke mfheckemat mfinit mfisCM mfisequal mfisetaquo mfkohnenbasis mfkohnenbijection mfkohneneigenbasis mflinear mfmanin mfmul mfnumcusps mfparams mfperiodpol mfperiodpolbasis mfpetersson mfpow mfsearch mfshift mfshimura mfslashexpansion mfspace mfsplit mfsturm mfsymbol mfsymboleval mftaylor mftobasis mftocoset mftonew mftraceform mftwist | |
This section describes routines for working with modular forms and modular form spaces.
| |
Modular form spaces | |
These structures are initialized by the * The full modular form space Mk(Γ0(N),χ), where k is an integer or a half-integer and χ a Dirichlet character modulo N (flag = 4, the default). * The cuspidal space Sk(Γ0(N),χ) (flag = 1). * The Eisenstein space ℰk(Γ0(N),χ) (flag = 3), so that Mk = ℰk⨁ Sk. * The new space Sknew(Γ0(N),χ) (flag = 0). * The old space Skold(Γ0(N),χ) (flag = 2), so that Sk = Sknew⨁ Skold.
These resulting
The basis of eigenforms for the new space is obtained by the function
| |
Generalized modular forms | |
A modular form is represented in a special internal format giving the
possibility to compute an arbitrary number of terms of its Fourier coefficients
at infinity [a(0),a(1),...,a(n)] using the function
Modular forms are obtained either directly from other mathematical objects,
e.g., elliptic curves, or by a specific formula, e.g., Eisenstein series or
Ramanujan's Delta function, or by applying standard operators to existing forms
(Hecke operators, Rankin-Cohen brackets,...). A function A number of creation functions and operations are provided. It is however important to note that strictly speaking some of these operations create objects which are not modular forms: typical examples are derivation or integration of modular forms, the Eisenstein series E2, eta quotients, or quotients of modular forms. These objects are nonetheless very important in the theory, so are not considered as errors; however the user must be aware that no attempt is made to check that the objects that he handles are really modular. When the documentation of a function does not state that it applies to generalized modular forms, then the output is undefined if the input is not a true modular form.
| |
lfunmf(mf, {F}) | |
If F is a modular form in
? mf = mfinit([35,2],0);mffields(mf) %1 = [y, y^2 - y - 4] ? f = mfeigenbasis(mf)[2]; mfparams(f) \\ orbit of dimension two %2 = [35, 2, 1, y^2 - y - 4, t - 1] ? [L1,L2] = lfunmf(mf, f); \\ Two L-functions ? lfun(L1,1) %4 = 0.81018461849460161754947375433874745585 ? lfun(L2,1) %5 = 0.46007635204895314548435893464149369804 ? [ lfun(L,1) | L <- concat(lfunmf(mf)) ] %6 = [0.70291..., 0.81018..., 0.46007...]
The
The library syntax is
| |
mfDelta() | |
Mf structure corresponding to the Ramanujan Delta function Δ.
? mfcoefs(mfDelta(),4) %1 = [0, 1, -24, 252, -1472]
The library syntax is
| |
mfEH(k) | |
k being in 1/2+ℤ ≥ 0, return the mf structure corresponding to the Cohen-Eisenstein series Hk of weight k on Γ0(4).
? H = mfEH(13/2); mfcoefs(H,4) %1 = [691/32760, -1/252, 0, 0, -2017/252] The coefficients of H are given by the Cohen-Hurwitz function H(k-1/2,N) and can be obtained for moderately large values of N (the algorithm uses Õ(N) time):
? mfcoef(H,10^5+1) time = 55 ms. %2 = -12514802881532791504208348 ? mfcoef(H,10^7+1) time = 6,044 ms. %3 = -1251433416009877455212672599325104476
The library syntax is
| |
mfEk(k) | |
K being an even nonnegative integer, return the mf structure corresponding to the standard Eisenstein series Ek.
? mfcoefs(mfEk(8), 4) %1 = [1, 480, 61920, 1050240, 7926240]
The library syntax is
| |
mfTheta({psi = 1}) | |
The unary theta function corresponding to the primitive Dirichlet character ψ. Its level is 4 F(ψ)2 and its weight is 1 - ψ(-1)/2.
? Ser(mfcoefs(mfTheta(),30)) %1 = 1 + 2*x + 2*x^4 + 2*x^9 + 2*x^16 + 2*x^25 + O(x^31) ? f = mfTheta(8); Ser(mfcoefs(f,30)) %2 = 2*x - 2*x^9 - 2*x^25 + O(x^31) ? mfparams(f) %3 = [256, 1/2, 8, y, t + 1] ? g = mfTheta(-8); Ser(mfcoefs(g,30)) %4 = 2*x + 6*x^9 - 10*x^25 + O(x^31) ? mfparams(g) %5 = [256, 3/2, 8, y, t + 1] ? h = mfTheta(Mod(2,5)); mfparams(h) %6 = [100, 3/2, Mod(7, 20), y, t^2 + 1]
The library syntax is
| |
mfatkin(mfatk, f) | |
Given a
? mf = mfinit([35,2],0); [f] = mfbasis(mf); ? mfcoefs(f, 4) %2 = [0, 3, -1, 0, 3] ? mfatk = mfatkininit(mf,7); ? g = mfatkin(mfatk, f); mfcoefs(g, 4) %4 = [0, 1, -1, -2, 7] ? mfatk = mfatkininit(mf,35); ? g = mfatkin(mfatk, f); mfcoefs(g, 4) %6 = [0, -3, 1, 0, -3]
The library syntax is
| |
mfatkineigenvalues(mf, Q) | |
Given a modular form space
? mf = mfinit([35,2],0); mffields(mf) %1 = [y, y^2 - y - 4] \\ two orbits, dimension 1 and 2 ? mfatkineigenvalues(mf,5) %2 = [[1], [-1, -1]] ? mf = mfinit([12,7,Mod(3,4)],0); ? mfatkineigenvalues(mf,3) %4 = [[I, -I, -I, I, I, -I]] \\ one orbit
To obtain the eigenvalues on a larger space than the new space,
e.g., the full space, you can directly call
The library syntax is
| |
mfatkininit(mf, Q) | |
Given a modular form space with parameters N,k,χ and a
primitive divisor Q of the level N, initializes data necessary for
working with the Atkin-Lehner operator WQ, for now only the function
The result is a technical 4-component vector
*
*
*
? mf=mfinit([32,4],0); [mfB,MC,C]=mfatkininit(mf,32); MC %1 = [5/16 11/2 55/8] [ 1/8 0 -5/4] [1/32 -1/4 11/16] ? C %2 = 1 ? mf=mfinit([32,4,8],0); [mfB,MC,C]=mfatkininit(mf,32); MC %3 = [ 1/8 -7/4] [-1/16 -1/8] ? C %4 = 0.35355339059327376220042218105242451964 ? algdep(C,2) \\ C = 1/sqrt(8) %5 = 8*x^2 - 1
The library syntax is
| |
mfbasis(NK, {space = 4}) | |
If NK = [N,k,CHI] as in
If
? see(L) = apply(f->mfcoefs(f,3), L); ? mf = mfinit([35,2],0); ? see( mfbasis(mf) ) %2 = [[0, 3, -1, 0], [0, -1, 9, -8], [0, 0, -8, 10]] ? see( mfeigenbasis(mf) ) %3 = [[0, 1, 0, 1], [Mod(0, z^2 - z - 4), Mod(1, z^2 - z - 4), \ Mod(-z, z^2 - z - 4), Mod(z - 1, z^2 - z - 4)]] ? mf = mfinit([35,2]); ? see( mfbasis(mf) ) %5 = [[1/6, 1, 3, 4], [1/4, 1, 3, 4], [17/12, 1, 3, 4], \ [0, 3, -1, 0], [0, -1, 9, -8], [0, 0, -8, 10]] ? see( mfbasis([48,4],0) ) %6 = [[0, 3, 0, -3], [0, -3, 0, 27], [0, 2, 0, 30]]
The library syntax is
| |
mfbd(F, d) | |
F being a generalized modular form, return B(d)(F), where B(d) is
the expanding operator τ
? D2=mfbd(mfDelta(),2); mfcoefs(D2, 6) %1 = [0, 0, 1, 0, -24, 0, 252]
The library syntax is
| |
mfbracket(F, G, {m = 0}) | |
Compute the m-th Rankin-Cohen bracket of the generalized modular forms F and G.
? E4 = mfEk(4); E6 = mfEk(6); ? D1 = mfbracket(E4,E4,2); mfcoefs(D1,5)/4800 %2 = [0, 1, -24, 252, -1472, 4830] ? D2 = mfbracket(E4,E6,1); mfcoefs(D2,10)/(-3456) %3 = [0, 1, -24, 252, -1472, 4830]
The library syntax is
| |
mfcoef(F, n) | |
Compute the n-th Fourier coefficient a(n) of the generalized modular
form F. Note that this is the n+1-st component of the vector
? mfcoef(mfDelta(),10) %1 = -115920
The library syntax is
| |
mfcoefs(F, n, {d = 1}) | |
Compute the vector of Fourier coefficients [a[0],a[d],...,a[nd]] of the generalized modular form F; d must be positive and d = 1 by default.
? D = mfDelta(); ? mfcoefs(D,10) %2 = [0, 1, -24, 252, -1472, 4830, -6048, -16744, 84480, -113643, -115920] ? mfcoefs(D,5,2) %3 = [0, -24, -1472, -6048, 84480, -115920] ? mfcoef(D,10) %4 = -115920
This function also applies when F is a modular form space as output by
? mf = mfinit([1,12]); ? mfcoefs(mf,5) %2 = [691/65520 0] [ 1 1] [ 2049 -24] [ 177148 252] [ 4196353 -1472] [ 48828126 4830]
The library syntax is
| |
mfconductor(mf, F) | |
? mf=mfinit([96,6],1); vF = mfbasis(mf); mfdim(mf) %1 = 72 ? vector(10,i, mfconductor(mf, vF[i])) %2 = [3, 6, 12, 24, 48, 96, 4, 8, 12, 16]
The library syntax is
| |
mfcosets(N) | |
Let N be a positive integer. Return the list of right cosets of Γ0(N) \Γ, i.e., matrices γj ∈ Γ such that Γ = ⨆ j Γ0(N) γj. The γj are chosen in the form [a,b;c,d] with c | N.
? mfcosets(4) %1 = [[0, -1; 1, 0], [1, 0; 1, 1], [0, -1; 1, 2], [0, -1; 1, 3],\ [1, 0; 2, 1], [1, 0; 4, 1]] We also allow the argument N to be a modular form space, in which case it is replaced by the level of the space:
? M = mfinit([4, 12, 1], 0); mfcosets(M) %2 = [[0, -1; 1, 0], [1, 0; 1, 1], [0, -1; 1, 2], [0, -1; 1, 3],\ [1, 0; 2, 1], [1, 0; 4, 1]] Warning. In the present implementation, the trivial coset is represented by [1,0;N,1] and is the last in the list.
The library syntax is
| |
mfcuspisregular(NK, cusp) | |
In the space defined by
? mfcuspisregular([4,3,-4],1/2) %1 = 0
The library syntax is
| |
mfcusps(N) | |
Let N be a positive integer. Return the list of cusps of Γ0(N) in the form a/b with b | N.
? mfcusps(24) %1 = [0, 1/2, 1/3, 1/4, 1/6, 1/8, 1/12, 1/24] We also allow the argument N to be a modular form space, in which case it is replaced by the level of the space:
? M = mfinit([4, 12, 1], 0); mfcusps(M) %2 = [0, 1/2, 1/4]
The library syntax is
| |
mfcuspval(mf, F, cusp) | |
Valuation of modular form F in the space
? T=mfTheta(); mf=mfinit([12,1/2]); mfcusps(12) %1 = [0, 1/2, 1/3, 1/4, 1/6, 1/12] ? apply(x->mfcuspval(mf,T,x), %1) %2 = [0, 1/4, 0, 0, 1/4, 0] ? mf=mfinit([12,6,12],1); F=mfbasis(mf)[5]; ? apply(x->mfcuspval(mf,F,x),%1) %4 = [1/12, 1/6, 1/2, 2/3, 1/2, 2] ? mf=mfinit([12,3,-4],1); F=mfbasis(mf)[1]; ? apply(x->mfcuspval(mf,F,x),%1) %6 = [1/12, 1/6, 1/4, 2/3, 1/2, 1] ? mf = mfinit([625,2],0); [F] = mfeigenbasis(mf); mfparams(F) %7 = [625, 2, 1, y^2 - y - 1, t - 1] \\ [Q(F):Q(chi)] = 2 ? mfcuspval(mf, F, 1/25) %8 = [1, 2] \\ one conjugate has valuation 1, and the other is 2 ? mfcuspval(mf, F, 1/5) %9 = [1/25, 1/25]
The library syntax is
| |
mfcuspwidth(N, cusp) | |
Width of
? mfcusps(12) %1 = [0, 1/2, 1/3, 1/4, 1/6, 1/12] ? [mfcuspwidth(12,c) | c <- mfcusps(12)] %2 = [12, 3, 4, 3, 1, 1] ? mfcuspwidth(12, oo) %3 = 1 We also allow the argument N to be a modular form space, in which case it is replaced by the level of the space:
? M = mfinit([4, 12, 1], 0); mfcuspwidth(M, 1/2) %4 = 1
The library syntax is
| |
mfderiv(F, {m = 1}) | |
m-th formal derivative of the power series corresponding to the generalized modular form F, with respect to the differential operator qd/dq (default m = 1).
? D=mfDelta(); ? mfcoefs(D, 4) %2 = [0, 1, -24, 252, -1472] ? mfcoefs(mfderiv(D), 4) %3 = [0, 1, -48, 756, -5888]
The library syntax is
| |
mfderivE2(F, {m = 1}) | |
Compute the Serre derivative (q d/dq)F - kE2F/12 of the generalized modular form F, which has weight k+2; if F is a true modular form, then its Serre derivative is also modular. If m > 1, compute the m-th iterate, of weight k + 2m.
? mfcoefs(mfderivE2(mfEk(4)),5)*(-3) %1 = [1, -504, -16632, -122976, -532728] ? mfcoefs(mfEk(6),5) %2 = [1, -504, -16632, -122976, -532728]
The library syntax is
| |
mfdescribe(F, {&G}) | |
Gives a human-readable description of F, which is either a modular
form space or a generalized modular form. If the address of G is given,
puts into G the vector of parameters of the outermost operator defining F;
this vector is empty if F is a leaf (an atomic object such as
? E1 = mfeisenstein(4,-3,-4); mfdescribe(E1) %1 = "F4(-3, -4)" ? E2 = mfeisenstein(3,5,-7); mfdescribe(E2) %2 = "F3(5, -7)" ? E3 = mfderivE2(mfmul(E1,E2), 3); mfdescribe(E3,&G) %3 = "DERE2^3(MUL(F4(-3, -4), F3(5, -7)))" ? mfdescribe(G[1][1]) %4 = "MUL(F4(-3, -4), F3(5, -7))" ? G[2] %5 = 3 ? for (i = 0, 4, mf = mfinit([37,4],i); print(mfdescribe(mf))); S4^new(G0(37, 1)) S4(G0(37, 1)) S4^old(G0(37, 1)) E4(G0(37, 1)) M4(G0(37, 1))
The library syntax is
| |
mfdim(NK, {space = 4}) | |
If NK = [N,k,CHI] as in
The subspace is described by the small integer
Wildcards.
As in * order is the order of the character,
* conrey its Conrey label from which the character may be recovered
via * dim the dimension of the corresponding space, * dimdih the dimension of the subspace of dihedral forms corresponding to Hecke characters if k = 1 (this is not implemented for the old space and set to -1 for the time being) and 0 otherwise. The spaces are sorted by increasing order of the character; the characters are taken up to Galois conjugation and the Conrey number is the minimal one among Galois conjugates. In weight 1, this is only implemented when the space is 0 (newspace), 1 (cusp space), 2(old space) or 3(Eisenstein series). Wildcards for sets of characters. CHI may be a set of characters, and we return the set of [dim,dimdih]. Wildcard for Mk(Γ1(N)). Additionally, the wildcard CHI = -1 is available in which case we output the total dimension of the corresponding subspace of Mk(Γ1(N)). In weight 1, this is not implemented when the space is 4 (fullspace).
? mfdim([23,2], 0) \\ new space %1 = 2 ? mfdim([96,6], 0) %2 = 10 ? mfdim([10^9,4], 3) \\ Eisenstein space %1 = 40000 ? mfdim([10^9+7,4], 3) %2 = 2 ? mfdim([68,1,-1],0) %3 = 3 ? mfdim([68,1,0],0) %4 = [[2, Mod(67, 68), 1, 1], [4, Mod(47, 68), 1, 1]] ? mfdim([124,1,0],0) %5 = [[6, Mod(67, 124), 2, 0]] This last example shows that there exists a nondihedral form of weight 1 in level 124.
The library syntax is
| |
mfdiv(F, G) | |
Given two generalized modular forms F and G, compute F/G assuming
that the quotient will not have poles at infinity. If this is the
case, use
? D = mfDelta(); \\ Delta ? H = mfpow(mfEk(4), 3); ? J = mfdiv(H, D) *** at top-level: J=mfdiv(H,mfdeltac *** ^ — — — — — — -- *** mfdiv: domain error in mfdiv: ord(G) > ord(F) ? J = mfdiv(H, mfshift(D,1)); ? mfcoefs(J, 4) %4 = [1, 744, 196884, 21493760, 864299970]
The library syntax is
| |
mfeigenbasis(mf) | |
Vector of the eigenforms for the space
? mf = mfinit([26,2],0); ? see(L) = for(i=1,#L,print(mfcoefs(L[i],6))); ? see( mfeigenbasis(mf) ) [0, 1, -1, 1, 1, -3, -1] [0, 1, 1, -3, 1, -1, -3] ? see( mfbasis(mf) ) [0, 2, 0, -2, 2, -4, -4] [0, -2, -4, 10, -2, 0, 8]
The eigenforms are internally expressed as (algebraic) linear combinations of
? mf = mfinit([96,6],0); B = mfeigenbasis(mf); #B %1 = 8; ? vector(#B, i, mfcoefs(B[i],1000)); \\ expanded individually: slow time = 7,881 ms. ? M = mfcoefs(mf, 1000); \\ initialize once time = 982 ms. ? vector(#B, i, M * mftobasis(mf,B[i])); \\ then expand: much faster time = 623 ms.
When the eigenforms are defined over an extension field of ℚ(χ) for a
nonrational character, their coefficients are hard to read and you may want
to lift them or to express them in an absolute number field. In the
construction below T defines ℚ(f) over ℚ, a is the image of the
generator
? mf = mfinit([31, 2, Mod(25,31)], 0); [f] = mfeigenbasis(mf); ? f.mod %2 = Mod(1, t^2 + t + 1)*y^2 + Mod(2*t + 2, t^2 + t + 1) ? v = liftpol(mfcoefs(f,5)) %3 = [0, 1, (-t - 1)*y - 1, t*y + (t + 1), (2*t + 2)*y + 1, t] ? [T,a,k] = rnfequation(mf.mod, f.mod, 1) %4 = [y^4 + 2*y^2 + 4, Mod(-1/2*y^2 - 1, y^4 + 2*y^2 + 4), 0] ? liftpol(substvec(v, [t,y], [a, y-k*a])) %5 = [0, 1, 1/2*y^3 - 1, -1/2*y^3 - 1/2*y^2 - y, -y^3 + 1, -1/2*y^2 - 1]
Beware that the meaning of y has changed in the last line
is different: it now represents of root of T, no longer of
? [T,a,k] = rnfequation(mf.mod, subst(f.mod,'y,'x), 1) %6 = [x^4 + 2*x^2 + 4, Mod(-1/2*x^2 - 1, x^4 + 2*x^2 + 4), 0] ? liftpol(substvec(v, [t,y], [a, x-k*a])) %7 = [0, 1, 1/2*x^3 - 1, -1/2*x^3 - 1/2*x^2 - x, -x^3 + 1, -1/2*x^2 - 1]
The library syntax is
| |
mfeigensearch(NK, {AP}) | |
Search for a normalized rational eigen cuspform with quadratic character given restrictions on a few initial coefficients. The meaning of the parameters is as follows:
*
* The result is a vector of newforms f matching the search criteria, sorted by increasing level then increasing |D|.
? #mfeigensearch([[1..80],2], [[2,2],[3,-1]]) %1 = 1 ? #mfeigensearch([[1..80],2], [[2,2],[5,2]]) %2 = 1 ? v = mfeigensearch([[1..20],2], [[3,Mod(2,3)],[7,Mod(5,7)]]); #v %3 = 1 ? F=v[1]; [mfparams(F)[1], mfcoefs(F,15)] %4 = [11, [0, 1, -2, -1, 2, 1, 2, -2, 0, -2, -2, 1, -2, 4, 4, -1]]
The library syntax is
| |
mfeisenstein(k, {CHI1}, {CHI2}) | |
Create the Eisenstein series Ek(χ1,χ2), where k ≥ 1, χi are Dirichlet characters and an omitted character is considered as trivial. This form belongs to ℰk(Γ0(N), χ) with χ = χ1χ2 and N is the product of the conductors of χ1 and χ2.
? CHI = Mod(3,4); ? E = mfeisenstein(3, CHI); ? mfcoefs(E, 6) %2 = [-1/4, 1, 1, -8, 1, 26, -8] ? CHI2 = Mod(4,5); ? mfcoefs(mfeisenstein(3,CHI,CHI2), 6) %3 = [0, 1, -1, -10, 1, 25, 10] ? mfcoefs(mfeisenstein(4,CHI,CHI), 6) %4 = [0, 1, 0, -28, 0, 126, 0] ? mfcoefs(mfeisenstein(4), 6) %5 = [1/240, 1, 9, 28, 73, 126, 252]
Note that Important note. This function is currently implemented only when ℚ(χ) is the field of definition of Ek(χ1,χ2). If it is a strict subfield, an error is raised:
? mfeisenstein(6, Mod(7,9), Mod(4,9)); *** at top-level: mfeisenstein(6,Mod(7,9),Mod(4,9)) *** ^ — — — — — — — — — — — *** mfeisenstein: sorry, mfeisenstein for these characters is not *** yet implemented. The reason for this is that each modular form is attached to a modular form space Mk(Γ0(N),χ). This is a ℂ-vector space but it allows a basis of forms defined over ℚ(χ) and is only implemented as a ℚ(χ)-vector space: there is in general no mechanism to take linear combinations of forms in the space with coefficients belonging to a larger field. (Due to their importance, eigenforms are the single exception to this restriction; for an eigenform F, ℚ(F) is built on top of ℚ(χ).) When the property ℚ(χ) = ℚ(Ek(χ1,χ2) does not hold, we cannot express E as a ℚ(χ)-linear combination of the basis forms and many operations will fail. For this reason, the construction is currently disabled.
The library syntax is
| |
mfembed(f, {v}) | |
Let f be a generalized modular form with parameters [N,k,χ,P] (see
This function is meant to create embeddings of ℚ(f) and/or apply them
to the object v, typically a vector of Fourier coefficients of f
from * If v is omitted and f is a modular form as above, we return the embedding of ℚ(χ) if ℚ(χ) = ℚ(f) and a vector containing [ℚ(f):ℚ(χ)] embeddings of ℚ(f) otherwise. * If v is given, it must be a scalar in ℚ(f), or a vector/matrix of such, we apply the embeddings coefficientwise and return either a single result if ℚ(f) = ℚ(χ) and a vector of [ℚ(f):ℚ(χ)] results otherwise.
* Finally f can be replaced by a single embedding produced by
? mf = mfinit([35,2,Mod(11,35)], 0); ? [f] = mfbasis(mf); ? f.mod \\ ℚ(χ) = ℚ(ζ3) %3 = t^2 + t + 1 ? v = mfcoefs(f,5); lift(v) \\ coefficients in ℚ(χ) %4 = [0, 2, -2*t - 2, 2*t, 2*t, -2*t - 2] ? mfembed(f, v) \\ single embedding %5 = [0, 2, -1 - 1.7320...*I, -1 + 1.73205...*I, -1 + 1.7320...*I, ...] ? [F] = mfeigenbasis(mf); ? mffields(mf) %7 = [y^2 + Mod(-2*t, t^2 + t + 1)] \\ [ℚ(f):ℚ(χ)] = 2 ? V = liftpol( mfcoefs(F,5) ); %8 = [0, 1, y + (-t - 1), (t + 1)*y + t, (-2*t - 2)*y + t, -t - 1] ? vall = mfembed(F, V); #vall %9 = 2 \\ 2 embeddings, both applied to V ? vall[1] \\ the first %10 = [0, 1, -1.2071... - 2.0907...*I, 0.2071... - 0.3587...*I, ...] ? vall[2] \\ and the second one %11 = [0, 1, 0.2071... + 0.3587...*I, -1.2071... + 2.0907...*I, ...] ? vE = mfembed(F); #vE \\ same 2 embeddings %12 = 2 ? mfembed(vE[1], V) \\ apply first embedding to V %13 = [0, 1, -1.2071... - 2.0907...*I, 0.2071... - 0.3587...*I, ...]
For convenience, we also allow a modular form space from
? [mfB,MC,C] = mfatkininit(mf,7); MC \\ coefs in ℚ(χ) %13 = [ Mod(2/7*t, t^2 + t + 1) Mod(-1/7*t - 2/7, t^2 + t + 1)] [Mod(-1/7*t - 2/7, t^2 + t + 1) Mod(2/7*t, t^2 + t + 1)] ? C \\ normalizing constant %14 = 0.33863... - 0.16787*I ? M = mfembed(mf, MC) / C \\ the true matrix for the action of w7 [-0.6294... + 0.4186...*I -0.3625... - 0.5450...*I] [-0.3625... - 0.5450...*I -0.6294... + 0.4186...*I] ? exponent(M*conj(M) - 1) \\ M * conj(M) is close to 1 %16 = -126
The library syntax is
| |
mfeval(mf, F, vtau) | |
Computes the numerical value of the modular form F, belonging
to mf, at the complex number If the field of definition ℚ(F) is larger than ℚ(χ) then F may be embedded into ℂ in d = [ℚ(F):ℚ(χ)] ways, in which case a vector of the d results is returned.
? mf = mfinit([11,2],0); F = mfbasis(mf)[1]; mfparams(F) %1 = [11, 2, 1, y, t-1] \\ Q(F) = Q(chi) = Q ? mfeval(mf,F,I/2) %2 = 0.039405471130100890402470386372028382117 ? mf = mfinit([35,2],0); F = mfeigenbasis(mf)[2]; mfparams(F) %3 = [35, 2, 1, y^2 - y - 4, t - 1] \\ [Q(F) : Q(chi)] = 2 ? mfeval(mf,F,I/2) %4 = [0.045..., 0.0385...] \\ sigma1(F) and sigma2(F) at I/2 ? mf = mfinit([12,4],1); F = mfbasis(mf)[1]; ? mfeval(mf, F, 0.318+10^(-7)*I) %6 = 3.379... E-21 + 6.531... E-21*I \\ instantaneous !
In order to maximize the imaginary part of the argument,
the function computes (f | k γ)(γ-1.τ) for a
suitable γ not necessarily in Γ0(N) (in which case f |
γ is evaluated using
? T = mfTheta(); mf = mfinit(T); mfeval(mf,T,[0,1/2,1,oo]) %1 = [1/2 - 1/2*I, 0, 1/2 - 1/2*I, 1]
The library syntax is
| |
mffields(mf) | |
Given
? mf = mfinit([35,2],0); mffields(mf) %1 = [y, y^2 - y - 4] Here the character is trivial so ℚ(χ) = ℚ) and there are 3 newforms: one is rational (corresponding to y), the other two are conjugate and defined over the quadratic field ℚ[y]/(y2-y-4).
? [G,chi] = znchar(Mod(3,35)); ? zncharconductor(G,chi) %2 = 35 ? charorder(G,chi) %3 = 12 ? mf = mfinit([35, 2, [G,chi]],0); mffields(mf) %4 = [y, y] Here the character is primitive of order 12 and the two newforms are defined over ℚ(χ) = ℚ(ζ12).
? mf = mfinit([35, 2, Mod(13,35)],0); mffields(mf) %3 = [y^2 + Mod(5*t, t^2 + 1)] This time the character has order 4 and there are two conjugate newforms over ℚ(χ) = Q(i).
The library syntax is
| |
mffromell(E) | |
E being an elliptic curve defined over Q given by an
integral model in
? E = ellinit("26a1"); ? [mf,F,co] = mffromell(E); ? co %2 = [3/4, 1/4]~ ? mfcoefs(F, 5) %3 = [0, 1, -1, 1, 1, -3] ? ellan(E, 5) %4 = [1, -1, 1, 1, -3]
The library syntax is
| |
mffrometaquo(eta, {flag = 0}) | |
Modular form corresponding to the eta quotient matrix
? mffrometaquo(Mat([1,1]),1) %1 = 0 ? mfcoefs(mffrometaquo(Mat([1,24])),6) %2 = [0, 1, -24, 252, -1472, 4830, -6048] ? mfcoefs(mffrometaquo([1,1;23,1]),10) %3 = [0, 1, -1, -1, 0, 0, 1, 0, 1, 0, 0] ? F = mffrometaquo([1,2;2,-1]); mfparams(F) %4 = [16, 1/2, 1, y, t - 1] ? mfcoefs(F,10) %5 = [1, -2, 0, 0, 2, 0, 0, 0, 0, -2, 0] ? mffrometaquo(Mat([1,-24])) %6 = 0 ? f = mffrometaquo(Mat([1,-24]),1); mfcoefs(f,6) %7 = [1, 24, 324, 3200, 25650, 176256, 1073720]
For convenience, a
? f = mffrometaquo([1,24]); \\ also valid
The library syntax is
| |
mffromlfun(L) | |
Let L being an L-function in any of the
? L = lfuncreate(x^2+1); ? lfunan(L,10) %2 = [1, 1, 0, 1, 2, 0, 0, 1, 1, 2] ? [NK,space,v] = mffromlfun(L); NK %4 = [4, 1, -4] ? mf=mfinit(NK,space); w = mftobasis(mf,v) %5 = [1.0000000000000000000000000000000000000]~ ? [f] = mfbasis(mf); mfcoefs(f,10) \\ includes a0 ! %6 = [1/4, 1, 1, 0, 1, 2, 0, 0, 1, 1, 2] If L has inexact complex coefficients, one can for instance compute an eigenbasis for mf and check whether one of the attached L-function is reasonably close to L. In the example, we cheat by producing the L function from an eigenform in a known space, but the function does not use this information:
? mf = mfinit([32,6,Mod(5,32)],0); ? [poldegree(K) | K<-mffields(mf)] %2 = [19] \\ one orbit, [Q(F) : Q(chi)] = 19 ? L = lfunmf(mf)[1][1]; \\ one of the 19 L-functions attached to F ? lfunan(L,3) %4 = [1, 5.654... - 0.1812...*I, -7.876... - 19.02...*I] ? [NK,space,v] = mffromlfun(L); NK %5 = [32, 6, Mod(5, 32)] ? vL = concat(lfunmf(mf)); \\ L functions for all cuspidal eigenforms ? an = lfunan(L,10); ? for (i = 1, #vL, if (normlp(lfunan(vL[i],10) - an, oo) < 1e-10, print(i))); 1
The library syntax is
| |
mffromqf(Q, {P}) | |
Q being an even integral positive definite quadratic form
and P a homogeneous spherical polynomial for Q, computes
a 3-component vector [mf,F,v], where F is the theta function
corresponding to (Q,P), mf is the corresponding space of modular
forms (from
? [mf,F,v] = mffromqf(2*matid(10)); v %1 = [64/5, 4/5, 32/5]~ ? mfcoefs(F, 5) %2 = [1, 20, 180, 960, 3380, 8424] ? mfcoef(F, 10000) \\ number of ways of writing 10000 as sum of 10 squares %3 = 128205250571893636 ? mfcoefs(F, 10000); \\ fast ! time = 220ms ? [mf,F,v] = mffromqf([2,0;0,2],x^4-6*x^2*y^2+y^4); ? mfcoefs(F,10) %6 = [0, 4, -16, 0, 64, -56, 0, 0, -256, 324, 224] ? mfcoef(F,100000) \\ instantaneous %7 = 41304367104 Odd dimensions are supported, corresponding to forms of half-integral weight:
? [mf,F,v] = mffromqf(2*matid(3)); ? mfisequal(F, mfpow(mfTheta(),3)) %2 = 1 ? mfcoefs(F, 32) \\ illustrate Legendre's 3-square theorem %3 = [ 1, 6, 12, 8, 6, 24, 24, 0, 12, 30, 24, 24, 8, 24, 48, 0, 6, 48, 36, 24,24, 48, 24, 0, 24, 30, 72, 32, 0, 72, 48, 0, 12]
The library syntax is
| |
mfgaloisprojrep(mf, F) | |
mf being an
\\ A4 example ? mf = mfinit([4*31,1,Mod(87,124)],0); ? F = mfeigenbasis(mf)[1]; ? mfgaloistype(mf,F) %3 = -12 ? pol = mfgaloisprojrep(mf,F) %4 = x^12 + 68*x^10 + 4808*x^8 + ... + 4096 ? G = galoisinit(pol); galoisidentify(G) %5 = [12,3] \\A4 ? pol4 = polredbest(galoisfixedfield(G,G.gen[3], 1)) %6 = x^4 + 7*x^2 - 2*x + 14 ? polgalois(pol4) %7 = [12, 1, 1, "A4"] ? factor(nfdisc(pol4)) %8 = [ 2 4] [31 2] \\ S4 example ? mf = mfinit([4*37,1,Mod(105,148)],0); ? F = mfeigenbasis(mf)[1]; ? mfgaloistype(mf,F) %11 = -24 ? pol = mfgaloisprojrep(mf,F) %12 = x^24 + 24*x^22 + 256*x^20 + ... + 255488256 ? G = galoisinit(pol); galoisidentify(G) %13 = [24, 12] \\S4 ? pol4 = polredbest(galoisfixedfield(G,G.gen[3..4], 1)) %14 = x^4 - x^3 + 5*x^2 - 7*x + 12 ? polgalois(pol4) %15 = [24, -1, 1, "S4"] ? factor(nfdisc(pol4)) %16 = [ 2 2] [37 3]
The library syntax is
| |
mfgaloistype(NK, {F}) | |
? mfgaloistype([124,1, Mod(67,124)]) \\ A4 %1 = [-12] ? mfgaloistype([148,1, Mod(105,148)]) \\ S4 %2 = [-24] ? mfgaloistype([633,1, Mod(71,633)]) \\ D10, A5 %3 = [10, -60] ? mfgaloistype([239,1, -239]) \\ D6, D10, D30 %4 = [6, 10, 30] ? mfgaloistype([71,1, -71]) %5 = [14] ? mf = mfinit([239,1, -239],0); F = mfeigenbasis(mf)[2]; ? mfgaloistype(mf, F) %7 = 10 The function may also return 0 as a type when it failed to determine it; in this case the correct type is either -12 or -60, and most likely -12.
The library syntax is
| |
mfhecke(mf, F, n) | |
F being a modular form in modular form space mf, returns T(n)F, where T(n) is the n-th Hecke operator.
Warning. If F is of level M < N, then T(n)F
is in general not the same in Mk(Γ0(M),χ) and in
Mk(Γ0(N),χ). We take T(n) at the same level as the one
used in
? mf = mfinit([26,2],0); F = mfbasis(mf)[1]; mftobasis(mf,F) %1 = [1, 0]~ ? G2 = mfhecke(mf,F,2); mftobasis(mf,G2) %2 = [0, 1]~ ? G5 = mfhecke(mf,F,5); mftobasis(mf,G5) %3 = [-2, 1]~ Modular forms of half-integral weight are supported, in which case n must be a perfect square, else Tn will act as 0 (the operator Tp for p | N is not supported yet):
? F = mfpow(mfTheta(),3); mf = mfinit(F); ? mfisequal(mfhecke(mf,F,9), mflinear([F],[4])) %2 = 1 (F is an eigenvector of all Tp2, with eigenvalue p+1 for odd p.)
Warning. When n is a large composite, resp. the square of a large
composite in half-integral weight, it is in general more efficient to use
? mfcoefs(mfhecke(mf,F,3^10), 10) time = 917 ms. %3 = [324, 1944, 3888, 2592, 1944, 7776, 7776, 0, 3888, 9720, 7776] ? M = mfheckemat(mf,3^10) \\ instantaneous %4 = [324] ? G = mflinear(mf, M*mftobasis(mf,F)); ? mfcoefs(G, 10) \\ instantaneous %6 = [324, 1944, 3888, 2592, 1944, 7776, 7776, 0, 3888, 9720, 7776]
The library syntax is
| |
mfheckemat(mf, vecn) | |
If
? mf=mfinit([32,4],0); mfheckemat(mf,3) %1 = [0 44 0] [1 0 -10] [0 -2 0] ? mfheckemat(mf,[5,7]) %2 = [[0, 0, 220; 0, -10, 0; 1, 0, 12], [0, 88, 0; 2, 0, -20; 0, -4, 0]]
The library syntax is
| |
mfinit(NK, {space = 4}) | |
Create the space of modular forms corresponding to the data contained in
The subspace is described by the small integer
Wildcards. For given level and weight, it is advantageous to
compute simultaneously spaces attached to different Galois orbits
of characters, especially in weight 1. The parameter CHI may be set
to 0 (wildcard), in which case we return a vector of all
The output is a technical structure S, or a vector of structures if
CHI was a wildcard, which contains the following information:
[N,k,χ] is given by
? S = mfinit([36,2], 0); \\ new space ? mfdim(S) %2 = 1 ? mfparams %3 = [36, 2, 1, y] \\ trivial character ? f = mfbasis(S)[1]; mfcoefs(f,10) %4 = [0, 1, 0, 0, 0, 0, 0, -4, 0, 0, 0] ? vS = mfinit([36,2,0],0); \\ with wildcard ? #vS %6 = 4 \\ 4 non trivial spaces (mod Galois action) ? apply(mfdim,vS) %7 = [1, 2, 1, 4] ? mfdim([36,2,0], 0) %8 = [[1, Mod(1, 36), 1, 0], [2, Mod(35, 36), 2, 0], [3, Mod(13, 36), 1, 0], [6, Mod(11, 36), 4, 0]]
The library syntax is
| |
mfisCM(F) | |
Tests whether the eigenform F is a CM form. The answer
is 0 if it is not, and if it is, either the unique negative discriminant
of the CM field, or the pair of two negative discriminants of CM fields,
this latter case occurring only in weight 1 when the projective image is
D2 = C2 x C2, i.e., coded 4 by
? F = mffromell(ellinit([0,1]))[2]; mfisCM(F) %1 = -3 ? mf = mfinit([39,1,-39],0); F=mfeigenbasis(mf)[1]; mfisCM(F) %2 = Vecsmall([-3, -39]) ? mfgaloistype(mf) %3 = [4]
The library syntax is
| |
mfisequal(F, G, {lim = 0}) | |
Checks whether the modular forms F and G are equal. If
? D = mfDelta(); F = mfderiv(D); ? G = mfmul(mfEk(2), D); ? mfisequal(F, G) %2 = 1
The library syntax is
| |
mfisetaquo(f, {flag = 0}) | |
If the generalized modular form f is a holomorphic eta quotient,
return the eta quotient matrix, else return 0. If flag is set, also accept
meromorphic eta quotients: check whether f = q-v(g) g(q) for some
eta quotient g; if so, return the eta quotient matrix attached to g,
else return 0.
See
? mfisetaquo(mfDelta()) %1 = [1 24] ? f = mffrometaquo([1,1;23,1]); ? mfisetaquo(f) %3 = [ 1 1] [23 1] ? f = mffrometaquo([1,-24], 1); ? mfisetaquo(f) \\ nonholomorphic %5 = 0 ? mfisetaquo(f,1) %6 = [1 -24]
The library syntax is
| |
mfkohnenbasis(mf) | |
? mf = mfinit([36,5/2],1); K = mfkohnenbasis(mf); K~ %1 = [-1 0 0 2 0 0] [ 0 0 0 0 1 0] ? (mfcoefs(mf,20) * K)~ %4 = [0 -1 0 0 2 0 0 0 0 0 0 0 0 -6 0 0 8 0 0 0 0] [0 0 0 0 0 1 0 0 -2 0 0 0 0 0 0 0 0 1 0 0 2] ? mf = mfinit([40,3/2,8],1); mfkohnenbasis(mf) *** at top-level: mfkohnenbasis(mf) *** ^ — — — — — -- *** mfkohnenbasis: incorrect type in mfkohnenbasis [incorrect CHI] (t_VEC). In the final example both χ = (8/.) and χ.(-4/.) have conductor 8, which does not divide N/4 = 10.
The library syntax is
| |
mfkohnenbijection(mf) | |
Let
* * M is a matrix giving a Hecke-module isomorphism from that space to the Kohnen +-space Sk+(Γ0(4N),χ);
*
*
? mf=mfinit([60,5/2],1); [mf2,M,K,shi]=mfkohnenbijection(mf); M %2 = [-3 0 5/2 7/2] [ 1 -1/2 -7 -7] [ 1 1/2 0 -3] [ 0 0 5/2 5/2] ? shi %2 = [[1, 1], [2, 1]] This last command shows that the map giving the bijection is the sum of the Shimura lift with t = 1 and the one with t = 2. Since it gives a bijection of Hecke modules, this matrix can be used to transport modular form data from the easily computed space of level N and weight 2k-1 to the more difficult space of level 4N and weight k: matrices of Hecke operators, new space, splitting into eigenspaces and eigenforms. Examples:
? K^(-1)*mfheckemat(mf,121)*K /* matrix of T_11^2 on K. Slowish. */ time = 1,280 ms. %1 = [ 48 24 24 24] [ 0 32 0 -20] [-48 -72 -40 -72] [ 0 0 0 52] ? M*mfheckemat(mf2,11)*M^(-1) /* instantaneous via T_11 on S2k-1 */ time = 0 ms. %2 = [ 48 24 24 24] [ 0 32 0 -20] [-48 -72 -40 -72] [ 0 0 0 52] ? mf20=mfinit(mf2,0); [mftobasis(mf2,b) | b<-mfbasis(mf20)] %3 = [[0, 0, 1, 0]~, [0, 0, 0, 1]~] ? F1=M*[0,0,1,0]~ %4 = [1/2, 1/2, -3/2, -1/2]~ ? F2=M*[0,0,0,1]~ %5 = [3/2, 1/2, -9/2, -1/2] ? K*F1 %6 = [1, 0, 0, 1, 1, 0, 0, 1, -3, 0, 0, -3, 0, 0]~ ? K*F2 %7 = [3, 0, 0, 3, 1, 0, 0, 1, -9, 0, 0, -3, 0, 0]~ This gives a basis of the new space of S5/2+(Γ0(60)) expressed on the initial basis of S5/2(Γ0(60)). To obtain the eigenforms, we write instead:
? BE=mfeigenbasis(mf20);[E1,E2]=apply(x->K*M*mftobasis(mf2,x),BE) %1 = [[1, 0, 0, 1, 0, 0, 0, 0, -3, 0, 0, 0, 0, 0]~,\ [0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, -3, 0, 0]~ ? EI1 = mflinear(mf, E1); EI2=mflinear(mf, E2);
These are the two eigenfunctions in the space
The library syntax is
| |
mfkohneneigenbasis(mf, bij) | |
? mf=mfinit([44,5/2],1);bij=mfkohnenbijection(mf); ? [mf0,BN,BE]=mfkohneneigenbasis(mf,bij); ? BN~ %2 = [2 0 0 -2 2 0 -8] [2 0 0 4 14 0 -32] ? BE~ %3 = [1 0 0 Mod(y-1, y^2-3) Mod(2*y+1, y^2-3) 0 Mod(-4*y-4, y^2-3)] ? lift(mfcoefs(mf,20)*BE[,1]) %4 = [0, 1, 0, 0, y - 1, 2*y + 1, 0, 0, 0, -4*y - 4, 0, 0,\ -5*y + 3, 0, 0, 0, -6, 0, 0, 0, 7*y + 9]~
The library syntax is
| |
mflinear(vF, v) | |
? D = mfDelta(); G = mflinear([D],[-3]); ? mfcoefs(G,4) %2 = [0, -3, 72, -756, 4416] For user convenience, we allow
* a modular form space
* in this case, we also allow a modular form f as v, which
is understood as
? T = mfpow(mfTheta(),7); F = mfShimura(T,-3); \\ Shimura lift for D=-3 ? mfcoefs(F,8) %2 = [-5/9, 280, 9240, 68320, 295960, 875280, 2254560, 4706240, 9471000] ? mf = mfinit(F); G = mflinear(mf,F); ? mfcoefs(G,8) %4 = [-5/9, 280, 9240, 68320, 295960, 875280, 2254560, 4706240, 9471000] This last construction allows to replace a general modular form by a simpler linear combination of basis functions, which is often more efficient:
? T10=mfpow(mfTheta(),10); mfcoef(T10, 10^4) \\ direct evaluation time = 399 ms. %5 = 128205250571893636 ? mf=mfinit(T10); F=mflinear(mf,T10); \\ instantaneous ? mfcoef(F, 10^4) \\ after linearization time = 67 ms. %7 = 128205250571893636
The library syntax is
| |
mfmanin(FS) | |
Given the modular symbol FS associated to an eigenform F by
? D=mfDelta(); mf=mfinit(D); DS=mfsymbol(mf,D); ? [pols,oms]=mfmanin(DS); pols %2 = [[4*x^9 - 25*x^7 + 42*x^5 - 25*x^3 + 4*x],\ [-36*x^10 + 691*x^8 - 2073*x^6 + 2073*x^4 - 691*x^2 + 36]] ? oms %3 = [0.018538552324740326472516069364750571812,\ -0.00033105361053212432521308691198949874026*I, 4096/691] ? mf=mfinit([11,2],0); F=mfeigenbasis(mf)[1]; FS=mfsymbol(mf,F); ? [pols,oms]=mfmanin(FS);pols %5 = [[0, 0, 0, 1, 1, 0, 0, -1, -1, 0, 0, 0],\ [2, 0, 10, 5, -5, -10, -10, -5, 5, 10, 0, -2]] ? oms[3] %6 = 24/5
The library syntax is
| |
mfmul(F, G) | |
Multiply the two generalized modular forms F and G.
? E4 = mfEk(4); G = mfmul(mfmul(E4,E4),E4); ? mfcoefs(G, 4) %2 = [1, 720, 179280, 16954560, 396974160] ? mfcoefs(mfpow(E4,3), 4) %3 = [1, 720, 179280, 16954560, 396974160]
The library syntax is
| |
mfnumcusps(N) | |
Number of cusps of Γ0(N)
? mfnumcusps(24) %1 = 8 ? mfcusps(24) %1 = [0, 1/2, 1/3, 1/4, 1/6, 1/8, 1/12, 1/24]
The library syntax is
| |
mfparams(F) | |
If F is a modular form space, returns
In contrast with
? E1 = mfeisenstein(4,-3,-4); E2 = mfeisenstein(3,5,-7); E3 = mfmul(E1,E2); ? apply(mfparams, [E1,E2,E3]) %2 = [[12, 4, 12, y, t-1], [35, 3, -35, y, t-1], [420, 7, -420, y, t-1]] ? mf = mfinit([36,2,Mod(13,36)],0); [f] = mfeigenbasis(mf); mfparams(mf) %3 = [36, 2, Mod(13, 36), 0, t^2 + t + 1] ? mfparams(f) %4 = [36, 2, Mod(13, 36), y, t^2 + t + 1] ? f.mod %5 = t^2 + t + 1 ? mf = mfinit([36,4,Mod(13,36)],0); [f] = mfeigenbasis(mf); ? lift(mfparams(f)) %7 = [36, 4, 13, y^3 + (2*t-2)*y^2 + (-4*t+6)*y + (10*t-1), t^2+t+1]
The library syntax is
| |
mfperiodpol(mf, f, {flag = 0}) | |
Period polynomial of the cuspidal part of the form f, in other words
∫0i oo (X-τ)k-2f(τ)dτ. If flag = 0,
ordinary period polynomial. If it is 1 or -1, even or odd part of that
polynomial. f can also be the modular symbol output by
? D = mfDelta(); mf = mfinit(D,0); ? PP = mfperiodpol(mf, D, -1); PP/=polcoef(PP, 1); bestappr(PP) %1 = x^9 - 25/4*x^7 + 21/2*x^5 - 25/4*x^3 + x ? PM = mfperiodpol(mf, D, 1); PM/=polcoef(PM, 0); bestappr(PM) %2 = -x^10 + 691/36*x^8 - 691/12*x^6 + 691/12*x^4 - 691/36*x^2 + 1
The library syntax is
| |
mfperiodpolbasis(k, {flag = 0}) | |
Basis of period polynomials for weight k. If flag = 1 or -1, basis of odd or even period polynomials.
? mfperiodpolbasis(12,1) %1 = [x^8 - 3*x^6 + 3*x^4 - x^2, x^10 - 1] ? mfperiodpolbasis(12,-1) %2 = [4*x^9 - 25*x^7 + 42*x^5 - 25*x^3 + 4*x]
The library syntax is
| |
mfpetersson(fs, {gs}) | |
Petersson scalar product of the modular forms f and g belonging to
the same modular form space
? D=mfDelta(); mf=mfinit(D); DS=mfsymbol(mf,D); mfpetersson(DS) %1 = 1.0353620568043209223478168122251645932 E-6 ? mf=mfinit([11,6],0);B=mfeigenbasis(mf);BS=vector(#B,i,mfsymbol(mf,B[i])); ? mfpetersson(BS[1]) %3 = 1.6190120685220988139111708455305245466 E-5 ? mfpetersson(BS[1],BS[2]) %4 = [-3.826479006582967148 E-42 - 2.801547395385577002 E-41*I,\ 1.6661127341163336125 E-41 + 1.1734725972345985061 E-41*I,\ 0.E-42 - 6.352626992842664490 E-41*I]~ ? mfpetersson(BS[2]) %5 = [ 2.7576133733... E-5 2.0... E-42 6.3... E-43 ] [ -4.1... E-42 6.77837030070... E-5 3.3...E-42 ] [ -6.32...E-43 3.6... E-42 2.27268958069... E-5] ? mf=mfinit([23,2],0); F=mfeigenbasis(mf)[1]; FS=mfsymbol(mf,F); ? mfpetersson(FS) %5 = [0.0039488965740025031688548076498662860143 -3.56 ... E-40] [ -3.5... E-40 0.0056442542987647835101583821368582485396] Noncuspidal example:
? E1=mfeisenstein(5,1,-3);E2=mfeisenstein(5,-3,1); ? mf=mfinit([12,5,-3]); cusps=mfcusps(12); ? apply(x->mfcuspval(mf,E1,x),cusps) %3 = [0, 0, 1, 0, 1, 1] ? apply(x->mfcuspval(mf,E2,x),cusps) %4 = [1/3, 1/3, 0, 1/3, 0, 0] ? E1S=mfsymbol(mf,E1);E2S=mfsymbol(mf,E2); ? mfpetersson(E1S,E2S) %6 = -1.884821671646... E-5 - 1.9... E-43*I Weight 1 and 1/2-integral weight example:
? mf=mfinit([23,1,-23],1);F=mfbasis(mf)[1];FS=mfsymbol(mf,F); ? mfpetersson(mf,FS) %2 = 0.035149946790370230814006345508484787443 ? mf=mfinit([4,9/2],1);F=mfbasis(mf)[1];FS=mfsymbol(mf,F); ? mfpetersson(FS) %4 = 0.00015577084407139192774373662467908966030
The library syntax is
| |
mfpow(F, n) | |
Compute Fn, where n is an integer and F is a generalized modular form:
? G = mfpow(mfEk(4), 3); \\ E4^3 ? mfcoefs(G, 4) %2 = [1, 720, 179280, 16954560, 396974160]
The library syntax is
| |
mfsearch(NK, V, {space}) | |
The parameter N can be replaced by a vector of allowed levels, in which case the list of forms is sorted by increasing level, then increasing |D|. If a form is found at level N, any multiple of N with the same D is not considered. Some useful possibilities are
*
*
*
Note that this is different from
? F = mfsearch([[1..40], 2], [0,1,2,3,4], 1); #F %1 = 3 ? [ mfparams(f)[1..3] | f <- F ] %2 = [[38, 2, 1], [40, 2, 8], [40, 2, 40]] ? mfcoefs(F[1],10) %3 = [0, 1, 2, 3, 4, -5, -8, 1, -7, -5, 7]
The library syntax is
| |
mfshift(F, s) | |
Divide the generalized modular form F by qs, omitting the remainder if there is one. One can have s < 0.
? D=mfDelta(); mfcoefs(mfshift(D,1), 4) %1 = [1, -24, 252, -1472, 4830] ? mfcoefs(mfshift(D,2), 4) %2 = [-24, 252, -1472, 4830, -6048] ? mfcoefs(mfshift(D,-1), 4) %3 = [0, 0, 1, -24, 252]
The library syntax is
| |
mfshimura(mf, F, {D = 1}) | |
F being a modular form of half-integral weight k ≥ 3/2 and D a
positive squarefree integer, returns the Shimura lift G of weight 2k-1
corresponding to D. This function returns [mf2,G,v]
where mf2 is a modular form space containing G and v expresses G
in terms of
? F = mfpow(mfTheta(), 7); mf = mfinit(F); ? [mf2, G, v] = mfshimura(mf, F, 3); mfcoefs(G,5) %2 = [-5/9, 280, 9240, 68320, 295960, 875280] ? mfparams(G) \\ the level may be lower than expected %3 = [1, 6, 1, y, t - 1] ? mfparams(mf2) %4 = [2, 6, 1, 4, t - 1] ? v %5 = [280, 0]~ ? mfcoefs(mf2, 5) %6 = [-1/504 -1/504] [ 1 0] [ 33 1] [ 244 0] [ 1057 33] [ 3126 0] ? mf = mfinit([60,5/2],1); F = mflinear(mf,mfkohnenbasis(mf)[,1]); ? mfparams(mfshimura(mf,F)[2]) %8 = [15, 4, 1, y, t - 1] ? mfparams(mfshimura(mf,F,6)[2]) %9 = [15, 4, 1, y, t - 1]
The library syntax is
| |
mfslashexpansion(mf, f, g, n, flrat, {¶ms}) | |
Let mf be a modular form space in level N, f a modular form
belonging to mf and let g be in M2+(Q). This function
computes the Fourier expansion of f|k g to n terms. We first describe
the behaviour when
If
? mf = mfinit([32,4],0); f = mfbasis(mf)[1]; ? mfcoefs(f, 10) %2 = [0, 3, 0, 0, 0, 2, 0, 0, 0, 47, 0] ? mfatk = mfatkininit(mf,32); mfcoefs(mfatkin(mfatk,f),10) / mfatk[3] %3 = [0, 1, 0, 16, 0, 22, 0, 32, 0, -27, 0] ? mfatk[3] \\ here normalizing constant C = 1, but need in general %4 = 1 ? mfslashexpansion(mf,f,[0,-1;1,0],10,1,¶ms) * 32^(4/2) %5 = [0, 1, 0, 16, 0, 22, 0, 32, 0, -27, 0] ? params %6 = [0, 32, [1, 0; 0, 1]] ? mf = mfinit([12,8],0); f = mfbasis(mf)[1]; ? mfslashexpansion(mf,f,[1,0;2,1],7,0) %7 = [0, 0, 0, 0.6666666... + 0.E-38*I, 0, -3.999999... + 6.92820...*I, 0,\ -11.99999999... - 20.78460969...*I] ? mfslashexpansion(mf,f,[1,0;2,1],7,1, ¶ms) %8 = [0, 0, 0, 2/3, 0, Mod(8*t, t^2+t+1), 0, Mod(-24*t-24, t^2+t+1)] ? params %9 = [0, 3, [1, 0; 0, 1]]
If [ℚ(f):ℚ(χ)] > 1, the coefficients may be polynomials in y,
where y is any root of the polynomial giving the field of definition of
f (
? mf=mfinit([23,2],0);f=mfeigenbasis(mf)[1]; ? mfcoefs(f,5) %1 = [Mod(0, y^2 - y - 1), Mod(1, y^2 - y - 1), Mod(-y, y^2 - y - 1),\ Mod(2*y - 1, y^2 - y - 1), Mod(y - 1, y^2 - y - 1), Mod(-2*y, y^2 - y - 1)] ? mfslashexpansion(mf,f,[1,0;0,1],5,1) %2 = [0, 1, -y, 2*y - 1, y - 1, -2*y] ? mfslashexpansion(mf,f,[0,-1;1,0],5,1) %3 = [0, -1/23, 1/23*y, -2/23*y + 1/23, -1/23*y + 1/23, 2/23*y] Caveat. In half-integral weight, we define the "slash" operation as (f |k g)(τ) := ((c τ + d)-1/2)2k f( g.τ), with the principal determination of the square root. In particular, the standard cocycle condition is no longer satisfied and we only have f | (gg') = ± (f | g) | g'.
The library syntax is
| |
mfspace(mf, {f}) | |
Identify the modular space mf, resp. the modular form f in
mf if present, as the flag given to
? mf = mfinit([1,12],1); mfspace(mf) %1 = 1 ? mfspace(mf, mfDelta()) %2 = 0 \\ new space This function returns -1 when the form f is modular but does not belong to the space.
? mf = mfinit([1,2]; mfspace(mf, mfEk(2)) %3 = -1 When f is not modular and is for instance only quasi-modular, the function returns nonsense:
? M6 = mfinit([1,6]); ? dE4 = mfderiv(mfEk(4)); \\ not modular ! ? mfspace(M6,dE4) \\ asserts (wrongly) that E4' belongs to new space %3 = 0
The library syntax is
| |
mfsplit(mf, {dimlim = 0}, {flag = 0}) | |
The functions returns [vF, vK], where vF gives (Galois orbit of)
eigenforms and vK is a list of polynomials defining each Galois orbit.
The eigenforms are given in
If flag speeds up computations when the dimension is large: if flag = d > 0, when the dimension of the eigenspace is > d, only the Galois polynomial is computed.
Note that the function
? mf=mfinit([11,2],0); f=mfeigenbasis(mf)[1]; mfcoefs(f,16) %1 = [0, 1, -2, -1, ...] ? mf=mfinit([23,2],0); f=mfeigenbasis(mf)[1]; mfcoefs(f,16) %2 = [Mod(0, z^2 - z - 1), Mod(1, z^2 - z - 1), Mod(-z, z^2 - z - 1), ...] ? mf=mfinit([179,2],0); apply(poldegree, mffields(mf)) %3 = [1, 3, 11] ? mf=mfinit([719,2],0); ? [vF,vK] = mfsplit(mf, 5); \\ fast when restricting to small orbits time = 192 ms. ? #vF \\ a single orbit %5 = 1 ? poldegree(vK[1]) \\ of dimension 5 %6 = 5 ? [vF,vK] = mfsplit(mf); \\ general case is slow time = 2,104 ms. ? apply(poldegree,vK) %8 = [5, 10, 45] \\ because degree 45 is large...
The library syntax is
| |
mfsturm(NK) | |
Gives the Sturm bound for modular forms on Γ0(N) and
weight k, i.e., an upper bound for the order of the zero at infinity of
a nonzero form. * a pair [N,k], in which case the bound is the floor of (kN/12).∏p | N (1+1/p);
* or the output of
? NK = [96,6]; mfsturm(NK) %1 = 97 ? mf=mfinit(NK,1); mfsturm(mf) %2 = 76 ? mfdim(NK,0) \\ new space %3 = 72
The library syntax is
| |
mfsymbol(mf, f) | |
Initialize data for working with all period polynomials of the modular
form f: this is essential for efficiency for functions such as
? mf=mfinit([23,2],0);F=mfeigenbasis(mf)[1]; ? FS=mfsymbol(mf,F); ? mfsymboleval(FS,[0,oo]) %3 = [8.762565143790690142 E-39 + 0.0877907874...*I, -5.617375463602574564 E-39 + 0.0716801031...*I] ? mfpetersson(FS) %4 = [0.0039488965740025031688548076498662860143 1.2789721111175127425 E-40] [1.2630501762985554269 E-40 0.0056442542987647835101583821368582485396]
By abuse of language, initialize data for working with
? mf=mfinit([12,9/2],1); F=mfbasis(mf); ? fs=mfsymbol(mf,F[1]); time = 476 ms ? mfpetersson(fs) %2 = 1.9722437519492014682047692073275406145 E-5 ? f2s = mfsymbol(mf,F[2]); time = 484 ms. ? mfpetersson(f2s) %4 = 1.2142222531326333658647877864573002476 E-5 ? gs = mfsymbol(fs,F[2]); \\ re-use existing symbol, a little faster time = 430 ms. ? mfpetersson(gs) == %4 \\ same value %6 = 1
For simplicity, we also allow
The library syntax is
| |
mfsymboleval(fs, path, {ga = id}) | |
Evaluation of the modular symbol fs (corresponding to the modular
form f) output by
? mf=mfinit([35,2],1);f=mfbasis(mf)[1];fs=mfsymbol(mf,f); ? mfsymboleval(fs,[0,oo]) %1 = 0.31404011074188471664161704390256378537*I ? mfsymboleval(fs,[1,3;2,5]) %2 = -0.1429696291... - 0.2619975641...*I ? mfsymboleval(fs,[I,2*I]) %3 = 0.00088969563028739893631700037491116258378*I ? E2=mfEk(2);E22=mflinear([E2,mfbd(E2,2)],[1,-2]);mf=mfinit(E22); ? E2S = mfsymbol(mf,E22); ? mfsymboleval(E2S,[0,1]) %6 = (-1.00000...*x^2 + 1.00000...*x - 0.50000...)/(x^2 - x) The rational function which is given in case the integral diverges is easy to interpret. For instance:
? E4=mfEk(4);mf=mfinit(E4);ES=mfsymbol(mf,E4); ? mfsymboleval(ES,[I,oo]) %2 = 1/3*x^3 - 0.928067...*I*x^2 - 0.833333...*x + 0.234978...*I ? mfsymboleval(ES,[0,I]) %3 = (-0.234978...*I*x^3 - 0.833333...*x^2 + 0.928067...*I*x + 0.333333...)/x
The library syntax is
| |
mftaylor(F, n, {flreal = 0}) | |
F being a form in Mk(SL2(ℤ)), computes the first n+1
canonical Taylor expansion of F around τ = I. If
? D=mfDelta(); ? mftaylor(D,8) %2 = [1/1728, 0, -1/20736, 0, 1/165888, 0, 1/497664, 0, -11/3981312]
The library syntax is
| |
mftobasis(mf, F, {flag = 0}) | |
Coefficients of the form F on the basis given by
? mf = mfinit([26,2],0); mfdim(mf) %1 = 2 ? F = mflinear(mf,[a,b]); mftobasis(mf,F) %2 = [a, b]~ A q-expansion or vector of coefficients can also be given instead of F.
? Th = 1 + 2*sum(n=1, 8, q^(n^2), O(q^80)); ? mf = mfinit([4,5,Mod(3,4)]); ? mftobasis(mf, Th^10) %3 = [64/5, 4/5, 32/5]~ If F does not belong to the corresponding space, the result is incorrect and simply matches the coefficients of F up to some bound, and the function may either return an empty column or an error message. If flag is set, there are no error messages, and the result is an empty column if F is a modular form; if F is supplied via a series or vector of coefficients which does not contain enough information to force a unique (potential) solution, the function returns [v,K] where v is a solution and K is a matrix of maximal rank describing the affine space of potential solutions v + K.x.
? mf = mfinit([4,12],1); ? mftobasis(mf, q-24*q^2+O(q^3), 1) %2 = [[43/64, -63/8, 800, 21/64]~, [1, 0; 24, 0; 2048, 768; -1, 0]] ? mftobasis(mf, [0,1,-24,252], 1) %3 = [[1, 0, 1472, 0]~, [0; 0; 768; 0]] ? mftobasis(mf, [0,1,-24,252,-1472], 1) %4 = [1, 0, 0, 0]~ \\ now uniquely determined ? mftobasis(mf, [0,1,-24,252,-1472,0], 1) %5 = [1, 0, 0, 0]~ \\ wrong result: no such form exists ? mfcoefs(mflinear(mf,%), 5) \\ double check %6 = [0, 1, -24, 252, -1472, 4830] ? mftobasis(mf, [0,1,-24,252,-1472,0]) *** at top-level: mftobasis(mf,[0,1, *** ^ — — — — — — -- *** mftobasis: domain error in mftobasis: form does not belong to space ? mftobasis(mf, mfEk(10)) *** at top-level: mftobasis(mf,mfEk( *** ^ — — — — — — -- *** mftobasis: domain error in mftobasis: form does not belong to space ? mftobasis(mf, mfEk(10), 1) %7 = []~
The library syntax is
| |
mftocoset(N, M, Lcosets) | |
M being a matrix in SL2(Z) and
? N = 4; L = mfcosets(N); ? mftocoset(N, [1,1;2,3], L) %2 = [[-1, 1; -4, 3], 5]
The library syntax is
| |
mftonew(mf, F) | |
? mf = mfinit([96,6],1); F = mfbasis(mf)[60]; s = mftonew(mf,F); #s %1 = 1 ? [M,d,G] = s[1]; [M,d] %2 = [48, 2] ? mfcoefs(F,10) %3 = [0, 0, -160, 0, 0, 0, 0, 0, 0, 0, -14400] ? mfcoefs(G,10) %4 = [0, 0, -160, 0, 0, 0, 0, 0, 0, 0, -14400]
The library syntax is
| |
mftraceform(NK, {space = 0}) | |
If NK = [N,k,CHI,.] as in
? F = mftraceform([23,2]); mfcoefs(F,16) %1 = [0, 2, -1, 0, -1, -2, -5, 2, 0, 4, 6, -6, 5, 6, 4, -10, -3] ? F = mftraceform([23,1,-23]); mfcoefs(F,16) %2 = [0, 1, -1, -1, 0, 0, 1, 0, 1, 0, 0, 0, 0, -1, 0, 0, -1]
The library syntax is
| |
mftwist(F, D) | |
F being a generalized modular form, returns the twist of F by the
integer D, i.e., the form G such that
? mf = mfinit([11,2],0); F = mfbasis(mf)[1]; mfcoefs(F, 5) %1 = [0, 1, -2, -1, 2, 1] ? G = mftwist(F,-3); mfcoefs(G, 5) %2 = [0, 1, 2, 0, 2, -1] ? mf2 = mfinit([99,2],0); mftobasis(mf2, G) %3 = [1/3, 0, 1/3, 0]~ Note that twisting multiplies the level by D2. In particular it is not an involution:
? H = mftwist(G,-3); mfcoefs(H, 5) %4 = [0, 1, -2, 0, 2, 1] ? mfparams(G) %5 = [99, 2, 1, y, t - 1]
The library syntax is
| |