First time here? Check out the FAQ!

Ask Your Question
1

symmetric group: get back conjugacy class from its generators

asked 5 years ago

rue82 gravatar image

The function below returns a list r of elements of the symmetric group that leave a certain polynomial f fixed. I know (by the properties of f that I'm not specifiying here) that the list of g's that leave it fixed generate one of the 11 conjugacy subclasses of S(4). What is the best way to output from my code below a number between 1 and 11 that corresponds to such subclass?

R = PolynomialRing(QQ, 4, ["q1","q2","q3","q4"])
q1,q2,q3,q4 = R.gens()
f = 1 + q1 +q2 # in general, it is a polynomial with unit coefficients in the ring R
G = SymmetricGroup(4)
cl = G.conjugacy_classes_subgroups()
r = []
for g in G:
     if (f * g) == f: r.append(g)
return r
Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 5 years ago

rburing gravatar image

Unfortunately the method conjugacy_classes_subgroups returns representatives, unlike GAP, which returns objects representing conjugacy classes. It would be nicer to have such objects in SageMath as well.

Fortunately we can still use the underlying interface to GAP:

H = G.subgroup(r)
gap_cl = G.gap().ConjugacyClassesSubgroups()
gap_H = H.gap()
cl_index_of_H = next(k for (k,gap_c) in enumerate(gap_cl) if gap_H in gap_c)

and then (using that the ordering of cl is the same as gap_cl):

sage: cl[cl_index_of_H]
Subgroup generated by [(3,4), (1,2)(3,4)] of (Symmetric group of order 4! as a permutation group)
Preview: (hide)
link

Comments

Looking at both your answer and mine, would it be possible to outpu a number between 1 and 11 instead of 'Subgroup generated by...'?

rue82 gravatar imagerue82 ( 5 years ago )
1

That would be cl_index_of_H + 1.

rburing gravatar imagerburing ( 5 years ago )
0

answered 5 years ago

rue82 gravatar image

updated 5 years ago

This is my attempt (edit):

R = PolynomialRing(QQ, 4, ["q1","q2","q3","q4"])
q1,q2,q3,q4 = R.gens()
f = 1+q1+q2 # for example
G = SymmetricGroup(4)
r = []
for g in G:
    if (f * g) == f: r.append(g)
H = PermutationGroup(r)
return ConjugacyClass(H, G)
Preview: (hide)
link

Comments

Be careful that isomorphism is weaker than conjugacy, so this doesn't always work (it gives "false positives").

rburing gravatar imagerburing ( 5 years ago )

@rburing Thanks, indeed I corrected.

rue82 gravatar imagerue82 ( 5 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 5 years ago

Seen: 490 times

Last updated: Jan 22 '20