bridge/class-master/depend/pari/src/basemath/mftrace.c
/* bij is the output of mfkohnenbijection */
bij is the output of mfkohnenbijection
bij is the output of mfkohnenbijection
GEN
mfkohneneigenbasis(GEN mf, GEN bij)
{
  pari_sp av = avma;
  GEN mf3, mf30, B, KM, M, k;
  long r, i, l, N4;
  mf = checkMF(mf);
  if (!checkbij_i(bij))
    pari_err_TYPE("mfkohneneigenbasis [bijection]", bij);
  if (MF_get_space(mf) != mf_CUSP)
    pari_err_TYPE("mfkohneneigenbasis [not a cuspidal space]", mf);
  if (!MF_get_dim(mf))
    retmkvec3(cgetg(1, t_VEC), cgetg(1, t_VEC), cgetg(1, t_VEC));
  N4 = MF_get_N(mf) >> 2; k = MF_get_gk(mf);
  if (typ(k) == t_INT) pari_err_TYPE("mfkohneneigenbasis", k);
  if (!uissquarefree(N4))
    pari_err_TYPE("mfkohneneigenbasis [N not squarefree]", utoipos(N4));
  r = MF_get_r(mf);
  KM = RgM_mul(gel(bij,3), gel(bij,2));
  mf3 = gel(bij,1);
  mf30 = mfinit_Nkchi(N4, 2*r, MF_get_CHI(mf3), mf_NEW, 0);
  B = mfcoefs_mf(mf30, mfsturm_mf(mf3), 1); l = lg(B);
  M = cgetg(l, t_MAT);
  for (i=1; i<l; i++) gel(M,i) = RgM_RgC_mul(KM, mftobasis_i(mf3, gel(B,i)));
  return gerepilecopy(av, mkvec3(mf30, M, RgM_mul(M, MF_get_newforms(mf30))));
}
GEN mfkohneneigenbasis ( GEN mf , GEN bij ) { pari_sp av = avma ; GEN mf3 , mf30 , B , KM , M , k ; long r , i , l , N4 ; mf = checkMF ( mf ) ; if ( ! checkbij_i ( bij ) ) pari_err_TYPE ( " " , bij ) ; if ( MF_get_space ( mf ) != mf_CUSP ) pari_err_TYPE ( " " , mf ) ; if ( ! MF_get_dim ( mf ) ) retmkvec3 ( cgetg ( 1 , t_VEC ) , cgetg ( 1 , t_VEC ) , cgetg ( 1 , t_VEC ) ) ; N4 = MF_get_N ( mf ) >> 2 ; k = MF_get_gk ( mf ) ; if ( typ ( k ) == t_INT ) pari_err_TYPE ( " " , k ) ; if ( ! uissquarefree ( N4 ) ) pari_err_TYPE ( " " , utoipos ( N4 ) ) ; r = MF_get_r ( mf ) ; KM = RgM_mul ( gel ( bij , 3 ) , gel ( bij , 2 ) ) ; mf3 = gel ( bij , 1 ) ; mf30 = mfinit_Nkchi ( N4 , 2 * r , MF_get_CHI ( mf3 ) , mf_NEW , 0 ) ; B = mfcoefs_mf ( mf30 , mfsturm_mf ( mf3 ) , 1 ) ; l = lg ( B ) ; M = cgetg ( l , t_MAT ) ; for ( i = 1 ; i < l ; i ++ ) gel ( M , i ) = RgM_RgC_mul ( KM , mftobasis_i ( mf3 , gel ( B , i ) ) ) ; return gerepilecopy ( av , mkvec3 ( mf30 , M , RgM_mul ( M , MF_get_newforms ( mf30 ) ) ) ) ; }
bij is the output of mfkohnenbijection
bij is the output of mfkohnenbijection