Ask Your Question
1

using GAP: Group Theory

asked 2016-11-25 08:50:39 +0100

fagui gravatar image

I'm trying this code base on the book "Adventures in Group Theory" from D.Joyner

MS=MatrixSpace(GF(2),3,3) 
A=MS([0,1,0,1,0,0,0,0,1]) 
B=MS([1,0,0,0,0,1,0,1,0])
G=MatrixGroup([A,B]) G1=SymmetricGroup(3)
imG=G._gap_().IsomorphismPermGroup().Image(G._gap_())
imG

Sym( [ 2 .. 4 ] )

gens=imG.GeneratorsOfGroup()
gens

[ (3,4), (2,3) ]

G2=PermutationGroup([(3,4),(2,3)])
G2.is_isomorphic(G1)

True

However, there seems to be a signature problem the following commands don't work: (the first one was from the book, I tried myself the second one)

G2=PermutationGroup(gens)

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

File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpHRYMWK/___code___.py", line 2, in <module> exec compile(u'G2=PermutationGroup(gens) File "", line 1, in <module>

File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 343, in PermutationGroup raise TypeError("gens must be a tuple, list, or GapElement") TypeError: gens must be a tuple, list, or GapElement

G2=PermutationGroup(list(gens))

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

File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpOxJAnr/___code___.py", line 2, in <module> exec compile(u'G2=PermutationGroup(list(gens)) File "", line 1, in <module>

File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 345, in PermutationGroup canonicalize=canonicalize, category=category) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 419, in __init__ for cycle in x: TypeError: 'sage.libs.gap.element.GapElement_Permutation' object is not iterable

I cannot make much of the documentation. Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-11-29 06:16:15 +0100

jaebond gravatar image

updated 2016-11-29 06:17:42 +0100

Here is the problem:

sage: parent(gens)
C library interface to GAP

Just coerce them to GAP:

sage: parent(gap(gens))
Gap
sage: PermutationGroup(gap(gens))
Permutation Group with generators [(3,4), (2,3)]
edit flag offensive delete link more

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-25 08:50:39 +0100

Seen: 917 times

Last updated: Nov 29 '16