diff --git a/gap/digraph.gd b/gap/digraph.gd index 8c3924bc6..d93389b46 100644 --- a/gap/digraph.gd +++ b/gap/digraph.gd @@ -14,6 +14,7 @@ DeclareCategory("IsDigraphWithAdjacencyFunction", IsDigraph); DeclareCategory("IsCayleyDigraph", IsDigraph); DeclareCategory("IsImmutableDigraph", IsDigraph); DeclareSynonym("IsMutableDigraph", IsDigraph and IsMutable); +DeclareCategoryCollections("IsDigraph"); DeclareAttribute("DigraphMutabilityFilter", IsDigraph); diff --git a/gap/oper.gd b/gap/oper.gd index e8fa1f176..45c48ea3c 100644 --- a/gap/oper.gd +++ b/gap/oper.gd @@ -59,6 +59,8 @@ DeclareOperation("DIGRAPHS_GraphProduct", [IsDigraph, IsDigraph, IsFunction]); # 4. Actions . . . DeclareOperation("OnDigraphs", [IsDigraph, IsPerm]); DeclareOperation("OnDigraphs", [IsDigraph, IsTransformation]); +DeclareOperation("OnTuplesDigraphs", [IsDigraphCollection, IsPerm]); +DeclareOperation("OnSetsDigraphs", [IsDigraphCollection, IsPerm]); DeclareOperation("OnMultiDigraphs", [IsDigraph, IsPermCollection]); DeclareOperation("OnMultiDigraphs", [IsDigraph, IsPerm, IsPerm]); diff --git a/gap/oper.gi b/gap/oper.gi index 7ee4ef858..b50fd22cf 100644 --- a/gap/oper.gi +++ b/gap/oper.gi @@ -826,6 +826,18 @@ function(D, t) return MakeImmutable(OnDigraphs(DigraphMutableCopy(D), t)); end); +# TODO DigraphByOutNeighboursColl +InstallMethod(OnTuplesDigraphs, +"for list of digraphs and a perm", +[IsDigraphCollection and IsList, IsPerm], +{L, p} -> List(L, D -> OnDigraphs(D, p))); + +# TODO DigraphByOutNeighboursColl +InstallMethod(OnSetsDigraphs, +"for a set of digraphs and a perm", +[IsDigraphCollection and IsSet, IsPerm], +{S, p} -> Set(S, D -> OnDigraphs(D, p))); + # Not revising the following because multi-digraphs are being withdrawn in the # near future. diff --git a/tst/standard/oper.tst b/tst/standard/oper.tst index f9bf07118..85b3ce0a6 100644 --- a/tst/standard/oper.tst +++ b/tst/standard/oper.tst @@ -149,6 +149,31 @@ gap> gr := OnDigraphs(gr, t); gap> OutNeighbours(gr); [ [ 2 ], [ 1, 1 ], [ ] ] +# OnTuplesDigraphs: for a digraph and a permutation +gap> D := [ChainDigraph(3), CycleDigraph(4)];; +gap> List(D, OutNeighbours); +[ [ [ 2 ], [ 3 ], [ ] ], [ [ 2 ], [ 3 ], [ 4 ], [ 1 ] ] ] +gap> List(OnTuplesDigraphs(D, (1, 3)), OutNeighbours); +[ [ [ ], [ 1 ], [ 2 ] ], [ [ 4 ], [ 1 ], [ 2 ], [ 3 ] ] ] +gap> D := [ChainDigraph(3), DigraphReverse(ChainDigraph(3))];; +gap> List(D, OutNeighbours); +[ [ [ 2 ], [ 3 ], [ ] ], [ [ ], [ 1 ], [ 2 ] ] ] +gap> List(OnTuplesDigraphs(D, (1, 3)), OutNeighbours); +[ [ [ ], [ 1 ], [ 2 ] ], [ [ 2 ], [ 3 ], [ ] ] ] +gap> OnTuplesDigraphs(D, (1, 3)) = Permuted(D, (1, 2)); +true + +# OnSetsDigraphs: for a digraph and a permutation +gap> D := [ChainDigraph(3), DigraphReverse(ChainDigraph(3))];; +gap> IsSet(D); +true +gap> OnSetsDigraphs(D, (1, 3)) = D; +true +gap> OnSetsDigraphs(D, (1, 3)) = OnTuplesDigraphs(D, (1, 3)); +false +gap> MinimalGeneratingSet(Stabilizer(SymmetricGroup(3), D, OnSetsDigraphs)); +[ (1,3) ] + # OnMultiDigraphs: for a pair of permutations gap> gr1 := CompleteDigraph(3);