4
$\begingroup$

I was wondering if there is a way to get a nicer output in GAP I would like this:

Elements(GF(2));
[ 0*Z(2), Z(2)^0 ]
Elements(CyclicGroup(4));
[ <identity> of ..., f1, f2, f1*f2 ]

to look something like this:

Elements(GF(2));
[ 0, 1 ]
Elements(CyclicGroup(4));
[ 1, x, x^2, x^3 ]

I'm fairly new to GAP, but I doubt I'll miss whatever benefits come with this awkward notation.

$\endgroup$
4
$\begingroup$

The notation that might be looking initially weird is due to how objects are represented internally, sometimes with a view to more complicated structures or algorithm efficiency.

What you can do is to turn on a "teaching mode" in which the display of finite field elements is closer to what you want.

gap> TeachingMode(true);
#I  Teaching mode is turned ON
gap> Elements(GF(2));
[ ZmodnZObj(0,2), ZmodnZObj(1,2) ]

You can also force a cyclic group into the representation as finitely presented group, thus ensuring all elements are represented as powers of the single generator:

gap> Elements(CyclicGroup(IsFpGroup,4));
[ <identity ...>, a, a^2, a^3 ]
$\endgroup$
  • $\begingroup$ This looks good! I'll play around with it when I get home, and probably mark as solved. Thanks. $\endgroup$ – CanofDrink Jun 21 '17 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.