Nicer Output in GAP

105 Views Asked by At

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.

1

There are 1 best solutions below

1
On BEST ANSWER

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 ]