1##############################################################################
2##
3#W  autos2.tst                  Groupoids Package                Chris Wensley
4##
5#Y  Copyright (C) 2000-2019, Chris Wensley,
6#Y  School of Computer Science, Bangor University, U.K.
7##
8
9gap> gpd_infolevel_saved := InfoLevel( InfoGroupoids );;
10gap> SetInfoLevel( InfoGroupoids, 0 );;
11
12gap> s4 := Group( (1,2,3,4), (3,4) );;
13gap> SetName( s4, "s4" );
14gap> d8 := Subgroup( s4, [ (1,2,3,4), (2,4) ] );;
15gap> SetName( d8, "d8" );
16gap> Gs4 := SinglePieceGroupoid( s4, [-9,-8,-7,-6] );
17single piece groupoid: < s4, [ -9, -8, -7, -6 ] >
18gap> SetName( Gs4, "Gs4" );
19gap> Gd8 := SubgroupoidWithRays( Gs4, d8, [(),(1,2,3),(),(1,2,3)] );
20single piece groupoid with rays: < d8, [ -9, -8, -7, -6 ],
21[ (), (1,2,3), (), (1,2,3) ] >
22gap> SetName( Gd8, "Gd8" );
23gap> isosg := IsomorphismStandardGroupoid( Gd8, [-5,-4,-3,-2] );
24groupoid homomorphism :
25[ [ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(1,2,3) : -9 -> -8],
26      [() : -9 -> -7], [(1,2,3) : -9 -> -6] ],
27  [ [(1,2,3,4) : -5 -> -5], [(2,4) : -5 -> -5], [() : -5 -> -4],
28      [() : -5 -> -3], [() : -5 -> -2] ] ]
29gap> isono := IsomorphismNewObjects( Gs4, [-19,-18,-17,-16] );;
30gap> Fs4 := Image( isono );
31single piece groupoid: < s4, [ -19, -18, -17, -16 ] >
32gap> SetName( Fs4, "Fs4" );
33gap> isod8 := RestrictedMappingGroupoids( isono, Gd8 );
34groupoid homomorphism :
35[ [ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(1,2,3) : -9 -> -8],
36      [() : -9 -> -7], [(1,2,3) : -9 -> -6] ],
37  [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
38      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ] ]
39gap> Fd8 := ImagesSource( isod8 );
40single piece groupoid with rays: < Group( [ (1,2,3,4), (2,4) ] ),
41[ -19, -18, -17, -16 ], [ (), (1,2,3), (), (1,2,3) ] >
42gap> SetName( Fd8, "Fd8" );
43
44gap> alpha := GroupoidAutomorphismByObjectPerm( Gs4, [-8,-7,-6,-9] );
45groupoid homomorphism : Gs4 -> Gs4
46[ [ [(1,2,3,4) : -9 -> -9], [(3,4) : -9 -> -9], [() : -9 -> -8],
47      [() : -9 -> -7], [() : -9 -> -6] ],
48  [ [(1,2,3,4) : -8 -> -8], [(3,4) : -8 -> -8], [() : -8 -> -7],
49      [() : -8 -> -6], [() : -8 -> -9] ] ]
50gap> coll := GeneratorsOfGroupoid( Gd8 );
51[ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(1,2,3) : -9 -> -8],
52  [() : -9 -> -7], [(1,2,3) : -9 -> -6] ]
53gap> acoll := List( coll, a -> ImageElm( alpha, a ) );
54[ [(1,2,3,4) : -8 -> -8], [(2,4) : -8 -> -8], [(1,2,3) : -8 -> -7],
55  [() : -8 -> -6], [(1,2,3) : -8 -> -9] ]
56gap> Hd8a := SinglePieceSubgroupoidByGenerators( Gs4, acoll );;
57gap> Display( Hd8a );
58single piece groupoid with rays having:
59supergroupoid: single piece groupoid: < s4, [ -9, -8, -7, -6 ] >
60      objects: [ -9, -8, -7, -6 ]
61   root group: Group( [ (1,4,2,3), (3,4) ] )
62         rays: [ (), (1,3,2), (), (1,3,2) ]
63gap> resalpha := RestrictedMappingGroupoids( alpha, Gd8 );
64groupoid homomorphism :
65[ [ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(1,2,3) : -9 -> -8],
66      [() : -9 -> -7], [(1,2,3) : -9 -> -6] ],
67  [ [(1,2,3,4) : -8 -> -8], [(2,4) : -8 -> -8], [(1,2,3) : -8 -> -7],
68      [() : -8 -> -6], [(1,2,3) : -8 -> -9] ] ]
69gap> IsAutomorphismWithObjects( resalpha );
70false
71gap> Jd8a := ImagesSource( resalpha );
72single piece groupoid with rays: < Group( [ (1,4,2,3), (3,4) ] ),
73[ -9, -8, -7, -6 ], [ (), (1,3,2), (), (1,3,2) ] >
74
75gap> beta := GroupoidAutomorphismByObjectPerm( Gs4, [-7,-6,-9,-8] );
76groupoid homomorphism : Gs4 -> Gs4
77[ [ [(1,2,3,4) : -9 -> -9], [(3,4) : -9 -> -9], [() : -9 -> -8],
78      [() : -9 -> -7], [() : -9 -> -6] ],
79  [ [(1,2,3,4) : -7 -> -7], [(3,4) : -7 -> -7], [() : -7 -> -6],
80      [() : -7 -> -9], [() : -7 -> -8] ] ]
81gap> bcoll := List( coll, a -> ImageElm( beta, a ) );
82[ [(1,2,3,4) : -7 -> -7], [(2,4) : -7 -> -7], [(1,2,3) : -7 -> -6],
83  [() : -7 -> -9], [(1,2,3) : -7 -> -8] ]
84gap> Hd8b := SinglePieceSubgroupoidByGenerators( Gs4, bcoll );;
85gap> Display( Hd8b );
86single piece groupoid with rays having:
87supergroupoid: single piece groupoid: < s4, [ -9, -8, -7, -6 ] >
88      objects: [ -9, -8, -7, -6 ]
89   root group: Group( [ (1,2,3,4), (2,4) ] )
90         rays: [ (), (1,2,3), (), (1,2,3) ]
91gap> resbeta := RestrictedMappingGroupoids( beta, Gd8 );
92groupoid homomorphism :
93[ [ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(1,2,3) : -9 -> -8],
94      [() : -9 -> -7], [(1,2,3) : -9 -> -6] ],
95  [ [(1,2,3,4) : -7 -> -7], [(2,4) : -7 -> -7], [(1,2,3) : -7 -> -6],
96      [() : -7 -> -9], [(1,2,3) : -7 -> -8] ] ]
97gap> IsAutomorphismWithObjects( resbeta );
98true
99gap> Jd8b := ImagesSource( resbeta );
100single piece groupoid with rays: < Group( [ (1,2,3,4), (2,4) ] ),
101[ -9, -8, -7, -6 ], [ (), (1,2,3), (), (1,2,3) ] >
102
103gap> aut1 := GroupoidAutomorphismByObjectPerm( Fd8, [-17,-16,-19,-18] );
104groupoid homomorphism : Fd8 -> Fd8
105[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
106      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
107  [ [(1,2,3,4) : -17 -> -17], [(2,4) : -17 -> -17], [(1,2,3) : -17 -> -16],
108      [() : -17 -> -19], [(1,2,3) : -17 -> -18] ] ]
109gap> IsAutomorphismWithObjects( aut1 );
110true
111gap> iso1 := isod8 * aut1;;
112gap> Display( iso1 );
113 groupoid mapping: [ Gd8 ] -> [ Fd8 ]
114root homomorphism: [ [ (1,2,3,4), (2,4) ], [ (1,2,3,4), (2,4) ] ]
115images of objects: [ -17, -16, -19, -18 ]
116   images of rays: [ [() : -17 -> -17], [(1,2,3) : -17 -> -16],
117  [() : -17 -> -19], [(1,2,3) : -17 -> -18] ]
118gap> a := Arrow( Gd8, (1,2,3), -9, -8 );;
119gap> a1 := ImageElm( iso1, a );
120[(1,2,3) : -17 -> -16]
121gap> b := Arrow( Gd8, (), -9, -7 );;
122gap> b1 := ImageElm( iso1, b );
123[() : -17 -> -19]
124gap> c := Arrow( Gd8, (1,2,3), -9, -6 );;
125gap> c1 := ImageElm( iso1, c );
126[(1,2,3) : -17 -> -18]
127gap> e := Arrow( Gd8, (1,3,4,2), -8, -7 );;
128gap> e1 := ImageElm( iso1, e );
129[(1,3,4,2) : -16 -> -19]
130
131gap> hom := GroupHomomorphismByImages( d8, d8,
132>               [ (1,2,3,4), (2,4) ], [ (1,2,3,4), (1,3) ] );;
133gap> aut2 := GroupoidAutomorphismByGroupAuto( Fd8, hom );
134groupoid homomorphism : Fd8 -> Fd8
135[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
136      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
137  [ [(1,2,3,4) : -19 -> -19], [(1,3) : -19 -> -19], [(1,2,3) : -19 -> -18],
138      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ] ]
139gap> IsAutomorphismWithObjects( aut2 );
140true
141gap> iso2 := isod8 * aut2;;
142gap> Display( iso2 );
143 groupoid mapping: [ Gd8 ] -> [ Fd8 ]
144root homomorphism: [ [ (1,2,3,4), (2,4) ], [ (1,2,3,4), (1,3) ] ]
145images of objects: [ -19, -18, -17, -16 ]
146   images of rays: [ [() : -19 -> -19], [(1,2,3) : -19 -> -18],
147  [() : -19 -> -17], [(1,2,3) : -19 -> -16] ]
148gap> a2 := ImageElm( iso2, a );
149[(1,2,3) : -19 -> -18]
150gap> b2 := ImageElm( iso2, b );
151[() : -19 -> -17]
152gap> c2 := ImageElm( iso2, c );
153[(1,2,3) : -19 -> -16]
154gap> e2 := ImageElm( iso2, e );
155[(2,3) : -18 -> -17]
156gap> a12 := ImageElm( aut2, a1 );
157[(1,2,3) : -17 -> -16]
158gap> b12 := ImageElm( aut2, b1 );
159[() : -17 -> -19]
160gap> c12 := ImageElm( aut2, c1 );
161[(1,2,3) : -17 -> -18]
162gap> e12 := ImageElm( aut2, e1 );
163[(2,3) : -16 -> -19]
164
165gap> shifts := [ (), (1,2)(3,4), (1,4,3,2), (1,4)(2,3) ];;
166gap> aut3 := GroupoidAutomorphismByRayShifts( Fd8, shifts );
167groupoid homomorphism : Fd8 -> Fd8
168[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
169      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
170  [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(2,4,3) : -19 -> -18],
171      [(1,4,3,2) : -19 -> -17], [(1,3,4) : -19 -> -16] ] ]
172gap> IsAutomorphismWithObjects( aut3 );
173true
174gap> iso3 := isod8 * aut3;;
175gap> Display( iso3 );
176 groupoid mapping: [ Gd8 ] -> [ Fd8 ]
177root homomorphism: [ [ (1,2,3,4), (2,4) ], [ (1,2,3,4), (2,4) ] ]
178images of objects: [ -19, -18, -17, -16 ]
179   images of rays: [ [() : -19 -> -19], [(2,4,3) : -19 -> -18],
180  [(1,4,3,2) : -19 -> -17], [(1,3,4) : -19 -> -16] ]
181gap> a3 := ImageElm( iso3, a );
182[(2,4,3) : -19 -> -18]
183gap> b3 := ImageElm( iso3, b );
184[(1,4,3,2) : -19 -> -17]
185gap> c3 := ImageElm( iso3, c );
186[(1,3,4) : -19 -> -16]
187gap> e3 := ImageElm( iso3, e );
188[(1,4,3) : -18 -> -17]
189gap> a123 := ImageElm( aut3, a12 );
190[(1,2,4,3) : -17 -> -16]
191gap> b123 := ImageElm( aut3, b12 );
192[(1,2,3,4) : -17 -> -19]
193gap> c123 := ImageElm( aut3, c12 );
194[(1,4) : -17 -> -18]
195gap> e123 := ImageElm( aut3, e12 );
196[(1,4) : -16 -> -19]
197
198gap> inv3 := InverseGeneralMapping( iso3 );
199groupoid homomorphism : Fd8 -> Gd8
200[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
201      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
202  [ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(2,4,3) : -9 -> -8],
203      [(1,2,3,4) : -9 -> -7], [(1,3,4) : -9 -> -6] ] ]
204gap> inv2 := InverseGeneralMapping( iso2 );
205groupoid homomorphism : Fd8 -> Gd8
206[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
207      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
208  [ [(1,2,3,4) : -9 -> -9], [(1,3) : -9 -> -9], [(1,2,3) : -9 -> -8],
209      [() : -9 -> -7], [(1,2,3) : -9 -> -6] ] ]
210gap> inv1 := InverseGeneralMapping( iso1 );
211groupoid homomorphism : Fd8 -> Gd8
212[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
213      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
214  [ [(1,2,3,4) : -7 -> -7], [(2,4) : -7 -> -7], [(1,2,3) : -7 -> -6],
215      [() : -7 -> -9], [(1,2,3) : -7 -> -8] ] ]
216gap> ainv3 := InverseGeneralMapping( aut3 );
217groupoid homomorphism : Fd8 -> Fd8
218[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
219      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
220  [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(2,4,3) : -19 -> -18],
221      [(1,2,3,4) : -19 -> -17], [(1,3,4) : -19 -> -16] ] ]
222gap> ainv2 := InverseGeneralMapping( aut2 );
223groupoid homomorphism : Fd8 -> Fd8
224[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
225      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
226  [ [(1,2,3,4) : -19 -> -19], [(1,3) : -19 -> -19], [(1,2,3) : -19 -> -18],
227      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ] ]
228gap> ainv1 := InverseGeneralMapping( aut1 );
229groupoid homomorphism : Fd8 -> Fd8
230[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
231      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
232  [ [(1,2,3,4) : -17 -> -17], [(2,4) : -17 -> -17], [(1,2,3) : -17 -> -16],
233      [() : -17 -> -19], [(1,2,3) : -17 -> -18] ] ]
234gap> aut123 := aut1 * aut2 * aut3;
235groupoid homomorphism : Fd8 -> Fd8
236[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
237      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
238  [ [(1,2,3,4) : -17 -> -17], [(2,4) : -17 -> -17], [(1,2,4,3) : -17 -> -16],
239      [(1,2,3,4) : -17 -> -19], [(1,4) : -17 -> -18] ] ]
240gap> iso123 := isod8 * aut123;
241groupoid homomorphism : Gd8 -> Fd8
242[ [ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(1,2,3) : -9 -> -8],
243      [() : -9 -> -7], [(1,2,3) : -9 -> -6] ],
244  [ [(1,2,3,4) : -17 -> -17], [(2,4) : -17 -> -17], [(1,2,4,3) : -17 -> -16],
245      [(1,2,3,4) : -17 -> -19], [(1,4) : -17 -> -18] ] ]
246gap> a0 := ImageElm( iso123, a );
247[(1,2,4,3) : -17 -> -16]
248gap> b0 := ImageElm( iso123, b );
249[(1,2,3,4) : -17 -> -19]
250gap> c0 := ImageElm( iso123, c );
251[(1,4) : -17 -> -18]
252gap> e0 := ImageElm( iso123, e );
253[(1,4) : -16 -> -19]
254gap> ainv321 := ainv3 * ainv2 * ainv1;
255groupoid homomorphism : Fd8 -> Fd8
256[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
257      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
258  [ [(1,2,3,4) : -17 -> -17], [(1,3) : -17 -> -17], [(2,4,3) : -17 -> -16],
259      [(1,2,3,4) : -17 -> -19], [(1,4,2) : -17 -> -18] ] ]
260gap> invd8 := InverseGeneralMapping( isod8 );
261groupoid homomorphism :
262[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
263      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
264  [ [(1,2,3,4) : -9 -> -9], [(2,4) : -9 -> -9], [(1,2,3) : -9 -> -8],
265      [() : -9 -> -7], [(1,2,3) : -9 -> -6] ] ]
266gap> inv321 := ainv321 * invd8;
267groupoid homomorphism : Fd8 -> Gd8
268[ [ [(1,2,3,4) : -19 -> -19], [(2,4) : -19 -> -19], [(1,2,3) : -19 -> -18],
269      [() : -19 -> -17], [(1,2,3) : -19 -> -16] ],
270  [ [(1,2,3,4) : -7 -> -7], [(1,3) : -7 -> -7], [(2,4,3) : -7 -> -6],
271      [(1,2,3,4) : -7 -> -9], [(1,4,2) : -7 -> -8] ] ]
272
273gap> #
274gap> SetInfoLevel( InfoGroupoids, gpd_infolevel_saved );;
275