Ask Your Question
1

PermutationGroupMorphism_im_gens

asked 2016-11-24 17:51:17 +0100

fagui gravatar image

I'm trying this code (taken from "Adventures in Group Theory"). I get an error, why ?

G=SymmetricGroup(4)
gensG=G.gens()
h=G([(1,3,4,2)]) # a 'random' element of G
gensG_h=[h*g*h^(-1) for g in gensG]

phi = PermutationGroupMorphism_im_gens(G,G,gensG,gensG_h)
phi.image(G)
phi.range()

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_78.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("cGhpID0gUGVybXV0YXRpb25Hcm91cE1vcnBoaXNtX2ltX2dlbnMoRyxHLGdlbnNHLGdlbnNHX2gp"),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>

File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmplbPZy2/___code___.py", line 2, in <module> exec compile(u'phi = PermutationGroupMorphism_im_gens(G,G,gensG,gensG_h) File "", line 1, in <module>

TypeError: __init__() takes at most 4 arguments (5 given)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-11-24 20:46:45 +0100

tmonteil gravatar image

You can get the documentation of PermutationGroupMorphism_im_gens (which i admit is pretty poor) as follows:

sage: PermutationGroupMorphism_im_gens?

As you can see, you have only 3 arguments:

  1. the group that serves as the domain
  2. the group that serves as the codomain
  3. the list of images (in the codomain) of "the" generators of the domain by the morphism you want to construct

So in your case, i do not have a copy of the book, but i guess that you want to define the inner automorphism (a.k.a. conjugacy), from G to G that maps $g$ to $hgh^{-1}$.

So the first argument is G, the second is G and the third is the list of images of G.gens() by the inner automorphism, that is [h*g*h^(-1) for g in gensG] (which you named gensG_h). Hence, you can define your morphism as:

sage: phi = PermutationGroupMorphism_im_gens(G,G,gensG_h)
sage: phi
Permutation group endomorphism of Symmetric group of order 4! as a permutation group
  Defn: [(1,2,3,4), (1,2)] -> [(1,3,2,4), (2,4)]
sage: phi.image(G)
Subgroup of (Symmetric group of order 4! as a permutation group) generated by [(2,4), (1,3,2,4)]

However, there is no range method (which would have lead to the same result anyway).

Cou can check that phi a bijection:

sage: phi.kernel()
Subgroup of (Symmetric group of order 4! as a permutation group) generated by [()]
sage: phi.image(G) == G
True
edit flag offensive delete link more

Comments

thanks for your answer.

the book is quite old (from 2008) so I guess the functions had not the same signature, and some other functions have been removed.

fagui gravatar imagefagui ( 2016-11-25 05:06:30 +0100 )edit

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: 2016-11-24 17:51:17 +0100

Seen: 679 times

Last updated: Nov 24 '16