bridge/class-master/depend/pari/src/basemath/mftrace.c
/* decomposition of modular form on eisenspace */
decomposition of modular form on eisenspace
decomposition of modular form on eisenspace
static GEN
mfeisensteindec(GEN mf, GEN F)
{
  pari_sp av = avma;
  GEN M, Mindex, Mvecj, V, B, CHI;
  long o, ord;
  Mvecj = obj_checkbuild(mf, MF_EISENSPACE, &mfeisensteinspaceinit);
  if (lg(Mvecj) < 5)
  {
    GEN E, e = gel(Mvecj,2), gkE = gel(e,1);
    long dE = itou(gel(e,4));
    Mvecj = gel(Mvecj,1);
    E = mfeisenstein(itou(gkE), NULL, gel(e,3));
    if (dE != 1) E = mfbd_E2(E, dE, gel(e,2)); 
    F = mfmul(F, E);
  }
  M = gel(Mvecj, 2);
  if (lg(M) == 1) return cgetg(1, t_VEC);
  Mindex = gel(Mvecj, 1);
  ord = itou(gel(Mvecj,4));
  V = mfcoefs(F, Mindex[lg(Mindex)-1]-1, 1); settyp(V, t_COL);
  CHI = mf_get_CHI(F);
  o = mfcharorder_canon(CHI);
  if (o > 1 && o != ord)
  { 
    GEN z, P = gel(M,4); 
    long vt = varn(P);
    z = gmodulo(pol_xn(ord/o, vt), P);
    if (ord % o) pari_err_TYPE("mfeisensteindec", V);
    V = gsubst(liftpol_shallow(V), vt, z);
  }
  B = Minv_RgC_mul(M, vecpermute(V, Mindex));
  return gerepileupto(av, B);
}
static GEN mfeisensteindec ( GEN mf , GEN F ) { pari_sp av = avma ; GEN M , Mindex , Mvecj , V , B , CHI ; long o , ord ; Mvecj = obj_checkbuild ( mf , MF_EISENSPACE , & mfeisensteinspaceinit ) ; if ( lg ( Mvecj ) < 5 ) { GEN E , e = gel ( Mvecj , 2 ) , gkE = gel ( e , 1 ) ; long dE = itou ( gel ( e , 4 ) ) ; Mvecj = gel ( Mvecj , 1 ) ; E = mfeisenstein ( itou ( gkE ) , NULL , gel ( e , 3 ) ) ; if ( dE != 1 ) E = mfbd_E2 ( E , dE , gel ( e , 2 ) ) ; F = mfmul ( F , E ) ; } M = gel ( Mvecj , 2 ) ; if ( lg ( M ) == 1 ) return cgetg ( 1 , t_VEC ) ; Mindex = gel ( Mvecj , 1 ) ; ord = itou ( gel ( Mvecj , 4 ) ) ; V = mfcoefs ( F , Mindex [ lg ( Mindex ) - 1 ] - 1 , 1 ) ; settyp ( V , t_COL ) ; CHI = mf_get_CHI ( F ) ; o = mfcharorder_canon ( CHI ) ; if ( o > 1 && o != ord ) { GEN z , P = gel ( M , 4 ) ; long vt = varn ( P ) ; z = gmodulo ( pol_xn ( ord / o , vt ) , P ) ; if ( ord % o ) pari_err_TYPE ( " " , V ) ; V = gsubst ( liftpol_shallow ( V ) , vt , z ) ; } B = Minv_RgC_mul ( M , vecpermute ( V , Mindex ) ) ; return gerepileupto ( av , B ) ; }
decomposition of modular form on eisenspace
decomposition of modular form on eisenspace
/* here k = 2 */ /* convert Mod(.,polcyclo(o)) to Mod(., polcyclo(N)) for o | N,
     * o and N both != 2 (mod 4) */ /* polcyclo(ord) */