Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix declaration of sparse action homomorphisms. #3281

Merged
merged 3 commits into from
Feb 14, 2019
Merged
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
80 changes: 70 additions & 10 deletions lib/oprt.gd
Original file line number Diff line number Diff line change
Expand Up @@ -747,10 +747,6 @@ end );
## </ManSection>
## <#/GAPDoc>
##
DeclareOperation( "PreOrbishProcessing", [IsGroup]);

InstallMethod( PreOrbishProcessing, [IsGroup], x->x );

BindGlobal( "OrbitishFO", function( name, reqs, famrel, usetype,realenum )
local str, orbish, func,isnotest;

Expand Down Expand Up @@ -824,8 +820,6 @@ local str, orbish, func,isnotest;
"or ", name, "(<G>[,<Omega>],<pnt>[,<gens>,<acts>][,<act>])" );
fi;

G := PreOrbishProcessing(G);

if not IsBound( gens ) then
if (not IsPermGroup(G)) and CanEasilyComputePcgs( G ) then
gens := Pcgs( G );
Expand Down Expand Up @@ -1075,10 +1069,76 @@ DeclareGlobalFunction("MultiActionsHomomorphism");
## </ManSection>
## <#/GAPDoc>
##
OrbitishFO( "SparseActionHomomorphism", OrbitishReq,
IsIdenticalObj, false,false );
OrbitishFO( "SortedSparseActionHomomorphism", OrbitishReq,
IsIdenticalObj, false,false );

BindGlobal( "SparseActHomFO", function( name, reqs, famrel )
local str, orbish, func;

# Create the operation.
str:= SHALLOW_COPY_OBJ( name );

APPEND_LIST_INTR( str, "Op" );
orbish := NewOperation( str, reqs );
BIND_GLOBAL( str, orbish );

# Create the wrapper function.
func := function( arg )
local G, D, pnt, gens, acts, act, p, attrG, result,le;

# Get the arguments.
if 2 <= Length( arg ) then
le:=Length(arg);
G := arg[ 1 ];
if IsFunction( arg[ le ] ) then
act := arg[ le ];
else
act := OnPoints;
fi;
if Length( arg ) > 2
and famrel( FamilyObj( arg[ 2 ] ), FamilyObj( arg[ 3 ] ) )
then
D := arg[ 2 ];
if IsDomain( D ) then
if IsFinite( D ) then D:= AsSSortedList( D ); else D:= Enumerator( D ); fi;
fi;
p := 3;
else
p := 2;
fi;
pnt := Immutable(arg[ p ]);
if Length( arg ) > p + 1 then
gens := arg[ p + 1 ];
acts := arg[ p + 2 ];
fi;
else
Error( "usage: ", name, "(<G>[,<Omega>],<pnts>[,<gens>,<acts>][,<act>])" );
fi;

if not IsBound( gens ) then
if (not IsPermGroup(G)) and CanEasilyComputePcgs( G ) then
gens := Pcgs( G );
else
gens := GeneratorsOfGroup( G );
fi;
acts := gens;
fi;

for p in pnt do
TestIdentityAction(acts,p,act);
od;

if IsBound( D ) then
result := orbish( G, D, pnt, gens, acts, act );
else
result := orbish( G, pnt, gens, acts, act );
fi;

return result;
end;
BIND_GLOBAL( name, func );
end );

SparseActHomFO( "SparseActionHomomorphism", OrbitishReq, IsIdenticalObj );
SparseActHomFO( "SortedSparseActionHomomorphism", OrbitishReq, IsIdenticalObj );

#############################################################################
##
Expand Down