On Fri, Apr 29, 2022 at 3:27 PM Dima Pasechnik <d...@sagemath.org> wrote:
>
> On Fri, Apr 29, 2022 at 08:40:28AM +0800, Hongyi Zhao wrote:
> >
> > See the following testings:
> >
> > gap> g:=SmallGroup(8,1);
> > <pc group of size 8 with 3 generators>
> >
> > gap> Elements(g);
> > [ <identity> of ..., f1, f2, f3, f1*f2, f1*f3, f2*f3, f1*f2*f3 ]
> >
> > gap> ele:=Elements(g);
> > [ <identity> of ..., f1, f2, f3, f1*f2, f1*f3, f2*f3, f1*f2*f3 ]
> > gap> Group(ele);
> > <pc group with 8 generators>
> >
> > gap> Group([ <identity> of ..., f1, f2, f3, f1*f2, f1*f3, f2*f3, f1*f2*f3 
> > ]);
> > Syntax error: expression expected
> > Group([ <identity> of ..., f1, f2, f3, f1*f2, f1*f3, f2*f3, f1*f2*f3 ]);
> >         ^
>
> No surprise here, as very often GAP's output isn't even a syntactically 
> correct GAP's input.
>
> What will work here is either
> gap> g.1;
> f1
>
> (and, more generally, g.<i> is f<i>)
>
> So you can either use these g.1, g.2, etc directly, or assign them to 
> variables and use these,
> e.g.
>
> gap> a:=g.1;
>
> Another way to get group's generators is
> gap> GeneratorsOfGroup(g);
> [ f1, f2, f3 ]
>
> (and so you can use elements of this list)
>
> Yet another way is calling the following function, which performs the 
> assignment of generators of g
> to the corr. global variables (only recommended for interactive work).
>
> gap> AssignGeneratorVariables(g);
> #I  Assigned the global variables [ f1, f2, f3 ]
> gap> f1;
> f1

Really. All your above tips work:

gap> g:=SmallGroup(8,1);
<pc group of size 8 with 3 generators>

gap> GeneratorsOfGroup(g);
[ f1, f2, f3 ]

gap> Group(g.1, g.2, g.3);
<pc group with 3 generators>

gap> AssignGeneratorVariables(g);
#I  Assigned the global variables [ f1, f2, f3 ]

gap> Group(f1, f2, f3);
<pc group with 3 generators>


Another question: How can I create a group that meets the following
requirements?

1. Create a group isomorphic to the above one from scratch.
2. Don't use the already existent generators.
3. Use an arbitrarily named element name.
4. Don't use the permutation group as the isomorphic base.

Yours,
HZ

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

Reply via email to