Skip to content

Commit

Permalink
FIX: ClosureSubgroup assumes closure is in parent
Browse files Browse the repository at this point in the history
Can happen in perfect subgroup computation, as reported by S.Bouc on 4/8/19.
Added assertion to catch this situation in other cases.
  • Loading branch information
hulpke authored and fingolfin committed Apr 10, 2019
1 parent 359eee2 commit 7ea1f43
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/ref/fldabnum.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ over a non-cyclotomic field.
<P/>
<Example><![CDATA[
gap> g:= GaloisGroup( AsField( Field( [ Sqrt(5) ] ), CF(5) ) );
<group with 1 generators>
<group of size 2 with 1 generators>
gap> gens:= GeneratorsOfGroup( g );
[ ANFAutomorphism( AsField( NF(5,[ 1, 4 ]), CF(5) ), 4 ) ]
gap> x:= last[1];; x^2;
Expand Down
2 changes: 2 additions & 0 deletions lib/grp.gi
Original file line number Diff line number Diff line change
Expand Up @@ -2402,7 +2402,9 @@ local G,obj,close;
else
obj:= ClosureGroup( G, obj, arg[3] );
fi;

if close and not IsIdenticalObj( Parent( G ), obj ) then
Assert(2,IsSubset(Parent(G),obj));
SetParent( obj, Parent( G ) );
fi;
return obj;
Expand Down
4 changes: 3 additions & 1 deletion lib/grplatt.gi
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,9 @@ InstallGlobalFunction(LatticeViaRadical,function(arg)
# make generators of homomorphism fit nicely to presentation
gf:=IsomorphismFpGroup(a);
e:=List(MappingGeneratorsImages(gf)[1],x->PreImagesRepresentative(hom,x));
k:=ClosureSubgroupNC(KernelOfMultiplicativeGeneralMapping(hom),e);
# we cannot guarantee that the parent contains e, so no
# ClosureSubgroup.
k:=ClosureGroup(KernelOfMultiplicativeGeneralMapping(hom),e);
Add(nu,k);
Add(nn,PreImage(hom,Stabilizer(i)));
Add(nf,GroupHomomorphismByImagesNC(k,Range(gf),Concatenation(e,kg),
Expand Down
3 changes: 3 additions & 0 deletions tst/testbugfix/2019-04-09-Lattice.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# see https://github.com/gap-system/gap/pull/3397
gap> l:=AllSmallGroups(960,IsSolvableGroup,false);;g:=l[5];;
gap> StructureDescription(g);;t:=TableOfMarks(g);;

0 comments on commit 7ea1f43

Please sign in to comment.