bridge/class-master/depend/pari/src/basemath/galconj.c
/* Let sigma be an automorphism of L (as a polynomial with rational coefs)
 * Let 'sym' be a symmetric polynomial defining alpha in L.
 * We have alpha = sym(x,sigma(x),,,sigma^(g-1)(x)). Compute alpha mod p */
Let sigma be an automorphism of L (as a polynomial with rational coefs)
Let 'sym' be a symmetric polynomial defining alpha in L.
Let sigma be an automorphism of L ( as a polynomial with rational coefs ) Let ' sym ' be a symmetric polynomial defining alpha in L .
static GEN
sympol_aut_evalmod(GEN sym, long g, GEN sigma, GEN Tp, GEN p)
{
  pari_sp ltop=avma;
  long i, j, npows = brent_kung_optpow(degpol(Tp)-1, g-1, 1);
  GEN s, f, pows, v = zv_to_ZV(gel(sym,1)), w = zv_to_ZV(gel(sym,2));
  sigma = RgX_to_FpX(sigma, p);
  pows  = FpXQ_powers(sigma,npows,Tp,p);
  f = pol_x(varn(sigma));
  s = pol_0(varn(sigma));
  for(i=1; i<=g;i++)
  {
    if (i > 1) f = FpX_FpXQV_eval(f,pows,Tp,p);
    for(j=1; j<lg(v); j++)
      s = FpX_add(s, FpX_Fp_mul(FpXQ_pow(f,gel(w,j),Tp,p),gel(v,j),p),p);
  }
  return gerepileupto(ltop, s);
}
static GEN sympol_aut_evalmod ( GEN sym , long g , GEN sigma , GEN Tp , GEN p ) { pari_sp ltop = avma ; long i , j , npows = brent_kung_optpow ( degpol ( Tp ) - 1 , g - 1 , 1 ) ; GEN s , f , pows , v = zv_to_ZV ( gel ( sym , 1 ) ) , w = zv_to_ZV ( gel ( sym , 2 ) ) ; sigma = RgX_to_FpX ( sigma , p ) ; pows = FpXQ_powers ( sigma , npows , Tp , p ) ; f = pol_x ( varn ( sigma ) ) ; s = pol_0 ( varn ( sigma ) ) ; for ( i = 1 ; i <= g ; i ++ ) { if ( i > 1 ) f = FpX_FpXQV_eval ( f , pows , Tp , p ) ; for ( j = 1 ; j < lg ( v ) ; j ++ ) s = FpX_add ( s , FpX_Fp_mul ( FpXQ_pow ( f , gel ( w , j ) , Tp , p ) , gel ( v , j ) , p ) , p ) ; } return gerepileupto ( ltop , s ) ; }
Let sigma be an automorphism of L (as a polynomial with rational coefs)
 Let 'sym' be a symmetric polynomial defining alpha in L.
 We have alpha = sym(x,sigma(x),,,sigma^(g-1)(x)).
Let sigma be an automorphism of L ( as a polynomial with rational coefs ) Let ' sym ' be a symmetric polynomial defining alpha in L . We have alpha = sym ( x sigma ( x ) sigma^ ( g - 1 ) ( x )) .