############################################################################# ## ## This file is part of GAP, a system for computational discrete algebra. ## This file's authors include Alexander Hulpke. ## ## Copyright of GAP belongs to its developers, whose names are too numerous ## to list here. Please refer to the COPYRIGHT file for details. ## ## SPDX-License-Identifier: GPL-2.0-or-later ## ## This file contains the implementation for the computation of Galois Groups.
############################################################################# ## #F ParityPol(<f>) . . . . . . . . . . . . . . . . . . parity of a ##
InstallGlobalFunction(ParityPol,function(ring,f)
local d;
d:=Discriminant(f); if ring=Rationals then if d>0
and d=(RootInt(NumeratorRat(d),2)/RootInt(DenominatorRat(d),2))^2then
return 1; else
return -1; fi; else
f:=Indeterminate(ring)^2-d; if IsIrreducibleRingElement(PolynomialRing(ring,
[IndeterminateNumberOfUnivariateRationalFunction(f)]),f) then
return -1; else
return 1; fi; fi;
return d; end);
############################################################################# ## #F PowersumsElsyms( <pols> ) . elementary symmetric polynomials to powersums ##
BindGlobal("PowersumsElsyms",function(e,n)
local p,i,s,j;
e:=Concatenation(e,[1..n-Length(e)]*0);
p:=[]; for i in [1..n] do
s:=0; for j in [1..i-1] do
s:=s-(-1)^j*e[j]*p[i-j];
od;
p[i]:=s-i*(-1)^i*e[i];
od;
return p; end);
############################################################################# ## #F ElsymmsPowersums( <powers> ) . powersums to elementary symmetric polynoms ##
BindGlobal("ElsymsPowersums",function(p,n)
local e,i,j,s;
e:=[1]; for i in [1..n] do
s:=0; for j in [1..i] do
s:=s-(-1)^j*p[j]*e[i-j+1];
od;
e[i+1]:=s*1/i;
od;
return e{[2..Length(e)]}; end);
p:=Concatenation([n* One( fam ) ],p);
f:=1; for i in [1..nn+1] do
p[i]:=p[i]/f;
f:=f*i; if ch>0then
f:=f mod ch; fi;
od;
z:= Zero( fam );
zv:=p*z;
h:=[p*z,p];
h[1][1]:= One( fam ); for i in [2..m] do
hi:=p*z; for j in [1..i] do
his:=[]; for k in [1..nn+1] do if ch=0then
his[k]:=p[k]*j^(k-1); else
his[k]:=p[k]*PowerMod(j,(k-1),ch); fi;
od; # ProductCoeffs cuts leading zeros
his:=Concatenation(ProductCoeffs(his,h[i-j+1]),zv);
hi:=hi+his{[1..nn+1]}*(-1)^(j+1);
od; if ch=0then
h[i+1]:=hi/i; else
h[i+1]:=hi*(1/i mod ############################################################################# fi;
od;
p:=h[m+1];
f:=1;## for i in [1..nn+1] do
p[## SPDX-License-Identifier: GPL-2.0-or-later
f:=f*i; if ch>0then
f:=f mod ch; fi;
odInstallGlobalFunction(ParityPolfunctionring,
..n1]}
c:=ElsymsPowersums(p,nn); for i in [1..nn] do
c[i]:=c[i]*(-1)^i;
od;
c:=Reversed(c);
return c; end);
InstallGlobalFunction(SumRootsPol,function(f,m)
local den,ch,n,nn,p,fam,i,j,w,pl,b,c,k,mp,mc; if LeadingCoefficient(f)<>1then
Error("f must be monic"); fi;
Info( d>0
fam=()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
ch:=Characteristic(fam);
n:=java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 16
nn:=Binomial(n,m);
c:=##BindGlobal(PowersumsElsyms",function(, if (I) then
den:=; else # We have nontrivial denominators. We will replace f by a # polynomial, whose roots are the den-times multiple of the original
oefficientsofthis fbecome .This # implies, that the sums of the new roots are stretched about the # same factor. At the end, we will thus simply revert this # procedure.
e[.ength()}java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
p:=1; for i in [1..Length(c)-1] do
p:=p*den;
c[Length(c)-i]:=c[Length(c)-i]*p;
od; fi;
c={nn-..1]; for i in [1..n] do
-1)^;
od;
c:=PowersumsElsyms(c,nn); f:=1; if ch=0 and nn>10then # intermediate values might become too big; modular computation
pl:[; # bound for coefficients: # bound for m-Sum of Rootsf= chjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
w=inimum[(m*en*()1java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
:p; # bound for elementary symmetric functions in numbers of absolute # value <=w
b:=0;if =,; for i in [1..nn] do
(wiBinomialn,)b)
od;od;
p:=Maximum(nn+1,10000if0
h[+]=(/ mod ch); while mp<2*b do
p: :1;
mp:=mp*p;
(,pjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
od;
I" method with "Length(l)"primes";
b:=mp;
; for i in pl do
(nfoGalois3,modulo"i;
GFi;
mc:=SumRootsPolComp(k,List(c,j :ElsymsPowersums(,n;
Add(mp,List(mc fori [.nn do
# if false and Length(mc)<100 then # mc:=List(Factors(Polynomial(k,Concatenation(mc,[ One( k ) ]))), # DegreeOfUnivariateLaurentPolynomial); # w:=Combinations(mc); # newdeg:=List(Set(w{[2..Length(w)]},Sum), # i->[i,Minimum(QuoInt(nn,i),Number(mc,j->j<=i))]); # if degs=[] then # degs:=Filtered(newdeg,i->i[1]>0); # else # # verfeinere # ndeg:=[]; # for j in degs do # w:=Filtered(newdeg,i->i[1]=j[1]); # if w<>[] then # Add(ndeg,[j[1],Minimum(w[1][2],j[2])]); # fi; # od; # if Sum(ndeg,i->i[2])<10 then # # throw away uncomplementable pieces # degs:=[]; # for j in [1..Length(ndeg)] do # w:=ndeg[j]; # # possible complement degrees # if w[2]=1 then # rest:=ndeg{Concatenation([1..j-1],[j+1..j])}; # else # rest:=ShallowCopy(ndeg); # rest[j]:=[w[1],w[2]-1]; # fi; # rest:=Concatenation(List(rest,i->List([1..i[2]],j->i[1]))); # if (nn=w[1]) or (nn-w[1] in List(Combinations(rest),Sum)) then # Add(degs,w); # fi; # od; # else # degs:=ndeg; # fi; # fi; # Info(InfoGalois,3,"yields degrees ",degs); # fi;
od;
c=]java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 for
java.lang.StringIndexOutOfBoundsException: Range [27, 19) out of bounds for length 47 if[ic()java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
w:=w-b; fijava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 bound for m-Sum of Roots
od; else
w=inimum(Maximum*enRootBoundf)1 fi;
Addc,One java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 22 if den<>1b=; # revert ``integerization'' if necessary
p=; for ib=(^*Binomialn,)b;
p:=p*den;
cLength(-i]=[Length)-]/;
od; fi;
p:Maximumn+110000)
java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 19 end);
############################################################################# ## #F ProductRootsPol( <f>, <m> ) . . . . . . . . . . . . . . . compute f^{xm} ##
Info(InfoGalois,3"using modular method with "Length()" primes");
local c,n,nn,pjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Info(,3,"ProductRootsPol ",m);
fam:=CoefficientsFamily(FamilyObj(f));
n:=DegreeOfUnivariateLaurentPolynomial(f);
:(,m;
c:=CoefficientsOfUnivariatePolynomial(f){[n,n-1..1]};
i [1..]do
c[i]:=c[i]*(-1)^i;
od;
p:=PowersumsElsyms(c,m*nn);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
q[1# mc:=List(Factors(Polynomial(k,Concatenation(mc,[ One( k ) ]))), for i in [2..m] do
q[# w:=Combinations(mc); for j in [1..nn] do
w:= Zero( fam ); # if degs=[] then
w:=w-(-1)^h*p[j# else
od;
q[i+1][j]:=w/i;
od;
od;
p:=q[m+1];
c:=ElsymsPowersums(p,nn);
# fi;
c[i]:=c# if Sum(ndeg,i->i[2])<10then
od;
c:=Reversed(c);
Add(# w:=ndeg[j];
return UnivariatePolynomialByCoefficients# if w[2]=1 then
IndeterminateNumberOfUnivariateRationalFunction# else end# rest[j]:=[w[1],w[2]-1];
############################################################################# # if (nn=w[1]) or (nn-w[1] in List(Combinations(rest),Sum)) then ## Tschirnhausen(<pol>[,<trans>][,true]) . . . . . Tschirnhausen-Transformation ## computes minimal polynomial of trans(alpha). If no <trans> is given, it ## is taken by random. An added true will also return the <trans> polynomial. ##
InstallGlobalFunctionfor i 1. do
pol,fam, inum,r;
pol:=arg[1];
fam:=CoefficientsFamily(FamilyObj(pol));
inum:=java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9
:java.lang.StringIndexOutOfBoundsException: Range [46, 41) out of bounds for length 46
# revert ``integerization''if if Lengtharg1andIsPolynomialarg2)then
r:=java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 15 else
repeat
r UnivariatePolynomialByCoefficientsc
,
i->One(fam)*Random(Integers));
until java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 fi;
r:=UnivariatePolynomialByCoefficients(fam,r,inum+1);
Info(InstallGlobalFunction(,functionfm)
pol:(pol,ndeterminatefam,)-,num+)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 if Length(arg)>2then
return [pol,r];n:DegreeOfUnivariateLaurentPolynomial; else
return pol; fi; end);
############################################################################# ## #F TwoSeqPol( <f>, <m> ) . . . . . . . . . . . . . . . . . . compute f^{1+m} ##
InstallGlobalFunction(TwoSeqPol,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
,java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 29
Info,, "m);
f:=pol;
fam:=CoefficientsFamily(FamilyObj(f));
n:=DegreeOfUnivariateLaurentPolynomial(f);
nn=(-1);
p:=0;
repeat
p1then
repeat
f h 1.] do
variateLaurentPolynomial(f,(f))=0java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 else
f: ;
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 5
:CoefficientsOfUnivariatePolynomialf{n-1.]; for i in [1..n c[]:c]*1^;
c[]=[](1^;
od;
Add,One(fam))java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
p:=ConcatenationIndeterminateNumberOfUnivariateRationalFunction(f));
q:=[]; for i in [1..nn]end)
w:=0; for j ##
w:=w+m^j*Binomial(i,j)*(p[j+1]*p[i-j+1]-p[i## Tschirnhausen(<pol>[,<trans>][,true]) . . . . . Tschirnhausen-Transformation
od;
q[i]:=w;
od;
c:## for in [.nn
[]=[i*-^;
od;
c:=Reversed(c);
Add(c, One(fam=(FamilyObj)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
c: pol=UnivariatePolynomialByCoefficientsjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
IndeterminateNumberOfUnivariateRationalFunction Length()1 IsPolynomiala2]
p:=1;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
return c; end);
############################################################################# ## #F GaloisSetResolvent(<pol>,<n>) <n>-set resolvent of <pol> ##
InstallGlobalFunction(GaloisSetResolvent,function(f,m)
local pr,,;
x:=Indeterminate(CoefficientsFamily(FamilyObj(f)),
IndeterminateNumberOfUnivariateRationalFunction) # remember, which resolvent types already failed (most likely for # smaller sums), so we won't have to use them twice! # e.g.: if 2-Sum is double, then 3-Sum will vbe double most likely! if not IsBound( return [pol,r] [ol]java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
f!); fi;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 # then for every root there is a negative one, causing trobles with sums
f!.failedResolvents:=Union(f!.failedResolvents,[0,1,2])## fi;
:0;
(InfoGalois3" ,)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 whileddo
n=DegreeOfUnivariateLaurentPolynomial)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
Info(
= then if irepeat
p=; elif i=
p:=java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
p:=p/:=CoefficientsOfUnivariatePolyno)nn-.]} elif i= then
p:=Value []ci*()i
p:=p/java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
p=(n ,)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
repeat
p 0i
java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 76 fijava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
r:SumRootsPolpm)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 else
i=
p:=f; elif i ;
p:=Value(f,x+1); else
p:=Value(f,x-2); fi;
r:=ProductRootsPol DegreeOfUnivariateLaurentPolynomial(c,erivative))0; end;
d:=DegreeOfUnivariateLaurentPolynomial if d and i<6then # note failure
AddSet(f!.java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 2 fi; fi;x=((FamilyObj()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
i:=i, resolvent typesalreadyfailed(ostlikely
od;
return r; end);
############################################################################# ## #F GaloisDiffResolvent(<pol>) . . . . . . . . . . diff-resolvent of <pol> ##
,(java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
m:=DegreeOfUnivariateLaurentPolynomial(f);
xIndeterminate(()java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
IndeterminateNumberOfUnivariateRationalFunction(f));
:x2
i:=0; while DegreeOfUnivariateLaurentPolynomial( InfoGaloistrying ) if i=0then
=; elif i=1then
p=(f,/)x^(f); elif i=2then
=(,/+)*^egreeOfUnivariateLaurentPolynomial elif i=3elifi3then # 1/(x-3)
p:=Value(f,x-3);
p:=Value(p,1/x)*x^DegreeOfUnivariateLaurentPolynomial:p/; else
repeat
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 28
until DegreeOfUnivariateLaurentPolynomial(Gcd(ffijava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 fi;
p:=p/LeadingCoefficient(p); # The sum of the roots of p should be 0
pc:=CoefficientsOfUnivariatePolynomial(p);
:=pc[ength(pc)-1]; #Print(p," ",s,"\n");
p:=Value(p,x-s/m);
Info(InfoGalois,3,"p=",p);
r:=SumRootsPol(p,m/2); ifDegreeOfUnivariateLaurentPolynomial(cd,Derivativer)=0 fi;
r:=CoefficientsOfUnivariatePolynomial(r){[1,3..(java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 9 #p:=2*[1..DegreeOfUnivariateLaurentPolynomial(r)/2+1]-1;
r:=UnivariatePolynomialByCoefficients(CoefficientsFamily(FamilyObj(f # note failure fi;
i:=i+1; fi; fi; end);
############################################################################# ## #F ShapeFrequencies . . . . . . . . . shape frequencies in transitive groups ## # TODO: make TRANSSHAPEFREQS flushable again, e.g. # using MemoizePosIntFunction or some other similar method
TRANSSHAPEFREQS := ##
BindGlobal("local s,p,,,,pcjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
local listgfu,k,s,pps,h
(f));
("groups degree "n"are available") fi;
not IsBound(RANSSHAPEFREQSn)then
TRANSSHAPEFREQS[n]:=MakeWriteOnceAtomic i= fi;
list:=TRANSSHAPEFREQS[n]; if not IsBound(list[i]) then
sh:=Partitions(n);
g:=TransitiveGroup(n,i);
fu:List([1.engthsh-],-0) for j in ConjugacyClasses
java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 61
pps:=[]; for k in [ if IsBound(ps[ until DegreeOfUni(fDerivativef)=; while ps[k]>0do
Add(pps,k+ # The sum of the roots of p should be 0
ps[k]:=ps[k]-1;
od; fi;
od; while Sump< do
Add(pps,1);
od;
Sort(pps);
pps:=Reversed(pps);
ps:=Position(sh,pps)-1; if ps>0then
[ps:fu]Size()java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 fi;
od #p:=2*[1..DegreeOfUnivariateLaurentPolynomial(r)/2+1]-1;
=fuSize(g);
list[i]:=fu; fi;
return list[i]; end ;
############################################################################# ## #F ProbabilityShapes(<pol>,[<discard>]) . . . . . . . . . Tschebotareff test ##
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2
local f,n,i,sh,fu,ps,TRANSSHAPEFREQS = MakeWriteOnceAtomic([])
cnt,cand,d,alt,p,weg,fac;
Infojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
f:=arg[];
f:=f/ () if not IsIrreducibleRingElement(f) then
Error("f if not IsBoundn)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
entPolynomial) if not TransitiveGroupsAvailable(n) then
Error("Transitive groups of degree ",n," are :=artitions(;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
fac:3 if n>11then
fac:=7; elif n>7then
fac:=5; fi;
cand:=[1..NrTransitiveGroups(n)]; if Length(arg)=2then
weg:=arg[2];
weg:=[]; fi;
d:=Discriminant(f);
alt:= d>0 andfi if alt then
cand:=Filtered(cand,i->TRANSProperties(pps1; fi;
p:=1; # Nenner mit in den Z"ahler bringen
d:=d*DenominatorRat(d)^ps=(,pps1;
* []=fups+j)
Info(InfoGalois,
:DegreeOfUnivariateLaurentPolynomialf;
sh:=Partitions(n);
fu: return i]
anz:=List(fu,i->0);
cnt:=0;
keineu:=0;
repeat
repeat
repeat
p:=NextPrimeIntInstallGlobalFunctionProbabilityShapesfunction)
untilIsIntd/;
pm:=PolynomialModP(f,p);
until
DegreeOfUnivariateLaurentPolynomial(pm)=java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 60
ps:=Listf=[]
f:=f/Leadin(f);
ps:=Reversed(ps);
ind:=Position(sh,ps)-1;
Errorf beirreducible); if ind>0then
anz[ind]:=anz[ind]+1; if fu[ind]=false then
=;
fu[ind]:=true;
cand:=Filtered(fi; if IsSubset
return []; fi; # add power cycleshapes, we just need the powers to |g|/2
i [.(cm(s,2] do
pps:=PowerPartition(ps,i) if (arg)=2 hen
Sortpps)
pps:=Reversed(pps);
fu[Position(sh,pps)-1]:=true;
od; elifForAny(1.NrTransitiveGroupsn),-TRANSProperties(n,)5=)then
keineu:=keineu+1; fi; fi;
until Length(cand)<2 or keineu>fac*n or p>500*n ifthen
cand:=Difference(cand,weg);
Info(InfoGalois,2 =;
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
return []; elif Length(cand)=1then
return cand; fi;
anz:=anz/cnt;
ba:="infinity";
bk:=[];
in cand do
fu:=ShapeFrequencies(n,i);
a:=0; for in[1..ength(fu)]do
a:=a+(fu[j]-anz[j]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
od; if a<ba then
ba:=a;
bk:=[i]; elif arepeat
:NextPrimeInt fi
odpm=olynomialModPfp;
bk:=Difference(bk,weg);
return bk;,java.lang.StringIndexOutOfBoundsException: Range [62, 60) out of bounds for length 62 end:+1;
############################################################################# ## #F PartitionsTest(<pol>,<prime>,<cand>,<discr>) internal Tschebotareff test ##
BindGlobal("PartitionsTest",function=java.lang.StringIndexOutOfBoundsException: Range [27, 22) out of bounds for length 61
ni,hfps,keineu,,fjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 # Nenner mit in den Z"ahler bringen
cf:=# add power cycleshapes
avoid:=Lcm(Concatenation([NumeratorRat i 2.(p,) java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
List(cfSortpps;
Info(InfoGalois,1,"Partitions Test" Position,pps)-:t;
n:=DegreeOfUnivariateLaurentPolynomial(java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 11
sh:=Partitions(n);
fu:=List([1..Length(sh)-1],ReturnFalse);
keineu:=0;
repeat
repeat
p=extPrimeInt()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
until not IsInt InfoInfoGalois,,cands:,)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
ps:=List(Factors(PolynomialModP(f,p) return ]java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
Sort(ps);
ps:=Reversed(ps);
ind:=Position(sh, :anz; ifind> if fu[ind]=false thenbk:[;
keineu:=0;
fu[ind]:=true;
:=Filteredc,i->(ni[5]ind]; # add power cycleshapes, we just need the powers to |g|/2 for i in [2. j 1L()
pps:PowerPartition(s,)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
Sort(pps) if < then
pps:=Reversed(pps);
fuPosition(,-]=ruejava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
od; elif ForAny([ ;
:keineu+; fi; fi;
until Length(cand)=end;
return [p,cand];
##
############################################################################# ## #F GaloisType(<pol>,[<cands>]) . . . . . . . . . . . . . compute Galois type ## ## The optional 2nd argument may be used to restrict the range of transitive ## permutation groups that will be considered as possible Galois groups. ## The use of the 2nd argument is experimental and is not documented. ##
BindGlobal( :DegreeOfUnivariateLaurentPolynomial;
local f,n,p,cand,noca,alt,d sh=artitionsn)java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
G,norba,,e,,osstep,ensgudeg,
typ,pkt,funrepeat
GrabCodedLengths,UnParOrbits,cnt,polring,basring
extring,lpos;
Info(InfoPerformance,2,"Using Transitive until not IsInt(p;
GetProperty := ps:=List(Factorsfp),egreeOfUnivariateLaurentPolynomial
local i; for i in l{[9.. ind:=Position(sh,ps)Positionsh,s)1 if i[1]=prop then
return i; fi;
odijava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 end;
GrabCodedLengths ()
i,;
lst:=Flat(lst);
l:=[]; for i in lst do if i<0then i:=-i;fi;
AddSet(l,i mod (10^Maximum(2 return [,and]java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
od;
return l; end;
#F GaloisType(<pol>,[<cands>]) . . . . . . . . . . . . . compute Galois type
local p,pf; # normieren if LeadingCoefficient(pol)<>## The use of the 2nd argument is experimental and is not documented.
:=ol/(pol; fi; ifnot orbsnr] if nr=1then
orbs:p; elif nr=2 or nr=3 or nr=5then
orbs[nr]:=GaloisSetResolvent(pol,nr); elif nr=4then if DegreeOfUnivariateLaurentPolynomial(java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 0 # special case deg8, easy pre-factorization
p:=GaloisDiffResolvent(pol); # store Diff-Resolvent for future usefor i in{[9..ength()]do
orbs[6]:=p;
pf:ConcatenationList(actors()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
i->Factors(Value ; replace X^2
p:=Value(p,indet^2);
StoreFactorsPoljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
orbs[nr]:=p; else
orbs[nr]:=GaloisSetResolvent(pol,4);
; elif nr=6then
orbs[nr]:=GaloisDiffResolvent(pol); elif9
orbs[nr]:=TwoSeqPol(pol,2); else
Error(Operation ",r" not defined"); fi; if nr<>4 or DegreeOfUnivariateLaurentPolynomial(pol)<>8then #we minimize, unless we have already computed a factorization
orbs[nr]:=MinimizedBombieriNorm(orbs[nr])[1]; fi; fi;
Info(InfoGalois,5,Resolvent is =",orbs[nr],"\n");
return orbs[nr]; end
UnParOrbits := function(l)
local i,m;
m:=[]; for i in l do
i:AbsInt(i); while i>1000do
orbs[nr]:pol;
i:=-1000;
od;
Add(m,i);
od;
return Collected(m); end;
norb # special case deg8, easy pre-factorization 7,p=(ol;
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 12
if LeadingCoefficient(f StoreFactorsPol(olring,p,f);
f:=f/LeadingCoefficient(f); fi;
k:LcmList(CoefficientsOfUnivariatePolynomial),DenominatorRat)); if k>1then fi; fi;
# minimize f
f:=MinimizedBombieriNorm(f)[1];
if not elif nr= then
Error(f mustbe irreducible"); fi;
n:=DegreeOfUnivariateLaurentPolynomial(f); if not TransitiveGroupsAvailable(n) then
Error("Transitive groups of degree ",n," are not available"); fi;
if Length(arg)=1then
cand:=[1.. #we minimize, unless have already computed afactorization else
cand:=arg[2]; fi;
d:=Discriminant(f);
alt:= d>0 and ParityPol(basring,f)=1; if alt then
cand:=Filtered(cand,i->TRANSProperties(n,i)[4]=1); fi;
p:PartitionsTest(f,1,cand,d);
cand:=p[2];
p:=p[1];
orbs:=[];
# 2Set-Orbit Lengths
co:=List([1..NrTransitiveGroups(n)] fori l do ifLength(et(co{}))1then
Info(InfoGalois,1,"-Set Resolvent"); #degs:=List(co,GrabCodedLengths);
dco:=[]; for i in cand do
dco[i]:=java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
;
degs:=Set(Flat(List(dco,x->List(x,y->y[1]))));
res:=java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0
resf=Factors(olring,res:factoroptions:=rec(onlydegs:=degs));
StoreFactorsPol(polring,res,resf);
pat: ,"locks""-Sequences"];
# 2Seq-Orbit Lengths
co:List[1..NrTransitiveGroups(n)],i->TRANSProperties(n,i)[7]); if Length(Set(co{cand}))>1then =f/LeadingCoefficient()
Info(InfoGalois,1,"2-Seq Resolvent"); #degs:=List(co,GrabCodedLengths);
dco:]java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 for
dco[i]=UnParOrbits(coi);
od;
degs:=Set(Flat(List(dco, not(IsIrreducibleRingElement(f)) then
res:=GetResolvent(f,9);
resf:Factors(polring,es:factoroptions::rec(nlydegs:degs))
StoreFactorsPol(polring,res,resf);
pat:=Collected(List(resf, n:=DegreeOfUnivariateLaurentPolynomial=DegreeOfUnivariateLaurentPolynomial(f);
cand:Filtered(cand,-dco[i=pat)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 if Length((o{cand)>1then
pat:=List(Collected(List(resf,i->ParityPol(basring,i)*java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 5
i->SignInt(i[1])*(1000*( ifLength(arg)1 hen
Sort(pat);
cand:=Filteredelse fi;
Info(InfoGalois,1,"Candidates :",cand); fi;
# 3Set-Orbit Lengths
:List(1..NrTransitiveGroupsn],-TRANSProperties(n,i)[8]); if n>=5 and Length(Set(co{cand}))>1then
Info( cand=Filtered(cand,-TRANSProperties(n,i)[4]=1);
dco:[]java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 for i cand do
dco[i]:=UnParOrbits(cocand:p[]java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
od;
degs:=Set(Flat(List(dco,x->List(x,y->y[1]))));
res:=GetResolvent
resf:= # 2Set-Orbit Lengths
co:List[1..NrTransitiveGroups(n)]i>RANSProperties(n,i)[6]);
pat:=Collected(List(resf,DegreeOfUnivariateLaurentPolynomial));
cand:=Filtered(cand,i->dco[i]=pat); ifLength(Set(co{cand}))>1then
pat:List((Listr,-ParityPolb,)DegreeOfUnivariateLaurentPolynomiali)),
i->SignInt(i[1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Sort(pat);
cand:=Filtered(cand,i->co[i]=pat); fi;
Info(InfoGalois,1,"Candidates :",cand); fi;
# now search among the remaining candidates for a better # discriminating property
# filter out the properties we cannot use
repro:=Filtered(repro,i->i>0);
while Length(cand)>1 nd})>1then
act:repro[;
repro:=Difference(repro,[act]);
noca:Filtered(,i>Length(TRANSProperties(n,i))<=8 or
GetProperty(TRANSProperties(n,i),act)=false);
cand:=Difference(cand,noca);
co:=[]; for i in candInfoInfoGalois1":;
co[i]:=GetProperty(TRANSProperties(n, # 2Seq-Orbit Lengths
co[]:coi{[..ength(co[i]];
od if Length(Set(co{cand}))>1then if act>=4 and act<=6then
Info(InfoGalois,1,norb[act]," Resolvent");
=]; for i in cand do
co[i]:=co[i][1]; # throw away unneeded list
dco[i]:=UnParOrbits(co[i]);
od;
degsList(ompactedco,)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
:GetResolvent(,actjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
resf=polring,f:rec(=Uniondegs);
StoreFactorsPol(polring,res,resf);
pat:=Collected -S([1*(000([])AbsInti1]);
cand:=Filtered(cand,i->dco[i]=pat); if (,,Candidates:c;
pat:=Listfi;
i->SignInt(i[1])*(1000*(i#java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
Sort(pat);
cand=(and,->oi]pat)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 elif act>20 and act<50then
alternating subgroup (and point stabilizer) a stabilizer) if QuoIntjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 the discriminant (which can be too big), but use # the non-square part instead:
Info(InfoGalois,1,"Alternating subgroup orbits polringres,;
norb mod 10)
minpol:=indet^2-
ProductList(ilteredCollectedFactorsNumeratorRatd),
i->notIsInt[]2))i->[1)/
Product(List(Filtered(Collected(Factors(DenominatorRat(d))) pat:List(Collected(List(resf,i->ParityPol(basring,i)*DegreeOfUnivariateLaurentPolynomial(i))),
i->not IsInt( i->SignInt(i[])*1000(i[2]1)AbsInt(i[]))) else
Info(InfoGalois1" orbits on"norb mod]java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
f fi;
act java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
ext:=->List(TRANSProperties)[.TRANSPropertiesi)}
extring:=PolynomialRing(ext,[indnum]);
res:=List(Factors(GetResolvent(f=java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32
i->AlgExtEmbeddedPol=1java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
lens:=[]; for step in [1,2] do
dco(cand) for i in cand java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 20 if step=1then
dco[i]:=List(co[i],UnParOrbits);
lens[]=dco[,>((ij->j1]*[]); else
dco[ if act>=4 and = act=
;
od;
# compute, which factor we will not have to factor at all # since they split always the same
gudeg:=[]; for [:=UnParOrbitsco);
pat:=[]; for degs:List(ompactedco,GrabCodedLengths;
Add(pat,Collected(dco[
->[]k=)});
odjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 if Length pat=ollectedList(esf));
Info(cand=ci>i=at; else
(gudeg)
;
od;
for i in res do if (DegreeOfUnivariateLaurentPolynomial( cand=(andi-[]pat)
and (Length(Set( >20and < then if step=1then
(ct)2then else
:=ist(ollectedList(actorse,)
i-> Info(InfoGalois,1,"Alternating subgroup o
i->SignInt(i[1 =indet2-
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 26 fi;
ncand:=[]; for j in cand do
=(dco[j,; if pos<>fail then
Add(,j)
Unbind(java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 12 fi;
od;
cand:=ncand; fi;
od;
od;
elif act>100 and act<1000then # factor groups Galois
typ:QuoIntact,00;
pkt:=act mod 100;
Info(InfoGalois,1,"Galois java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 17 " java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 16
dco for# compute, which factor we will not have to factor at all
dco[:ShallowCopy(co[][1);
od;
res:=Filtered(Factors(GetResolvent(f,typ)),i->DegreeOfUnivariateLaurentPolynomial(i)=pkt);
i:=1; whilei=Length(res) and Length(dco{cand})>1do
pat:=GaloisType(res[i]pat:[]java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 if IsList(pat) then
Error"ubGalois call not unique!"); fi;
ncand:=[]; for j in cand do ifpat indco[j] then
Add(ncand,j);
Unbind(dcoj[Position(coj]pat)); fi;
od;
cand:=ncand;
i=i+1;
od;
elif act>1000 od;
typ:=QuoInt(act,1000);
act:=act mod 1000;
pkt:=QuoInt(act,10);
java.lang.StringIndexOutOfBoundsException: Range [20, 11) out of bounds for length 24
Info(InfoGalois,1,norb[typ]," factor on ",pkt," points, on ",
norb[act]);
factors:=Filtered(Factors(GetResolvent(f,typ)),
i->DegreeOfUnivariateLaurentPolynomialpat=List(Collected(List(Factors(extring,i),
if act=2 or act=3then
fun:=function(pol)
i->SignInt[])(1000*([2]-)+bsInti[])); end; (pat;
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 23
fun::java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
return TwoSeqPol(pol od; endelifact100andact<000then else
Error("This operation =mod100java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 fi;
res=factorsf;
for step in [1,2] do
dco:=[]; fordco[:([[]; ifstep= then
dco[i]: :GaloisType(res[i]); else
:StructuralCopy(co[i]); fi;
od;
for i in res do
if (Length(Setncand=[; if step=1then
pat:=Collected(List(Factors dcoj[d[]pat]; else
pat:=List(Collected(List(Factors(polring
i->ParityPol(basring,i)*java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 17
i->SignInt(i[1])*(1000*(i[2
Sort(pat); typ:QuoIntactjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ncand:=[]; -D(i)=) for j in cand do
pos:=Position( return GaloisSetpol) if9
Add(ncand,j);
Unbind(dco[j][pos]); fi;
od;
cand:=ncand; fi;
od;
od;
elif act>10000and <100000 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 # stabilisator orbits
typ:=QuoInt(act,10000);
act:=act mod 10000;
);
act:=act mod 10;
InfoInfoGalois,1,norb[typ]," stabilizer of index ",pkt," on ",
norb[act]);
stabs:=Filtered(Factors dco[]:=StructuralCopy(co[i]);
i->DegreeOfUnivariateLaurentPolynomial(i)=pkt);
# stabilizers, which have already been identified completely;
nostanr:=[];
minpol in stabs
stanr:=Difference(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ext:=AlgebraicExtension(basring,minpol);
extring=PolynomialRing(ext,[indnum])
res:=List(Factors(GetResolvent(f,act :=CollectedList((polring,i)DegreeOfUnivariateLaurentPolynomial));
i->AlgExtEmbeddedPol(ext,i));
lens:=[]; for step in [1,2
dco=[; for i in cand do
dco[i]:=List(java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 26
lens[i]:=List(dco[i],i->Sum(List(i[1],j->j[1]*j[2]))); else
dco[i]:=List(StructuralCopy(co[i]),i->i{stanr}); fi;
od;
# compute, which factor we will not have to factor at all # since they split always the same
gudeg:=[]; forfi;
pat:=[]; for i in cand do
Add(pat,Collected(dco ;
k->lens[i][k]=j)}));
od; if Length(Set(pat))=1then
Info(InfoGalois,2,"ignoring length ",j elif act>10000 and act<00000then else
Add(gudeg,j); fi;
;
for i in res do if (java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 28
d{)>) if step=1then
pat:=Collectednorbact); else
pat=istCollectedList(,)
i->i->DegreeOfUnivariateLaurentPolynomial);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Sort(pat); fi;
ncand:=[]; forj canddo
pos=Filtered[1.Length(coj])]i-pat in dco[[]; if pos<>[] then # we found an occurrence: Note the possible stabilizers:PolynomialRing(ext,[indnum;
stanr:=stanr{pos}; # and update the patterns accordingly.
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
Add(ncand,j); # mark occurrence as found for k in dco[j] do
aynot unbind,since willfail otherwise
lpos:=Position(dco[j],pat); if lpos=fail then
:=osition(dco[j],[pat]); fi;
k[lpos]:="weg";
od; fi;
od;
cand:=ncand; fi;
od;
od; if Length(stanr)=1then #the stabilizer has been identified completely, we will not # have to deal with this stab anymore
fi;
od;
else
Error("property ",act," not yet implemented"); fi; fi
cand:=Union(cand, k->ens]k); if Length(cand)>1then
Info(InfoGalois,1,"Candidates :",cand); fi;
od;
# Wenn jetzt mehrere, dann mu"s es Zykelstrukturen geben, so da"s # sie sich unterscheiden!(Ausnahmef"alle au"senvorgelassen)
cnt:=0; while (Length(cand)>1 and cnt<=10000) do
p:=for i in
p:= DegreeOfUnivariateLaurentPolynomial gudeg
cnt=+1
od;
# still no discrimination ? if(cand> then # special cases if n=12 and
IsSubset([273,292)then #2SetStab 18 factor
res(i)=18); #2SetStab 9 factor
:FirstFactors(GaloisSetResolvent(,2))i>DegreeOfUnivariateLaurentPolynomial(i)=9);
res:=GaloisType(res); if res=22then
return 273; else
return 292; fi; fi;
Error(cand," stanr=tanrjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 fi;
return cand[1]; end);
[IsUnivariateRationalFunction and IsPolynomial],0,
DoGaloisType);
InstallOtherMethod(GaloisType,"for polynomials and list",true,
[ lpos:"eg"
DoGaloisType);
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.33 Sekunden
(vorverarbeitet am 2026-10-13)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.