bridge/class-master/depend/pari/src/modules/algebras.c
/* Only in positive characteristic. Assumes that al is semisimple. */
Only in positive characteristic. Assumes that al is semisimple.
Only in positive characteristic . Assumes that al is semisimple .
GEN
algprimesubalg(GEN al)
{
  pari_sp av = avma;
  GEN p, Z, F, K;
  long nz, i;
  checkalg(al);
  p = alg_get_char(al);
  if (!signe(p)) pari_err_DOMAIN("algprimesubalg","characteristic","=",gen_0,p);
  Z = algtablecenter(al);
  nz = lg(Z)-1;
  if (nz==1) return Z;
  F = cgetg(nz+1, t_MAT);
  for (i=1; i<=nz; i++) {
    GEN zi = gel(Z,i);
    gel(F,i) = FpC_sub(algpow(al,zi,p),zi,p);
  }
  K = FpM_ker(F,p);
  return gerepileupto(av, FpM_mul(Z,K,p));
}
GEN algprimesubalg ( GEN al ) { pari_sp av = avma ; GEN p , Z , F , K ; long nz , i ; checkalg ( al ) ; p = alg_get_char ( al ) ; if ( ! signe ( p ) ) pari_err_DOMAIN ( " " , " " , " " , gen_0 , p ) ; Z = algtablecenter ( al ) ; nz = lg ( Z ) - 1 ; if ( nz == 1 ) return Z ; F = cgetg ( nz + 1 , t_MAT ) ; for ( i = 1 ; i <= nz ; i ++ ) { GEN zi = gel ( Z , i ) ; gel ( F , i ) = FpC_sub ( algpow ( al , zi , p ) , zi , p ) ; } K = FpM_ker ( F , p ) ; return gerepileupto ( av , FpM_mul ( Z , K , p ) ) ; }
Only in positive characteristic.
Only in positive characteristic .