Perfect. Thanks for the speedy reply and easy solution.

All the best,

Graham




________________________________________
From: Hulpke,Alexander [alexander.hul...@colostate.edu]
Sent: Thursday, July 26, 2018 5:45 PM
To: Ellis, Grahamj; forum@gap-system.org
Subject: Re: [GAP Forum] Question about SubdirectProduct

Dear Forum, Dear Graham,

The problem you run into is the conjunction of forced tests to ensure that 
input is correct, and the fact that D (as an infinite matrix group) does not 
seem to have a membership test for arbitrary integral matrices implemented. (G 
probably has, but that is not carried through with the standard direct product 
construction.)

This is a problem that arises more generakky for larger matrix groups, and for 
which we do not have a universally satisfactory solution. (Other systems e.g. 
get around this issue by forcefully casting matrices or parmutations into a 
particular group and then take this as assured membership. With permutation 
groups we were able to avoid any such casting, for matrix groups the problem is 
still open.

By far the easiest way around the problem thus is to not use `Image` (which 
does extensive tests on the input to establish that the second argument is 
indeed a matrix in the group, and not a list of objects to be mapped, etc.), 
but `ImagesRepresentative`, which is more trusting of user input:

ImagesRepresentative(DhomDD,x);

works (at least on my computer). I have done similarly in other code for matrix 
groups, e.g. in the matgrp package.

Hope this helps,

   Alexander

On Jul 26, 2018, at 9:58 AM, Ellis, Grahamj 
<graham.el...@nuigalway.ie<mailto:graham.el...@nuigalway.ie>> wrote:

Dear Forum and Alexander,

I have a related question. Does anyone know an easy way to get around the 
difficulty arising in the second of the following two examples? I'm looking for 
a general method of embedding an element w in GxG as the element (1,w) in the 
direct product Gx(GxG) which I'd like to work for a range of groups G..

gap> G:=SymmetricGroup(3);;
gap> D:=DirectProduct(G,G);;
gap> gensD:=GeneratorsOfGroup(D);;
gap> DD:=DirectProduct(G,D);;
gap> DhomDD:=Embedding(DD,2);;
gap> x:=gensD[1]*gensD[2];
(2,3)
gap> y:=Image(DhomDD,x);
(5,6)
gap>
gap>
gap> G:=SpaceGroup(4,122);;
gap> D:=DirectProduct(G,G);;
gap> gensD:=GeneratorsOfGroup(D);;
gap> DD:=DirectProduct(G,D);;
gap> DhomDD:=Embedding(DD,2);;
gap> x:=gensD[1]*gensD[2];
[ [ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ],
 [ 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0, -1, 0, 0, 0, 0, 0, 0 ],
 [ 0, -1/2, 1/2, -1/2, 1, 0, 0, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ],
 [ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ],
 [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ], [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ] ]
gap> y:=Image(DhomDD,x);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `Enumerator' on 1 arguments called from
Enumerator( D ) at /usr/local/lib/gap4r8/lib/domain.gi:247 called from
elm in Source( map ) at /usr/local/lib/gap4r8/lib/mapping.gi:190 called from
<function "Image">( <arguments> )
called from read-eval loop at line 275 of *stdin*
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk>


Thanks,

Graham


School of Mathematics, Statistics & Applied Mathematics
National University of Ireland, Galway
http://hamilton.nuigalway.ie<http://hamilton.nuigalway.ie/>
tel: 091 493011
________________________________________
From: Hulpke,Alexander 
[alexander.hul...@colostate.edu<mailto:alexander.hul...@colostate.edu>]
Sent: Thursday, July 26, 2018 3:49 PM
To: German Combariza
Cc: forum@gap-system.org<mailto:forum@gap-system.org>
Subject: Re: [GAP Forum] Question about SubdirectProduct

Dear GAP Forum, Dear German Combariza,

I am having problems with the function SubdirectProduct. Looks like GAP does 
not recognize the SubdirectProduct as a subgroup of the DirectProduct, but It 
does for small groups.

s4  := Group((1,2,3,4),(1,2));;
list := AllSmallGroups(48);;
n := 48;;
g := list[n];;
hom := AllHomomorphisms(list[n], s4)[53];;
gamma := SubdirectProduct(g,g,hom,hom);;
wprod := DirectProduct(g,g);;
IsSubgroup( wprod, gamma);  # This returns False

Let me explain what happens here and clear up the misapprehensions in prior 
responses.

When you construct a group product in GAP, you construct a new group (what is 
sometimes called an ``external direct product'' in the literature). GAP will 
decide internally how this product is to be represented, but in general it will 
be a new group that might be in a representation quite different than that of 
the groups one started with.

As described in the manual,
https://www.gap-system.org/Manuals/doc/ref/chap49_mj.html
the attributes stores certain homomorphisms from the factors to the product 
(operation `Embedding`) or from the product to the constituent factors 
(operation `Projection`).

When working with products on paper, there might be further homomorphisms, for 
example the embedding of a subdirect product in a direct product.   This 
embedding is in fact a homomorphism, albeit one that when working on paper is 
not written down and assumed.
GAP will need such a homomorphism to be constructed.

An even more drastic case happens if you construct the direct product of the 
same two groups twice. GAP will construct two different direct products whose 
elements have nothing to do with each other.

Of course it is possible to construct the embedding you are interested in 
explicitly from the embeddings and constructions: Project from the subdirect 
product on both components and embed into the direct product, do so 
simultaneously for both factors.

gap> p1:=Projection(gamma,1);p2:=Projection(gamma,2);
[ f1, f2, f3, f4, f5, f6, f7, f8 ] -> [ f1, f2, f3, f4, f5, <identity> of ...,
 <identity> of ..., <identity> of ... ]
[ f1, f2, f3, f4, f5, f6, f7, f8 ] -> [ f1*f4*f5, f2*f3^2, <identity> of ...,
 <identity> of ..., <identity> of ..., f3, f4, f5 ]
gap> e1:=Embedding(wprod,1);e2:=Embedding(wprod,2);
Pcgs([ f1, f2, f3, f4, f5 ]) -> [ f1, f2, f3, f4, f5 ]
Pcgs([ f1, f2, f3, f4, f5 ]) -> [ f6, f7, f8, f9, f10 ]
gap> emb:=GroupHomomorphismByImages(gamma,wprod,GeneratorsOfGroup(gamma),
List(GeneratorsOfGroup(gamma),x->Image(e1,Image(p1,x))*Image(e2,Image(p2,x))));
[ f1, f2, f3, f4, f5, f6, f7, f8 ] -> [ f1*f6*f9*f10, f2*f7*f8^2, f3, f4, f5, 
f8, f9,
 f10 ]
gap> IsInjective(emb);
true
gap> Size(Image(emb));
576
gap> Index(wprod,Image(emb));
4

Now the image of `emb` will be the subdirect product as a subset of the direct 
product,
IsSubgroup(wprod, Image(emb));

returns `true` as desired.

The weird bit is in fact that the ``automatic'' embedding works in the case of 
permutation groups. This is a byproduct of the methods GAP uses for permutation 
groups, shifting the domain of the second group to larger points, and writing 
it as permutations. In this particular case thus the elements of a subdirect 
product can be elements of the dirct product (though that might fail if the 
factors are not transitive). The method I described above is the only general 
way.



What also should be noted (and seems to be the problem behind the wrong answers 
given before) is that if GAP constructs a new group as words in generators (as 
is done in general for solvable groups) these generators will display as 
f1,f2,f3,..., but there is no relation between the f1 onf one group and the f1 
of another group and neither is bound to the variable f1.
You need to use (e.g.)

gens:=GeneratorsOfGroup(group);
gens[3];
to get the third generator, etc.

Hope this helps,

 Alexander Hulpke

-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: 
hul...@colostate.edu<mailto:hul...@colostate.edu><mailto:hul...@colostate.edu>, 
Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke

_______________________________________________
Forum mailing list
Forum@gap-system.org<mailto:Forum@gap-system.org>
https://mail.gap-system.org/mailman/listinfo/forum


_______________________________________________
Forum mailing list
Forum@gap-system.org
https://mail.gap-system.org/mailman/listinfo/forum

Reply via email to