Discussion:
[GAP Forum] Displayed name for generators of group
Gabriel Cardona
2018-09-03 08:03:20 UTC
Permalink
Dear members of the GAP forum,

I am trying to display the elements of a group using names that I specify
for the generators. I could find a way to do it when the group is given as
generators and relations, but not when it is constructed with DirectProduct
(or CyclicGroup,...).

A simplified example is as follows:

gap> F1:=FreeGroup("s");;
gap> G1:=F1/[F1.1^2];;
gap> F2:=FreeGroup("t");;
gap> G2:=F2/[F2.1^2];;
gap> G:=DirectProduct(G1,G2);;
gap> Elements(G1);
[ <identity ...>, s ]
gap> Elements(G2);
[ <identity ...>, t ]
gap> Elements(G);
[ <identity ...>, f1, f2, f1*f2 ]

I would like to get "f1" displayed as "s" and "f2" as "t".
Is there a way to do it?

Thanks!

Gabriel Cardona

PS: I know I could define it as the free group with two generators (that I
can assign a name) modulo the appropiate relations. In the real case I need
to deal with the description of the group gets too complicated and GAP
cannot even find its subgroups.
Hulpke,Alexander
2018-09-03 17:15:09 UTC
Permalink
Dear Forum, Dear Gabriel Cardona,
Post by Gabriel Cardona
I am trying to display the elements of a group using names that I specify
for the generators. I could find a way to do it when the group is given as
generators and relations, but not when it is constructed with DirectProduct
(or CyclicGroup,...).
gap> F1:=FreeGroup("s");;
gap> G1:=F1/[F1.1^2];;
gap> F2:=FreeGroup("t");;
gap> G2:=F2/[F2.1^2];;
gap> G:=DirectProduct(G1,G2);;
gap> Elements(G1);
[ <identity ...>, s ]
gap> Elements(G2);
[ <identity ...>, t ]
gap> Elements(G);
[ <identity ...>, f1, f2, f1*f2 ]
I would like to get "f1" displayed as "s" and "f2" as "t".
Is there a way to do it?
At this point, `DirectProduct` simply creates new generators named consecutively without an option to rename.

The only thing you could do is to create a new finitely presented group with differehtly named generators and copying over the relators. In your example:

new:=FreeGroup("s","t");
newrel:=List(RelatorsOfFpGroup(G), x->MappedWord(x,FreeGeneratorsOfFpGroup(G),GeneratorsOfGroup(new)));
GG:=new/newrel;

Alas this new group will lose the direct product information that would allow for projections etc., so it is only a partial solution. I'll see whether one could preserve existing names.

Regards,

Alexander Hupke
Gabriel Cardona
2018-09-03 20:11:03 UTC
Permalink
It will do the trick... Thanks a lot!
Biel

On Mon, Sep 3, 2018 at 7:15 PM Hulpke,Alexander <
Post by Hulpke,Alexander
Dear Forum, Dear Gabriel Cardona,
Post by Gabriel Cardona
I am trying to display the elements of a group using names that I specify
for the generators. I could find a way to do it when the group is given
as
Post by Gabriel Cardona
generators and relations, but not when it is constructed with
DirectProduct
Post by Gabriel Cardona
(or CyclicGroup,...).
gap> F1:=FreeGroup("s");;
gap> G1:=F1/[F1.1^2];;
gap> F2:=FreeGroup("t");;
gap> G2:=F2/[F2.1^2];;
gap> G:=DirectProduct(G1,G2);;
gap> Elements(G1);
[ <identity ...>, s ]
gap> Elements(G2);
[ <identity ...>, t ]
gap> Elements(G);
[ <identity ...>, f1, f2, f1*f2 ]
I would like to get "f1" displayed as "s" and "f2" as "t".
Is there a way to do it?
At this point, `DirectProduct` simply creates new generators named
consecutively without an option to rename.
The only thing you could do is to create a new finitely presented group
with differehtly named generators and copying over the relators. In your
new:=FreeGroup("s","t");
newrel:=List(RelatorsOfFpGroup(G),
x->MappedWord(x,FreeGeneratorsOfFpGroup(G),GeneratorsOfGroup(new)));
GG:=new/newrel;
Alas this new group will lose the direct product information that would
allow for projections etc., so it is only a partial solution. I'll see
whether one could preserve existing names.
Regards,
Alexander Hupke
Loading...