Goal
Test the subgroup relation, compute a centralizer, and scan all subgroup
classes with ConjugacyClassesSubgroups / Representative. The tools for
showing "this factor centralises that one" and "this group has no subgroup of
order n."
Concept
Centralizer(G, x) is everything in G commuting with x (an element or a
subgroup); it's the algebraic form of "what leaves this structure alone." The set
of all subgroups up to conjugacy is ConjugacyClassesSubgroups(G). That's a list of
classes, each with a Representative. That lets you ask existence questions
("is there a subgroup of order 60?") by scanning representatives, which is how
you rule out a wrong guess about a group's structure.
Commands to try
S4 := SymmetricGroup(4);
H := Subgroup(S4, [ (1,2,3,4) ]);
Size(H);
IsSubgroup(S4, H);
Expect 4 and true. Subgroup(G, gens) builds a subgroup from generators that
already live in G; IsSubgroup(G, H) tests containment.
c := Centralizer(S4, (1,2,3,4) );
Size(c);
Elements(c);
Predict the size: what commutes with a 4-cycle in S4? (A 4-cycle generates a
cyclic group of order 4, and in S4 little else commutes with it.) Then check that
the centralizer here is the cyclic group ⟨(1,2,3,4)⟩ itself, order 4.
Centralizer(S4, Subgroup(S4, [(1,2)(3,4), (1,3)(2,4)]) );
The centralizer of a whole subgroup (the Klein four V). Same function,
subgroup argument: it returns everything commuting with all of V.
Scanning subgroup classes
ccs := ConjugacyClassesSubgroups(A4);; # A4 first; it's small
Length(ccs);
List(ccs, c -> Size(Representative(c)));
where A4 := AlternatingGroup(4);;. Each class gives one Representative
subgroup; mapping Size over the representatives shows which subgroup orders
occur. Predict: A4 has order 12; does an order-6 subgroup appear? (Famously,
A4 has no subgroup of order 6 - watch 6 be absent from the list.)
ForAny(ConjugacyClassesSubgroups(A4), c -> Size(Representative(c)) = 6);
Expect false. The GAP one-liner for "no order-6 subgroup," the same shape as
any "does a subgroup of order n exist?" check.
Predict-then-check
Build the direct-product-style centralizer reading on a toy:
G := SymmetricGroup(5);;
z := (1,2,3,4,5);;
Centralizer(G, z) = Group(z);
Size(Centralizer(G, z));
Predict: in S5, what commutes with a 5-cycle? Is the centralizer exactly the
cyclic group it generates, and what is its order?
Exercise
- In
S4, computeCentralizer(S4, (1,2)). Predict its size (what commutes with a single transposition?) before checking. - Using
ConjugacyClassesSubgroups(SymmetricGroup(4)), list the distinct subgroup orders that occur (useSet+List+Representative+Size). Compare against the divisors of 24 - which divisors are missing? - Write the one-liner that answers "does
A5have a subgroup of order 30?" (Predict the truth value:A5is simple. Then verify.) - Foreshadow the capstone: confirm
ForAny(ConjugacyClassesSubgroups(SymmetricGroup(4)), c -> Size(Representative(c))=12)and identify which subgroup of order 12 that is.
Pitfalls
Centralizer(G, x)accepts an element or a subgroup asx. The centre is the special caseCentralizer(G, G) = Center(G).ConjugacyClassesSubgroupsis exponential in general - fine forA4,S4, and other small groups, but do not call it on a group with millions of elements. Existence questions on big groups need other tools instead.Representative(c)gives one subgroup from the class; other members are its conjugates. Two different classes can share the same order -Setof sizes collapses that, which is what you usually want for an existence scan.Subgroup(G, gens)requires the generators to already be elements ofG;Group(gens)builds a standalone group instead. UseSubgroupwhen you want the containment relationship tracked.- A centralizer is itself a group object. You can take its
Size,Center, feed it back intoIsSubgroup, etc.