First time here? Check out the FAQ!

Ask Your Question
0

cycle_index as element of PolynomialRing

asked 11 years ago

Ivo Hedtke gravatar image

updated 11 years ago

vdelecroix gravatar image

How do I get the cycle_index of a group as an element of PolynomialRing(QQ,...)? For example I tried

G=SymmetricGroup(3)
p=G.cycle_index()

But I want p as an element of PolynomialRing(QQ,3,"xyz").

Preview: (hide)

Comments

How can it be on x,y,z ? you want x for the 1-cycle class, y for the 2-cycle class and z for the 3-cycle one ?

vdelecroix gravatar imagevdelecroix ( 11 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 11 years ago

vdelecroix gravatar image

updated 11 years ago

(first try) what you want might be the following

sage: G = SymmetricGroup(3)
sage: p = G.cycle_index()
sage: p.expand(2)
x0^3 + x0^2*x1 + x0*x1^2 + x1^3 + x0^2*x2 + x0*x1*x2 + x1^2*x2 + x0*x2^2 + x1*x2^2 + x2^3

It is not x,y,z but x0,x1,x2.

(second try) In order to obtain the same polynomial as in GAP, you may define a morphism from symmetric functions to the polynomial ring in x,y,z. Hopefully, it is not that hard as you only need to define it on the basis.

The following defines the polynomial ring as well as a function that given a partition returns the associated monomial in R

R.<x,y,z> = PolynomialRing(QQ,'x,y,z')
def partition_to_xyz(p):
    e = p.to_exp_dict()
    return x^e.get(1,0) * y^e.get(2,0) * z^e.get(3,0)

you can check

sage: partition_to_xyz(Partition([3]))
z
sage: partition_to_xyz(Partition([1,1,1]))
x^3

then to define the morphism, simply do

sage: Sym = SymmetricFunctions(QQ).power()
sage: phi = Sym.module_morphism(on_basis=partition_to_xyz, codomain=R)

and then

sage: G = SymmetricGroup(3)
sage: p = G.cycle_index()
sage: phi(p)
1/6*x^3 + 1/2*x*y + 1/3*z

You may have a look at the documentation of symmetric functions.

Preview: (hide)
link

Comments

But `gap.CycleIndex(G)` tells me something different.

Ivo Hedtke gravatar imageIvo Hedtke ( 11 years ago )

There are plenty of different possible basis. The gap answer is the same as Sage: you only need to replace p[1,1,1] by x_1^3, p[2,1] by x_2 x_1 and p[3] by x_3.

vdelecroix gravatar imagevdelecroix ( 11 years ago )

But I don't want to do it by hand. I would like to have the result of GAP, but as an element of PolynomialRing(QQ,3,"xyz").

Ivo Hedtke gravatar imageIvo Hedtke ( 11 years ago )

See my updated answer.

vdelecroix gravatar imagevdelecroix ( 11 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

Stats

Asked: 11 years ago

Seen: 302 times

Last updated: Jul 11 '13