bridge/class-master/depend/pari/src/modules/algebras.c
/* quotient of an algebra by a nontrivial two-sided ideal */
quotient of an algebra by a nontrivial two-sided ideal
quotient of an algebra by a nontrivial two - sided ideal
GEN
alg_quotient(GEN al, GEN I, long maps)
{
  pari_sp av = avma;
  GEN p, IS, ISi, S, Si;
  long n, ni;
  checkalg(al);
  p = alg_get_char(al);
  n = alg_get_absdim(al);
  ni = lg(I)-1;
  IS = shallowconcat(I, gcoeff(alg_get_multable(al),1,1));
  if (signe(p)) {
    IS = FpM_suppl(IS,p);
    ISi = FpM_inv(IS,p);
  }
  else {
    IS = suppl(IS);
    ISi = RgM_inv(IS);
  }
  S = vecslice(IS, ni+1, n);
  Si = rowslice(ISi, ni+1, n);
  return gerepilecopy(av, alg_quotient0(al, S, Si, n-ni, p, maps));
}
GEN alg_quotient ( GEN al , GEN I , long maps ) { pari_sp av = avma ; GEN p , IS , ISi , S , Si ; long n , ni ; checkalg ( al ) ; p = alg_get_char ( al ) ; n = alg_get_absdim ( al ) ; ni = lg ( I ) - 1 ; IS = shallowconcat ( I , gcoeff ( alg_get_multable ( al ) , 1 , 1 ) ) ; if ( signe ( p ) ) { IS = FpM_suppl ( IS , p ) ; ISi = FpM_inv ( IS , p ) ; } else { IS = suppl ( IS ) ; ISi = RgM_inv ( IS ) ; } S = vecslice ( IS , ni + 1 , n ) ; Si = rowslice ( ISi , ni + 1 , n ) ; return gerepilecopy ( av , alg_quotient0 ( al , S , Si , n - ni , p , maps ) ) ; }
quotient of an algebra by a nontrivial two-sided ideal
quotient of an algebra by a nontrivial two - sided ideal
/* force first vector of complement to be the identity */