"Fossies" - the Fresh Open Source Software Archive

Member "pari-2.13.1/src/test/in/mf" (14 Jan 2021, 22098 Bytes) of package /linux/misc/pari-2.13.1.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "mf": 2.13.0_vs_2.13.1.

    1 default(parisize, "40M");
    2 default(realprecision, 38);
    3 getcache()
    4 Z4=znstar(4,1);
    5 Z5=znstar(5,1);
    6 Z8=znstar(8,1);
    7 
    8 vec(f)=mfcoefs(f,15);
    9 vec(mfeisenstein(2,[Z5,2]))
   10 vec(mfeisenstein(3,[Z5,2]))
   11 vec(mfeisenstein(2,[Z8,3],[Z8,5]))
   12 vec(mfeisenstein(3,[Z8,3],[Z8,5]))
   13 mfdim(mfinit([12,2],3))
   14 mfdim(mfinit([225,2],3))
   15 mfdim([10^9,4], 3)
   16 mfdim([10^9,1,Mod(3,4)], 3)
   17 mfdim([1,2],3)
   18 Th=1+2*sum(n=1,4,q^(n^2),O(q^20));
   19 mf=mfinit([4,2]);mftobasis(mf,Th^4)
   20 mf=mfinit([4,3,[Z4,3]]);mftobasis(mf,Th^6)
   21 mf=mfinit([4,4]);mftobasis(mf,Th^8)
   22 mf=mfinit([4,5,[Z4,3]]);mftobasis(mf,Th^10)
   23 mf=mfinit([4,12],1);
   24 mfcoefs(mfinit(mf,0),10)
   25 mfcoefs(mf,10)
   26 mfcoefs(mf,5,2)
   27 D=q*eta(q)^24;
   28 mftobasis(mf,D+O(q^2),1)
   29 mftobasis(mf,D+O(q^3),1)
   30 mftobasis(mf,D+O(q^4),1)
   31 mftobasis(mf,D+O(q^5),1)
   32 v=mftonew(mf,D); [#v, v[1][1..2]]
   33 v2=concat(0,Vec(D));
   34 mftobasis(mf,v2)
   35 mftobasis(mf,v2~)
   36 
   37 apply(mfdim, mfinit([1,0,0], 1))
   38 apply(mfdim, mfinit([1,0,0]))
   39 apply(mfdim, mfinit([1,-1,0]))
   40 apply(mfdim, mfinit([1,-1,[]]))
   41 apply(mfdim, mfinit([1,-1,[1,1]]))
   42 apply(mfdim, mfinit([1,1,0],0))
   43 apply(mfdim, mfinit([1,1,[1,1]],1))
   44 mfdim([2,-1,-1])
   45 mfdim([11,2,-1])
   46 
   47 mfdim(mfinit([1,0,1], 1))
   48 mfdim(mfinit([1,0,1]))
   49 mfdim(mfinit([4,0,-4], 1))
   50 mfdim(mfinit([4,0,-4]))
   51 mfdim([1,0],1)
   52 mfdim([1,0])
   53 mfdim([1,0,0],1)
   54 mfdim([1,0,0])
   55 mfdim([1,0,1],1)
   56 mfdim([1,0,1])
   57 mfdim([4,0,-4],1)
   58 mfdim([4,0,-4])
   59 mfdim([4,0,[1,-4,-4,1]],1)
   60 mfdim([4,0,[1,-4,-4,1]])
   61 N=7^3*13^3;mfdim([N,2,Mod(107,N)])
   62 N=5^3*13^3;mfdim([N,2,Mod(101,N)])
   63 N=5^3*17^3;mfdim([N,2,Mod(101,N)])
   64 
   65 mf=mfinit([155,2],0);
   66 mfsplit(mf,,1)
   67 mfsplit(mf, 1)[2]
   68 mfsplit(mf, 2)[2]
   69 mfsplit(mf, 3)[2]
   70 mfsplit(mf, 4)[2]
   71 mffields(mfinit([104,4,104],0))
   72 mffields(mfinit([35,4,Mod(11,35)],0))
   73 
   74 L=mfinit([23,1,0],3); vector(#L,i,mfdim(L[i]))
   75 #mfbasis([23,1,-23],0)
   76 mfdim([23,1,0],3)
   77 mfdim([23,1,0],2)
   78 mfdim([23,1,-1],2)
   79 L=mfinit([35,2,0],0);
   80 #L
   81 mf=L[1];
   82 #mfinit([296,1,0],0)
   83 
   84 mfadd(F,G) = mflinear([F,G],[1,1]);
   85 
   86 [f,g] = mfbasis(mf);
   87 mfcoefs(f,19)
   88 mfcoefs(g,19)
   89 vec(mfadd(f,g))
   90 vec(mfmul(f,g))
   91 vec(mflinear([f,g],[1,2]))
   92 mfcoefs(f,49)
   93 vec(mfhecke(mf,g,3))
   94 f2=mfbd(f,2);
   95 vec(f2)
   96 vec(mfbd(f2,3))
   97 vec(mftwist(f,-7))
   98 vec(mfEk(0))
   99 T=mfcusps(96)
  100 apply(x->mfcuspwidth(96,x),T)
  101 apply(x->mfcuspisregular([96,2,Mod(7,96)],x), T)
  102 apply(x->mfcuspisregular([96,1/2,Mod(7,96)],x), T)
  103 mfnumcusps(96)
  104 mfnumcusps(2^64)
  105 mfnumcusps(factor(6^64))
  106 mfsturm([96,6])
  107 mfdim([96,6],0)
  108 mfdim([96,6])
  109 vec(mftraceform([1,0]))
  110 T=mftraceform([96,6],1);
  111 mfdescribe(T)
  112 mfdescribe(mflinear([T],[0]))
  113 [mfcoef(T,2), mfcoef(T,3)]
  114 vec(T)
  115 T=mftraceform([96,6]);
  116 [mfcoef(T,2), mfcoef(T,3)]
  117 vec(T)
  118 T=mftraceform([23,1,-23]); vec(T)
  119 T=mftraceform([52,1,Mod(3,52)]); vec(T)
  120 T=mftraceform([88,1,Mod(59,88)],0); vec(T)
  121 T=mftraceform([88,1,Mod(65,88)],0); vec(T)
  122 T=mftraceform([88,1,Mod(65,88)],1); vec(T)
  123 T=mftraceform([8,4,8],0); vec(T)
  124 T=mftraceform([15,2]); vec(T)
  125 T=mftraceform([15,4]); vec(T)
  126 mf = mfinit([15,4],1); mfparams(mflinear(mf,[1,0,1,0]))
  127 
  128 mf=mfinit([16,6]); B = mfbasis(mf); F = mflinear([B[7],B[8]],[4,7]);
  129 mfconductor(mf,F)
  130 V=mftonew(mf,F);
  131 for (i=1,#V,v=V[i];print([v[1],v[2],mfcoefs(v[3],9)]))
  132 
  133 mf=mfinit([96,6],1);#mf[3]
  134 F=mflinear([mf[3][1],mf[3][2]],[4,7]);
  135 V=mftonew(mf,F);
  136 for (i=1,#V,v=V[i];print([v[1],v[2],mfcoefs(v[3],9)]))
  137 mfconductor(mf,F)
  138 #mfinit([96,6],2)[3]
  139 #mfinit([96,6],3)[2]
  140 mf=mfinit(mf,0);#mf[3]
  141 mfsplit(mf,,1)
  142 mfsplit(mf,,2)
  143 [poldegree(p) | p<-mffields(mf)]
  144 mfsplit(mf,1)
  145 mfsplit(mf,2)
  146 LC=mfeigenbasis(mf);
  147 for(i=1,#LC,print(concat(mfcoefs(LC[i],9), mfparams(LC[i])[4])))
  148 f=LC[#LC]; vec(mfmul(f,f))
  149 mfsturm(mf)
  150 F=mflinear(mfbasis(mf)[1..3],[4,-7,11]);
  151 mftobasis(mf,F)
  152 mfheckemat(mf,2)
  153 mfheckemat(mf,3)
  154 mfheckemat(mf, [9,15,25])
  155 b = mfbasis(mf);
  156 for(i=1,#b,print(mfeval(mf,b[i],I/2)))
  157 D=mfDelta(); mfD = mfinit(D,1);
  158 mfeval(mfD,D,I/10)
  159 mfeval(mfD,D,1+2*I)
  160 mf23=mfinit([23,2],0);F=mfeigenbasis(mf23)[1];
  161 mfcuspval(mf23,F,oo)
  162 mfcuspval(mf23,F,0)
  163 mfcuspval(mf23,F,1/2)
  164 \\ to make it identical in 32/64 bits
  165 round(mfeval(mf23,F,I/50) * 1e35)
  166 round(mfslashexpansion(mf23,F,[1,0;1,1],2,0) * 1e35)
  167 vec(mfdiv(mfpow(D,3),mfpow(D,2)))
  168 mfcoefs(D,0) \\ #2078
  169 
  170 mfa = mfatkininit(mf,32);
  171 mfa[2]
  172 mfatkininit(mfinit([12,11,-3],0), 4)[2]
  173 vec(mfatkin(mfa,mf[3][1]))
  174 mfatkininit(mfinit([3,7,-3],0), 3)[2]
  175 
  176 L=[lfuninit(l,[3,4,0],1) | l<-concat(lfunmf(mf))];
  177 vector(#L,i,lfun(L[i],2))
  178 vector(#L,i,lfun(L[i],1))
  179 vector(#L,i,lfun(L[i],0,1))
  180 vector(#L,i,lfun(L[i],-1,1))
  181 
  182 mf=mfinit([163,4],3); f=mfbasis(mf)[2];
  183 mfeval(mf,f,I/400)
  184 real(mfeval(mf,f,1.5+I/400))
  185 mf=mfinit([5,4],0); vF=mfeigenbasis(mf); #vF
  186 F=vF[1]; liftpol(mfcoefs(F, 9))
  187 R=mfslashexpansion(mf,F,[1,0;1,1],10,0,&params);
  188 lift(bestapprnf(R*25,polcyclo(5,'t)))
  189 params
  190 
  191 mf=mfinit([11,2],1);F=mfbasis(mf)[1];
  192 mfslashexpansion(mf,F,[1,0;0,1],5,0,&params)
  193 params
  194 
  195 mf=mfinit([44,3,-4],4);F=mfbasis(mf)[1];
  196 mfslashexpansion(mf,F,[1,0;2,1],4,0,&params)
  197 params
  198 
  199 mf=mfinit([7,4,Mod(2,7)], 0); F=mfbasis(mf)[1];
  200 mfslashexpansion(mf,F,[1,0;1,1],5,0,&params)
  201 params
  202 
  203 mf=mfinit([12,8],0);F=mfbasis(mf)[1];
  204 mfslashexpansion(mf,F,[1,0;2,1],12,0)
  205 mfslashexpansion(mf,F,[1,0;2,1],12,1)
  206 
  207 mf=mfinit([12,7,-4],0);F=mfbasis(mf)[1];
  208 mfslashexpansion(mf,F,[1,0;6,1],7,1,&A)
  209 A
  210 
  211 mf=mfinit([12,3,-4],0);F=mfbasis(mf)[1];
  212 V=mfslashexpansion(mf,F,[1,1;4,5],4,1)
  213 mf=mfinit([12,3,-4],1);
  214 mfslashexpansion(mf,F,[1,1;4,5],4,1)==V
  215 
  216 mf=mfinit([4,7,-4]); B=mfbasis(mf);
  217 mfslashexpansion(mf,B[1],[0,-1;4,0],5,1,&A)
  218 A
  219 
  220 mf=mfinit([256,2]);f=mfeigenbasis(mf)[5];
  221 mfslashexpansion(mf,f,[1,0;64,1],3,1,&A)
  222 A
  223 
  224 mf=mfinit([28,3/2],1);F=mfbasis(mf)[1];mf2=mfinit([56,3/2],1);
  225 mfslashexpansion(mf2,F,[1,0;1,1],5,0)
  226 
  227 mf=mfinit([96,2,8], 0);
  228 mfa = mfatkininit(mf,3);
  229 mfa[2]
  230 mfa[3]
  231 mfa = mfatkininit(mf,32);
  232 mfa[2]
  233 mfa[3]
  234 mf=mfinit([45,3,Mod(2,5)],0);
  235 mfa = mfatkininit(mf,9);
  236 factor(charpoly(mfa[2]))
  237 mfa[3]
  238 mf=mfinit([12,7,Mod(3,4)],0); mfatkineigenvalues(mf,3)
  239 mf=mfinit([24,3,-3],0); mfatkineigenvalues(mf,24)
  240 mf=mfinit([5,60],0); mfatkineigenvalues(mf,5)
  241 
  242 E4=mfEk(4); mf=mfinit([2,4]);
  243 mfslashexpansion(mf,E4,[0,-1;1,0],10,0)
  244 
  245 mf=mfinit([58,2], 0); F=mfeigenbasis(mf)[1];
  246 round(mfslashexpansion(mf,F,[0,-1;58,0],10,0))
  247 
  248 mf=mfinit([79,1,-79]); F=mfbasis(mf)[1];
  249 79 * lift(bestapprnf(mfslashexpansion(mf,F,[0,-1;1,0],5,0), x^2+79))
  250 
  251 mf=mfinit([24,3,-3], 0); mfatkininit(mf,24)[2]
  252 
  253 [mf,F,coe]=mffromell(ellinit([-1,1]));coe
  254 vec(F)
  255 mfcoefs(F,6,2)
  256 [mf,F,coe]=mffromqf(2*matid(10));coe
  257 vec(F)
  258 mfcoefs(F,6,2)
  259 [mf,F,coe]=mffromqf(2*matid(2),x^4-6*x^2*y^2+y^4); vec(F)
  260 [mf,F,coe]=mffromqf(Mat); vec(F)
  261 [mf,F,coe]=mffromqf(2*matid(2),(x+I*y)^3); vec(F)
  262 [mf,F,coe]=mffromqf(2*matid(2),3); vec(F)
  263 
  264 mfwt1all(N,mf)=
  265 { for(i=1,#mf,
  266     my(vtf = mf[i][3], [G,c] = mf[i][1][3], chi = znconreyexp(G,c));
  267     mf[i] = [chi, vector(#vtf,j,lift(vec(vtf[j])))]
  268   );print(N,": ",mf);
  269 }
  270 for(N=1,150,my(mf=mfinit([N,1,0],1));if(#mf,mfwt1all(N,mf)));
  271 for(N=1,150,print1([N,mfdim([N,1,-1],1),mfdim([N,1,-1],0)]," "));
  272 mfdim([23,1,0])
  273 mfdim([23,1,0],0)
  274 mfdim([23,1,0],1)
  275 mfdim([23,1,0],2)
  276 mfdim([23,1,0],3)
  277 mfdim([46,1,0],2)
  278 G=znstar(23,1); w=[[G,v] | v<-chargalois(G)];
  279 mfdim([23,1,w],0)
  280 mfdim([23,1,w],1)
  281 mfdim([23,1,w],2)
  282 mfdim([96,2,-1],0)
  283 mfdim([96,2,-1],1)
  284 mfdim([96,2,-1],2)
  285 mfdim([96,2,-1],3)
  286 mfdim([96,2,-1],4)
  287 mfdim([96,2,0],0)
  288 mfdim([96,2,0],1)
  289 mfdim([96,2,0],2)
  290 mfdim([96,2,0],3)
  291 mfdim([96,2,0],4)
  292 G=znstar(96,1); w=[[G,v] | v<-chargalois(G)];
  293 mfdim([96,2,w],0)
  294 mfdim([96,2,w],1)
  295 mfdim([96,2,w],2)
  296 mfdim([96,2,w],3)
  297 mfdim([96,2,w],4)
  298 
  299 mfdim([240,1,-1],1)
  300 \\ regressions
  301 mfdim(mfinit([154,1,0],1)[1])
  302 mfinit([248,1,0],1);
  303 mfdim([455,1,Mod(94,455)],0)
  304 T=mfTheta();vec(T)
  305 mfT = mfinit(T);
  306 mfeval(mfT,T,[0,1/2,1,oo, (38+I)/85.])
  307 T=mfTheta(Mod(2,7)); vec(T)
  308 mfparams(T)
  309 T=mfTheta(Mod(2,5)); vec(T)
  310 mfparams(T)
  311 E=mfEk(10); vec(E)
  312 D=mfDelta(); vec(D)
  313 mfparams(mfD)
  314 vec(mfshift(D,1))
  315 mftaylor(D,10)
  316 mftaylor(D,10,1)
  317 E4=mfEk(4);
  318 E6=mfEk(6);
  319 N=mflinear([mfmul(mfmul(E4,E4),E4), mfmul(E6,E6)], [1,-1]);
  320 mf=mfinit(N); vec(N) == vec(mflinear(mf,N))
  321 vec(mfdiv(N, D))
  322 N=mflinear([mfpow(E4,3), mfpow(E6,2)], [1,-1]);
  323 vec(N)
  324 mfcoefs(mfderiv(E6),6)
  325 mfcoefs(mfderiv(E6,-1),6)
  326 mfcoefs(mfderivE2(E6),6)
  327 N=19; f=mfeisenstein(2,Mod(6,N)); g=mfeisenstein(2,Mod(11,N)); E=mfmul(f,g);
  328 mfcoefs(E,6)
  329 
  330 f = mfbracket(mfbd(E4,4), mfTheta(), 1); vec(f)
  331 mfcoefs(f,0)
  332 f = mfbracket(mfbd(E4,4), mfTheta(), 0); vec(f)
  333 mfcoefs(f,0)
  334 mfcoefs(mfbracket(E4,E6,1),10)/(-3456)
  335 mf = mfinit([7,3,Mod(6,7)], 0); [f]=mfeigenbasis(mf);
  336 lfunmfspec(lfunmf(mf,f))
  337 mf=mfinit([10,7,[Z5,2]], 0); mffields(mf)
  338 [f1,f2]=mfeigenbasis(mf);
  339 vE=mfembed(f1)
  340 mfembed(vE,mfcoefs(f1,4))
  341 mfembed(mf)
  342 vE=mfembed(f2); #vE
  343 mfembed(vE[1],mfcoefs(f2,4))
  344 mfembed(vE[2],mfcoefs(f2,4))
  345 mfembed(vE[1], [1,t;y,1/2])
  346 mfperiodpol(mf,f1)
  347 f1=mfsymbol(mf,f1); f2=mfsymbol(mf,f2);
  348 mfperiodpol(mf,f1)
  349 mfperiodpol(mf,f2)
  350 mfsymboleval(f1,[0,oo])
  351 mfsymboleval(f1,[1/2 + I/10000,oo])
  352 mfsymboleval(f1,[1/2 + I/20,oo])
  353 mfsymboleval(f1,[1/2 + I/(20+1e-10),oo])
  354 mfsymboleval(f1,[1/3,1/2])
  355 mfsymboleval(f2,[1/3,1/2])
  356 mfsymboleval(f2,[1/2,1/2]) \\ #2260
  357 mfpetersson(f1)
  358 m=mfpetersson(f2);
  359 if (abs(m[2,1]) < 1e-38, m[2,1]=0);
  360 if (abs(m[1,2]) < 1e-38, m[1,2]=0); m
  361 normlp(mfpetersson(f1,f2)) < 1e-38
  362 normlp(mfpetersson(f2,f1)) < 1e-38
  363 L=mfmanin(f2)[1];
  364 liftpol(L[1])
  365 L[2][3]
  366 
  367 FS5=mfsymbol(mfeisenstein(4,1,5));
  368 FS3=FS5[3]; for(i=1,#FS3,print(FS3[i]));
  369 mfsymboleval(FS5,[0,oo])
  370 mfsymboleval(FS5,[1/5,oo])
  371 FS16=mfsymbol(mfeisenstein(4,-4,-4));
  372 mfsymboleval(FS16,[0,oo])
  373 mfsymboleval(FS16,[1/4,oo])
  374 mfsymboleval(FS16,[1/4,oo],[0,-1;1,4])
  375 mfsymboleval(FS16,[0,oo],[0,-1;1,2])
  376 
  377 mfatkineigenvalues(mf,1)
  378 mfatkineigenvalues(mf,2)
  379 mfatkineigenvalues(mf,5)
  380 mfatkineigenvalues(mf,10)
  381 mfparams(mf)
  382 #mfbasis(mf)
  383 liftpol(mfcoefs(mfbasis(mf)[1], 9))
  384 F = mfeigenbasis(mf); #F
  385 liftpol(mfcoefs(F[1], 9))
  386 liftpol(mfcoefs(F[2], 9))
  387 mfcoefs(mffrometaquo([1,2;11,2]),10)
  388 
  389 f=mffrometaquo([864,6;432,-3;288,-2;144,1]);
  390 mfcoefs(f,11,12)
  391 mfcoefs(f,12,12)
  392 
  393 F=mffrometaquo([1,8;2,-2;4,2;6,2;12,2]);
  394 mf=mfinit([12,6],1);
  395 mftobasis(mf,F)
  396 
  397 F=mffrometaquo([1,-16;2,68]);
  398 mf=mfinit([4,26],1);
  399 F2=mfhecke(mf,F,2);
  400 mf2=mfinit([2,26],1);
  401 mftobasis(mf2,F2)
  402 
  403 mfcoefs(mffrometaquo(matrix(0,2)),5)
  404 
  405 mfdim(mfinit([24,4,Mod(23,24)],1),1)
  406 
  407 data = [63,2, Mod(46,63)];
  408 B=mfbasis(mfinit(data,3));
  409 MF = mfinit(data,4);
  410 lift(mftobasis(MF,B[3]))
  411 mfsturm(MF)
  412 charpoly(mfheckemat(MF,2))
  413 mfsturm(mfinit([1,4]))
  414 
  415 mfgaloistype([11,1,1])
  416 mfgaloistype([148,1,Mod(105,148)])
  417 mfgaloistype([71,1, -71])
  418 mf = mfinit([71,1, -71]); mfgaloistype(mf)
  419 [f]=mfeigenbasis(mf); lfunmfspec(lfunmf(mf,f)[1])
  420 mfgaloistype([124,1, Mod(67,124)])
  421 \\ slow: ~ 10s, but needed to reproduce regression
  422 /*
  423 mf=mfsplit(mfinit([633,1,Mod(71,633)],1));
  424 mfgaloistype(mf, mfeigenbasis(mf)[2])
  425 mf=mfsplit(mfinit([675,1,Mod(161,675)],1));
  426 mfgaloistype(mf, mfeigenbasis(mf)[1])
  427 */
  428 
  429 see(L) = for(i=1,#L, my(f=L[i]); print([mfparams(f), mfcoefs(f,10)]));
  430 L=mfeigensearch([[1..40],2],[[2,1],[3,-1]]); see(L)
  431 L=mfeigensearch([[1..40],2],[[2,Mod(1,3)],[3,Mod(2,4)]]); see(L)
  432 L=mfeigensearch([[1..38],2],[[2,-1],[11,-6]]); see(L)
  433 L=mfeigensearch([[1..16],3],[[2,0]]); see(L)
  434 
  435 V=mfsearch([[11..40],2],[0,1,2,3,4],1);
  436 for(i=1,#V,print([mfparams(V[i])[1..3],mfcoefs(V[i],10)]));
  437 V=mfsearch([60,2],[0,1,2,3,4,5,6], 1); #V
  438 mfcoefs(V[1],5)
  439 
  440 charpoly(mfheckemat(mfinit([106,2],1),2))
  441 
  442 G=znstar(164,1); L=[chi | chi <- chargalois(G,164), zncharisodd(G,chi)];
  443 apply(chi->charorder(G,chi),L)
  444 mfdim([164, 1, apply(x->[G,x], L)],0)
  445 mfdim([667, 1, [Mod(45,667)]],0)
  446 mfdim([329, 1, [Mod(46,329)]],0)
  447 mfdim([484, 1, [Mod(3,484)]],0)
  448 mfdim([191, 1, [Mod(190,191)]],0)
  449 mfdim([195, 1, [Mod(194,195)]],0)
  450 
  451 N=4; L=mfcosets(N)
  452 mftocoset(N, [1,1;2,3], L)
  453 mfcosets(mf23)
  454 
  455 /* regressions */
  456 mf=mfinit([77,1, Mod(20,77)],0);
  457 lift(mfcoefs(mf[3][1],10))
  458 mfgaloistype(mf)
  459 mf=mfinit([196,1,Mod(67,196)],0);mfdim(mf)
  460 mf=mfinit([297,1, Mod(10,297)],0);
  461 lift(mfcoefs(mf[3][1],10))
  462 mfgaloistype(mf)
  463 mf=mfinit([416,1, Mod(159,416)],1);mfdim(mf)
  464 \\ oo loop in Zab_indexrank
  465 mf=mfinit([72,2,Mod(11,72)],0);mfdim(mf)
  466 \\ division by 1 in mfheckematwt1
  467 mf=mfinit([283,1,-283],0); mfdim(mf)
  468 mfheckemat(mf,[2,3])
  469 
  470 \\ Tests lfunmf
  471 E4=mfEk(4);E6=mfEk(6);D=mfDelta();
  472 mf=mfinit([1,4],3);
  473 mfeval(mf,E4,I)
  474 mfeval(mf,E4,I/10)
  475 mf12=mfinit([1,12],3); mfeval(mf12,mfEk(12),I)
  476 L4=lfunmf(mf, E4);
  477 [lfun(L4,0),lfun(L4,1)*Pi^2/zeta(3),lfun(L4,4)/zeta(4)]
  478 L6=lfunmf(mfinit([1,6],3), E6);
  479 [lfun(L6,0),lfun(L6,1)*Pi^4/zeta(5),lfun(L6,6)/zeta(6)]
  480 L12=lfunmf(mfinit([1,12],0), D); omp=lfunlambda(L12,3)
  481 vector(6,i,bestappr(lfunlambda(L12,2*i-1)/omp))
  482 omm=lfunlambda(L12,2)
  483 vector(5,i,bestappr(lfunlambda(L12,2*i)/omm))
  484 L18=lfunmf(mfinit([1,18],0), mfmul(D,E6)); omp=lfunlambda(L18,3);
  485 vector(9,i,bestappr(lfunlambda(L18,2*i-1)/omp))
  486 omm=lfunlambda(L18,2)
  487 vector(8,i,bestappr(lfunlambda(L18,2*i)/omm))
  488 mf = mfinit([25,3,Mod(2,5)],0); F = mfbasis(mf)[1];
  489 L=lfunmf(mf,F); lfun(L,1)
  490 
  491 [mf,F] = mffromqf([2,0;0,2]);
  492 L=lfunmf(mf,F); lfun(L,1)
  493 lfun(L,2)
  494 
  495 mf=mfinit([11,2,Mod(3,11)]); f=mfbasis(mf)[1]; lfuncheckfeq(lfunmf(mf,f))
  496 
  497 \\ oo loop due to low precision in mffrickeeigen
  498 p=[4,54]; lfunmf(mfinit(p,0), mftraceform(p,0));
  499 
  500 mf=mfinit(D);
  501 PP=mfperiodpol(mf,D,-1);cP=polcoeff(PP,1)
  502 PP/=cP;bestappr(PP)
  503 PM=mfperiodpol(mf,D,1);cM=polcoeff(PM,0)
  504 PM/=cM;bestappr(PM)
  505 Ds = mfsymbol(mf,D); DS=mfpetersson(Ds)
  506 [pols,oms]=mfmanin(Ds); pols
  507 oms[3]
  508 bestappr(DS/(oms[1]*oms[2]/I), 10^8)
  509 mf=mfinit([11,2],1); fs=mfsymbol(mf,mfbasis(mf)[1]); DS=mfpetersson(fs)
  510 [pols,oms]=mfmanin(fs); pols
  511 oms[3]
  512 mf=mfinit([11,4],1); fs=mfsymbol(mf,mfbasis(mf)[1]); mfpetersson(fs)
  513 real(mfpetersson(fs, mfsymbol(mf,mfbasis(mf)[2])))
  514 mf=mfinit([12,3,-4],1); fs=mfsymbol(mf,mfbasis(mf)[1]);
  515 real(subst(fs[3][24],x,x/I))
  516 mfpetersson(fs)
  517 mfsymboleval(fs,[2/5,3/4])
  518 mf=mfinit([12,6,12],1); fs=mfsymbol(mf,mfbasis(mf)[5]);
  519 real(subst(fs[3][14],x,x/I))
  520 mfpetersson(fs)
  521 mfsymboleval(fs,[2,3;5,4])
  522 mfsymboleval(fs,[0,0])
  523 mfsymboleval(fs,[I,2*I])
  524 mfsymboleval(fs,[0,oo],[2,0;0,1])
  525 mfsymboleval(fs,[I,2*I],[2,0;0,1])
  526 mfperiodpolbasis(12)
  527 mfperiodpolbasis(12,1)
  528 mfperiodpolbasis(12,-1)
  529 mfperiodpolbasis(2)
  530 mfperiodpolbasis(-1)
  531 
  532 mf=mfinit([23,4],0); [f1,f2]=mfeigenbasis(mf); F=mfsymbol(mf,f1);
  533 mfeval(mf,f2,0.9995346163+0.02156773223*I) \\ regression
  534 
  535 \\#2134
  536 f=mffrometaquo([1,1;3,1;5,1;15,1]); z = 1+I/300;
  537 mf2=mfinit([30,2],1);
  538 real(mfeval(mf2,f,z))
  539 
  540 mfpetersson(F)
  541 mf=mfinit([23,2],0); f = mfeigenbasis(mf)[1]; F = mfsymbol(mf, f);
  542 mfslashexpansion(mf,f,[1,0;0,1],5,1)
  543 mfcuspisregular(mf,1/2);
  544 L=liftpol(mfmanin(F)); [v[1] | v<-L]
  545 [v[2][3] | v<-L]
  546 mf=mfinit([7,4,Mod(2,7)], 0); F=mfsymbol(mf, mfeigenbasis(mf)[1]);
  547 L=mfmanin(F)
  548 mfcusps(mf)
  549 
  550 mf = mfinit([37,2],4);
  551 f=mfbasis(mf)[2]; s=mfsymbol(mf,f);
  552 mfpetersson(s)
  553 
  554 T=mfTheta();mf=mfinit([12,1/2]);CU12=mfcusps(12)
  555 mfcusps(mf)
  556 apply(x->mfcuspwidth(mf,x), CU12)
  557 apply(x->mfcuspisregular(mf,x), CU12)
  558 apply(x->mfcuspisregular([12,2,-4],x), CU12)
  559 apply(x->mfcuspval(mf,T,x),CU12)
  560 mf=mfinit([12,6,12],1);F=mfbasis(mf)[5];
  561 apply(x->mfcuspval(mf,F,x),CU12)
  562 mf=mfinit([12,3,-4],1);F=mfbasis(mf)[1];
  563 apply(x->mfcuspval(mf,F,x),CU12)
  564 
  565 D=mfDelta();F=mfderiv(D);
  566 G=mfmul(D,mfEk(2));mfisequal(F,G)
  567 
  568 p(mf,f) = mfdescribe(f,&g); concat([mfparams(f), mfspace(mf,f), [mfdescribe(f)], apply(mfdescribe,g[1])]);
  569 F2=mfeisenstein(7,-3); p(mfinit(F2,3),F2)
  570 F3=mfeisenstein(7,-3,5); p(mfinit(F3,3),F3)
  571 F4=mfEk(4); p(mfinit(F4,3),F4)
  572 [mf,F5]=mffromqf([2,1;1,6]); p(mf,F5)
  573 T=mfTheta();
  574 mfT = mfinit(T);
  575 p(mfT, T)
  576 p(mfT, mfhecke(mfT,T,9))
  577 F6=mfDelta(); p(mfD,F6)
  578 F7=mffrometaquo([1,2;11,2]); p(mfinit(F7),F7)
  579 [mf,F8]=mffromell(ellinit([0,1,1,9,1])); p(mf,F8)
  580 p(mf,mfadd(F7,F8))
  581 p(mf,mfpow(F2,3))
  582 p(mf,mfmul(F2,F3))
  583 p(mfD,mfbracket(F4,F4,2))
  584 p(mf,mflinear([F7,F8],[1,-1]))
  585 p(mf,mfdiv(F3,F2))
  586 p(mf,mfshift(F6,1))
  587 p(mf,mfderiv(F4))
  588 p(mfD,mfderivE2(F4,4))
  589 p(mf,mftwist(F4,5))
  590 p(mfD,mfhecke(mfD,F6,5))
  591 p(mfinit([3,4],3),mfbd(F4,3))
  592 mf=mfinit([6,2],3);B=mfbasis(mf);
  593 for(i=1,#B,print(p(mf,B[i])));
  594 mf=mfinit([24,4]);B=mfbasis(mf);
  595 for(i=1,#B,print(p(mf,B[i])));
  596 apply(x->mfconductor(mf,x),B)
  597 mf=mfinit([23,1,-23],1); f=mfbasis(mf)[1]; p(mf,f)
  598 mfpetersson(mfsymbol(mf,f))
  599 mf=mfinit([92,1,-23],1); mfconductor(mf,f)
  600 mf=mfinit([96,2]); L=mfbasis(mf); mf0=mfinit(mf,0);
  601 mftobasis(mf0,L[1],1)
  602 mffromlfun(lfuncreate(x^2+1))
  603 mffromlfun(lfunqf(matid(3)))
  604 mffromlfun(ellinit([0,-1,1,-10,-20]))
  605 F=mffromell(ellinit([0,1]))[2]; mfisCM(F)
  606 mf = mfinit([39,1,-39],0); F=mfeigenbasis(mf)[1]; mfisCM(F)
  607 f = mffrometaquo(Mat([1,24])); mfisetaquo(f)
  608 f = mffrometaquo([1,1;23,1]); mfisetaquo(f)
  609 f = mffrometaquo(Mat([1,-24]), 1); mfisetaquo(f)
  610 mfisetaquo(f,1)
  611 mfisetaquo(mffromell(ellinit([0,1,1,0,0]))[2])
  612 mfisetaquo(mfpow(mfDelta(),20))
  613 
  614 \\ Half-integral weight
  615 dim2(N,k,space)=
  616 {
  617   my(L=mfdim([N,k+1/2,0],space));
  618   if (!k && space==1,
  619     for(i=1,#L,print1(L[i][2..3]," ")),
  620     for(i=1,#L,print1(L[i][3]," "))
  621   );
  622 }
  623 for(N=1,300,dim2(4*N,0,1));print();
  624 for(N=1,10,dim2(4*N,0,3)); for(N=1,10,dim2(4*N,0,4));
  625 for(N=1,10,dim2(4*N,1,1)); for(N=1,10,dim2(4*N,1,3)); for(N=1,10,dim2(4*N,1,4));
  626 for(N=1,10,dim2(4*N,2,1)); for(N=1,10,dim2(4*N,2,3)); for(N=1,10,dim2(4*N,2,4));
  627 for(N=1,10,dim2(4*N,3,1)); for(N=1,10,dim2(4*N,3,3)); for(N=1,10,dim2(4*N,3,4));
  628 for(N=1,10,print1(mfdim([4*N,3+1/2,-1],1)," "));
  629 for(N=1,10,print1(mfdim([4*N,3+1/2,-1],3)," "));
  630 for(N=1,10,print1(mfdim([4*N,3+1/2,-1],4)," "));
  631 L=mfinit([12,7/2,0],1); vector(#L,i,[vec(f) | f<-mfbasis(L[i])])
  632 mf=mfinit([24,5/2],1); mfcoefs(mf,5)
  633 mf=mfinit([28,5/2],1); B=mfbasis(mf); mfcoefs(mf,5)
  634 for(i=1,#B,print(vec(B[i])));
  635 mf=mfinit([28,5/2,Mod(2,7)],1); B=mfbasis(mf);
  636 [G,chi] = znchar(mf); chi
  637 [G,chi] = znchar(B[1]); chi
  638 mfslashexpansion(mf, B[1], [1,0;2,1], 5, 1)
  639 mfheckemat(mf,4)
  640 for(i=1,#B,print(lift(vec(B[i]))));
  641 T=mfTheta(); T2=mfmul(T,T); mfparams(T2)
  642 mf=mfinit([20,3/2]); B=mfbasis(mf);
  643 for(i=1,#B,print(lift(vec(B[i]))));
  644 mf=mfinit([4,5/2]);#mfbasis(mf)
  645 mfparams(mffrometaquo([1,24]))
  646 mfparams(mffrometaquo([2,12]))
  647 mfparams(mffrometaquo([3,8]))
  648 mfparams(mffrometaquo([4,6]))
  649 mfparams(mffrometaquo([6,4]))
  650 mfparams(mffrometaquo([12,2]))
  651 mfparams(mffrometaquo([24,1]))
  652 F=mffrometaquo([8,3]);mfparams(F)
  653 mf=mfinit([64,3/2]); mftobasis(mf,F)
  654 V=mfslashexpansion(mf,F,[0,-1;1,0],10,0,&A); [A,V]
  655 mfslashexpansion(mf,F,[0,-1;1,0],10,1)
  656 V=mfslashexpansion(mf,F,[-1,0;2,-1],10,0,&A); [A,V]
  657 mfslashexpansion(mf,F,[-1,0;2,-1],10,1)
  658 mfeval(mf,F,I)
  659 T=mfTheta(); mf=mfinit(T);
  660 mfslashexpansion(mf,T,[-1,0;0,-1],2,1)
  661 mfslashexpansion(mf,T,[-1,0;-2,-1],2,1)
  662 mfslashexpansion(mf,T,[1,0;2,1],2,1)
  663 mfslashexpansion(mf,T,[0,1;-1,0],2,1)
  664 mfslashexpansion(mf,T,[0,-1;1,0],2,1)
  665 mfslashexpansion(mf,T,[0,1;-1,-1],2,1)
  666 mfslashexpansion(mf,T,[2^64+1,2^64+3;9223372036854775808,9223372036854775809],2,1)
  667 mf=mfinit([36,5/2],1);mfparams(mfbasis(mf)[3])
  668 K=mfkohnenbasis(mf); nbcol=matsize(K)[2]
  669 K~
  670 mfparams(mfshimura(mf,mflinear(mf,K[,1]))[2])
  671 mfparams(mfshimura(mf,mflinear(mf,K[,2]),5)[2])
  672 (mfcoefs(mf,20)*K)~
  673 mf=mfinit([60,5/2],1);bij=mfkohnenbijection(mf);bij[2]
  674 bij[4]
  675 mfkohneneigenbasis(mf,bij)[2..3]
  676 mf=mfinit([52,3/2,Mod(15,52)],1);mfkohnenbijection(mf)[2..4]
  677 mf=mfinit([12,5/2]); apply(x->mfconductor(mf,x),mfbasis(mf))
  678 mfconductor(mf,mflinear(mf,[0,1,2,4,8]))
  679 mf=mfinit([12,5/2],1); F=mfbasis(mf)[1]; FSbug = mfsymbol(mf,F);
  680 mfpetersson(FSbug)
  681 T5S=mfsymbol(mfTheta(5));Pi/mfpetersson(T5S)
  682 F=mffrometaquo([1,-2;2,5;4,-2]);mfparams(F)
  683 F=mffrometaquo([1,2;2,-1]);mfparams(F)
  684 mf=mfinit(F);mftobasis(mf,F)
  685 E1=mfeisenstein(4,-3,-4); mfdescribe(E1)
  686 E2=mfeisenstein(3,5,-7); mfdescribe(E2)
  687 E3=mfderivE2(mfmul(E1,E2), 3); mfdescribe(E3)
  688 mfdescribe(mfDelta())
  689 mfdescribe(mfEk(2))
  690 mfdescribe(mfhecke(mfinit([1,2]),mfEk(2),3))
  691 [mfdescribe(mfinit([37,4],i)) | i<-[0..4]]
  692 [mfdescribe(mfinit([16,3/2],i)) | i<-[1,4]]
  693 E=mfmul(mfeisenstein(4,-3,-4),mfeisenstein(3,1,-3));
  694 mfdescribe(E,&g);
  695 apply(mfdescribe,g[1])
  696 
  697 f1=mffromqf(matdiagonal([1,6,36]*2))[2];
  698 f2=mffromqf(matdiagonal([4,6,9]*2))[2];
  699 F=mflinear([f1,f2],[1,-1]/2);
  700 mf=mfinit(F);
  701 [mf2,g]=mfshimura(mf,F);
  702 mfcuspval(mf2,g,0)
  703 
  704 T3=mfpow(T,3);mf=mfinit(T3);
  705 [mf,TSHI,res]=mfshimura(mf,T3);
  706 mfcoefs(TSHI,10)
  707 T5=mfpow(T,5);
  708 [mf,TSHI,res]=mfshimura(mfinit(T5),T5);
  709 mfcoefs(TSHI,10)
  710 mftobasis(mfinit(TSHI,4),TSHI)
  711 F4=mfmul(mfbd(T,4),mffrometaquo([8,1;16,1]));
  712 F4S=mfshimura(mfinit(F4),F4)[2];mfcoefs(F4S,20)
  713 EH=mfEH(13/2);
  714 mfdescribe(EH);
  715 mfcoef(EH,1001)
  716 mfcoef(EH,13*5^2)
  717 mfcoefs(EH,15,2)
  718 EH=mfEH(3/2);
  719 \\ to test hclassno6u
  720 mfcoefs(EH,2,10^8)
  721 mfcoefs(EH,2,10^8+3)
  722 mf=mfinit(EH);
  723 vec(EH)
  724 vec(mfEH(5/2))
  725 vec(mfEH(7/2))
  726 vec(mfEH(9/2))
  727 vec(mfEH(11/2))
  728 vec(mfEH(13/2))
  729 vec(mfEH(15/2))
  730 vec(mfEH(19/2))
  731 vec(mfhecke(mf, EH, 6))
  732 vec(mfhecke(mf, EH, 4))
  733 mf2=mfinit([12,3/2]);
  734 vec(mfhecke(mf2, EH, 4))
  735 vec(mfhecke(mf, EH, 9))
  736 vec(mfhecke(mf2, EH, 9))
  737 vec(mfhecke(mf, EH, 25))
  738 vec(mfhecke(mf, EH, 3^6))
  739 vec(mfhecke(mf2, EH, 25))
  740 vec(mfhecke(mfT, mfTheta(),4))
  741 vec(mfhecke(mfT, mfTheta(),3^4))
  742 mf=mfinit([32,5/2,8],1); F=mfbasis(mf)[1];
  743 mfa = mfatkininit(mf,32);
  744 vec(mfatkin(mfa,F))
  745 mfa[3]
  746 mffrometaquo([1,1],1)
  747 
  748 mf=mfinit([11,4]);B=mfbasis(mf)[1..2];
  749 FE1=mflinear(B,[1,-1]);FE2=mflinear(B,[1,-11^4]);
  750 FE1S=mfsymbol(mf,FE1);FE2S=mfsymbol(mf,FE2);
  751 real(mfpetersson(FE1S,FE2S))
  752 E=mfeisenstein(3); mf=mfinit([3,3]); ES=mfsymbol(mf,E);
  753 mfsymboleval(ES,[1,I])
  754 mfcuspval(mf,E,1/2)
  755 
  756 mffrometaquo([1,-24])
  757 mfcoefs(mffrometaquo([1,-24],1),6)
  758 
  759 mf=mfinit([53,2]);
  760 F=mfeigenbasis(mf)[1];
  761 ms=mfsymbol(mf,F);mfpetersson(ms)
  762 
  763 f=mfeisenstein(4,Mod(1,2),Mod(1,2)); vec(f)
  764 
  765 getcache()[,1..4]
  766 
  767 \\ ERRORS, leave at end of bench
  768 mftobasis(mf0,L[1])
  769 mfdim([4,1/2],0)
  770 mfdim([4,1/2],2)
  771 mfdim([4,1/2],5)
  772 
  773 mfeisenstein(2,1.0)
  774 mfeisenstein(2,[0,0])
  775 mfeisenstein(6,Mod(7,9),Mod(4,9));
  776 mfinit([1,1.0])
  777 L=mfeigenbasis(mfinit([14,6,Mod(9,14)],0)); mfmul(L[1],L[2])
  778 
  779 mfcuspwidth(0,0)
  780 
  781 mfparams(mfadd(F2,F3))
  782 mfparams(mfadd(F4,F6))
  783 
  784 mfinit([23,1,Mod(22,45)],0);
  785 mfinit([23,2,Mod(22,45)],0);
  786 mfinit([7,1,-7],2);
  787 mfinit([7,1,-7],5);
  788 mfinit([1,2],5)
  789 
  790 mfgaloistype([11,1,Mod(2,11)], mfeisenstein(1,1,Mod(2,11)))
  791 
  792 D=mfDelta();
  793 mfdiv(D,mfpow(D,2))
  794 mfeval(mfD,D,-I)
  795 mfslashexpansion(mfD,D,[1,2;3,4],1,1)
  796 mftonew(mfD,1)
  797 T=mftraceform([96,6],4);
  798 mfshimura(mfinit(T5),T5,4)
  799 mf=mfinit([1,4],3);
  800 mftonew(mf,E4)
  801 mffields(mf)
  802 
  803 mfdiv(1,mfTheta())
  804 
  805 mfdiv(D,mftraceform([1,3]))
  806 mfcosets(1.)
  807 mf=mfinit([1,0]);F=mfbasis(mf)[1];mfsymbol(mf,F);
  808 mf=mfinit([12,5/2],1); F=mfbasis(mf)[1];
  809 mfmanin(FSbug)
  810 mfsymboleval(FSbug,[0,1])
  811 mfgaloistype([4,1,-4],x)
  812 
  813 N=19; f=mfeisenstein(2,Mod(6,N)); g=mfeisenstein(2,Mod(11,N)); E=mfmul(f,g);
  814 mfdiv(E,f);
  815 mf=mfinit([7, 6, Mod(2,7)],0); [F] = mfeigenbasis(mf); mfpow(F,3)