Goal
Build a group from generators, ask its Size, recognise the standard families
SymmetricGroup/AlternatingGroup, and read the structural predicates
IsAbelian, IsPerfect, Center. Theses are the the important structural details about a Group that you studied heavily in Hungerford.
Concept
A permutation group is the set of all products of some generators. You give
GAP a handful of permutations; it knows (via serious algorithms) the whole group
they generate, often astronomically large, without listing it. Group(g1,g2)
builds it; Size returns the order; predicates like IsPerfect answer
structural questions. A5 (the icosahedral simple group) is
AlternatingGroup(5).
Commands to try
G := Group( (1,2,3), (1,2) );
Size(G);
Predict before checking: these two generate all of S_3. Expect 6. Group(…)
takes generators; Size computes the order without enumerating blindly.
GeneratorsOfGroup(G);
The generators you gave back (as a list). A group remembers a generating set.
S5 := SymmetricGroup(5);
Size(S5);
A5 := AlternatingGroup(5);
Size(A5);
Expect 120 and 60. These constructors build the standard groups directly. There are
no generators to type.
IsAbelian(A5);
IsPerfect(A5);
Expect false then true. Perfect means G = [G,G] (it equals its own
commutator subgroup). Equivalently, no nontrivial abelian quotient. A5 is the
smallest nonabelian simple group, hence perfect. IsPerfect is the predicate you
reach for whenever you need to know a group has no nontrivial abelian quotient.
Center(A5);
Size(Center(A5));
Expect the trivial group and 1. A5 is simple, so its center is trivial.
(Contrast: an abelian group is all center Size(Center(G)) = Size(G).)
IsSimple(A5);
Expect true.
Predict-then-check
The Klein four-group sits inside A4. Predict each:
V := Group( (1,2)(3,4), (1,3)(2,4) );
Size(V);
IsAbelian(V);
Size(Center(V));
(Two commuting double-transpositions. How big is the group, and since it's abelian, what must its centre equal?)
Exercise
- Build
S4two ways: asSymmetricGroup(4)and asGroup( (1,2,3,4), (1,2) ). Confirm both haveSize24. Are they=as GAP objects? (TryG1 = G2.) - For
A5: confirmIsPerfectistrueandIsAbelianisfalse, and thatSize(DerivedSubgroup(A5)) = 60(perfect ⟺ derived subgroup is the whole group). - Find a generator pair for the cyclic group of order 5 inside
A5, build it withGroup, and check itsSizeand thatIsAbelianistrue. - Predict, then check,
IsPerfect(SymmetricGroup(5)). (IsS5equal to its own commutator subgroup?)
Pitfalls
Order(G)andSize(G)both give the group order and agree - butOrderis overloaded (it's also an element's order, Lesson 07). For groups, preferSize; useSize(...)for a group's order andOrder(elt)for an element's.- Two groups can be equal as sets (
G1 = G2true) without being the same object; andIsSubgroup/=compare the actual point-sets, soS4built two ways with the same moved points will compare equal. Group(gens)withgensa list also works:Group([g1,g2]). Mixing the two forms is fine.IsPerfect,IsSimple,Centercan be expensive on huge groups but are instant onA5/S5. Don't fear them here; do respect them at large-group scale.- A trivial group prints as
Group(())and hasSize1: that's the centre of a simple group, not an error.