Bill Allombert on Tue, 30 Jul 2019 14:08:01 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: nfgaloisconj


On Tue, Jul 30, 2019 at 11:08:44AM +0200, Bill Allombert wrote:
> On Tue, Jul 30, 2019 at 10:44:45AM +0900, macsyma wrote:
> > Thank you, Bill.
> > 
> > > what it does
> > 
> > In my code, G1 is a permutation representation, G2 is a polynomial
> > representation of G the Galois group of f over Q. The principle is
> > directly linked to Q-automorphism, that for each m_j in G, the
> > permutation of the roots of f is obtained by replacing alpha the
> > primitive element in the root representation of f with m_j(alpha) the
> > image of alpha that is a root of g. One can consider alpha =
> > polroots(g)[1], m_j(alpha) = polroots(g)[i] in G12 code. 
> 
> This seems useful. Maybe we should add this algorithm to PARI (by using
> p-adic roots).

Below is a version using p-adic roots.

Cheers,
Bill.
findp(g)=
{
  my(d=poldegree(g), try = 2*d);
  my(beste=d+1,bestp=0,c=0);
  forprime(p=2,oo,
    if(!issquarefree(g*Mod(1,p)),next);
    e=lcm(factormod(g,p,1)[,1]);
    if (e<beste, beste=e; bestp=p);
    if (c++>=try && bestp, break));
  [bestp,beste];
}

nfsplittingaut(f,deg=0)=
{
  my(g=if(deg,nfsplitting(f,deg),nfsplitting(f)));
  my(d=poldegree(g),R=nfisincl(f,g),v=variable(f));
  my([p,e]=findp(g),T=lift(ffinit(p,e,varlower(v))));
  my(N,M,G1,K,G2);
  N=subst(R,v,polrootsmod(g,[T,p]));
  M=Map(Mat([N[1]~,[1..poldegree(f)]~]));
  G1=[Vecsmall([mapget(M,s)|s<-t])|t<-N];
  K=matinverseimage(matconcat(vector(d,i,subst(R,v,i))~),[1..d]~);
  G2=[R*[K[s]|s<-Vec(t^(-1))]~|t<-G1];
  return([g,G1,G2]);
}