bridge/class-master/depend/pari/src/basemath/lfunutils.c
/* p does not divide nf.index */
p does not divide nf.index
p does not divide nf . index
static GEN
idealfrobenius_easy(GEN nf, GEN gal, GEN aut, GEN T, GEN p)
{
  long i, l = lg(aut), f = degpol(T);
  GEN D, Dzk, DzkT, DXp, grp = gal_get_group(gal);
  pari_sp av = avma;
  if (f==1) return gel(grp,1);
  Dzk = nf_get_zkprimpart(nf);
  D = modii(nf_get_zkden(nf), p);
  DzkT = RgV_to_RgM(FqV_red(Dzk, T, p), f);
  DXp = RgX_to_RgC(FpX_Frobenius(T, p), f);
  if (!equali1(D)) DXp = FpC_Fp_mul(DXp, D, p);
  for(i=1; i < l; i++)
  {
    GEN g = gel(grp,i);
    if (perm_order(g)==f)
    {
      GEN A = FpM_FpC_mul(DzkT, gel(aut,g[1]), p);
      if (ZV_equal(A, DXp)) {avma = av; return g; }
    }
  }
  return NULL; 
}
static GEN idealfrobenius_easy ( GEN nf , GEN gal , GEN aut , GEN T , GEN p ) { long i , l = lg ( aut ) , f = degpol ( T ) ; GEN D , Dzk , DzkT , DXp , grp = gal_get_group ( gal ) ; pari_sp av = avma ; if ( f == 1 ) return gel ( grp , 1 ) ; Dzk = nf_get_zkprimpart ( nf ) ; D = modii ( nf_get_zkden ( nf ) , p ) ; DzkT = RgV_to_RgM ( FqV_red ( Dzk , T , p ) , f ) ; DXp = RgX_to_RgC ( FpX_Frobenius ( T , p ) , f ) ; if ( ! equali1 ( D ) ) DXp = FpC_Fp_mul ( DXp , D , p ) ; for ( i = 1 ; i < l ; i ++ ) { GEN g = gel ( grp , i ) ; if ( perm_order ( g ) == f ) { GEN A = FpM_FpC_mul ( DzkT , gel ( aut , g [ 1 ] ) , p ) ; if ( ZV_equal ( A , DXp ) ) { avma = av ; return g ; } } } return NULL ; }
p does not divide nf.index
p does not divide nf . index
/* LCOV_EXCL_LINE */