@@ -1048,6 +1048,8 @@ gap> monos := MonomorphismsDigraphs(gr1, gr2);
10481048 Transformation( [ 2 , 3 , 3 ] ), Transformation( [ 2 , 5 , 3 , 4 , 5 ] ),
10491049 Transformation( [ 3 , 2 , 3 ] ), Transformation( [ 4 , 2 , 3 , 4 ] ),
10501050 Transformation( [ 4 , 5 , 3 , 4 , 5 ] ), Transformation( [ 5 , 1 , 3 , 4 , 5 ] ) ]
1051+ gap> ForAll(monos, x -> IsDigraphMonomorphism(gr1, gr2, x));
1052+ true
10511053gap> monos = MonomorphismsDigraphsRepresentatives(gr1, gr2);
10521054true
10531055gap> monos = HomomorphismsDigraphsRepresentatives(gr1, gr2);
@@ -1067,8 +1069,8 @@ gap> gr2 := CompleteDigraph(3);;
10671069gap> EpimorphismsDigraphs(gr1, gr2);
10681070[ ]
10691071gap> gr1 := DigraphFromDigraph6String(" &I@??HO???????A????" );;
1070- gap> DigraphEpimorphism(gr1, gr2);
1071- Transformation( [ 2 , 1 , 1 , 2 , 1 , 3 , 1 , 2 , 1 , 1 ] )
1072+ gap> IsDigraphEpimorphism(gr1, gr2, DigraphEpimorphism(gr1, gr2) );
1073+ true
10721074gap> epis := EpimorphismsDigraphsRepresentatives(gr1, gr2);;
10731075gap> Length(epis);
10741076972
@@ -1162,17 +1164,23 @@ gap> ForAll(GeneratorsOfEndomorphismMonoid(gr),
11621164> x -> IsDigraphEndomorphism(gr, x));
11631165true
11641166gap> x := Transformation([ 2 , 1 , 3 , 3 ] );;
1167+ gap> ForAll(DigraphEdges(gr), e -> IsDigraphEdge(gr, e[ 1 ] ^ x, e[ 2 ] ^ x));
1168+ true
11651169gap> IsDigraphEndomorphism(gr, x);
1166- false
1170+ true
11671171gap> x := Transformation([ 3 , 1 , 3 , 3 ] );;
11681172gap> IsDigraphEndomorphism(gr, x);
11691173false
11701174gap> IsDigraphEndomorphism(gr, ());
11711175true
11721176gap> IsDigraphEndomorphism(gr, (1 , 2 ));
11731177true
1174- gap> IsDigraphEndomorphism(gr, (1 , 2 )(3 , 4 ));
1175- false
1178+ gap> x := (1 , 2 )(3 , 4 );
1179+ (1 ,2 )(3 ,4 )
1180+ gap> IsDigraphEndomorphism(gr, x);
1181+ true
1182+ gap> ForAll(DigraphEdges(gr), e -> IsDigraphEdge(gr, e[ 1 ] ^ x, e[ 2 ] ^ x));
1183+ true
11761184gap> IsDigraphEndomorphism(gr, (1 , 2 , 3 , 4 ));
11771185false
11781186gap> IsDigraphHomomorphism(NullDigraph(1 ),
@@ -1845,6 +1853,8 @@ gap> D := Digraph(parts, {x, y} -> ForAll(x, z -> not z in y));
18451853< immutable digraph with 280 vertices, 70560 edges>
18461854gap> t := DigraphHomomorphism(CompleteDigraph(25 ), D);
18471855< transformation on 273 pts with rank 251 >
1856+ gap> IsDigraphHomomorphism(CompleteDigraph(25 ), D, t);
1857+ true
18481858gap> tt := HomomorphismDigraphsFinder(CompleteDigraph(26 ),
18491859> D,
18501860> fail , # hook
@@ -1853,12 +1863,11 @@ gap> tt := HomomorphismDigraphsFinder(CompleteDigraph(26),
18531863> fail ,
18541864> 0 ,
18551865> [ 1 .. 280 ] ,
1856- > OnTuples([ 2 .. 25 ] , t),
1866+ > [ 12 , 23 , 32 , 44 , 52 , 1 , 77 , 85 , 96 , 103 , 114 ,
1867+ > 125 , 136 , 145 , 157 , 170 , 262 , 204 , 215 , 233 , 246 , 255 , 193 , 273 ] ,
18571868> fail ,
18581869> fail )[ 1 ] ;
18591870< transformation on 273 pts with rank 250 >
1860- gap> OnTuples([ 2 .. 25 ] , t) = OnTuples([ 2 .. 25 ] , tt);
1861- false
18621871
18631872# GAP hook function
18641873gap> found := 0 ;;
@@ -2135,7 +2144,7 @@ gap> HomomorphismDigraphsFinder(CycleDigraph(5),
21352144
21362145# More arg/error checks
21372146gap> HomomorphismDigraphsFinder(0 );
2138- Error, there must be 11 or 12 arguments, found 1 ,
2147+ Error, there must be 11 , 12 , or 13 arguments, found 1 ,
21392148gap> DigraphHomomorphism(NullDigraph(1 ), NullDigraph(513 ));
21402149IdentityTransformation
21412150gap> HomomorphismDigraphsFinder(NullDigraph(1 ), NullDigraph(510 ), fail , [] , 1 ,
@@ -2759,6 +2768,115 @@ gap> D := DigraphFromGraph6String("O^vMMF@oM?w@o@o?w?N?@");
27592768gap> Length(SubdigraphsMonomorphisms(CompleteMultipartiteDigraph([ 2 , 7 ] ), D));
276027693432
27612770
2771+ #
2772+ gap> H := DigraphFromGraph6String(" F~CWw" );
2773+ < immutable symmetric digraph with 7 vertices, 24 edges>
2774+ gap> G := DigraphFromGraph6String(" G@p}|{" );
2775+ < immutable symmetric digraph with 8 vertices, 36 edges>
2776+ gap> ForAll(MonomorphismsDigraphs(H, G), x -> IsDigraphMonomorphism(H, G, x));
2777+ true
2778+ gap> H := NullDigraph(3 );
2779+ < immutable empty digraph with 3 vertices>
2780+ gap> G := NullDigraph(510 );
2781+ < immutable empty digraph with 510 vertices>
2782+ gap> p := MappingPermListList([ 1 .. 1000 ] , [ 5 .. 1004 ] );;
2783+ gap> IsDigraphAutomorphism(G, p);
2784+ false
2785+ gap> HomomorphismDigraphsFinder(NullDigraph(3 ), NullDigraph(510 ), fail , [] , 1 ,
2786+ > fail , true , [ 1 , 2 , 3 ] , [ 1 ] , fail , fail ,
2787+ > Group(MappingPermListList([ 1 .. 1000 ] , [ 5 .. 1004 ] )));
2788+ Error, expected group of automorphisms, but found a non- automorphism in positi\
2789+ on 1 of the group generators,
2790+ gap> HomomorphismDigraphsFinder(NullDigraph(3 ), NullDigraph(510 ), fail , [] , 1 ,
2791+ > fail , true , [ 1 , 2 , 3 ] , [ 1 ] , fail , fail ,
2792+ > Group((511 , 512 )));
2793+ [ IdentityTransformation ]
2794+
2795+ # Issue 697
2796+ gap> H := DigraphFromGraph6String(" F~CWw" );
2797+ < immutable symmetric digraph with 7 vertices, 24 edges>
2798+ gap> G := DigraphFromGraph6String(" G@p}|{" );
2799+ < immutable symmetric digraph with 8 vertices, 36 edges>
2800+ gap> p := PermList(DigraphWelshPowellOrder(H)) ^ - 1 ;
2801+ (1 ,2 ,3 ,4 )
2802+ gap> H := OnDigraphs(H, p);
2803+ < immutable digraph with 7 vertices, 24 edges>
2804+ gap> # Reorder H to remove the ordering from the equation
2805+
2806+ # no partial map, no group
2807+ gap> HomomorphismDigraphsFinder(H,
2808+ > G, # range
2809+ > fail , # hook
2810+ > [] , # user_param
2811+ > 1 , # max_results
2812+ > 7 , # hint (i.e. rank)
2813+ > true , # injective
2814+ > [ 1 , 3 , 4 , 5 , 6 , 7 , 8 ] , # image
2815+ > [] , # partial_map
2816+ > fail , # colors1
2817+ > fail );
2818+ [ ]
2819+
2820+ # With partial map, no hint
2821+ gap> HomomorphismDigraphsFinder(H,
2822+ > G, # range
2823+ > fail , # hook
2824+ > [] , # user_param
2825+ > 1 , # max_results
2826+ > fail , # hint (i.e. rank)
2827+ > true , # injective
2828+ > [ 1 , 3 , 4 , 5 , 6 , 7 , 8 ] , # image
2829+ > [ 8 ] , # partial_map
2830+ > fail , # colors1
2831+ > fail );
2832+ [ Transformation( [ 8 , 1 , 5 , 7 , 3 , 4 , 6 , 8 ] ) ]
2833+
2834+ # With group, no hint
2835+ gap> HomomorphismDigraphsFinder(H,
2836+ > G, # range
2837+ > fail , # hook
2838+ > [] , # user_param
2839+ > 1 , # max_results
2840+ > fail , # hint (i.e. rank)
2841+ > true , # injective
2842+ > [ 1 , 3 , 4 , 5 , 6 , 7 , 8 ] ,
2843+ > [] , # partial_map
2844+ > fail , # colors1
2845+ > fail ,
2846+ > [ 1 .. 7 ] ,
2847+ > Group(()));
2848+ [ Transformation( [ 8 , 1 , 5 , 7 , 3 , 4 , 6 , 8 ] ) ]
2849+
2850+ # With partial map, with hint
2851+ gap> HomomorphismDigraphsFinder(H,
2852+ > G, # range
2853+ > fail , # hook
2854+ > [] , # user_param
2855+ > 1 , # max_results
2856+ > 7 , # hint (i.e. rank)
2857+ > true , # injective
2858+ > [ 1 , 3 , 4 , 5 , 6 , 7 , 8 ] , # image
2859+ > [ 8 ] , # partial_map
2860+ > fail , # colors1
2861+ > fail );
2862+ [ Transformation( [ 8 , 1 , 5 , 7 , 3 , 4 , 6 , 8 ] ) ]
2863+
2864+ # With group, with hint
2865+ gap> HomomorphismDigraphsFinder(H,
2866+ > G, # range
2867+ > fail , # hook
2868+ > [] , # user_param
2869+ > 1 , # max_results
2870+ > 7 , # hint (i.e. rank)
2871+ > true , # injective
2872+ > [ 1 , 3 , 4 , 5 , 6 , 7 , 8 ] ,
2873+ > [] , # partial_map
2874+ > fail , # colors1
2875+ > fail ,
2876+ > DigraphWelshPowellOrder(H),
2877+ > Group(()));
2878+ [ Transformation( [ 8 , 1 , 5 , 7 , 3 , 4 , 6 , 8 ] ) ]
2879+
27622880# DIGRAPHS_UnbindVariables
27632881gap> Unbind (D);
27642882gap> Unbind (D1);
0 commit comments