Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ if not IsBound(MultVector) then
DeclareSynonym( "MultVector", MultRowVector );
fi;

#
# GAP >= 4.17 has unchecked NC variants of the PreImages operations
#
if not IsBound( PreImagesNC ) then
BindGlobal( "PreImagesNC", PreImages );
fi;
if not IsBound( PreImagesElmNC ) then
BindGlobal( "PreImagesElmNC", PreImagesElm );
fi;
if not IsBound( PreImagesSetNC ) then
BindGlobal( "PreImagesSetNC", PreImagesSet );
fi;
if not IsBound( PreImagesRepresentativeNC ) then
BindGlobal( "PreImagesRepresentativeNC", PreImagesRepresentative );
fi;

ReadPackage("fining","lib/geometry.gd");

ReadPackage("fining","lib/liegeometry.gd");
Expand Down
4 changes: 2 additions & 2 deletions lib/gpolygons.gi
Original file line number Diff line number Diff line change
Expand Up @@ -4020,7 +4020,7 @@ InstallMethod( EGQByBLTSet,
[0,0,0,1,0,0],[0,0,0,0,1,0]]*One(f));
q4qcanonical := Range(duality)!.geometry;
iso := IsomorphismPolarSpaces(q4q, q4qcanonical);
bltdual := PreImagesSet(duality, ImagesSet(iso, blt));
bltdual := PreImagesSetNC(duality, ImagesSet(iso, blt));

Info(InfoFinInG, 1, "Now embedding dual BLT-set into W(5,q)...");

Expand Down Expand Up @@ -4301,7 +4301,7 @@ InstallMethod( FlockGQByqClan, [ IsqClanObj ],
imgs := Filtered([1..Size(omega)], x -> omega[x] in blt);;
stabblt := Stabilizer(Image(hom), imgs, OnSets);
gens := GeneratorsOfGroup(stabblt);
gens := List(gens, x -> PreImagesRepresentative(hom, x));
gens := List(gens, x -> PreImagesRepresentativeNC(hom, x));
stabblt := GroupWithGenerators(gens);

Info(InfoFinInG, 1, "..computed stabiliser of BLT set");
Expand Down
14 changes: 12 additions & 2 deletions lib/morphisms.gi
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,25 @@ InstallOtherMethod( PreImageElm,

# CHECKED 27/09/11 jdb
#############################################################################
#O PreImagesSet( <em>, <x> )
#O PreImagesSetNC( <em>, <x> )
##
InstallOtherMethod( PreImagesSet,
InstallOtherMethod( PreImagesSetNC,
"for a geometry morphism and an element of an incidence structure",
[IsGeometryMorphism, IsElementOfIncidenceStructureCollection],
function(em, x)
return List(x, t -> em!.prefun(t));
end );

# The generic PreImagesSet fails its IsSubset( Range( em ), x ) check for
# geometry morphisms. Without PreImagesSetNC in GAP, both names denote the
# same operation, see init.g.
if not IsIdenticalObj( PreImagesSet, PreImagesSetNC ) then
InstallOtherMethod( PreImagesSet,
"for a geometry morphism and an element of an incidence structure",
[IsGeometryMorphism, IsElementOfIncidenceStructureCollection],
PreImagesSetNC );
fi;

##########################################################
## User methods for the "natural geometry morphisms"
##########################################################
Expand Down
4 changes: 2 additions & 2 deletions lib/orbits-stabilisers.gi
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ InstallMethod( FiningStabiliserPerm, [IsProjectiveGroupWithFrob, IsElementOfInci
nr:=Position(enum,el);
stab:=Stabilizer(Image(hom),nr);
gens:=GeneratorsOfGroup(stab);;
gens:=List(gens,x->PreImagesRepresentative(hom,x));
gens:=List(gens,x->PreImagesRepresentativeNC(hom,x));
stab:=GroupWithGenerators(gens);
return stab;
end );
Expand All @@ -433,7 +433,7 @@ InstallMethod( FiningStabiliserPerm2,
stab:=Stab(im,nr,OnPoints,rec( DoEstimate := size )).stab;
#stab:=Stabiliser(Image(hom),nr);
gens:=GeneratorsOfGroup(stab);;
gens:=List(gens,x->PreImagesRepresentative(hom,x));
gens:=List(gens,x->PreImagesRepresentativeNC(hom,x));
stab:=GroupWithGenerators(gens);
return stab;
end );
Expand Down
8 changes: 8 additions & 0 deletions tst/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,13 @@ gap> ElationOfProjectiveSpace(l, p, q);
gap> SingerCycleCollineation(2, 2^6);
< a collineation: <cmat 3x3 over GF(2,6)>, F^0>

# GAP >= 4.17 calls PreImagesSetNC internally
gap> d := NaturalDuality(SymplecticSpace(3, 3));;
gap> pts := AsList(Points(Range(d)!.geometry)){[1..3]};;
gap> PreImagesSetNC(d, pts) = List(pts, x -> PreImageElm(d, x));
true
gap> PreImagesSet(d, pts) = PreImagesSetNC(d, pts);
true

#
gap> STOP_TEST("bugfix.tst", 1 );
Loading