bridge/class-master/depend/pari/src/modules/algebras.c
/* Ip is a lift of a left O/pO-ideal where O is the integral basis of al */
Ip is a lift of a left O/pO-ideal where O is the integral basis of al
Ip is a lift of a left O / pO - ideal where O is the integral basis of al
static GEN
algleftordermodp(GEN al, GEN Ip, GEN p)
{
  pari_sp av = avma;
  GEN I, Ii, M, mt, K, imi, p2;
  long n, i;
  n = alg_get_absdim(al);
  mt = alg_get_multable(al);
  p2 = sqri(p);
  I = ZM_hnfmodid(Ip, p);
  Ii = ZM_inv(I,NULL);
  M = cgetg(n+1, t_MAT);
  for (i=1; i<=n; i++) {
    imi = FpM_mul(Ii, FpM_mul(gel(mt,i), I, p2), p2);
    imi = ZM_Z_divexact(imi, p);
    gel(M,i) = mattocol(imi, n);
  }
  K = FpM_ker(M, p);
  if (lg(K)==1) { avma = av; return matid(n); }
  K = ZM_hnfmodid(K,p);
  return gerepileupto(av, ZM_Z_div(K,p));
}
static GEN algleftordermodp ( GEN al , GEN Ip , GEN p ) { pari_sp av = avma ; GEN I , Ii , M , mt , K , imi , p2 ; long n , i ; n = alg_get_absdim ( al ) ; mt = alg_get_multable ( al ) ; p2 = sqri ( p ) ; I = ZM_hnfmodid ( Ip , p ) ; Ii = ZM_inv ( I , NULL ) ; M = cgetg ( n + 1 , t_MAT ) ; for ( i = 1 ; i <= n ; i ++ ) { imi = FpM_mul ( Ii , FpM_mul ( gel ( mt , i ) , I , p2 ) , p2 ) ; imi = ZM_Z_divexact ( imi , p ) ; gel ( M , i ) = mattocol ( imi , n ) ; } K = FpM_ker ( M , p ) ; if ( lg ( K ) == 1 ) { avma = av ; return matid ( n ) ; } K = ZM_hnfmodid ( K , p ) ; return gerepileupto ( av , ZM_Z_div ( K , p ) ) ; }
Ip is a lift of a left O/pO-ideal where O is the integral basis of al
Ip is a lift of a left O / pO - ideal where O is the integral basis of al